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