flipper.pb.h 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  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_STORAGE_DIR_NOT_EMPTY = 18, /* *< Directory, you're going to remove is not empty */
  31. PB_CommandStatus_ERROR_APP_CANT_START = 16, /* *< Can't start app - internal error */
  32. PB_CommandStatus_ERROR_APP_SYSTEM_LOCKED = 17 /* *< Another app is running */
  33. } PB_CommandStatus;
  34. /* Struct definitions */
  35. /* There are Server commands (e.g. Storage_write), which have no body message
  36. in response. But 'oneof' obligate to have at least 1 encoded message
  37. in scope. For this needs Empty message is implemented. */
  38. typedef struct _PB_Empty {
  39. char dummy_field;
  40. } PB_Empty;
  41. typedef struct _PB_StopSession {
  42. char dummy_field;
  43. } PB_StopSession;
  44. typedef struct _PB_Main {
  45. uint32_t command_id;
  46. PB_CommandStatus command_status;
  47. bool has_next;
  48. pb_callback_t cb_content;
  49. pb_size_t which_content;
  50. union {
  51. PB_Empty empty;
  52. PB_Status_PingRequest ping_request;
  53. PB_Status_PingResponse ping_response;
  54. PB_Storage_ListRequest storage_list_request;
  55. PB_Storage_ListResponse storage_list_response;
  56. PB_Storage_ReadRequest storage_read_request;
  57. PB_Storage_ReadResponse storage_read_response;
  58. PB_Storage_WriteRequest storage_write_request;
  59. PB_Storage_DeleteRequest storage_delete_request;
  60. PB_Storage_MkdirRequest storage_mkdir_request;
  61. PB_Storage_Md5sumRequest storage_md5sum_request;
  62. PB_Storage_Md5sumResponse storage_md5sum_response;
  63. PB_App_Start app_start;
  64. PB_App_LockStatusRequest app_lock_status_request;
  65. PB_App_LockStatusResponse app_lock_status_response;
  66. PB_StopSession stop_session;
  67. } content;
  68. } PB_Main;
  69. /* Helper constants for enums */
  70. #define _PB_CommandStatus_MIN PB_CommandStatus_OK
  71. #define _PB_CommandStatus_MAX PB_CommandStatus_ERROR_STORAGE_DIR_NOT_EMPTY
  72. #define _PB_CommandStatus_ARRAYSIZE ((PB_CommandStatus)(PB_CommandStatus_ERROR_STORAGE_DIR_NOT_EMPTY+1))
  73. #ifdef __cplusplus
  74. extern "C" {
  75. #endif
  76. /* Initializer values for message structs */
  77. #define PB_Empty_init_default {0}
  78. #define PB_StopSession_init_default {0}
  79. #define PB_Main_init_default {0, _PB_CommandStatus_MIN, 0, {{NULL}, NULL}, 0, {PB_Empty_init_default}}
  80. #define PB_Empty_init_zero {0}
  81. #define PB_StopSession_init_zero {0}
  82. #define PB_Main_init_zero {0, _PB_CommandStatus_MIN, 0, {{NULL}, NULL}, 0, {PB_Empty_init_zero}}
  83. /* Field tags (for use in manual encoding/decoding) */
  84. #define PB_Main_command_id_tag 1
  85. #define PB_Main_command_status_tag 2
  86. #define PB_Main_has_next_tag 3
  87. #define PB_Main_empty_tag 4
  88. #define PB_Main_ping_request_tag 5
  89. #define PB_Main_ping_response_tag 6
  90. #define PB_Main_storage_list_request_tag 7
  91. #define PB_Main_storage_list_response_tag 8
  92. #define PB_Main_storage_read_request_tag 9
  93. #define PB_Main_storage_read_response_tag 10
  94. #define PB_Main_storage_write_request_tag 11
  95. #define PB_Main_storage_delete_request_tag 12
  96. #define PB_Main_storage_mkdir_request_tag 13
  97. #define PB_Main_storage_md5sum_request_tag 14
  98. #define PB_Main_storage_md5sum_response_tag 15
  99. #define PB_Main_app_start_tag 16
  100. #define PB_Main_app_lock_status_request_tag 17
  101. #define PB_Main_app_lock_status_response_tag 18
  102. #define PB_Main_stop_session_tag 19
  103. /* Struct field encoding specification for nanopb */
  104. #define PB_Empty_FIELDLIST(X, a) \
  105. #define PB_Empty_CALLBACK NULL
  106. #define PB_Empty_DEFAULT NULL
  107. #define PB_StopSession_FIELDLIST(X, a) \
  108. #define PB_StopSession_CALLBACK NULL
  109. #define PB_StopSession_DEFAULT NULL
  110. #define PB_Main_FIELDLIST(X, a) \
  111. X(a, STATIC, SINGULAR, UINT32, command_id, 1) \
  112. X(a, STATIC, SINGULAR, UENUM, command_status, 2) \
  113. X(a, STATIC, SINGULAR, BOOL, has_next, 3) \
  114. X(a, STATIC, ONEOF, MSG_W_CB, (content,empty,content.empty), 4) \
  115. X(a, STATIC, ONEOF, MSG_W_CB, (content,ping_request,content.ping_request), 5) \
  116. X(a, STATIC, ONEOF, MSG_W_CB, (content,ping_response,content.ping_response), 6) \
  117. X(a, STATIC, ONEOF, MSG_W_CB, (content,storage_list_request,content.storage_list_request), 7) \
  118. X(a, STATIC, ONEOF, MSG_W_CB, (content,storage_list_response,content.storage_list_response), 8) \
  119. X(a, STATIC, ONEOF, MSG_W_CB, (content,storage_read_request,content.storage_read_request), 9) \
  120. X(a, STATIC, ONEOF, MSG_W_CB, (content,storage_read_response,content.storage_read_response), 10) \
  121. X(a, STATIC, ONEOF, MSG_W_CB, (content,storage_write_request,content.storage_write_request), 11) \
  122. X(a, STATIC, ONEOF, MSG_W_CB, (content,storage_delete_request,content.storage_delete_request), 12) \
  123. X(a, STATIC, ONEOF, MSG_W_CB, (content,storage_mkdir_request,content.storage_mkdir_request), 13) \
  124. X(a, STATIC, ONEOF, MSG_W_CB, (content,storage_md5sum_request,content.storage_md5sum_request), 14) \
  125. X(a, STATIC, ONEOF, MSG_W_CB, (content,storage_md5sum_response,content.storage_md5sum_response), 15) \
  126. X(a, STATIC, ONEOF, MSG_W_CB, (content,app_start,content.app_start), 16) \
  127. X(a, STATIC, ONEOF, MSG_W_CB, (content,app_lock_status_request,content.app_lock_status_request), 17) \
  128. X(a, STATIC, ONEOF, MSG_W_CB, (content,app_lock_status_response,content.app_lock_status_response), 18) \
  129. X(a, STATIC, ONEOF, MSG_W_CB, (content,stop_session,content.stop_session), 19)
  130. #define PB_Main_CALLBACK NULL
  131. #define PB_Main_DEFAULT NULL
  132. #define PB_Main_content_empty_MSGTYPE PB_Empty
  133. #define PB_Main_content_ping_request_MSGTYPE PB_Status_PingRequest
  134. #define PB_Main_content_ping_response_MSGTYPE PB_Status_PingResponse
  135. #define PB_Main_content_storage_list_request_MSGTYPE PB_Storage_ListRequest
  136. #define PB_Main_content_storage_list_response_MSGTYPE PB_Storage_ListResponse
  137. #define PB_Main_content_storage_read_request_MSGTYPE PB_Storage_ReadRequest
  138. #define PB_Main_content_storage_read_response_MSGTYPE PB_Storage_ReadResponse
  139. #define PB_Main_content_storage_write_request_MSGTYPE PB_Storage_WriteRequest
  140. #define PB_Main_content_storage_delete_request_MSGTYPE PB_Storage_DeleteRequest
  141. #define PB_Main_content_storage_mkdir_request_MSGTYPE PB_Storage_MkdirRequest
  142. #define PB_Main_content_storage_md5sum_request_MSGTYPE PB_Storage_Md5sumRequest
  143. #define PB_Main_content_storage_md5sum_response_MSGTYPE PB_Storage_Md5sumResponse
  144. #define PB_Main_content_app_start_MSGTYPE PB_App_Start
  145. #define PB_Main_content_app_lock_status_request_MSGTYPE PB_App_LockStatusRequest
  146. #define PB_Main_content_app_lock_status_response_MSGTYPE PB_App_LockStatusResponse
  147. #define PB_Main_content_stop_session_MSGTYPE PB_StopSession
  148. extern const pb_msgdesc_t PB_Empty_msg;
  149. extern const pb_msgdesc_t PB_StopSession_msg;
  150. extern const pb_msgdesc_t PB_Main_msg;
  151. /* Defines for backwards compatibility with code written before nanopb-0.4.0 */
  152. #define PB_Empty_fields &PB_Empty_msg
  153. #define PB_StopSession_fields &PB_StopSession_msg
  154. #define PB_Main_fields &PB_Main_msg
  155. /* Maximum encoded size of messages (where known) */
  156. #define PB_Empty_size 0
  157. #define PB_StopSession_size 0
  158. #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)
  159. #define PB_Main_size (10 + sizeof(union PB_Main_content_size_union))
  160. 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];};
  161. #endif
  162. #ifdef __cplusplus
  163. } /* extern "C" */
  164. #endif
  165. #endif