flipper.pb.h 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. /* Automatically generated nanopb header */
  2. /* Generated by nanopb-0.4.5 */
  3. #ifndef PB_PB_FLIPPER_PB_H_INCLUDED
  4. #define PB_PB_FLIPPER_PB_H_INCLUDED
  5. #include <pb.h>
  6. #include "storage.pb.h"
  7. #include "status.pb.h"
  8. #include "application.pb.h"
  9. #if PB_PROTO_HEADER_VERSION != 40
  10. #error Regenerate this file with the current version of nanopb generator.
  11. #endif
  12. /* Enum definitions */
  13. typedef enum _PB_CommandStatus {
  14. PB_CommandStatus_OK = 0,
  15. PB_CommandStatus_ERROR = 1, /* *< Unknown error */
  16. PB_CommandStatus_ERROR_DECODE = 2, /* *< Command can't be decoded successfully - command_id in response may be wrong! */
  17. PB_CommandStatus_ERROR_NOT_IMPLEMENTED = 3, /* *< Command succesfully decoded, but not implemented (deprecated or not yet implemented) */
  18. PB_CommandStatus_ERROR_BUSY = 4, /* *< Somebody took global lock, so not all commands are available */
  19. PB_CommandStatus_ERROR_CONTINUOUS_COMMAND_INTERRUPTED = 14, /* *< Not received has_next == 0 */
  20. PB_CommandStatus_ERROR_INVALID_PARAMETERS = 15, /* *< not provided (or provided invalid) crucial parameters to perform rpc */
  21. PB_CommandStatus_ERROR_STORAGE_NOT_READY = 5, /* *< FS not ready */
  22. PB_CommandStatus_ERROR_STORAGE_EXIST = 6, /* *< File/Dir alrady exist */
  23. PB_CommandStatus_ERROR_STORAGE_NOT_EXIST = 7, /* *< File/Dir does not exist */
  24. PB_CommandStatus_ERROR_STORAGE_INVALID_PARAMETER = 8, /* *< Invalid API parameter */
  25. PB_CommandStatus_ERROR_STORAGE_DENIED = 9, /* *< Access denied */
  26. PB_CommandStatus_ERROR_STORAGE_INVALID_NAME = 10, /* *< Invalid name/path */
  27. PB_CommandStatus_ERROR_STORAGE_INTERNAL = 11, /* *< Internal error */
  28. PB_CommandStatus_ERROR_STORAGE_NOT_IMPLEMENTED = 12, /* *< Functon not implemented */
  29. PB_CommandStatus_ERROR_STORAGE_ALREADY_OPEN = 13, /* *< File/Dir already opened */
  30. PB_CommandStatus_ERROR_APP_CANT_START = 16, /* *< Can't start app - either wrong name, or internal error */
  31. PB_CommandStatus_ERROR_APP_SYSTEM_LOCKED = 17 /* *< Another app is running */
  32. } PB_CommandStatus;
  33. /* Struct definitions */
  34. /* There are Server commands (e.g. Storage_write), which have no body message
  35. in response. But 'oneof' obligate to have at least 1 encoded message
  36. in scope. For this needs Empty message is implemented. */
  37. typedef struct _PB_Empty {
  38. char dummy_field;
  39. } PB_Empty;
  40. typedef struct _PB_Main {
  41. uint32_t command_id;
  42. PB_CommandStatus command_status;
  43. bool has_next;
  44. pb_callback_t cb_content;
  45. pb_size_t which_content;
  46. union {
  47. PB_Empty empty;
  48. PB_Status_PingRequest ping_request;
  49. PB_Status_PingResponse ping_response;
  50. PB_Storage_ListRequest storage_list_request;
  51. PB_Storage_ListResponse storage_list_response;
  52. PB_Storage_ReadRequest storage_read_request;
  53. PB_Storage_ReadResponse storage_read_response;
  54. PB_Storage_WriteRequest storage_write_request;
  55. PB_Storage_DeleteRequest storage_delete_request;
  56. PB_Storage_MkdirRequest storage_mkdir_request;
  57. PB_Storage_Md5sumRequest storage_md5sum_request;
  58. PB_Storage_Md5sumResponse storage_md5sum_response;
  59. PB_App_Start app_start;
  60. PB_App_LockStatusRequest app_lock_status_request;
  61. PB_App_LockStatusResponse app_lock_status_response;
  62. } content;
  63. } PB_Main;
  64. /* Helper constants for enums */
  65. #define _PB_CommandStatus_MIN PB_CommandStatus_OK
  66. #define _PB_CommandStatus_MAX PB_CommandStatus_ERROR_APP_SYSTEM_LOCKED
  67. #define _PB_CommandStatus_ARRAYSIZE ((PB_CommandStatus)(PB_CommandStatus_ERROR_APP_SYSTEM_LOCKED+1))
  68. #ifdef __cplusplus
  69. extern "C" {
  70. #endif
  71. /* Initializer values for message structs */
  72. #define PB_Empty_init_default {0}
  73. #define PB_Main_init_default {0, _PB_CommandStatus_MIN, 0, {{NULL}, NULL}, 0, {PB_Empty_init_default}}
  74. #define PB_Empty_init_zero {0}
  75. #define PB_Main_init_zero {0, _PB_CommandStatus_MIN, 0, {{NULL}, NULL}, 0, {PB_Empty_init_zero}}
  76. /* Field tags (for use in manual encoding/decoding) */
  77. #define PB_Main_command_id_tag 1
  78. #define PB_Main_command_status_tag 2
  79. #define PB_Main_has_next_tag 3
  80. #define PB_Main_empty_tag 4
  81. #define PB_Main_ping_request_tag 5
  82. #define PB_Main_ping_response_tag 6
  83. #define PB_Main_storage_list_request_tag 7
  84. #define PB_Main_storage_list_response_tag 8
  85. #define PB_Main_storage_read_request_tag 9
  86. #define PB_Main_storage_read_response_tag 10
  87. #define PB_Main_storage_write_request_tag 11
  88. #define PB_Main_storage_delete_request_tag 12
  89. #define PB_Main_storage_mkdir_request_tag 13
  90. #define PB_Main_storage_md5sum_request_tag 14
  91. #define PB_Main_storage_md5sum_response_tag 15
  92. #define PB_Main_app_start_tag 16
  93. #define PB_Main_app_lock_status_request_tag 17
  94. #define PB_Main_app_lock_status_response_tag 18
  95. /* Struct field encoding specification for nanopb */
  96. #define PB_Empty_FIELDLIST(X, a) \
  97. #define PB_Empty_CALLBACK NULL
  98. #define PB_Empty_DEFAULT NULL
  99. #define PB_Main_FIELDLIST(X, a) \
  100. X(a, STATIC, SINGULAR, UINT32, command_id, 1) \
  101. X(a, STATIC, SINGULAR, UENUM, command_status, 2) \
  102. X(a, STATIC, SINGULAR, BOOL, has_next, 3) \
  103. X(a, STATIC, ONEOF, MSG_W_CB, (content,empty,content.empty), 4) \
  104. X(a, STATIC, ONEOF, MSG_W_CB, (content,ping_request,content.ping_request), 5) \
  105. X(a, STATIC, ONEOF, MSG_W_CB, (content,ping_response,content.ping_response), 6) \
  106. X(a, STATIC, ONEOF, MSG_W_CB, (content,storage_list_request,content.storage_list_request), 7) \
  107. X(a, STATIC, ONEOF, MSG_W_CB, (content,storage_list_response,content.storage_list_response), 8) \
  108. X(a, STATIC, ONEOF, MSG_W_CB, (content,storage_read_request,content.storage_read_request), 9) \
  109. X(a, STATIC, ONEOF, MSG_W_CB, (content,storage_read_response,content.storage_read_response), 10) \
  110. X(a, STATIC, ONEOF, MSG_W_CB, (content,storage_write_request,content.storage_write_request), 11) \
  111. X(a, STATIC, ONEOF, MSG_W_CB, (content,storage_delete_request,content.storage_delete_request), 12) \
  112. X(a, STATIC, ONEOF, MSG_W_CB, (content,storage_mkdir_request,content.storage_mkdir_request), 13) \
  113. X(a, STATIC, ONEOF, MSG_W_CB, (content,storage_md5sum_request,content.storage_md5sum_request), 14) \
  114. X(a, STATIC, ONEOF, MSG_W_CB, (content,storage_md5sum_response,content.storage_md5sum_response), 15) \
  115. X(a, STATIC, ONEOF, MSG_W_CB, (content,app_start,content.app_start), 16) \
  116. X(a, STATIC, ONEOF, MSG_W_CB, (content,app_lock_status_request,content.app_lock_status_request), 17) \
  117. X(a, STATIC, ONEOF, MSG_W_CB, (content,app_lock_status_response,content.app_lock_status_response), 18)
  118. #define PB_Main_CALLBACK NULL
  119. #define PB_Main_DEFAULT NULL
  120. #define PB_Main_content_empty_MSGTYPE PB_Empty
  121. #define PB_Main_content_ping_request_MSGTYPE PB_Status_PingRequest
  122. #define PB_Main_content_ping_response_MSGTYPE PB_Status_PingResponse
  123. #define PB_Main_content_storage_list_request_MSGTYPE PB_Storage_ListRequest
  124. #define PB_Main_content_storage_list_response_MSGTYPE PB_Storage_ListResponse
  125. #define PB_Main_content_storage_read_request_MSGTYPE PB_Storage_ReadRequest
  126. #define PB_Main_content_storage_read_response_MSGTYPE PB_Storage_ReadResponse
  127. #define PB_Main_content_storage_write_request_MSGTYPE PB_Storage_WriteRequest
  128. #define PB_Main_content_storage_delete_request_MSGTYPE PB_Storage_DeleteRequest
  129. #define PB_Main_content_storage_mkdir_request_MSGTYPE PB_Storage_MkdirRequest
  130. #define PB_Main_content_storage_md5sum_request_MSGTYPE PB_Storage_Md5sumRequest
  131. #define PB_Main_content_storage_md5sum_response_MSGTYPE PB_Storage_Md5sumResponse
  132. #define PB_Main_content_app_start_MSGTYPE PB_App_Start
  133. #define PB_Main_content_app_lock_status_request_MSGTYPE PB_App_LockStatusRequest
  134. #define PB_Main_content_app_lock_status_response_MSGTYPE PB_App_LockStatusResponse
  135. extern const pb_msgdesc_t PB_Empty_msg;
  136. extern const pb_msgdesc_t PB_Main_msg;
  137. /* Defines for backwards compatibility with code written before nanopb-0.4.0 */
  138. #define PB_Empty_fields &PB_Empty_msg
  139. #define PB_Main_fields &PB_Main_msg
  140. /* Maximum encoded size of messages (where known) */
  141. #define PB_Empty_size 0
  142. #if defined(PB_Storage_ListRequest_size) && defined(PB_Storage_ListResponse_size) && defined(PB_Storage_ReadRequest_size) && defined(PB_Storage_ReadResponse_size) && defined(PB_Storage_WriteRequest_size) && defined(PB_Storage_DeleteRequest_size) && defined(PB_Storage_MkdirRequest_size) && defined(PB_Storage_Md5sumRequest_size) && defined(PB_App_Start_size)
  143. #define PB_Main_size (10 + sizeof(union PB_Main_content_size_union))
  144. union PB_Main_content_size_union {char f7[(6 + PB_Storage_ListRequest_size)]; char f8[(6 + PB_Storage_ListResponse_size)]; char f9[(6 + PB_Storage_ReadRequest_size)]; char f10[(6 + PB_Storage_ReadResponse_size)]; char f11[(6 + PB_Storage_WriteRequest_size)]; char f12[(6 + PB_Storage_DeleteRequest_size)]; char f13[(6 + PB_Storage_MkdirRequest_size)]; char f14[(6 + PB_Storage_Md5sumRequest_size)]; char f16[(7 + PB_App_Start_size)]; char f0[36];};
  145. #endif
  146. #ifdef __cplusplus
  147. } /* extern "C" */
  148. #endif
  149. #endif