blob: 5425d33afee1636c441ef000689101b406a3f813 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
syntax = "proto3";
import "storage.proto";
import "status.proto";
import "application.proto";
package PB;
option java_package = "com.flipperdevices.protobuf";
option go_package = "github.com/flipperdevices/go-flipper/proto";
enum CommandStatus {
OK = 0;
/**< Common Errors */
ERROR = 1; /**< Unknown error */
ERROR_DECODE = 2; /**< Command can't be decoded successfully - command_id in response may be wrong! */
ERROR_NOT_IMPLEMENTED = 3; /**< Command succesfully decoded, but not implemented (deprecated or not yet implemented) */
ERROR_BUSY = 4; /**< Somebody took global lock, so not all commands are available */
ERROR_CONTINUOUS_COMMAND_INTERRUPTED = 14; /**< Not received has_next == 0 */
ERROR_INVALID_PARAMETERS = 15; /**< not provided (or provided invalid) crucial parameters to perform rpc */
/**< Storage Errors */
ERROR_STORAGE_NOT_READY = 5; /**< FS not ready */
ERROR_STORAGE_EXIST = 6; /**< File/Dir alrady exist */
ERROR_STORAGE_NOT_EXIST = 7; /**< File/Dir does not exist */
ERROR_STORAGE_INVALID_PARAMETER = 8; /**< Invalid API parameter */
ERROR_STORAGE_DENIED = 9; /**< Access denied */
ERROR_STORAGE_INVALID_NAME = 10; /**< Invalid name/path */
ERROR_STORAGE_INTERNAL = 11; /**< Internal error */
ERROR_STORAGE_NOT_IMPLEMENTED = 12; /**< Functon not implemented */
ERROR_STORAGE_ALREADY_OPEN = 13; /**< File/Dir already opened */
ERROR_STORAGE_DIR_NOT_EMPTY = 18; /**< Directory, you're going to remove is not empty */
/**< Application Errors */
ERROR_APP_CANT_START = 16; /**< Can't start app - internal error */
ERROR_APP_SYSTEM_LOCKED = 17; /**< Another app is running */
}
/* There are Server commands (e.g. Storage_write), which have no body message
* in response. But 'oneof' obligate to have at least 1 encoded message
* in scope. For this needs Empty message is implemented.
*/
message Empty {
}
message StopSession {
}
message Main {
uint32 command_id = 1;
CommandStatus command_status = 2;
bool has_next = 3;
oneof content {
Empty empty = 4;
StopSession stop_session = 19;
.PB_Status.PingRequest ping_request = 5;
.PB_Status.PingResponse ping_response = 6;
.PB_Storage.ListRequest storage_list_request = 7;
.PB_Storage.ListResponse storage_list_response = 8;
.PB_Storage.ReadRequest storage_read_request = 9;
.PB_Storage.ReadResponse storage_read_response = 10;
.PB_Storage.WriteRequest storage_write_request = 11;
.PB_Storage.DeleteRequest storage_delete_request = 12;
.PB_Storage.MkdirRequest storage_mkdir_request = 13;
.PB_Storage.Md5sumRequest storage_md5sum_request = 14;
.PB_Storage.Md5sumResponse storage_md5sum_response = 15;
.PB_App.Start app_start = 16;
.PB_App.LockStatusRequest app_lock_status_request = 17;
.PB_App.LockStatusResponse app_lock_status_response = 18;
}
}
|