#import <FlutterBinaryMessengerRelay.h>
◆ cleanUpConnection:
Clears out a channel's message handler if that handler is still the one that was created as a result of setMessageHandlerOnChannel:binaryMessageHandler:
.
- Parameters
-
connection | The result from setMessageHandlerOnChannel:binaryMessageHandler: . |
Reimplemented from <FlutterBinaryMessenger>.
Definition at line 9 of file FlutterBinaryMessengerRelay.mm.
75 return [self.parent cleanUpConnection:connection];
76 } else {
77 FML_LOG(WARNING) <<
"Communicating on a dead channel.";
78 }
79}
int64_t FlutterBinaryMessengerConnection
#define FML_LOG(severity)
NSObject< FlutterBinaryMessenger > * parent
◆ initWithParent:
◆ makeBackgroundTaskQueue
TODO(gaaclarke): Remove optional when macos supports Background Platform Channels.
Reimplemented from <FlutterBinaryMessenger>.
Definition at line 9 of file FlutterBinaryMessengerRelay.mm.
40 {
42 return [self.parent makeBackgroundTaskQueue];
43 } else {
44 return nil;
45 };
46}
◆ sendOnChannel:message:
- (void) sendOnChannel: |
|
(NSString*) |
channel |
message: |
|
(NSData*) |
message |
|
|
| |
|
implementation |
Definition at line 9 of file FlutterBinaryMessengerRelay.mm.
24 [self.parent sendOnChannel:channel message:message binaryReply:nil];
25 } else {
26 FML_LOG(WARNING) <<
"Communicating on a dead channel.";
27 }
28}
◆ sendOnChannel:message:binaryReply:
- (void) sendOnChannel: |
|
(NSString*) |
channel |
message: |
|
(NSData*) |
message |
binaryReply: |
|
(FlutterBinaryReply) |
callback |
|
|
| |
|
implementation |
Definition at line 9 of file FlutterBinaryMessengerRelay.mm.
30 :(NSString*)channel
34 [self.parent sendOnChannel:channel message:message binaryReply:callback];
35 } else {
36 FML_LOG(WARNING) <<
"Communicating on a dead channel.";
37 }
38}
NS_ASSUME_NONNULL_BEGIN typedef void(^ FlutterBinaryReply)(NSData *_Nullable reply)
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
◆ setMessageHandlerOnChannel:binaryMessageHandler:
Definition at line 9 of file FlutterBinaryMessengerRelay.mm.
48 :(NSString*)channel
49 binaryMessageHandler:
52 return [self.parent setMessageHandlerOnChannel:channel binaryMessageHandler:handler];
53 } else {
54 FML_LOG(WARNING) <<
"Communicating on a dead channel.";
55 return -1;
56 }
57}
void(^ FlutterBinaryMessageHandler)(NSData *_Nullable message, FlutterBinaryReply reply)
◆ setMessageHandlerOnChannel:binaryMessageHandler:taskQueue:
Definition at line 9 of file FlutterBinaryMessengerRelay.mm.
59 :(NSString*)channel
61 taskQueue:
62 (NSObject<FlutterTaskQueue>*)taskQueue {
64 return [self.parent setMessageHandlerOnChannel:channel
65 binaryMessageHandler:handler
66 taskQueue:taskQueue];
67 } else {
68 FML_LOG(WARNING) <<
"Communicating on a dead channel.";
69 return -1;
70 }
71}
◆ parent
The documentation for this class was generated from the following files: