| Flutter Linux Embedder |

fl_binary_messenger_private.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_BINARY_MESSENGER_PRIVATE_H_
6 #define FLUTTER_SHELL_PLATFORM_LINUX_FL_BINARY_MESSENGER_PRIVATE_H_
7
8 #include <glib-object.h>
9
10 #include "flutter/shell/platform/embedder/embedder.h"
11 #include "flutter/shell/platform/linux/public/flutter_linux/fl_engine.h"
12
13 G_BEGIN_DECLS
14
15 /**
16 * fl_binary_messenger_new:
17 * @engine: The #FlEngine to communicate with.
18 *
19 * Creates a new #FlBinaryMessenger. The binary messenger will take control of
20 * the engines platform message handler.
21 *
22 * Returns: a new #FlBinaryMessenger.
23 */
24 FlBinaryMessenger* fl_binary_messenger_new(FlEngine* engine);
25
26 /**
27 * fl_binary_messenger_handle_message:
28 * @messenger: an #FlBinaryMessenger.
29 * @channel: channel message received on.
30 * @message: message data.
31 * @response_handle: handle to provide to
32 * fl_engine_send_platform_message_response().
33 *
34 * Handles a message received from the engine. Available for testing purposes.
35 *
36 * Returns: %TRUE if the message is handled.
37 */
38 gboolean fl_binary_messenger_handle_message(
39 FlBinaryMessenger* messenger,
40 const gchar* channel,
41 GBytes* message,
42 const FlutterPlatformMessageResponseHandle* response_handle);
43
44 /**
45 * fl_binary_messenger_shutdown:
46 * @messenger: an #FlBinaryMessenger.
47 *
48 * Shutdown the messenger closing any open channels.
49 */
50 void fl_binary_messenger_shutdown(FlBinaryMessenger* messenger);
51
52 G_END_DECLS
53
54 #endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_BINARY_MESSENGER_PRIVATE_H_
message
const char * message
Definition: fl_accessibility_handler.cc:21
fl_binary_messenger_shutdown
void fl_binary_messenger_shutdown(FlBinaryMessenger *messenger)
Definition: fl_binary_messenger.cc:500
fl_binary_messenger_new
G_BEGIN_DECLS FlBinaryMessenger * fl_binary_messenger_new(FlEngine *engine)
Definition: fl_binary_messenger.cc:391
fl_binary_messenger_handle_message
gboolean fl_binary_messenger_handle_message(FlBinaryMessenger *messenger, const gchar *channel, GBytes *message, const FlutterPlatformMessageResponseHandle *response_handle)
Definition: fl_binary_messenger.cc:478
fl_engine.h