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_generic_channel below:

GCKGenericChannel Class | Cast | Google for Developers

GCKGenericChannel Class

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

A generic GCKCastChannel implementation, suitable for use when subclassing is not desired.

GCKGenericChannel forwards message and connectivity events to its delegate, and has no processing logic of its own.

See GCKGenericChannelDelegate for the delegate protocol.

Inherits GCKCastChannel.

- (instancetype) initWithNamespace: (NSString *)  protocolNamespace

Designated initializer.

Parameters
protocolNamespace The namespace for this channel. This namespace must be unique across all channels used by a given application.

Implements GCKCastChannel.

Default initializer is not available.

- (void) didReceiveTextMessage: (NSString *)  message

Called when a text message has been received on this channel.

The default implementation is a no-op.

Parameters
- (BOOL) sendTextMessage: (NSString *)  message error: (GCKError *_Nullable *_Nullable)  error 

Sends a text message on this channel.

Parameters
message The message. error A pointer at which to store the error result. May be nil.
Returns
YES on success or NO if the message could not be sent.
- (NSInteger) generateRequestID

Generates a request ID for a new message.

Returns
The generated ID, or kGCKInvalidRequestID if the channel is not currently connected.
- (nullable NSNumber *) generateRequestNumber

A convenience method which wraps the result of generateRequestID in an NSNumber.

Returns
The generated ID, or nil if the channel is not currently connected.

Called when this channel has been connected, indicating that messages can now be exchanged with the Cast device over this channel.

The default implementation is a no-op.

Called when this channel has been disconnected, indicating that messages can no longer be exchanged with the Cast device over this channel.

The default implementation is a no-op.

- (void) didChangeWritableState: (BOOL)  isWritable

Called when the writable state of this channel has changed.

The default implementation is a no-op.

Parameters
isWritable Whether the channel is now writable.
Since
4.0

The delegate for receiving notifications about changes in the channel's state.

- (NSString*) protocolNamespace readnonatomiccopyinherited

The channel's namespace.

readnonatomicassigninherited

A flag indicating whether this channel is currently connected.

readnonatomicassigninherited

A flag indicating whether this channel is currently writable.

Since
4.0

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."],[[["`GCKGenericChannel` provides a basic implementation of a Cast channel for communication with Cast devices, forwarding events to its delegate without internal processing."],["It allows sending and receiving text messages, managing connection status, and handling writability changes through its delegate."],["Developers can use this class directly or subclass it for custom channel logic using a unique namespace."],["This class inherits properties and methods from the `GCKCastChannel` class, offering standard channel functionalities."],["`GCKGenericChannel` uses a delegate pattern for handling events, requiring the delegate to conform to the `GCKGenericChannelDelegate` protocol."]]],["The `GCKGenericChannel` class, a `GCKCastChannel` implementation, facilitates message exchange between a sender and a receiver without custom processing. It initializes with a unique namespace and forwards connectivity and message events to its delegate. Key actions include initializing with `initWithNamespace:`, sending text messages via `sendTextMessage:error:`, and generating message request IDs with `generateRequestID`. The channel also handles connection events through `didConnect`, `didDisconnect`, and `didChangeWritableState:`, informing the delegate about state changes. It has properties for `delegate`, `protocolNamespace`, `isConnected`, and `isWritable`.\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