forked from flipperdevices/flipperzero-protobuf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flipper.proto
102 lines (92 loc) · 4.99 KB
/
flipper.proto
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
syntax = "proto3";
import "storage.proto";
import "system.proto";
import "application.proto";
import "gui.proto";
package PB;
option java_package = "com.flipperdevices.protobuf";
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 */
/**< Virtual Display Errors */
ERROR_VIRTUAL_DISPLAY_ALREADY_STARTED = 19; /**< Virtual Display session can't be started twice */
ERROR_VIRTUAL_DISPLAY_NOT_STARTED = 20; /**< Virtual Display session can't be stopped when it's not started */
}
/* 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_System.PingRequest system_ping_request = 5;
.PB_System.PingResponse system_ping_response = 6;
.PB_System.RebootRequest system_reboot_request = 31;
.PB_System.DeviceInfoRequest system_device_info_request = 32;
.PB_System.DeviceInfoResponse system_device_info_response = 33;
.PB_System.FactoryResetRequest system_factory_reset_request = 34;
.PB_System.GetDateTimeRequest system_get_datetime_request = 35;
.PB_System.GetDateTimeResponse system_get_datetime_response = 36;
.PB_System.SetDateTimeRequest system_set_datetime_request = 37;
.PB_System.PlayAudiovisualAlertRequest system_play_audiovisual_alert_request = 38;
.PB_System.ProtobufVersionRequest system_protobuf_version_request = 39;
.PB_System.ProtobufVersionResponse system_protobuf_version_response = 40;
.PB_System.UpdateRequest system_update_request = 41;
.PB_System.UpdateResponse system_update_response = 46;
.PB_System.PowerInfoRequest system_power_info_request = 44;
.PB_System.PowerInfoResponse system_power_info_response = 45;
.PB_Storage.InfoRequest storage_info_request = 28;
.PB_Storage.InfoResponse storage_info_response = 29;
.PB_Storage.StatRequest storage_stat_request = 24;
.PB_Storage.StatResponse storage_stat_response = 25;
.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_Storage.RenameRequest storage_rename_request = 30;
.PB_Storage.BackupCreateRequest storage_backup_create_request = 42;
.PB_Storage.BackupRestoreRequest storage_backup_restore_request = 43;
.PB_App.StartRequest app_start_request = 16;
.PB_App.LockStatusRequest app_lock_status_request = 17;
.PB_App.LockStatusResponse app_lock_status_response = 18;
.PB_Gui.StartScreenStreamRequest gui_start_screen_stream_request = 20;
.PB_Gui.StopScreenStreamRequest gui_stop_screen_stream_request = 21;
.PB_Gui.ScreenFrame gui_screen_frame = 22;
.PB_Gui.SendInputEventRequest gui_send_input_event_request = 23;
.PB_Gui.StartVirtualDisplayRequest gui_start_virtual_display_request = 26;
.PB_Gui.StopVirtualDisplayRequest gui_stop_virtual_display_request = 27;
}
}