GCKGenericChannel.h
1 // Copyright 2014 Google Inc.
2 
3 #import <GoogleCast/GCKCastChannel.h>
4 #import <GoogleCast/GCKDefines.h>
5 
6 #import <Foundation/Foundation.h>
7 
8 @protocol GCKGenericChannelDelegate;
9 
10 GCK_ASSUME_NONNULL_BEGIN
11 
19 GCK_EXPORT
21 
25 @property(nonatomic, weak, readwrite, GCK_NULLABLE) id<GCKGenericChannelDelegate> delegate;
26 
33 - (instancetype)initWithNamespace:(NSString *)protocolNamespace NS_DESIGNATED_INITIALIZER;
34 
35 @end
36 
40 GCK_EXPORT
41 @protocol GCKGenericChannelDelegate <NSObject>
42 
46 - (void)castChannel:(GCKGenericChannel *)channel
47  didReceiveTextMessage:(NSString *)message
48  withNamespace:(NSString *)protocolNamespace;
49 
50 @optional
51 
58 - (void)castChannelDidConnect:(GCKGenericChannel *)channel;
59 
66 - (void)castChannelDidDisconnect:(GCKGenericChannel *)channel;
67 
75 - (void)castChannel:(GCKCastChannel *)channel didChangeWritableState:(BOOL)writable;
76 
77 @end
78 
79 GCK_ASSUME_NONNULL_END
NSString * protocolNamespace
The channel&#39;s namespace.
Definition: GCKCastChannel.h:28
A generic GCKCastChannel implementation, suitable for use when subclassing is not desired...
Definition: GCKGenericChannel.h:20
id< GCKGenericChannelDelegate > delegate
The delegate for receiving notifications about changes in the channel&#39;s state.
Definition: GCKGenericChannel.h:25
A virtual communication channel for exchanging messages between a Cast sender and a Cast receiver...
Definition: GCKCastChannel.h:25