Loading...
Searching...
No Matches
flipper_format_stream.h
1#pragma once
2#include <stdlib.h>
3#include <stdbool.h>
4#include <toolbox/stream/stream.h>
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10typedef enum {
11 FlipperStreamValueIgnore,
12 FlipperStreamValueStr,
13 FlipperStreamValueHex,
14 FlipperStreamValueFloat,
15 FlipperStreamValueInt32,
16 FlipperStreamValueUint32,
17 FlipperStreamValueHexUint64,
18 FlipperStreamValueBool,
19} FlipperStreamValue;
20
21typedef struct {
22 const char* key;
23 FlipperStreamValue type;
24 const void* data;
25 size_t data_size;
27
35bool flipper_format_stream_write_value_line(Stream* stream, FlipperStreamWriteData* write_data);
36
48bool flipper_format_stream_read_value_line(
49 Stream* stream,
50 const char* key,
51 FlipperStreamValue type,
52 void* _data,
53 size_t data_size,
54 bool strict_mode);
55
65bool flipper_format_stream_get_value_count(
66 Stream* stream,
67 const char* key,
68 uint32_t* count,
69 bool strict_mode);
70
79bool flipper_format_stream_delete_key_and_write(
80 Stream* stream,
81 FlipperStreamWriteData* write_data,
82 bool strict_mode);
83
91bool flipper_format_stream_write_comment_cstr(Stream* stream, const char* data);
92
93#ifdef __cplusplus
94}
95#endif
Definition flipper_format_stream.h:21
Definition stream_i.h:40