mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-23 21:13:16 +00:00
e9e76e144c
* RPC: Update protobuf sources * RPC: Implement storage_stat_request * RPC: Test storage_stat_request * FuriRecord: fix use after free in destroy method. * Furi: refactor PubSub and it's usage. Fix allocation in RPC. * FuriCore: fix memory leak in pubsub * FuriCore: update unsubscribe method signature in pubsub, make subscription structure lighter. * FuriCore: remove dead code Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
247 lines
10 KiB
C
247 lines
10 KiB
C
/* Automatically generated nanopb header */
|
|
/* Generated by nanopb-0.4.5 */
|
|
|
|
#ifndef PB_PB_STORAGE_STORAGE_PB_H_INCLUDED
|
|
#define PB_PB_STORAGE_STORAGE_PB_H_INCLUDED
|
|
#include <pb.h>
|
|
|
|
#if PB_PROTO_HEADER_VERSION != 40
|
|
#error Regenerate this file with the current version of nanopb generator.
|
|
#endif
|
|
|
|
/* Enum definitions */
|
|
typedef enum _PB_Storage_File_FileType {
|
|
PB_Storage_File_FileType_FILE = 0,
|
|
PB_Storage_File_FileType_DIR = 1
|
|
} PB_Storage_File_FileType;
|
|
|
|
/* Struct definitions */
|
|
typedef struct _PB_Storage_ListRequest {
|
|
char *path;
|
|
} PB_Storage_ListRequest;
|
|
|
|
typedef struct _PB_Storage_Md5sumRequest {
|
|
char *path;
|
|
} PB_Storage_Md5sumRequest;
|
|
|
|
typedef struct _PB_Storage_MkdirRequest {
|
|
char *path;
|
|
} PB_Storage_MkdirRequest;
|
|
|
|
typedef struct _PB_Storage_ReadRequest {
|
|
char *path;
|
|
} PB_Storage_ReadRequest;
|
|
|
|
typedef struct _PB_Storage_StatRequest {
|
|
char *path;
|
|
} PB_Storage_StatRequest;
|
|
|
|
typedef struct _PB_Storage_DeleteRequest {
|
|
char *path;
|
|
bool recursive;
|
|
} PB_Storage_DeleteRequest;
|
|
|
|
typedef struct _PB_Storage_File {
|
|
PB_Storage_File_FileType type;
|
|
char *name;
|
|
uint32_t size;
|
|
pb_bytes_array_t *data;
|
|
} PB_Storage_File;
|
|
|
|
typedef struct _PB_Storage_Md5sumResponse {
|
|
char md5sum[33];
|
|
} PB_Storage_Md5sumResponse;
|
|
|
|
typedef struct _PB_Storage_ListResponse {
|
|
pb_size_t file_count;
|
|
PB_Storage_File file[8];
|
|
} PB_Storage_ListResponse;
|
|
|
|
typedef struct _PB_Storage_ReadResponse {
|
|
bool has_file;
|
|
PB_Storage_File file;
|
|
} PB_Storage_ReadResponse;
|
|
|
|
typedef struct _PB_Storage_StatResponse {
|
|
bool has_file;
|
|
PB_Storage_File file;
|
|
} PB_Storage_StatResponse;
|
|
|
|
typedef struct _PB_Storage_WriteRequest {
|
|
char *path;
|
|
bool has_file;
|
|
PB_Storage_File file;
|
|
} PB_Storage_WriteRequest;
|
|
|
|
|
|
/* Helper constants for enums */
|
|
#define _PB_Storage_File_FileType_MIN PB_Storage_File_FileType_FILE
|
|
#define _PB_Storage_File_FileType_MAX PB_Storage_File_FileType_DIR
|
|
#define _PB_Storage_File_FileType_ARRAYSIZE ((PB_Storage_File_FileType)(PB_Storage_File_FileType_DIR+1))
|
|
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* Initializer values for message structs */
|
|
#define PB_Storage_File_init_default {_PB_Storage_File_FileType_MIN, NULL, 0, NULL}
|
|
#define PB_Storage_StatRequest_init_default {NULL}
|
|
#define PB_Storage_StatResponse_init_default {false, PB_Storage_File_init_default}
|
|
#define PB_Storage_ListRequest_init_default {NULL}
|
|
#define PB_Storage_ListResponse_init_default {0, {PB_Storage_File_init_default, PB_Storage_File_init_default, PB_Storage_File_init_default, PB_Storage_File_init_default, PB_Storage_File_init_default, PB_Storage_File_init_default, PB_Storage_File_init_default, PB_Storage_File_init_default}}
|
|
#define PB_Storage_ReadRequest_init_default {NULL}
|
|
#define PB_Storage_ReadResponse_init_default {false, PB_Storage_File_init_default}
|
|
#define PB_Storage_WriteRequest_init_default {NULL, false, PB_Storage_File_init_default}
|
|
#define PB_Storage_DeleteRequest_init_default {NULL, 0}
|
|
#define PB_Storage_MkdirRequest_init_default {NULL}
|
|
#define PB_Storage_Md5sumRequest_init_default {NULL}
|
|
#define PB_Storage_Md5sumResponse_init_default {""}
|
|
#define PB_Storage_File_init_zero {_PB_Storage_File_FileType_MIN, NULL, 0, NULL}
|
|
#define PB_Storage_StatRequest_init_zero {NULL}
|
|
#define PB_Storage_StatResponse_init_zero {false, PB_Storage_File_init_zero}
|
|
#define PB_Storage_ListRequest_init_zero {NULL}
|
|
#define PB_Storage_ListResponse_init_zero {0, {PB_Storage_File_init_zero, PB_Storage_File_init_zero, PB_Storage_File_init_zero, PB_Storage_File_init_zero, PB_Storage_File_init_zero, PB_Storage_File_init_zero, PB_Storage_File_init_zero, PB_Storage_File_init_zero}}
|
|
#define PB_Storage_ReadRequest_init_zero {NULL}
|
|
#define PB_Storage_ReadResponse_init_zero {false, PB_Storage_File_init_zero}
|
|
#define PB_Storage_WriteRequest_init_zero {NULL, false, PB_Storage_File_init_zero}
|
|
#define PB_Storage_DeleteRequest_init_zero {NULL, 0}
|
|
#define PB_Storage_MkdirRequest_init_zero {NULL}
|
|
#define PB_Storage_Md5sumRequest_init_zero {NULL}
|
|
#define PB_Storage_Md5sumResponse_init_zero {""}
|
|
|
|
/* Field tags (for use in manual encoding/decoding) */
|
|
#define PB_Storage_ListRequest_path_tag 1
|
|
#define PB_Storage_Md5sumRequest_path_tag 1
|
|
#define PB_Storage_MkdirRequest_path_tag 1
|
|
#define PB_Storage_ReadRequest_path_tag 1
|
|
#define PB_Storage_StatRequest_path_tag 1
|
|
#define PB_Storage_DeleteRequest_path_tag 1
|
|
#define PB_Storage_DeleteRequest_recursive_tag 2
|
|
#define PB_Storage_File_type_tag 1
|
|
#define PB_Storage_File_name_tag 2
|
|
#define PB_Storage_File_size_tag 3
|
|
#define PB_Storage_File_data_tag 4
|
|
#define PB_Storage_Md5sumResponse_md5sum_tag 1
|
|
#define PB_Storage_ListResponse_file_tag 1
|
|
#define PB_Storage_ReadResponse_file_tag 1
|
|
#define PB_Storage_StatResponse_file_tag 1
|
|
#define PB_Storage_WriteRequest_path_tag 1
|
|
#define PB_Storage_WriteRequest_file_tag 2
|
|
|
|
/* Struct field encoding specification for nanopb */
|
|
#define PB_Storage_File_FIELDLIST(X, a) \
|
|
X(a, STATIC, SINGULAR, UENUM, type, 1) \
|
|
X(a, POINTER, SINGULAR, STRING, name, 2) \
|
|
X(a, STATIC, SINGULAR, UINT32, size, 3) \
|
|
X(a, POINTER, SINGULAR, BYTES, data, 4)
|
|
#define PB_Storage_File_CALLBACK NULL
|
|
#define PB_Storage_File_DEFAULT NULL
|
|
|
|
#define PB_Storage_StatRequest_FIELDLIST(X, a) \
|
|
X(a, POINTER, SINGULAR, STRING, path, 1)
|
|
#define PB_Storage_StatRequest_CALLBACK NULL
|
|
#define PB_Storage_StatRequest_DEFAULT NULL
|
|
|
|
#define PB_Storage_StatResponse_FIELDLIST(X, a) \
|
|
X(a, STATIC, OPTIONAL, MESSAGE, file, 1)
|
|
#define PB_Storage_StatResponse_CALLBACK NULL
|
|
#define PB_Storage_StatResponse_DEFAULT NULL
|
|
#define PB_Storage_StatResponse_file_MSGTYPE PB_Storage_File
|
|
|
|
#define PB_Storage_ListRequest_FIELDLIST(X, a) \
|
|
X(a, POINTER, SINGULAR, STRING, path, 1)
|
|
#define PB_Storage_ListRequest_CALLBACK NULL
|
|
#define PB_Storage_ListRequest_DEFAULT NULL
|
|
|
|
#define PB_Storage_ListResponse_FIELDLIST(X, a) \
|
|
X(a, STATIC, REPEATED, MESSAGE, file, 1)
|
|
#define PB_Storage_ListResponse_CALLBACK NULL
|
|
#define PB_Storage_ListResponse_DEFAULT NULL
|
|
#define PB_Storage_ListResponse_file_MSGTYPE PB_Storage_File
|
|
|
|
#define PB_Storage_ReadRequest_FIELDLIST(X, a) \
|
|
X(a, POINTER, SINGULAR, STRING, path, 1)
|
|
#define PB_Storage_ReadRequest_CALLBACK NULL
|
|
#define PB_Storage_ReadRequest_DEFAULT NULL
|
|
|
|
#define PB_Storage_ReadResponse_FIELDLIST(X, a) \
|
|
X(a, STATIC, OPTIONAL, MESSAGE, file, 1)
|
|
#define PB_Storage_ReadResponse_CALLBACK NULL
|
|
#define PB_Storage_ReadResponse_DEFAULT NULL
|
|
#define PB_Storage_ReadResponse_file_MSGTYPE PB_Storage_File
|
|
|
|
#define PB_Storage_WriteRequest_FIELDLIST(X, a) \
|
|
X(a, POINTER, SINGULAR, STRING, path, 1) \
|
|
X(a, STATIC, OPTIONAL, MESSAGE, file, 2)
|
|
#define PB_Storage_WriteRequest_CALLBACK NULL
|
|
#define PB_Storage_WriteRequest_DEFAULT NULL
|
|
#define PB_Storage_WriteRequest_file_MSGTYPE PB_Storage_File
|
|
|
|
#define PB_Storage_DeleteRequest_FIELDLIST(X, a) \
|
|
X(a, POINTER, SINGULAR, STRING, path, 1) \
|
|
X(a, STATIC, SINGULAR, BOOL, recursive, 2)
|
|
#define PB_Storage_DeleteRequest_CALLBACK NULL
|
|
#define PB_Storage_DeleteRequest_DEFAULT NULL
|
|
|
|
#define PB_Storage_MkdirRequest_FIELDLIST(X, a) \
|
|
X(a, POINTER, SINGULAR, STRING, path, 1)
|
|
#define PB_Storage_MkdirRequest_CALLBACK NULL
|
|
#define PB_Storage_MkdirRequest_DEFAULT NULL
|
|
|
|
#define PB_Storage_Md5sumRequest_FIELDLIST(X, a) \
|
|
X(a, POINTER, SINGULAR, STRING, path, 1)
|
|
#define PB_Storage_Md5sumRequest_CALLBACK NULL
|
|
#define PB_Storage_Md5sumRequest_DEFAULT NULL
|
|
|
|
#define PB_Storage_Md5sumResponse_FIELDLIST(X, a) \
|
|
X(a, STATIC, SINGULAR, STRING, md5sum, 1)
|
|
#define PB_Storage_Md5sumResponse_CALLBACK NULL
|
|
#define PB_Storage_Md5sumResponse_DEFAULT NULL
|
|
|
|
extern const pb_msgdesc_t PB_Storage_File_msg;
|
|
extern const pb_msgdesc_t PB_Storage_StatRequest_msg;
|
|
extern const pb_msgdesc_t PB_Storage_StatResponse_msg;
|
|
extern const pb_msgdesc_t PB_Storage_ListRequest_msg;
|
|
extern const pb_msgdesc_t PB_Storage_ListResponse_msg;
|
|
extern const pb_msgdesc_t PB_Storage_ReadRequest_msg;
|
|
extern const pb_msgdesc_t PB_Storage_ReadResponse_msg;
|
|
extern const pb_msgdesc_t PB_Storage_WriteRequest_msg;
|
|
extern const pb_msgdesc_t PB_Storage_DeleteRequest_msg;
|
|
extern const pb_msgdesc_t PB_Storage_MkdirRequest_msg;
|
|
extern const pb_msgdesc_t PB_Storage_Md5sumRequest_msg;
|
|
extern const pb_msgdesc_t PB_Storage_Md5sumResponse_msg;
|
|
|
|
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
|
#define PB_Storage_File_fields &PB_Storage_File_msg
|
|
#define PB_Storage_StatRequest_fields &PB_Storage_StatRequest_msg
|
|
#define PB_Storage_StatResponse_fields &PB_Storage_StatResponse_msg
|
|
#define PB_Storage_ListRequest_fields &PB_Storage_ListRequest_msg
|
|
#define PB_Storage_ListResponse_fields &PB_Storage_ListResponse_msg
|
|
#define PB_Storage_ReadRequest_fields &PB_Storage_ReadRequest_msg
|
|
#define PB_Storage_ReadResponse_fields &PB_Storage_ReadResponse_msg
|
|
#define PB_Storage_WriteRequest_fields &PB_Storage_WriteRequest_msg
|
|
#define PB_Storage_DeleteRequest_fields &PB_Storage_DeleteRequest_msg
|
|
#define PB_Storage_MkdirRequest_fields &PB_Storage_MkdirRequest_msg
|
|
#define PB_Storage_Md5sumRequest_fields &PB_Storage_Md5sumRequest_msg
|
|
#define PB_Storage_Md5sumResponse_fields &PB_Storage_Md5sumResponse_msg
|
|
|
|
/* Maximum encoded size of messages (where known) */
|
|
/* PB_Storage_File_size depends on runtime parameters */
|
|
/* PB_Storage_StatRequest_size depends on runtime parameters */
|
|
/* PB_Storage_StatResponse_size depends on runtime parameters */
|
|
/* PB_Storage_ListRequest_size depends on runtime parameters */
|
|
/* PB_Storage_ListResponse_size depends on runtime parameters */
|
|
/* PB_Storage_ReadRequest_size depends on runtime parameters */
|
|
/* PB_Storage_ReadResponse_size depends on runtime parameters */
|
|
/* PB_Storage_WriteRequest_size depends on runtime parameters */
|
|
/* PB_Storage_DeleteRequest_size depends on runtime parameters */
|
|
/* PB_Storage_MkdirRequest_size depends on runtime parameters */
|
|
/* PB_Storage_Md5sumRequest_size depends on runtime parameters */
|
|
#define PB_Storage_Md5sumResponse_size 34
|
|
|
|
#ifdef __cplusplus
|
|
} /* extern "C" */
|
|
#endif
|
|
|
|
#endif
|