ios build
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017 The Chromium Authors. All rights reserved.
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
@@ -11,72 +11,67 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
/**
|
||||
A message reply callback.
|
||||
|
||||
Used for submitting a binary reply back to a Flutter message sender. Also used
|
||||
in the dual capacity for handling a binary message reply received from Flutter.
|
||||
|
||||
- Parameters:
|
||||
- reply: The reply.
|
||||
* A message reply callback.
|
||||
*
|
||||
* Used for submitting a binary reply back to a Flutter message sender. Also used
|
||||
* in for handling a binary message reply received from Flutter.
|
||||
*
|
||||
* @param reply The reply.
|
||||
*/
|
||||
typedef void (^FlutterBinaryReply)(NSData* _Nullable reply);
|
||||
|
||||
/**
|
||||
A strategy for handling incoming binary messages from Flutter and to send
|
||||
asynchronous replies back to Flutter.
|
||||
|
||||
- Parameters:
|
||||
- message: The message.
|
||||
- reply: A callback for submitting a reply to the sender.
|
||||
* A strategy for handling incoming binary messages from Flutter and to send
|
||||
* asynchronous replies back to Flutter.
|
||||
*
|
||||
* @param message The message.
|
||||
* @param reply A callback for submitting an asynchronous reply to the sender.
|
||||
*/
|
||||
typedef void (^FlutterBinaryMessageHandler)(NSData* _Nullable message, FlutterBinaryReply reply);
|
||||
|
||||
/**
|
||||
A facility for communicating with the Flutter side using asynchronous message
|
||||
passing with binary messages.
|
||||
|
||||
- SeeAlso:
|
||||
- `FlutterBasicMessageChannel`, which supports communication using structured
|
||||
messages.
|
||||
- `FlutterMethodChannel`, which supports communication using asynchronous
|
||||
method calls.
|
||||
- `FlutterEventChannel`, which supports commuication using event streams.
|
||||
* A facility for communicating with the Flutter side using asynchronous message
|
||||
* passing with binary messages.
|
||||
*
|
||||
* Implementated by:
|
||||
* - `FlutterBasicMessageChannel`, which supports communication using structured
|
||||
* messages.
|
||||
* - `FlutterMethodChannel`, which supports communication using asynchronous
|
||||
* method calls.
|
||||
* - `FlutterEventChannel`, which supports commuication using event streams.
|
||||
*/
|
||||
FLUTTER_EXPORT
|
||||
@protocol FlutterBinaryMessenger<NSObject>
|
||||
@protocol FlutterBinaryMessenger <NSObject>
|
||||
/**
|
||||
Sends a binary message to the Flutter side on the specified channel, expecting
|
||||
no reply.
|
||||
|
||||
- Parameters:
|
||||
- channel: The channel name.
|
||||
- message: The message.
|
||||
* Sends a binary message to the Flutter side on the specified channel, expecting
|
||||
* no reply.
|
||||
*
|
||||
* @param channel The channel name.
|
||||
* @param message The message.
|
||||
*/
|
||||
- (void)sendOnChannel:(NSString*)channel message:(NSData* _Nullable)message;
|
||||
|
||||
/**
|
||||
Sends a binary message to the Flutter side on the specified channel, expecting
|
||||
an asynchronous reply.
|
||||
|
||||
- Parameters:
|
||||
- channel: The channel name.
|
||||
- message: The message.
|
||||
- callback: A callback for receiving a reply.
|
||||
* Sends a binary message to the Flutter side on the specified channel, expecting
|
||||
* an asynchronous reply.
|
||||
*
|
||||
* @param channel The channel name.
|
||||
* @param message The message.
|
||||
* @param callback A callback for receiving a reply.
|
||||
*/
|
||||
- (void)sendOnChannel:(NSString*)channel
|
||||
message:(NSData* _Nullable)message
|
||||
binaryReply:(FlutterBinaryReply _Nullable)callback;
|
||||
|
||||
/**
|
||||
Registers a message handler for incoming binary messages from the Flutter side
|
||||
on the specified channel.
|
||||
|
||||
Replaces any existing handler. Use a `nil` handler for unregistering the
|
||||
existing handler.
|
||||
|
||||
- Parameters:
|
||||
- channel: The channel name.
|
||||
- handler: The message handler.
|
||||
* Registers a message handler for incoming binary messages from the Flutter side
|
||||
* on the specified channel.
|
||||
*
|
||||
* Replaces any existing handler. Use a `nil` handler for unregistering the
|
||||
* existing handler.
|
||||
*
|
||||
* @param channel The channel name.
|
||||
* @param handler The message handler.
|
||||
*/
|
||||
- (void)setMessageHandlerOnChannel:(NSString*)channel
|
||||
binaryMessageHandler:(FlutterBinaryMessageHandler _Nullable)handler;
|
||||
|
||||
Reference in New Issue
Block a user