diff options
author | Albert Kharisov <ah@bright-box.com> | 2021-10-13 16:55:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-13 16:55:39 +0300 |
commit | 8e6db414beed5aff0902f2cca2f4146a0dffb7a1 (patch) | |
tree | ae0862bff39db140a0a13f57f798c43f5a464933 | |
parent | 85c55f5072747e0c707f9a3165773630c4318b0a (diff) |
[FL-1946] Add AppStart, AppLockStatus (#5)
-rw-r--r-- | application.options | 5 | ||||
-rw-r--r-- | application.proto | 17 | ||||
-rw-r--r-- | flipper.proto | 6 | ||||
-rw-r--r-- | storage.options | 5 |
4 files changed, 31 insertions, 2 deletions
diff --git a/application.options b/application.options new file mode 100644 index 0000000..dbe539d --- /dev/null +++ b/application.options @@ -0,0 +1,5 @@ +PB_App.Start.args type:FT_POINTER +PB_App.Start.args max_length:512 +PB_App.Start.name type:FT_POINTER +PB_App.Start.name max_length:512 + diff --git a/application.proto b/application.proto new file mode 100644 index 0000000..622f197 --- /dev/null +++ b/application.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; + +package PB_App; +option java_package = "com.flipperdevices.protobuf.app"; + +message Start { + string name = 1; + string args = 2; +} + +message LockStatusRequest { +} + +message LockStatusResponse { + bool locked = 1; +} + diff --git a/flipper.proto b/flipper.proto index 31fe833..ed82a91 100644 --- a/flipper.proto +++ b/flipper.proto @@ -1,6 +1,7 @@ syntax = "proto3"; import "storage.proto"; import "status.proto"; +import "application.proto"; package PB; option java_package = "com.flipperdevices.protobuf"; @@ -22,6 +23,8 @@ enum CommandStatus { ERROR_STORAGE_INTERNAL = 11; /**< Internal error */ ERROR_STORAGE_NOT_IMPLEMENTED = 12; /**< Functon not implemented */ ERROR_STORAGE_ALREADY_OPEN = 13; /**< File/Dir already opened */ + ERROR_APP_CANT_START = 16; /**< Can't start app - or internal error */ + ERROR_APP_SYSTEM_LOCKED = 17; /**< Another app is running */ } /* There are Server commands (e.g. Storage_write), which have no body message @@ -48,6 +51,9 @@ message Main { .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; } } diff --git a/storage.options b/storage.options index 2334206..a0bed62 100644 --- a/storage.options +++ b/storage.options @@ -10,7 +10,8 @@ PB_Storage.Md5sumRequest.path type:FT_POINTER PB_Storage.ListResponse.file max_count:8 -// not used by nanopb, better server should keep in mind this max size -PB_Storage.File.data max_size:4096 +// not affected by nanopb, so server & client should keep in mind these max values +PB_Storage.File.data max_size:512 PB_Storage.Md5sumResponse.md5sum max_length:32 +PB_Storage.*.path max_length:255 |