A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_device_provider below:

GCKDeviceProvider Class | Cast | Google for Developers

GCKDeviceProvider Class

Stay organized with collections Save and categorize content based on your preferences.

An abstract base class for performing device discovery and session construction.

Support for additional device types can be added by extending this class. See the GCKDeviceProvider(Protected) category for a list of helper methods intended for use by subclasses. New device providers are registered with the framework using registerDeviceProvider: (GCKCastContext).

Since
3.0

Inherits NSObject.

- (instancetype) initWithDeviceCategory: (NSString *)  deviceCategory

Designated initializer.

Constructs a new GCKDeviceProvider for devices of the specified type.

Parameters
deviceCategory A string that uniquely identifies the type of device that is managed by by this provider.

Starts a new discovery scan.

This is (commonly) an asynchronous operation. If any of the devices discovered by the previous scan are no longer valid, the provider should unpublish them at this time. Must be overridden by subclasses.

The provider must notify the discovery manager once the scan has been started (and any stale devices have been unpublished) by calling notifyDidStartDiscovery (GCKDeviceProvider(Protected)). If a particular implementation of this method has no asynchronous work to do when starting a scan, it can call the notification method directly before returning.

Stops the discovery scan.

Must be overridden by subclasses.

- (GCKSession *) createSessionForDevice: (GCKDevice *)  device sessionID: (nullable NSString *)  sessionID sessionOptions: (nullable GCKSessionOptions *)  sessionOptions 

Constructs a new session for the given device and optionally an existing session ID.

Must be overridden by subclasses.

Parameters
device The device to connect to. sessionID The ID of the session to resume; or nil to start a new session. sessionOptions The session options, if any; otherwise nil.
Since
4.0
- (GCKSession *) createSessionForDevice: (GCKDevice *)  device sessionID: (nullable NSString *)  sessionID 

Constructs a new session for the given device and optionally an existing session ID.

Parameters
device The device to connect to. sessionID The ID of the session to resume; or nil to start a new session.
Deprecated:
Subclasses should call createSessionForDevice:sessionID:sessionOptions instead.
- (void) notifyDidStartDiscovery - (void) notifyDidPublishDevice: (GCKDevice *)  device - (void) notifyDidUnpublishDevice: (GCKDevice *)  device

Notifies the discovery manager that a previously-published device has been unpublished, because it is no longer available.

Provided by category GCKDeviceProvider(Protected).

- (void) notifyDidUpdateDevice: (GCKDevice *)  device

Notifies the discovery manager that one or more of a previously-published device's display attributes (such as friendly name or icons) have changed.

Provided by category GCKDeviceProvider(Protected).

- (GCKDevice *) createDeviceWithID: (NSString *)  deviceID ipAddress: (NSString *)  ipAddress servicePort: (uint16_t)  servicePort 
Deprecated:
Use createDeviceWithID:networkAddress:servicePort: for IPv4 and IPv6 support

Factory method for constructing new GCKDevice instances. The parameters correspond to immutable properties of a GCKDevice.

Parameters
deviceID The unique ID identifying this device. This value must be unique among all GCKDevice objects that are created by this provider. ipAddress The IP address of the device, in numeric form (for example, @"10.0.0.10"). May not be nil. Supports IPv4 only. servicePort The service port on which connections should be made to this device. May be 0 if a service port is not applicable.

Provided by category GCKDeviceProvider(Protected).

- (GCKDevice *) createDeviceWithID: (NSString *)  deviceID networkAddress: (GCKNetworkAddress *)  networkAddress servicePort: (uint16_t)  servicePort 

Factory method for constructing new GCKDevice instances.

The parameters correspond to immutable properties of a GCKDevice.

Parameters
deviceID The unique ID identifying this device. This value must be unique among all GCKDevice objects that are created by this provider. networkAddress The IP address of the device, either IPv4 or IPv6 servicePort The service port on which connections should be made to this device. May be 0 if a service port is not applicable.
Since
4.2

Provided by category GCKDeviceProvider(Protected).

- (NSString*) deviceCategory readnonatomiccopy

A string that uniquely identifies the type of device that will be discovered by this provider.

Whether the scan should be a passive scan.

A passive scan sends discovery queries less frequently, so it is more efficient, but the results will not be as fresh. It's appropriate to do a passive scan when the user is not actively selecting a Cast target. Not all implementations will honor this property.

The array of discovered devices.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-09-18 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["`GCKDeviceProvider` is an abstract base class for discovering and connecting to Cast devices."],["Subclasses extend this class to add support for new device types."],["Device discovery can be started and stopped using the `startDiscovery` and `stopDiscovery` methods."],["Sessions with devices are created using the `createSessionForDevice` methods."],["The `devices` property provides a list of discovered devices."]]],["The `GCKDeviceProvider` class enables device discovery and session creation. Key actions include initializing with a device category, starting and stopping discovery scans, and creating sessions for devices, potentially with existing session IDs and options. Subclasses override `startDiscovery`, `stopDiscovery`, and `createSessionForDevice` methods. The class manages device notifications like publishing, unpublishing, and updating device attributes. It also offers methods to create `GCKDevice` instances. Important properties are `deviceCategory`, `passiveScan`, and `devices`.\n"]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4