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
ContextInfoDelegatetoContextManagerWhen the context manager receives a getContexts request it queries the registered
ContextInfoDelegatefor updated context.Declaration
Swift
func add(delegate: ContextInfoDelegate)Parameters
delegateThe object that acts as the provider of the ContextManager
-
Remove
ContextInfoDelegatefromContextManagerDeclaration
Swift
func remove(delegate: ContextInfoDelegate)Parameters
delegateThe object to remove
-
Request the
ContextManagerfor context.Request will be sent to the
ContextInfoDelegatevia thecontextInfoRequestContextrequests.Declaration
Swift
func getContexts(completion: @escaping ([ContextInfo]) -> Void)Parameters
completionA completion handler block to execute when all of the requests are finished.
-
Request the
ContextManagerfor context.Request will be sent to the
ContextInfoDelegatevia thecontextInfoRequestContextrequests.[ContextInfo]includes only version information.(Exceptnamespace‘sContextInfo).Declaration
Swift
func getContexts(namespace: String, completion: @escaping ([ContextInfo]) -> Void)Parameters
namespaceMay be
CapabilityAgentCategory.name.completionA completion handler block to execute when all of the requests are finished.
View on GitHub
ContextManageable Protocol Reference