BSB Developer Docs
Loading...
Searching...
No Matches
storage_message.h
1#pragma once
2#include <furi.h>
3#include <toolbox/api_lock.h>
4#include "filesystem_api_defines.h"
5#include "storage_sd_api.h"
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11typedef struct {
12 File* file;
13 const char* path;
14 FS_AccessMode access_mode;
15 FS_OpenMode open_mode;
16 FuriThreadId thread_id;
18
19typedef struct {
20 File* file;
21 void* buff;
22 uint16_t bytes_to_read;
24
25typedef struct {
26 File* file;
27 const void* buff;
28 uint16_t bytes_to_write;
30
31typedef struct {
32 File* file;
33 uint32_t offset;
34 bool from_start;
36
37typedef struct {
38 File* file;
39 const char* path;
40 FuriThreadId thread_id;
42
43typedef struct {
44 File* file;
45 FileInfo* fileinfo;
46 char* name;
47 uint16_t name_length;
49
50typedef struct {
51 const char* path;
52 uint32_t* timestamp;
53 FuriThreadId thread_id;
55
56typedef struct {
57 const char* path;
58 FileInfo* fileinfo;
59 FuriThreadId thread_id;
61
62typedef struct {
63 const char* fs_path;
64 uint64_t* total_space;
65 uint64_t* free_space;
66 bool* is_read_only;
67 FuriThreadId thread_id;
69
70typedef struct {
71 FuriString* path;
72 FuriThreadId thread_id;
74
75typedef struct {
76 const char* path1;
77 const char* path2;
78 bool check_subdir;
79 FuriThreadId thread_id;
81
82typedef struct {
83 uint32_t id;
85
86typedef struct {
87 const char* path;
88 FuriThreadId thread_id;
90
91typedef struct {
92 File* file;
94
95typedef struct {
96 const char* path;
97 SDInfo* info;
98 FuriThreadId thread_id;
99} SAInfo;
100
101typedef struct {
102 bool readonly;
103} SAReadOnly;
104
105typedef union {
106 SADataFOpen fopen;
107 SADataFRead fread;
108 SADataFWrite fwrite;
109 SADataFSeek fseek;
110
111 SADataDOpen dopen;
112 SADataDRead dread;
113
114 SADataCTimestamp ctimestamp;
115 SADataCStat cstat;
116 SADataCFSInfo cfsinfo;
117 SADataCResolvePath cresolvepath;
118 SADataCEquivPath cequivpath;
119
120 SADataError error;
121
122 SADataFile file;
123 SADataPath path;
124
125 SAInfo sdinfo;
126
127 SAReadOnly readonly;
128} SAData;
129
130typedef union {
131 bool bool_value;
132 uint16_t uint16_value;
133 uint64_t uint64_value;
134 FS_Error error_value;
135 const char* cstring_value;
136} SAReturn;
137
138typedef enum {
139 StorageCommandFileOpen,
140 StorageCommandFileClose,
141 StorageCommandFileRead,
142 StorageCommandFileWrite,
143 StorageCommandFileSeek,
144 StorageCommandFileTell,
145 StorageCommandFileTruncate,
146 StorageCommandFileSize,
147 StorageCommandFileSync,
148 StorageCommandFileEof,
149 StorageCommandDirOpen,
150 StorageCommandDirClose,
151 StorageCommandDirRead,
152 StorageCommandDirRewind,
153 StorageCommandCommonTimestamp,
154 StorageCommandCommonStat,
155 StorageCommandCommonRemove,
156 StorageCommandCommonMkDir,
157 StorageCommandCommonFSInfo,
158 StorageCommandSDFormat,
159 StorageCommandSDMakePartitions,
160 StorageCommandSDUnmount,
161 StorageCommandSDInfo,
162 StorageCommandSDStatus,
163 StorageCommandCommonResolvePath,
164 StorageCommandSDMount,
165 StorageCommandCommonEquivalentPath,
166 StorageCommandBackupReadOnly,
167 StorageCommandCommonShutdown,
168} StorageCommand;
169
170typedef struct {
171 FuriApiLock lock;
172 StorageCommand command;
173 SAData* data;
174 SAReturn* return_data;
176
177#ifdef __cplusplus
178}
179#endif
Structure that hold file index and returned api errors.
Definition filesystem_api_internal.h:18
Structure that hold file info.
Definition filesystem_api_defines.h:50
Definition storage_message.h:75
Definition storage_message.h:62
Definition storage_message.h:70
Definition storage_message.h:56
Definition storage_message.h:50
Definition storage_message.h:37
Definition storage_message.h:43
Definition storage_message.h:82
Definition storage_message.h:11
Definition storage_message.h:19
Definition storage_message.h:31
Definition storage_message.h:25
Definition storage_message.h:91
Definition storage_message.h:86
Definition storage_message.h:95
Definition storage_message.h:101
Definition storage_sd_api.h:19
Definition storage_message.h:170
Definition storage_message.h:105
Definition storage_message.h:130