diff options
author | Anna Prosvetova <anna@prosvetova.me> | 2021-12-06 18:11:20 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-06 18:11:20 +0300 |
commit | 5761a23786b4729303bfa49142effea51870e549 (patch) | |
tree | c53adcdc14949fdd9c0cedd3e17d8ae383043dac | |
parent | 060aead10b80622975b14a077420354d26e0be38 (diff) |
StorageInfo, StorageRename, SystemReboot, DeviceInfo (#17)
* Add StorageInfoRequest
* Add StorageRenameRequest
* Rename Status to System
* Add SystemRebootRequest
* Add DeviceInfoRequest and DeviceInfoResponse
-rw-r--r-- | flipper.proto | 12 | ||||
-rw-r--r-- | status.options | 5 | ||||
-rw-r--r-- | status.proto | 13 | ||||
-rw-r--r-- | storage.options | 4 | ||||
-rw-r--r-- | storage.proto | 13 | ||||
-rw-r--r-- | system.options | 7 | ||||
-rw-r--r-- | system.proto | 28 |
7 files changed, 60 insertions, 22 deletions
diff --git a/flipper.proto b/flipper.proto index a831031..2ac33bf 100644 --- a/flipper.proto +++ b/flipper.proto @@ -1,6 +1,6 @@ syntax = "proto3"; import "storage.proto"; -import "status.proto"; +import "system.proto"; import "application.proto"; import "gui.proto"; @@ -56,8 +56,13 @@ message Main { oneof content { Empty empty = 4; StopSession stop_session = 19; - .PB_Status.PingRequest ping_request = 5; - .PB_Status.PingResponse ping_response = 6; + .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_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; @@ -69,6 +74,7 @@ message Main { .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_App.StartRequest app_start_request = 16; .PB_App.LockStatusRequest app_lock_status_request = 17; .PB_App.LockStatusResponse app_lock_status_response = 18; diff --git a/status.options b/status.options deleted file mode 100644 index 4baf3e4..0000000 --- a/status.options +++ /dev/null @@ -1,5 +0,0 @@ -PB_Status.PingRequest.data type:FT_POINTER -PB_Status.PingRequest.data max_size:1024 -PB_Status.PingResponse.data type:FT_POINTER -PB_Status.PingResponse.data max_size:1024 - diff --git a/status.proto b/status.proto deleted file mode 100644 index 4de9566..0000000 --- a/status.proto +++ /dev/null @@ -1,13 +0,0 @@ -syntax = "proto3"; - -package PB_Status; -option java_package = "com.flipperdevices.protobuf.status"; - -message PingRequest { - bytes data = 1; -} - -message PingResponse { - bytes data = 1; -} - diff --git a/storage.options b/storage.options index 4ce438e..479d414 100644 --- a/storage.options +++ b/storage.options @@ -1,13 +1,15 @@ PB_Storage.File.name type:FT_POINTER PB_Storage.File.data type:FT_POINTER +PB_Storage.InfoRequest.path type:FT_POINTER PB_Storage.StatRequest.path type:FT_POINTER PB_Storage.ListRequest.path type:FT_POINTER PB_Storage.ReadRequest.path type:FT_POINTER PB_Storage.WriteRequest.path type:FT_POINTER PB_Storage.DeleteRequest.path type:FT_POINTER - PB_Storage.MkdirRequest.path type:FT_POINTER PB_Storage.Md5sumRequest.path type:FT_POINTER +PB_Storage.RenameRequest.old_path type:FT_POINTER +PB_Storage.RenameRequest.new_path type:FT_POINTER PB_Storage.ListResponse.file max_count:8 diff --git a/storage.proto b/storage.proto index 8427496..a293b18 100644 --- a/storage.proto +++ b/storage.proto @@ -14,6 +14,15 @@ message File { bytes data = 4; } +message InfoRequest { + string path = 1; +} + +message InfoResponse { + uint64 total_space = 1; + uint64 free_space = 2; +} + message StatRequest { string path = 1; } @@ -60,3 +69,7 @@ message Md5sumResponse { string md5sum = 1; } +message RenameRequest { + string old_path = 1; + string new_path = 2; +}
\ No newline at end of file diff --git a/system.options b/system.options new file mode 100644 index 0000000..8034103 --- /dev/null +++ b/system.options @@ -0,0 +1,7 @@ +PB_System.PingRequest.data type:FT_POINTER +PB_System.PingRequest.data max_size:1024 +PB_System.PingResponse.data type:FT_POINTER +PB_System.PingResponse.data max_size:1024 +PB_System.DeviceInfoResponse.key type:FT_POINTER +PB_System.DeviceInfoResponse.value type:FT_POINTER + diff --git a/system.proto b/system.proto new file mode 100644 index 0000000..6ff2b8e --- /dev/null +++ b/system.proto @@ -0,0 +1,28 @@ +syntax = "proto3"; + +package PB_System; +option java_package = "com.flipperdevices.protobuf.system"; + +message PingRequest { + bytes data = 1; +} + +message PingResponse { + bytes data = 1; +} + +message RebootRequest { + enum RebootMode { + OS = 0; // default value + DFU = 1; + } + RebootMode mode = 1; +} + +message DeviceInfoRequest { +} + +message DeviceInfoResponse { + string key = 1; + string value = 2; +}
\ No newline at end of file |