DIALServiceDiscovery

@interface DIALServiceDiscovery
    : NSObject <SSDPServiceDiscoveryDelegate, DIALDeviceDiscoveryTaskDelegate>

The main class device discovery using the DIAL protocol. It discovers devices that run a DIAL server and HbbTV applications. In the first step of the discovery process, it uses the SSDPServiceDiscovery module to discover services of type DIAL_MultiScreenOrgService1. Subsequently, DIALAppDiscoveryTasks are created and launched to take over the remainder of the HbbTV app discovery: 1) the Device Description request and 2) the Application Information request.

The list of discovered apps can be obtained by calling the getDiscoveredDIALDevices() method.

Events produced: {DIALAppDiscoveryNotif, DIALAppExpiryNotif} 1. DIALAppDiscoveryNotif: an NSNotification object containing a newly discovered HbbTV app, which is broadcast to other objects 2. DIALAppExpiryNotif: an NSNotification object for notifying that an HbbTV app host is off the network and the app has expired.

 Events required: None.
  • The application running on the device discovered via DIAL.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) NSString *applicationName;

    Swift

    var applicationName: String! { get set }
  • Initialiser

    Declaration

    Objective-C

    - (id)initWithApplication:(NSString *)appName;

    Swift

    init!(application appName: String!)

    Parameters

    appName

    name of application/service running on device

    Return Value

    initialised instance

  • Start the DIALServiceDiscovery component

    Declaration

    Objective-C

    - (void)start;

    Swift

    func start()
  • Stop the DIALServiceDiscovery component

    Declaration

    Objective-C

    - (void)stop;

    Swift

    func stop()
  • Get all devices discovered via the DIAL protocol till now.

    Declaration

    Objective-C

    - (NSArray *)getDiscoveredDIALDevices;

    Swift

    func getDiscoveredDIALDevices() -> [Any]!

    Return Value

    array of DIALDevice objects

  • Get all app discovery tasks currently in progress. To abort each task, the abort() methods can be invoked on each DIALDeviceDiscoveryTask object.

    Declaration

    Objective-C

    - (NSArray *)getCurrentDeviceDiscoveryTasks;

    Swift

    func getCurrentDeviceDiscoveryTasks() -> [Any]!

    Return Value

    an array of DIALDeviceDiscoveryTask objects