Skip to content

Commit

Permalink
update config.proto for file service
Browse files Browse the repository at this point in the history
  • Loading branch information
machinekoder committed Feb 4, 2022
1 parent 23b0abc commit b94ee07
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/machinetalk/protobuf/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ message File {

option (nanopb_msgopt).msgid = 200; // see README.msgid

required string name = 1; // flat for now
required FileContent encoding = 2;
optional bytes blob = 3;
required string name = 1; // file name or path, flat for now
required FileContent encoding = 2; // file encoding
optional bytes blob = 3 [default = ""]; // file data
optional uint32 size = 4 [default = 0]; // file size
optional bool is_dir = 5 [default = false]; // indicates if file is actually a directo
optional uint64 last_modified = 6 [default = 0]; // timestamp of last modification
}

message Application {
Expand Down Expand Up @@ -78,3 +81,8 @@ message Launcher {
optional uint32 priority = 13; // priority for sorting, smaller means lower priority
optional uint32 importance = 14; // importance set by the user, smaller means less important
}

// message for file service
message FileServiceData {
repeated File files = 1; // list of files
}
12 changes: 12 additions & 0 deletions src/machinetalk/protobuf/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,9 @@ enum ContainerType {
MT_FULL_UPDATE = 370;
MT_INCREMENTAL_UPDATE = 371;

// generic cmd reply
MT_CMD_COMPLETE = 380;

// task/client comms
MT_TASK_REPLY = 400;
MT_TICKET_UPDATE = 401;
Expand Down Expand Up @@ -697,6 +700,15 @@ enum ContainerType {
MT_LAUNCHER_CALL = 12614;
MT_LAUNCHER_SHUTDOWN = 12615;
MT_LAUNCHER_SET = 12616;

// remote file
MT_FILE_GET = 12700;
MT_FILE_PUT = 12701;
MT_FILE_LS = 12702;
MT_FILE_MKDIR = 12703;
MT_FILE_DELETE = 12704;
MT_FILE_DATA = 12705;
MT_FILE_LISTING = 12706;
}

enum OriginIndex {
Expand Down

0 comments on commit b94ee07

Please sign in to comment.