| Flutter Linux Embedder |

fl_value.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_PUBLIC_FLUTTER_LINUX_FL_VALUE_H_
6 #define FLUTTER_SHELL_PLATFORM_LINUX_PUBLIC_FLUTTER_LINUX_FL_VALUE_H_
7
8 #include <glib.h>
9 #include <stdbool.h>
10 #include <stdint.h>
11
12 #if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION)
13 #error "Only <flutter_linux/flutter_linux.h> can be included directly."
14 #endif
15
16 G_BEGIN_DECLS
17
18 /**
19 * FlValue:
20 *
21 * #FlValue is an object that contains the data types used in the platform
22 * channel used by Flutter.
23 *
24 * In Dart the values are represented as follows:
25 * - #FL_VALUE_TYPE_NULL: Null
26 * - #FL_VALUE_TYPE_BOOL: bool
27 * - #FL_VALUE_TYPE_INT: num
28 * - #FL_VALUE_TYPE_FLOAT: num
29 * - #FL_VALUE_TYPE_STRING: String
30 * - #FL_VALUE_TYPE_UINT8_LIST: Uint8List
31 * - #FL_VALUE_TYPE_INT32_LIST: Int32List
32 * - #FL_VALUE_TYPE_INT64_LIST: Int64List
33 * - #FL_VALUE_TYPE_FLOAT32_LIST: Float32List
34 * - #FL_VALUE_TYPE_FLOAT_LIST: Float64List
35 * - #FL_VALUE_TYPE_LIST: List<dynamic>
36 * - #FL_VALUE_TYPE_MAP: Map<dynamic>
37 *
38 * See #FlMessageCodec to encode and decode these values.
39 */
40 typedef struct _FlValue FlValue;
41
42 /**
43 * FlValueType:
44 * @FL_VALUE_TYPE_NULL: The null value.
45 * @FL_VALUE_TYPE_BOOL: A boolean.
46 * @FL_VALUE_TYPE_INT: A 64 bit signed integer.
47 * @FL_VALUE_TYPE_FLOAT: A 64 bit floating point number.
48 * @FL_VALUE_TYPE_STRING: UTF-8 text.
49 * @FL_VALUE_TYPE_UINT8_LIST: An ordered list of unsigned 8 bit integers.
50 * @FL_VALUE_TYPE_INT32_LIST: An ordered list of 32 bit integers.
51 * @FL_VALUE_TYPE_INT64_LIST: An ordered list of 64 bit integers.
52 * @FL_VALUE_TYPE_FLOAT_LIST: An ordered list of floating point numbers.
53 * @FL_VALUE_TYPE_LIST: An ordered list of #FlValue objects.
54 * @FL_VALUE_TYPE_MAP: A map of #FlValue objects keyed by #FlValue object.
55 * @FL_VALUE_TYPE_FLOAT32_LIST: An ordered list of 32bit floating point numbers.
56 *
57 * Types of #FlValue.
58 */
59 typedef enum {
60 // Parts of the public API, so fixing the names is a breaking change.
61 // NOLINTBEGIN(readability-identifier-naming)
62 FL_VALUE_TYPE_NULL,
63 FL_VALUE_TYPE_BOOL,
64 FL_VALUE_TYPE_INT,
65 FL_VALUE_TYPE_FLOAT,
66 FL_VALUE_TYPE_STRING,
67 FL_VALUE_TYPE_UINT8_LIST,
68 FL_VALUE_TYPE_INT32_LIST,
69 FL_VALUE_TYPE_INT64_LIST,
70 FL_VALUE_TYPE_FLOAT_LIST,
71 FL_VALUE_TYPE_LIST,
72 FL_VALUE_TYPE_MAP,
73 FL_VALUE_TYPE_FLOAT32_LIST,
74 // NOLINTEND(readability-identifier-naming)
75 } FlValueType;
76
77 /**
78 * fl_value_new_null:
79 *
80 * Creates an #FlValue that contains a null value. The equivalent Dart type is
81 * null.
82 *
83 * Returns: a new #FlValue.
84 */
85 FlValue* fl_value_new_null();
86
87 /**
88 * fl_value_new_bool:
89 * @value: the value.
90 *
91 * Creates an #FlValue that contains a boolean value. The equivalent Dart type
92 * is a bool.
93 *
94 * Returns: a new #FlValue.
95 */
96 FlValue* fl_value_new_bool(bool value);
97
98 /**
99 * fl_value_new_int:
100 * @value: the value.
101 *
102 * Creates an #FlValue that contains an integer number. The equivalent Dart type
103 * is a num.
104 *
105 * Returns: a new #FlValue.
106 */
107 FlValue* fl_value_new_int(int64_t value);
108
109 /**
110 * fl_value_new_float:
111 * @value: the value.
112 *
113 * Creates an #FlValue that contains a floating point number. The equivalent
114 * Dart type is a num.
115 *
116 * Returns: a new #FlValue.
117 */
118 FlValue* fl_value_new_float(double value);
119
120 /**
121 * fl_value_new_string:
122 * @value: a %NULL-terminated UTF-8 string.
123 *
124 * Creates an #FlValue that contains UTF-8 text. The equivalent Dart type is a
125 * String.
126 *
127 * Returns: a new #FlValue.
128 */
129 FlValue* fl_value_new_string(const gchar* value);
130
131 /**
132 * fl_value_new_string_sized:
133 * @value: a buffer containing UTF-8 text. It does not require a nul terminator.
134 * @value_length: the number of bytes to use from @value.
135 *
136 * Creates an #FlValue that contains UTF-8 text. The equivalent Dart type is a
137 * String.
138 *
139 * Returns: a new #FlValue.
140 */
141 FlValue* fl_value_new_string_sized(const gchar* value, size_t value_length);
142
143 /**
144 * fl_value_new_uint8_list:
145 * @value: an array of unsigned 8 bit integers.
146 * @value_length: number of elements in @value.
147 *
148 * Creates an ordered list containing 8 bit unsigned integers. The data is
149 * copied. The equivalent Dart type is a Uint8List.
150 *
151 * Returns: a new #FlValue.
152 */
153 FlValue* fl_value_new_uint8_list(const uint8_t* value, size_t value_length);
154
155 /**
156 * fl_value_new_uint8_list_from_bytes:
157 * @value: a #GBytes.
158 *
159 * Creates an ordered list containing 8 bit unsigned integers. The data is
160 * copied. The equivalent Dart type is a Uint8List.
161 *
162 * Returns: a new #FlValue.
163 */
164 FlValue* fl_value_new_uint8_list_from_bytes(GBytes* value);
165
166 /**
167 * fl_value_new_int32_list:
168 * @value: an array of signed 32 bit integers.
169 * @value_length: number of elements in @value.
170 *
171 * Creates an ordered list containing 32 bit integers. The equivalent Dart type
172 * is a Int32List.
173 *
174 * Returns: a new #FlValue.
175 */
176 FlValue* fl_value_new_int32_list(const int32_t* value, size_t value_length);
177
178 /**
179 * fl_value_new_int64_list:
180 * @value: an array of signed 64 bit integers.
181 * @value_length: number of elements in @value.
182 *
183 * Creates an ordered list containing 64 bit integers. The equivalent Dart type
184 * is a Int64List.
185 *
186 * Returns: a new #FlValue.
187 */
188 FlValue* fl_value_new_int64_list(const int64_t* value, size_t value_length);
189
190 /**
191 * fl_value_new_float32_list:
192 * @value: an array of floating point numbers.
193 * @value_length: number of elements in @value.
194 *
195 * Creates an ordered list containing 32 bit floating point numbers.
196 * The equivalent Dart type is a Float32List.
197 *
198 * Returns: a new #FlValue.
199 */
200 FlValue* fl_value_new_float32_list(const float* value, size_t value_length);
201
202 /**
203 * fl_value_new_float_list:
204 * @value: an array of floating point numbers.
205 * @value_length: number of elements in @value.
206 *
207 * Creates an ordered list containing floating point numbers. The equivalent
208 * Dart type is a Float64List.
209 *
210 * Returns: a new #FlValue.
211 */
212 FlValue* fl_value_new_float_list(const double* value, size_t value_length);
213
214 /**
215 * fl_value_new_list:
216 *
217 * Creates an ordered list. Children can be added to the list using
218 * fl_value_append(). The children are accessed using fl_value_get_length()
219 * and fl_value_get_list_value(). The equivalent Dart type is a List<dynamic>.
220 *
221 * The following example shows a simple list of values:
222 *
223 * |[<!-- language="C" -->
224 * g_autoptr(FlValue) value = fl_value_new_list ();
225 * fl_value_append_take (value, fl_value_new_string ("one");
226 * fl_value_append_take (value, fl_value_new_int (2);
227 * fl_value_append_take (value, fl_value_new_double (3.0);
228 * ]|
229 *
230 * This value can be decoded using:
231 *
232 * |[<!-- language="C" -->
233 * g_assert (fl_value_get_type (value) == FL_VALUE_TYPE_LIST);
234 * for (size_t i = 0; i < fl_value_get_length (value); i++) {
235 * FlValue *child = fl_value_get_list_value (value, i);
236 * process_value (child);
237 * }
238 * ]|
239 *
240 * Returns: a new #FlValue.
241 */
242 FlValue* fl_value_new_list();
243
244 /**
245 * fl_value_new_list_from_strv:
246 * @value: a %NULL-terminated array of strings.
247 *
248 * Creates an ordered list containing #FlString values.
249 *
250 * Returns: a new #FlValue.
251 */
252 FlValue* fl_value_new_list_from_strv(const gchar* const* value);
253
254 /**
255 * fl_value_new_map:
256 *
257 * Creates an ordered associative array. Children can be added to the map
258 * using fl_value_set(), fl_value_set_take(), fl_value_set_string(),
259 * fl_value_set_string_take(). The children are accessed using
260 * fl_value_get_length(), fl_value_get_map_key(), fl_value_get_map_value(),
261 * fl_value_lookup() and fl_value_lookup_string(). The equivalent Dart type is a
262 * Map<dynamic>.
263 *
264 * The following example shows how to create a map of values keyed by strings:
265 *
266 * |[<!-- language="C" -->
267 * g_autoptr(FlValue) value = fl_value_new_map ();
268 * fl_value_set_string_take (value, "name", fl_value_new_string ("Gandalf"));
269 * fl_value_set_string_take (value, "occupation",
270 * fl_value_new_string ("Wizard"));
271 * fl_value_set_string_take (value, "age", fl_value_new_int (2019));
272 * ]|
273 *
274 * This value can be decoded using:
275 * |[<!-- language="C" -->
276 * g_assert (fl_value_get_type (value) == FL_VALUE_TYPE_MAP);
277 * FlValue *name = fl_value_lookup_string (value, "name");
278 * g_assert (fl_value_get_type (name) == FL_VALUE_TYPE_STRING);
279 * FlValue *age = fl_value_lookup_string (value, "age");
280 * g_assert (fl_value_get_type (age) == FL_VALUE_TYPE_INT);
281 * g_message ("Next customer is %s (%d years old)",
282 * fl_value_get_string (name),
283 * fl_value_get_int (age));
284 * ]|
285 *
286 * Returns: a new #FlValue.
287 */
288 FlValue* fl_value_new_map();
289
290 /**
291 * fl_value_ref:
292 * @value: an #FlValue.
293 *
294 * Increases the reference count of an #FlValue.
295 *
296 * Returns: the value that was referenced.
297 */
298 FlValue* fl_value_ref(FlValue* value);
299
300 /**
301 * fl_value_unref:
302 * @value: an #FlValue.
303 *
304 * Decreases the reference count of an #FlValue. When the reference count hits
305 * zero @value is destroyed and no longer valid.
306 */
307 void fl_value_unref(FlValue* value);
308
309 /**
310 * fl_value_get_type:
311 * @value: an #FlValue.
312 *
313 * Gets the type of @value.
314 *
315 * Returns: an #FlValueType.
316 */
317 FlValueType fl_value_get_type(FlValue* value);
318
319 /**
320 * fl_value_equal:
321 * @a: an #FlValue.
322 * @b: an #FlValue.
323 *
324 * Compares two #FlValue to see if they are equivalent. Two values are
325 * considered equivalent if they are of the same type and their data is the same
326 * including any child values. For values of type #FL_VALUE_TYPE_MAP the order
327 * of the values does not matter.
328 *
329 * Returns: %TRUE if both values are equivalent.
330 */
331 bool fl_value_equal(FlValue* a, FlValue* b);
332
333 /**
334 * fl_value_append:
335 * @value: an #FlValue of type #FL_VALUE_TYPE_LIST.
336 * @child: an #FlValue.
337 *
338 * Adds @child to the end of @value. Calling this with an #FlValue that is not
339 * of type #FL_VALUE_TYPE_LIST is a programming error.
340 */
341 void fl_value_append(FlValue* value, FlValue* child);
342
343 /**
344 * fl_value_append_take:
345 * @value: an #FlValue of type #FL_VALUE_TYPE_LIST.
346 * @child: (transfer full): an #FlValue.
347 *
348 * Adds @child to the end of @value. Ownership of @child is taken by @value.
349 * Calling this with an #FlValue that is not of type #FL_VALUE_TYPE_LIST is a
350 * programming error.
351 */
352 void fl_value_append_take(FlValue* value, FlValue* child);
353
354 /**
355 * fl_value_set:
356 * @value: an #FlValue of type #FL_VALUE_TYPE_MAP.
357 * @key: an #FlValue.
358 * @child_value: an #FlValue.
359 *
360 * Sets @key in @value to @child_value. If an existing value was in the map with
361 * the same key it is replaced. Calling this with an #FlValue that is not of
362 * type #FL_VALUE_TYPE_MAP is a programming error.
363 */
364 void fl_value_set(FlValue* value, FlValue* key, FlValue* child_value);
365
366 /**
367 * fl_value_set_take:
368 * @value: an #FlValue of type #FL_VALUE_TYPE_MAP.
369 * @key: (transfer full): an #FlValue.
370 * @child_value: (transfer full): an #FlValue.
371 *
372 * Sets @key in @value to @child_value. Ownership of both @key and @child_value
373 * is taken by @value. If an existing value was in the map with the same key it
374 * is replaced. Calling this with an #FlValue that is not of type
375 * #FL_VALUE_TYPE_MAP is a programming error.
376 */
377 void fl_value_set_take(FlValue* value, FlValue* key, FlValue* child_value);
378
379 /**
380 * fl_value_set_string:
381 * @value: an #FlValue of type #FL_VALUE_TYPE_MAP.
382 * @key: a UTF-8 text key.
383 * @child_value: an #FlValue.
384 *
385 * Sets a value in the map with a text key. If an existing value was in the map
386 * with the same key it is replaced. Calling this with an #FlValue that is not
387 * of type #FL_VALUE_TYPE_MAP is a programming error.
388 */
389 void fl_value_set_string(FlValue* value,
390 const gchar* key,
391 FlValue* child_value);
392
393 /**
394 * fl_value_set_string_take:
395 * @value: an #FlValue of type #FL_VALUE_TYPE_MAP.
396 * @key: a UTF-8 text key.
397 * @child_value: (transfer full): an #FlValue.
398 *
399 * Sets a value in the map with a text key, taking ownership of the value. If an
400 * existing value was in the map with the same key it is replaced. Calling this
401 * with an #FlValue that is not of type #FL_VALUE_TYPE_MAP is a programming
402 * error.
403 */
404 void fl_value_set_string_take(FlValue* value,
405 const gchar* key,
406 FlValue* child_value);
407
408 /**
409 * fl_value_get_bool:
410 * @value: an #FlValue of type #FL_VALUE_TYPE_BOOL.
411 *
412 * Gets the boolean value of @value. Calling this with an #FlValue that is
413 * not of type #FL_VALUE_TYPE_BOOL is a programming error.
414 *
415 * Returns: a boolean value.
416 */
417 bool fl_value_get_bool(FlValue* value);
418
419 /**
420 * fl_value_get_int:
421 * @value: an #FlValue of type #FL_VALUE_TYPE_INT.
422 *
423 * Gets the integer number of @value. Calling this with an #FlValue that is
424 * not of type #FL_VALUE_TYPE_INT is a programming error.
425 *
426 * Returns: an integer number.
427 */
428 int64_t fl_value_get_int(FlValue* value);
429
430 /**
431 * fl_value_get_float:
432 * @value: an #FlValue of type #FL_VALUE_TYPE_FLOAT.
433 *
434 * Gets the floating point number of @value. Calling this with an #FlValue
435 * that is not of type #FL_VALUE_TYPE_FLOAT is a programming error.
436 *
437 * Returns: a floating point number.
438 */
439 double fl_value_get_float(FlValue* value);
440
441 /**
442 * fl_value_get_string:
443 * @value: an #FlValue of type #FL_VALUE_TYPE_STRING.
444 *
445 * Gets the UTF-8 text contained in @value. Calling this with an #FlValue
446 * that is not of type #FL_VALUE_TYPE_STRING is a programming error.
447 *
448 * Returns: a UTF-8 encoded string.
449 */
450 const gchar* fl_value_get_string(FlValue* value);
451
452 /**
453 * fl_value_get_length:
454 * @value: an #FlValue of type #FL_VALUE_TYPE_UINT8_LIST,
455 * #FL_VALUE_TYPE_INT32_LIST, #FL_VALUE_TYPE_INT64_LIST,
456 * #FL_VALUE_TYPE_FLOAT32_LIST, #FL_VALUE_TYPE_FLOAT_LIST, #FL_VALUE_TYPE_LIST
457 * or #FL_VALUE_TYPE_MAP.
458 *
459 * Gets the number of elements @value contains. This is only valid for list
460 * and map types. Calling this with other types is a programming error.
461 *
462 * Returns: the number of elements inside @value.
463 */
464 size_t fl_value_get_length(FlValue* value);
465
466 /**
467 * fl_value_get_uint8_list:
468 * @value: an #FlValue of type #FL_VALUE_TYPE_UINT8_LIST.
469 *
470 * Gets the array of unisigned 8 bit integers @value contains. The data
471 * contains fl_value_get_length() elements. Calling this with an #FlValue that
472 * is not of type #FL_VALUE_TYPE_UINT8_LIST is a programming error.
473 *
474 * Returns: an array of unsigned 8 bit integers.
475 */
476 const uint8_t* fl_value_get_uint8_list(FlValue* value);
477
478 /**
479 * fl_value_get_int32_list:
480 * @value: an #FlValue of type #FL_VALUE_TYPE_INT32_LIST.
481 *
482 * Gets the array of 32 bit integers @value contains. The data contains
483 * fl_value_get_length() elements. Calling this with an #FlValue that is not of
484 * type #FL_VALUE_TYPE_INT32_LIST is a programming error.
485 *
486 * Returns: an array of 32 bit integers.
487 */
488 const int32_t* fl_value_get_int32_list(FlValue* value);
489
490 /**
491 * fl_value_get_int64_list:
492 * @value: an #FlValue of type #FL_VALUE_TYPE_INT64_LIST.
493 *
494 * Gets the array of 64 bit integers @value contains. The data contains
495 * fl_value_get_length() elements. Calling this with an #FlValue that is not of
496 * type #FL_VALUE_TYPE_INT64_LIST is a programming error.
497 *
498 * Returns: an array of 64 bit integers.
499 */
500 const int64_t* fl_value_get_int64_list(FlValue* value);
501
502 /**
503 * fl_value_get_float32_list:
504 * @value: an #FlValue of type #FL_VALUE_TYPE_FLOAT32_LIST.
505 *
506 * Gets the array of floating point numbers @value contains. The data
507 * contains fl_value_get_length() elements. Calling this with an #FlValue that
508 * is not of type #FL_VALUE_TYPE_FLOAT32_LIST is a programming error.
509 *
510 * Returns: an array of floating point numbers.
511 */
512 const float* fl_value_get_float32_list(FlValue* value);
513
514 /**
515 * fl_value_get_float_list:
516 * @value: an #FlValue of type #FL_VALUE_TYPE_FLOAT_LIST.
517 *
518 * Gets the array of floating point numbers @value contains. The data
519 * contains fl_value_get_length() elements. Calling this with an #FlValue that
520 * is not of type #FL_VALUE_TYPE_FLOAT_LIST is a programming error.
521 *
522 * Returns: an array of floating point numbers.
523 */
524 const double* fl_value_get_float_list(FlValue* value);
525
526 /**
527 * fl_value_get_list_value:
528 * @value: an #FlValue of type #FL_VALUE_TYPE_LIST.
529 * @index: an index in the list.
530 *
531 * Gets a child element of the list. It is a programming error to request an
532 * index that is outside the size of the list as returned from
533 * fl_value_get_length(). Calling this with an #FlValue that is not of type
534 * #FL_VALUE_TYPE_LIST is a programming error.
535 *
536 * Returns: an #FlValue.
537 */
538 FlValue* fl_value_get_list_value(FlValue* value, size_t index);
539
540 /**
541 * fl_value_get_map_key:
542 * @value: an #FlValue of type #FL_VALUE_TYPE_MAP.
543 * @index: an index in the map.
544 *
545 * Gets a key from the map. It is a programming error to request an index that
546 * is outside the size of the list as returned from fl_value_get_length().
547 * Calling this with an #FlValue that is not of type #FL_VALUE_TYPE_MAP is a
548 * programming error.
549 *
550 * Returns: an #FlValue.
551 */
552 FlValue* fl_value_get_map_key(FlValue* value, size_t index);
553
554 /**
555 * fl_value_get_map_value:
556 * @value: an #FlValue of type #FL_VALUE_TYPE_MAP.
557 * @index: an index in the map.
558 *
559 * Gets a value from the map. It is a programming error to request an index that
560 * is outside the size of the list as returned from fl_value_get_length().
561 * Calling this with an #FlValue that is not of type #FL_VALUE_TYPE_MAP is a
562 * programming error.
563 *
564 * Returns: an #FlValue.
565 */
566 FlValue* fl_value_get_map_value(FlValue* value, size_t index);
567
568 /**
569 * fl_value_lookup:
570 * @value: an #FlValue of type #FL_VALUE_TYPE_MAP.
571 * @key: a key value.
572 *
573 * Gets the map entry that matches @key. Keys are checked using
574 * fl_value_equal(). Calling this with an #FlValue that is not of type
575 * #FL_VALUE_TYPE_MAP is a programming error.
576 *
577 * Map lookups are not optimized for performance - if you have a large map or
578 * need frequent access you should copy the data into another structure, e.g.
579 * #GHashTable.
580 *
581 * Returns: (allow-none): the value with this key or %NULL if not one present.
582 */
583 FlValue* fl_value_lookup(FlValue* value, FlValue* key);
584
585 /**
586 * fl_value_lookup_string:
587 * @value: an #FlValue of type #FL_VALUE_TYPE_MAP.
588 * @key: a key value.
589 *
590 * Gets the map entry that matches @key. Keys are checked using
591 * fl_value_equal(). Calling this with an #FlValue that is not of type
592 * #FL_VALUE_TYPE_MAP is a programming error.
593 *
594 * Map lookups are not optimized for performance - if you have a large map or
595 * need frequent access you should copy the data into another structure, e.g.
596 * #GHashTable.
597 *
598 * Returns: (allow-none): the value with this key or %NULL if not one present.
599 */
600 FlValue* fl_value_lookup_string(FlValue* value, const gchar* key);
601
602 /**
603 * fl_value_to_string:
604 * @value: an #FlValue.
605 *
606 * Converts an #FlValue to a text representation, suitable for logging purposes.
607 * The text is formatted to be the equivalent of Dart toString() methods.
608 *
609 * Returns: UTF-8 text.
610 */
611 gchar* fl_value_to_string(FlValue* value);
612
613 G_DEFINE_AUTOPTR_CLEANUP_FUNC(FlValue, fl_value_unref)
614
615 G_END_DECLS
616
617 #endif // FLUTTER_SHELL_PLATFORM_LINUX_PUBLIC_FLUTTER_LINUX_FL_VALUE_H_
FL_VALUE_TYPE_UINT8_LIST
@ FL_VALUE_TYPE_UINT8_LIST
Definition: fl_value.h:67
FL_VALUE_TYPE_MAP
@ FL_VALUE_TYPE_MAP
Definition: fl_value.h:72
fl_value_new_int
FlValue * fl_value_new_int(int64_t value)
Definition: fl_value.cc:251
fl_value_new_list_from_strv
FlValue * fl_value_new_list_from_strv(const gchar *const *value)
Definition: fl_value.cc:345
fl_value_append_take
void fl_value_append_take(FlValue *value, FlValue *child)
Definition: fl_value.cc:560
fl_value_new_string_sized
FlValue * fl_value_new_string_sized(const gchar *value, size_t value_length)
Definition: fl_value.cc:272
fl_value_new_float
FlValue * fl_value_new_float(double value)
Definition: fl_value.cc:258
fl_value_unref
void fl_value_unref(FlValue *value)
Definition: fl_value.cc:369
FlValue
typedefG_BEGIN_DECLS struct _FlValue FlValue
Definition: fl_value.h:40
fl_value_get_map_value
FlValue * fl_value_get_map_value(FlValue *value, size_t index)
Definition: fl_value.cc:751
FL_VALUE_TYPE_LIST
@ FL_VALUE_TYPE_LIST
Definition: fl_value.h:71
fl_value_get_list_value
FlValue * fl_value_get_list_value(FlValue *value, size_t index)
Definition: fl_value.cc:735
FlValueType
FlValueType
Definition: fl_value.h:59
fl_value_ref
FlValue * fl_value_ref(FlValue *value)
Definition: fl_value.cc:363
fl_value_new_float_list
FlValue * fl_value_new_float_list(const double *value, size_t value_length)
Definition: fl_value.cc:328
fl_value_set
void fl_value_set(FlValue *value, FlValue *key, FlValue *child_value)
Definition: fl_value.cc:569
fl_value_equal
bool fl_value_equal(FlValue *a, FlValue *b)
Definition: fl_value.cc:433
FL_VALUE_TYPE_NULL
@ FL_VALUE_TYPE_NULL
Definition: fl_value.h:62
fl_value_new_float32_list
FlValue * fl_value_new_float32_list(const float *value, size_t value_length)
Definition: fl_value.cc:318
fl_value_new_map
FlValue * fl_value_new_map()
Definition: fl_value.cc:355
fl_value_to_string
gchar * fl_value_to_string(FlValue *value)
Definition: fl_value.cc:781
fl_value_get_type
FlValueType fl_value_get_type(FlValue *value)
Definition: fl_value.cc:428
fl_value_set_string
void fl_value_set_string(FlValue *value, const gchar *key, FlValue *child_value)
Definition: fl_value.cc:599
fl_value_set_string_take
void fl_value_set_string_take(FlValue *value, const gchar *key, FlValue *child_value)
Definition: fl_value.cc:610
FL_VALUE_TYPE_FLOAT32_LIST
@ FL_VALUE_TYPE_FLOAT32_LIST
Definition: fl_value.h:73
fl_value_new_null
FlValue * fl_value_new_null()
Definition: fl_value.cc:240
FL_VALUE_TYPE_STRING
@ FL_VALUE_TYPE_STRING
Definition: fl_value.h:66
fl_value_new_uint8_list
FlValue * fl_value_new_uint8_list(const uint8_t *value, size_t value_length)
Definition: fl_value.cc:281
fl_value_new_bool
FlValue * fl_value_new_bool(bool value)
Definition: fl_value.cc:244
fl_value_append
void fl_value_append(FlValue *value, FlValue *child)
Definition: fl_value.cc:552
fl_value_get_map_key
FlValue * fl_value_get_map_key(FlValue *value, size_t index)
Definition: fl_value.cc:743
fl_value_get_bool
bool fl_value_get_bool(FlValue *value)
Definition: fl_value.cc:621
FL_VALUE_TYPE_INT64_LIST
@ FL_VALUE_TYPE_INT64_LIST
Definition: fl_value.h:69
fl_value_get_length
size_t fl_value_get_length(FlValue *value)
Definition: fl_value.cc:684
FL_VALUE_TYPE_INT
@ FL_VALUE_TYPE_INT
Definition: fl_value.h:64
fl_value_new_list
FlValue * fl_value_new_list()
Definition: fl_value.cc:338
fl_value_new_uint8_list_from_bytes
FlValue * fl_value_new_uint8_list_from_bytes(GBytes *value)
Definition: fl_value.cc:291
fl_value_lookup_string
FlValue * fl_value_lookup_string(FlValue *value, const gchar *key)
Definition: fl_value.cc:770
fl_value_lookup
FlValue * fl_value_lookup(FlValue *value, FlValue *key)
Definition: fl_value.cc:759
fl_value_get_float_list
const double * fl_value_get_float_list(FlValue *value)
Definition: fl_value.cc:677
fl_value_get_int32_list
const int32_t * fl_value_get_int32_list(FlValue *value)
Definition: fl_value.cc:656
fl_value_new_string
FlValue * fl_value_new_string(const gchar *value)
Definition: fl_value.cc:265
FL_VALUE_TYPE_FLOAT_LIST
@ FL_VALUE_TYPE_FLOAT_LIST
Definition: fl_value.h:70
fl_value_get_int64_list
const int64_t * fl_value_get_int64_list(FlValue *value)
Definition: fl_value.cc:663
fl_value_get_string
const gchar * fl_value_get_string(FlValue *value)
Definition: fl_value.cc:642
fl_value_get_float32_list
const float * fl_value_get_float32_list(FlValue *value)
Definition: fl_value.cc:670
fl_value_set_take
void fl_value_set_take(FlValue *value, FlValue *key, FlValue *child_value)
Definition: fl_value.cc:578
fl_value_new_int32_list
FlValue * fl_value_new_int32_list(const int32_t *value, size_t value_length)
Definition: fl_value.cc:298
fl_value_get_float
double fl_value_get_float(FlValue *value)
Definition: fl_value.cc:635
fl_value_new_int64_list
FlValue * fl_value_new_int64_list(const int64_t *value, size_t value_length)
Definition: fl_value.cc:308
fl_value_get_int
int64_t fl_value_get_int(FlValue *value)
Definition: fl_value.cc:628
FL_VALUE_TYPE_FLOAT
@ FL_VALUE_TYPE_FLOAT
Definition: fl_value.h:65
FL_VALUE_TYPE_INT32_LIST
@ FL_VALUE_TYPE_INT32_LIST
Definition: fl_value.h:68
_FlValue
Definition: fl_value.cc:11
FL_VALUE_TYPE_BOOL
@ FL_VALUE_TYPE_BOOL
Definition: fl_value.h:63
value
uint8_t value
Definition: fl_standard_message_codec.cc:41
fl_value_get_uint8_list
const uint8_t * fl_value_get_uint8_list(FlValue *value)
Definition: fl_value.cc:649