Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/flipperdevices/flipperzero-protobuf.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Kharisov <albert@flipperdevices.com>2021-10-08 16:17:49 +0300
committerAlbert Kharisov <albert@flipperdevices.com>2021-10-08 16:37:10 +0300
commit53f1fe36728e630cb54d2800b22359255067e6af (patch)
treecc426b74d666a033fc0e4d5a8cc8a8e5b138b839
parentf88c5a04ae11c94f24c5c2b368d8ebe1186243b0 (diff)
Element -> File
-rw-r--r--flipper.proto4
-rw-r--r--storage.options8
-rw-r--r--storage.proto8
3 files changed, 12 insertions, 8 deletions
diff --git a/flipper.proto b/flipper.proto
index 0c6bb2f..061ddd1 100644
--- a/flipper.proto
+++ b/flipper.proto
@@ -23,6 +23,10 @@ enum CommandStatus {
ERROR_STORAGE_ALREADY_OPEN = 13; /**< File/Dir already opened */
}
+/* 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 {
}
diff --git a/storage.options b/storage.options
index 1331008..2334206 100644
--- a/storage.options
+++ b/storage.options
@@ -1,5 +1,5 @@
-PB_Storage.Element.name type:FT_POINTER
-PB_Storage.Element.data type:FT_POINTER
+PB_Storage.File.name type:FT_POINTER
+PB_Storage.File.data type:FT_POINTER
PB_Storage.ListRequest.path type:FT_POINTER
PB_Storage.ReadRequest.path type:FT_POINTER
PB_Storage.WriteRequest.path type:FT_POINTER
@@ -8,9 +8,9 @@ PB_Storage.DeleteRequest.path type:FT_POINTER
PB_Storage.MkdirRequest.path type:FT_POINTER
PB_Storage.Md5sumRequest.path type:FT_POINTER
-PB_Storage.ListResponse.storage_element max_count:8
+PB_Storage.ListResponse.file max_count:8
// not used by nanopb, better server should keep in mind this max size
-PB_Storage.Element.data max_size:4096
+PB_Storage.File.data max_size:4096
PB_Storage.Md5sumResponse.md5sum max_length:32
diff --git a/storage.proto b/storage.proto
index 9700c03..f9bbb85 100644
--- a/storage.proto
+++ b/storage.proto
@@ -2,7 +2,7 @@ syntax = "proto3";
package PB_Storage;
-message Element {
+message File {
enum FileType {
FILE = 0; // default value
DIR = 1;
@@ -18,7 +18,7 @@ message ListRequest {
}
message ListResponse {
- repeated Element storage_element = 1;
+ repeated File file = 1;
}
message ReadRequest {
@@ -26,12 +26,12 @@ message ReadRequest {
}
message ReadResponse {
- Element storage_element = 1;
+ File file = 1;
}
message WriteRequest {
string path = 1;
- Element storage_element = 2;
+ File file = 2;
}
message DeleteRequest {