ExtensionAgentDelegate
public protocol ExtensionAgentDelegate : AnyObject
The ExtensionAgentDelegate protocol defines methods that action when ExtensionAgent receives a directive.
The methods of this protocol are all mandatory.
-
Provide a context of
ExtensionAgent. This function should return as soon as possible to reduce request delay.This context is used by the backend proxy server.
For more information, see Backend proxy API Reference.
Declaration
Swift
func extensionAgentRequestContext() -> [String : AnyHashable]? -
Tells the delegate that
ExtensionAgentreceivedactiondirectiveWhen received any data, must call completion block to send an event.
Declaration
Swift
func extensionAgentDidReceiveAction(data: [String : AnyHashable], playServiceId: String, header: Downstream.Header, completion: @escaping (Bool) -> Void)Parameters
dataThe message decoded from json to dictionary received by
actiondirective.playServiceIdThe unique identifier to specify play service.
headerThe header of the originally handled directive.
completionA block to call when you are finished performing the action.
View on GitHub
ExtensionAgentDelegate Protocol Reference