2021-10-12 11:48:34 +00:00
|
|
|
/* Automatically generated nanopb header */
|
|
|
|
/* Generated by nanopb-0.4.5 */
|
|
|
|
|
|
|
|
#ifndef PB_PB_FLIPPER_PB_H_INCLUDED
|
|
|
|
#define PB_PB_FLIPPER_PB_H_INCLUDED
|
|
|
|
#include <pb.h>
|
|
|
|
#include "storage.pb.h"
|
|
|
|
#include "status.pb.h"
|
2021-10-13 15:39:37 +00:00
|
|
|
#include "application.pb.h"
|
2021-11-01 16:26:37 +00:00
|
|
|
#include "gui.pb.h"
|
2021-10-12 11:48:34 +00:00
|
|
|
|
|
|
|
#if PB_PROTO_HEADER_VERSION != 40
|
|
|
|
#error Regenerate this file with the current version of nanopb generator.
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Enum definitions */
|
|
|
|
typedef enum _PB_CommandStatus {
|
|
|
|
PB_CommandStatus_OK = 0,
|
2021-11-01 16:26:37 +00:00
|
|
|
/* *< Common Errors */
|
2021-10-12 11:48:34 +00:00
|
|
|
PB_CommandStatus_ERROR = 1, /* *< Unknown error */
|
|
|
|
PB_CommandStatus_ERROR_DECODE = 2, /* *< Command can't be decoded successfully - command_id in response may be wrong! */
|
|
|
|
PB_CommandStatus_ERROR_NOT_IMPLEMENTED = 3, /* *< Command succesfully decoded, but not implemented (deprecated or not yet implemented) */
|
|
|
|
PB_CommandStatus_ERROR_BUSY = 4, /* *< Somebody took global lock, so not all commands are available */
|
|
|
|
PB_CommandStatus_ERROR_CONTINUOUS_COMMAND_INTERRUPTED = 14, /* *< Not received has_next == 0 */
|
|
|
|
PB_CommandStatus_ERROR_INVALID_PARAMETERS = 15, /* *< not provided (or provided invalid) crucial parameters to perform rpc */
|
2021-11-01 16:26:37 +00:00
|
|
|
/* *< Storage Errors */
|
2021-10-12 11:48:34 +00:00
|
|
|
PB_CommandStatus_ERROR_STORAGE_NOT_READY = 5, /* *< FS not ready */
|
|
|
|
PB_CommandStatus_ERROR_STORAGE_EXIST = 6, /* *< File/Dir alrady exist */
|
|
|
|
PB_CommandStatus_ERROR_STORAGE_NOT_EXIST = 7, /* *< File/Dir does not exist */
|
|
|
|
PB_CommandStatus_ERROR_STORAGE_INVALID_PARAMETER = 8, /* *< Invalid API parameter */
|
|
|
|
PB_CommandStatus_ERROR_STORAGE_DENIED = 9, /* *< Access denied */
|
|
|
|
PB_CommandStatus_ERROR_STORAGE_INVALID_NAME = 10, /* *< Invalid name/path */
|
|
|
|
PB_CommandStatus_ERROR_STORAGE_INTERNAL = 11, /* *< Internal error */
|
|
|
|
PB_CommandStatus_ERROR_STORAGE_NOT_IMPLEMENTED = 12, /* *< Functon not implemented */
|
2021-10-13 15:39:37 +00:00
|
|
|
PB_CommandStatus_ERROR_STORAGE_ALREADY_OPEN = 13, /* *< File/Dir already opened */
|
2021-10-26 16:05:28 +00:00
|
|
|
PB_CommandStatus_ERROR_STORAGE_DIR_NOT_EMPTY = 18, /* *< Directory, you're going to remove is not empty */
|
2021-11-01 16:26:37 +00:00
|
|
|
/* *< Application Errors */
|
2021-10-26 16:05:28 +00:00
|
|
|
PB_CommandStatus_ERROR_APP_CANT_START = 16, /* *< Can't start app - internal error */
|
2021-11-12 13:04:35 +00:00
|
|
|
PB_CommandStatus_ERROR_APP_SYSTEM_LOCKED = 17, /* *< Another app is running */
|
|
|
|
/* *< Virtual Display Errors */
|
|
|
|
PB_CommandStatus_ERROR_VIRTUAL_DISPLAY_ALREADY_STARTED = 19, /* *< Virtual Display session can't be started twice */
|
|
|
|
PB_CommandStatus_ERROR_VIRTUAL_DISPLAY_NOT_STARTED = 20 /* *< Virtual Display session can't be stopped when it's not started */
|
2021-10-12 11:48:34 +00:00
|
|
|
} PB_CommandStatus;
|
|
|
|
|
|
|
|
/* Struct definitions */
|
|
|
|
/* 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. */
|
|
|
|
typedef struct _PB_Empty {
|
|
|
|
char dummy_field;
|
|
|
|
} PB_Empty;
|
|
|
|
|
2021-10-26 16:05:28 +00:00
|
|
|
typedef struct _PB_StopSession {
|
|
|
|
char dummy_field;
|
|
|
|
} PB_StopSession;
|
|
|
|
|
2021-10-12 11:48:34 +00:00
|
|
|
typedef struct _PB_Main {
|
|
|
|
uint32_t command_id;
|
|
|
|
PB_CommandStatus command_status;
|
|
|
|
bool has_next;
|
|
|
|
pb_callback_t cb_content;
|
|
|
|
pb_size_t which_content;
|
|
|
|
union {
|
|
|
|
PB_Empty empty;
|
|
|
|
PB_Status_PingRequest ping_request;
|
|
|
|
PB_Status_PingResponse ping_response;
|
|
|
|
PB_Storage_ListRequest storage_list_request;
|
|
|
|
PB_Storage_ListResponse storage_list_response;
|
|
|
|
PB_Storage_ReadRequest storage_read_request;
|
|
|
|
PB_Storage_ReadResponse storage_read_response;
|
|
|
|
PB_Storage_WriteRequest storage_write_request;
|
|
|
|
PB_Storage_DeleteRequest storage_delete_request;
|
|
|
|
PB_Storage_MkdirRequest storage_mkdir_request;
|
|
|
|
PB_Storage_Md5sumRequest storage_md5sum_request;
|
|
|
|
PB_Storage_Md5sumResponse storage_md5sum_response;
|
2021-11-01 16:26:37 +00:00
|
|
|
PB_App_StartRequest app_start_request;
|
2021-10-13 15:39:37 +00:00
|
|
|
PB_App_LockStatusRequest app_lock_status_request;
|
|
|
|
PB_App_LockStatusResponse app_lock_status_response;
|
2021-10-26 16:05:28 +00:00
|
|
|
PB_StopSession stop_session;
|
2021-11-01 16:26:37 +00:00
|
|
|
PB_Gui_StartScreenStreamRequest gui_start_screen_stream_request;
|
|
|
|
PB_Gui_StopScreenStreamRequest gui_stop_screen_stream_request;
|
2021-11-12 13:04:35 +00:00
|
|
|
PB_Gui_ScreenFrame gui_screen_frame;
|
2021-11-01 16:26:37 +00:00
|
|
|
PB_Gui_SendInputEventRequest gui_send_input_event_request;
|
2021-11-01 20:35:54 +00:00
|
|
|
PB_Storage_StatRequest storage_stat_request;
|
|
|
|
PB_Storage_StatResponse storage_stat_response;
|
2021-11-12 13:04:35 +00:00
|
|
|
PB_Gui_StartVirtualDisplayRequest gui_start_virtual_display_request;
|
|
|
|
PB_Gui_StopVirtualDisplayRequest gui_stop_virtual_display_request;
|
2021-10-12 11:48:34 +00:00
|
|
|
} content;
|
|
|
|
} PB_Main;
|
|
|
|
|
|
|
|
|
|
|
|
/* Helper constants for enums */
|
|
|
|
#define _PB_CommandStatus_MIN PB_CommandStatus_OK
|
2021-11-12 13:04:35 +00:00
|
|
|
#define _PB_CommandStatus_MAX PB_CommandStatus_ERROR_VIRTUAL_DISPLAY_NOT_STARTED
|
|
|
|
#define _PB_CommandStatus_ARRAYSIZE ((PB_CommandStatus)(PB_CommandStatus_ERROR_VIRTUAL_DISPLAY_NOT_STARTED+1))
|
2021-10-12 11:48:34 +00:00
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Initializer values for message structs */
|
|
|
|
#define PB_Empty_init_default {0}
|
2021-10-26 16:05:28 +00:00
|
|
|
#define PB_StopSession_init_default {0}
|
2021-10-12 11:48:34 +00:00
|
|
|
#define PB_Main_init_default {0, _PB_CommandStatus_MIN, 0, {{NULL}, NULL}, 0, {PB_Empty_init_default}}
|
|
|
|
#define PB_Empty_init_zero {0}
|
2021-10-26 16:05:28 +00:00
|
|
|
#define PB_StopSession_init_zero {0}
|
2021-10-12 11:48:34 +00:00
|
|
|
#define PB_Main_init_zero {0, _PB_CommandStatus_MIN, 0, {{NULL}, NULL}, 0, {PB_Empty_init_zero}}
|
|
|
|
|
|
|
|
/* Field tags (for use in manual encoding/decoding) */
|
|
|
|
#define PB_Main_command_id_tag 1
|
|
|
|
#define PB_Main_command_status_tag 2
|
|
|
|
#define PB_Main_has_next_tag 3
|
|
|
|
#define PB_Main_empty_tag 4
|
|
|
|
#define PB_Main_ping_request_tag 5
|
|
|
|
#define PB_Main_ping_response_tag 6
|
|
|
|
#define PB_Main_storage_list_request_tag 7
|
|
|
|
#define PB_Main_storage_list_response_tag 8
|
|
|
|
#define PB_Main_storage_read_request_tag 9
|
|
|
|
#define PB_Main_storage_read_response_tag 10
|
|
|
|
#define PB_Main_storage_write_request_tag 11
|
|
|
|
#define PB_Main_storage_delete_request_tag 12
|
|
|
|
#define PB_Main_storage_mkdir_request_tag 13
|
|
|
|
#define PB_Main_storage_md5sum_request_tag 14
|
|
|
|
#define PB_Main_storage_md5sum_response_tag 15
|
2021-11-01 16:26:37 +00:00
|
|
|
#define PB_Main_app_start_request_tag 16
|
2021-10-13 15:39:37 +00:00
|
|
|
#define PB_Main_app_lock_status_request_tag 17
|
|
|
|
#define PB_Main_app_lock_status_response_tag 18
|
2021-10-26 16:05:28 +00:00
|
|
|
#define PB_Main_stop_session_tag 19
|
2021-11-01 16:26:37 +00:00
|
|
|
#define PB_Main_gui_start_screen_stream_request_tag 20
|
|
|
|
#define PB_Main_gui_stop_screen_stream_request_tag 21
|
2021-11-12 13:04:35 +00:00
|
|
|
#define PB_Main_gui_screen_frame_tag 22
|
2021-11-01 16:26:37 +00:00
|
|
|
#define PB_Main_gui_send_input_event_request_tag 23
|
2021-11-01 20:35:54 +00:00
|
|
|
#define PB_Main_storage_stat_request_tag 24
|
|
|
|
#define PB_Main_storage_stat_response_tag 25
|
2021-11-12 13:04:35 +00:00
|
|
|
#define PB_Main_gui_start_virtual_display_request_tag 26
|
|
|
|
#define PB_Main_gui_stop_virtual_display_request_tag 27
|
2021-10-12 11:48:34 +00:00
|
|
|
|
|
|
|
/* Struct field encoding specification for nanopb */
|
|
|
|
#define PB_Empty_FIELDLIST(X, a) \
|
|
|
|
|
|
|
|
#define PB_Empty_CALLBACK NULL
|
|
|
|
#define PB_Empty_DEFAULT NULL
|
|
|
|
|
2021-10-26 16:05:28 +00:00
|
|
|
#define PB_StopSession_FIELDLIST(X, a) \
|
|
|
|
|
|
|
|
#define PB_StopSession_CALLBACK NULL
|
|
|
|
#define PB_StopSession_DEFAULT NULL
|
|
|
|
|
2021-10-12 11:48:34 +00:00
|
|
|
#define PB_Main_FIELDLIST(X, a) \
|
|
|
|
X(a, STATIC, SINGULAR, UINT32, command_id, 1) \
|
|
|
|
X(a, STATIC, SINGULAR, UENUM, command_status, 2) \
|
|
|
|
X(a, STATIC, SINGULAR, BOOL, has_next, 3) \
|
|
|
|
X(a, STATIC, ONEOF, MSG_W_CB, (content,empty,content.empty), 4) \
|
|
|
|
X(a, STATIC, ONEOF, MSG_W_CB, (content,ping_request,content.ping_request), 5) \
|
|
|
|
X(a, STATIC, ONEOF, MSG_W_CB, (content,ping_response,content.ping_response), 6) \
|
|
|
|
X(a, STATIC, ONEOF, MSG_W_CB, (content,storage_list_request,content.storage_list_request), 7) \
|
|
|
|
X(a, STATIC, ONEOF, MSG_W_CB, (content,storage_list_response,content.storage_list_response), 8) \
|
|
|
|
X(a, STATIC, ONEOF, MSG_W_CB, (content,storage_read_request,content.storage_read_request), 9) \
|
|
|
|
X(a, STATIC, ONEOF, MSG_W_CB, (content,storage_read_response,content.storage_read_response), 10) \
|
|
|
|
X(a, STATIC, ONEOF, MSG_W_CB, (content,storage_write_request,content.storage_write_request), 11) \
|
|
|
|
X(a, STATIC, ONEOF, MSG_W_CB, (content,storage_delete_request,content.storage_delete_request), 12) \
|
|
|
|
X(a, STATIC, ONEOF, MSG_W_CB, (content,storage_mkdir_request,content.storage_mkdir_request), 13) \
|
|
|
|
X(a, STATIC, ONEOF, MSG_W_CB, (content,storage_md5sum_request,content.storage_md5sum_request), 14) \
|
2021-10-13 15:39:37 +00:00
|
|
|
X(a, STATIC, ONEOF, MSG_W_CB, (content,storage_md5sum_response,content.storage_md5sum_response), 15) \
|
2021-11-01 16:26:37 +00:00
|
|
|
X(a, STATIC, ONEOF, MSG_W_CB, (content,app_start_request,content.app_start_request), 16) \
|
2021-10-13 15:39:37 +00:00
|
|
|
X(a, STATIC, ONEOF, MSG_W_CB, (content,app_lock_status_request,content.app_lock_status_request), 17) \
|
2021-10-26 16:05:28 +00:00
|
|
|
X(a, STATIC, ONEOF, MSG_W_CB, (content,app_lock_status_response,content.app_lock_status_response), 18) \
|
2021-11-01 16:26:37 +00:00
|
|
|
X(a, STATIC, ONEOF, MSG_W_CB, (content,stop_session,content.stop_session), 19) \
|
|
|
|
X(a, STATIC, ONEOF, MSG_W_CB, (content,gui_start_screen_stream_request,content.gui_start_screen_stream_request), 20) \
|
|
|
|
X(a, STATIC, ONEOF, MSG_W_CB, (content,gui_stop_screen_stream_request,content.gui_stop_screen_stream_request), 21) \
|
2021-11-12 13:04:35 +00:00
|
|
|
X(a, STATIC, ONEOF, MSG_W_CB, (content,gui_screen_frame,content.gui_screen_frame), 22) \
|
2021-11-01 20:35:54 +00:00
|
|
|
X(a, STATIC, ONEOF, MSG_W_CB, (content,gui_send_input_event_request,content.gui_send_input_event_request), 23) \
|
|
|
|
X(a, STATIC, ONEOF, MSG_W_CB, (content,storage_stat_request,content.storage_stat_request), 24) \
|
2021-11-12 13:04:35 +00:00
|
|
|
X(a, STATIC, ONEOF, MSG_W_CB, (content,storage_stat_response,content.storage_stat_response), 25) \
|
|
|
|
X(a, STATIC, ONEOF, MSG_W_CB, (content,gui_start_virtual_display_request,content.gui_start_virtual_display_request), 26) \
|
|
|
|
X(a, STATIC, ONEOF, MSG_W_CB, (content,gui_stop_virtual_display_request,content.gui_stop_virtual_display_request), 27)
|
2021-10-12 11:48:34 +00:00
|
|
|
#define PB_Main_CALLBACK NULL
|
|
|
|
#define PB_Main_DEFAULT NULL
|
|
|
|
#define PB_Main_content_empty_MSGTYPE PB_Empty
|
|
|
|
#define PB_Main_content_ping_request_MSGTYPE PB_Status_PingRequest
|
|
|
|
#define PB_Main_content_ping_response_MSGTYPE PB_Status_PingResponse
|
|
|
|
#define PB_Main_content_storage_list_request_MSGTYPE PB_Storage_ListRequest
|
|
|
|
#define PB_Main_content_storage_list_response_MSGTYPE PB_Storage_ListResponse
|
|
|
|
#define PB_Main_content_storage_read_request_MSGTYPE PB_Storage_ReadRequest
|
|
|
|
#define PB_Main_content_storage_read_response_MSGTYPE PB_Storage_ReadResponse
|
|
|
|
#define PB_Main_content_storage_write_request_MSGTYPE PB_Storage_WriteRequest
|
|
|
|
#define PB_Main_content_storage_delete_request_MSGTYPE PB_Storage_DeleteRequest
|
|
|
|
#define PB_Main_content_storage_mkdir_request_MSGTYPE PB_Storage_MkdirRequest
|
|
|
|
#define PB_Main_content_storage_md5sum_request_MSGTYPE PB_Storage_Md5sumRequest
|
|
|
|
#define PB_Main_content_storage_md5sum_response_MSGTYPE PB_Storage_Md5sumResponse
|
2021-11-01 16:26:37 +00:00
|
|
|
#define PB_Main_content_app_start_request_MSGTYPE PB_App_StartRequest
|
2021-10-13 15:39:37 +00:00
|
|
|
#define PB_Main_content_app_lock_status_request_MSGTYPE PB_App_LockStatusRequest
|
|
|
|
#define PB_Main_content_app_lock_status_response_MSGTYPE PB_App_LockStatusResponse
|
2021-10-26 16:05:28 +00:00
|
|
|
#define PB_Main_content_stop_session_MSGTYPE PB_StopSession
|
2021-11-01 16:26:37 +00:00
|
|
|
#define PB_Main_content_gui_start_screen_stream_request_MSGTYPE PB_Gui_StartScreenStreamRequest
|
|
|
|
#define PB_Main_content_gui_stop_screen_stream_request_MSGTYPE PB_Gui_StopScreenStreamRequest
|
2021-11-12 13:04:35 +00:00
|
|
|
#define PB_Main_content_gui_screen_frame_MSGTYPE PB_Gui_ScreenFrame
|
2021-11-01 16:26:37 +00:00
|
|
|
#define PB_Main_content_gui_send_input_event_request_MSGTYPE PB_Gui_SendInputEventRequest
|
2021-11-01 20:35:54 +00:00
|
|
|
#define PB_Main_content_storage_stat_request_MSGTYPE PB_Storage_StatRequest
|
|
|
|
#define PB_Main_content_storage_stat_response_MSGTYPE PB_Storage_StatResponse
|
2021-11-12 13:04:35 +00:00
|
|
|
#define PB_Main_content_gui_start_virtual_display_request_MSGTYPE PB_Gui_StartVirtualDisplayRequest
|
|
|
|
#define PB_Main_content_gui_stop_virtual_display_request_MSGTYPE PB_Gui_StopVirtualDisplayRequest
|
2021-10-12 11:48:34 +00:00
|
|
|
|
|
|
|
extern const pb_msgdesc_t PB_Empty_msg;
|
2021-10-26 16:05:28 +00:00
|
|
|
extern const pb_msgdesc_t PB_StopSession_msg;
|
2021-10-12 11:48:34 +00:00
|
|
|
extern const pb_msgdesc_t PB_Main_msg;
|
|
|
|
|
|
|
|
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
|
|
|
#define PB_Empty_fields &PB_Empty_msg
|
2021-10-26 16:05:28 +00:00
|
|
|
#define PB_StopSession_fields &PB_StopSession_msg
|
2021-10-12 11:48:34 +00:00
|
|
|
#define PB_Main_fields &PB_Main_msg
|
|
|
|
|
|
|
|
/* Maximum encoded size of messages (where known) */
|
|
|
|
#define PB_Empty_size 0
|
2021-10-26 16:05:28 +00:00
|
|
|
#define PB_StopSession_size 0
|
2021-11-23 08:30:54 +00:00
|
|
|
#if defined(PB_Status_PingRequest_size) && defined(PB_Status_PingResponse_size) && 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_StartRequest_size) && defined(PB_Gui_ScreenFrame_size) && defined(PB_Storage_StatRequest_size) && defined(PB_Storage_StatResponse_size)
|
2021-10-12 11:48:34 +00:00
|
|
|
#define PB_Main_size (10 + sizeof(union PB_Main_content_size_union))
|
2021-11-23 08:30:54 +00:00
|
|
|
union PB_Main_content_size_union {char f5[(6 + PB_Status_PingRequest_size)]; char f6[(6 + PB_Status_PingResponse_size)]; 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_StartRequest_size)]; char f22[(7 + PB_Gui_ScreenFrame_size)]; char f24[(7 + PB_Storage_StatRequest_size)]; char f25[(7 + PB_Storage_StatResponse_size)]; char f0[36];};
|
2021-10-12 11:48:34 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
} /* extern "C" */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|