| Flutter Linux Embedder |

fl_standard_message_codec_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_STANDARD_MESSAGE_CODEC_PRIVATE_H_
6 #define FLUTTER_SHELL_PLATFORM_LINUX_FL_STANDARD_MESSAGE_CODEC_PRIVATE_H_
7
8 #include "flutter/shell/platform/linux/public/flutter_linux/fl_standard_message_codec.h"
9
10 G_BEGIN_DECLS
11
12 /**
13 * fl_standard_message_codec_write_size:
14 * @codec: an #FlStandardMessageCodec.
15 * @buffer: buffer to write into.
16 * @size: size value to write.
17 *
18 * Writes a size field in Flutter Standard encoding.
19 */
20 void fl_standard_message_codec_write_size(FlStandardMessageCodec* codec,
21 GByteArray* buffer,
22 uint32_t size);
23
24 /**
25 * fl_standard_message_codec_read_size:
26 * @codec: an #FlStandardMessageCodec.
27 * @buffer: buffer to read from.
28 * @offset: (inout): read position in @buffer.
29 * @value: location to read size.
30 * @error: (allow-none): #GError location to store the error occurring, or
31 * %NULL.
32 *
33 * Reads a size field in Flutter Standard encoding.
34 *
35 * Returns: %TRUE on success.
36 */
37 gboolean fl_standard_message_codec_read_size(FlStandardMessageCodec* codec,
38 GBytes* buffer,
39 size_t* offset,
40 uint32_t* value,
41 GError** error);
42
43 /**
44 * fl_standard_message_codec_write_value:
45 * @codec: an #FlStandardMessageCodec.
46 * @buffer: buffer to write into.
47 * @value: (allow-none): value to write.
48 * @error: (allow-none): #GError location to store the error occurring, or
49 * %NULL.
50 *
51 * Writes an #FlValue in Flutter Standard encoding.
52 *
53 * Returns: %TRUE on success.
54 */
55 gboolean fl_standard_message_codec_write_value(FlStandardMessageCodec* codec,
56 GByteArray* buffer,
57 FlValue* value,
58 GError** error);
59
60 /**
61 * fl_standard_message_codec_read_value:
62 * @codec: an #FlStandardMessageCodec.
63 * @buffer: buffer to read from.
64 * @offset: (inout): read position in @buffer.
65 * @value: location to read size.
66 * @error: (allow-none): #GError location to store the error occurring, or
67 * %NULL.
68 *
69 * Reads an #FlValue in Flutter Standard encoding.
70 *
71 * Returns: a new #FlValue or %NULL on error.
72 */
73 FlValue* fl_standard_message_codec_read_value(FlStandardMessageCodec* codec,
74 GBytes* buffer,
75 size_t* offset,
76 GError** error);
77
78 G_END_DECLS
79
80 #endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_STANDARD_MESSAGE_CODEC_PRIVATE_H_
FlValue
typedefG_BEGIN_DECLS struct _FlValue FlValue
Definition: fl_value.h:40
fl_standard_message_codec_read_size
gboolean fl_standard_message_codec_read_size(FlStandardMessageCodec *codec, GBytes *buffer, size_t *offset, uint32_t *value, GError **error)
Definition: fl_standard_message_codec.cc:477
fl_standard_message_codec_write_value
gboolean fl_standard_message_codec_write_value(FlStandardMessageCodec *codec, GByteArray *buffer, FlValue *value, GError **error)
Definition: fl_standard_message_codec.cc:504
error
const uint8_t uint32_t uint32_t GError ** error
Definition: fl_pixel_buffer_texture_test.cc:40
fl_standard_message_codec_write_size
G_BEGIN_DECLS void fl_standard_message_codec_write_size(FlStandardMessageCodec *codec, GByteArray *buffer, uint32_t size)
Definition: fl_standard_message_codec.cc:463
fl_standard_message_codec_read_value
FlValue * fl_standard_message_codec_read_value(FlStandardMessageCodec *codec, GBytes *buffer, size_t *offset, GError **error)
Definition: fl_standard_message_codec.cc:633
buffer
static const uint8_t buffer[]
Definition: fl_pixel_buffer_texture_test.cc:44
fl_standard_message_codec.h
value
uint8_t value
Definition: fl_standard_message_codec.cc:41