ContextManageable
public protocol ContextManageable : AnyObject
Manage capability agent’s context. Context is a container used to communicate the state of the capability agents to server.
-
Add
ContextInfoDelegate
toContextManager
When the context manager receives a getContexts request it queries the registered
ContextInfoDelegate
for updated context.Declaration
Swift
func add(delegate: ContextInfoDelegate)
Parameters
delegate
The object that acts as the provider of the ContextManager
-
Remove
ContextInfoDelegate
fromContextManager
Declaration
Swift
func remove(delegate: ContextInfoDelegate)
Parameters
delegate
The object to remove
-
Request the
ContextManager
for context.Request will be sent to the
ContextInfoDelegate
via thecontextInfoRequestContext
requests.Declaration
Swift
func getContexts(completion: @escaping ([ContextInfo]) -> Void)
Parameters
completion
A completion handler block to execute when all of the requests are finished.
-
Request the
ContextManager
for context.Request will be sent to the
ContextInfoDelegate
via thecontextInfoRequestContext
requests.[ContextInfo]
includes only version information.(Exceptnamespace
‘sContextInfo
).Declaration
Swift
func getContexts(namespace: String, completion: @escaping ([ContextInfo]) -> Void)
Parameters
namespace
May be
CapabilityAgentCategory.name
.completion
A completion handler block to execute when all of the requests are finished.