/* Automatically generated nanopb header */ #ifndef _PB_PAATTI_PB_H_ #define _PB_PAATTI_PB_H_ #include /* Enum definitions */ typedef enum { RPCCommand_Error = 0, RPCCommand_Login = 1, RPCCommand_Ping = 2, RPCCommand_DiscSpace = 10, RPCCommand_DirectoryListing = 11, RPCCommand_WriteFile = 12, RPCCommand_ReadFile = 13, RPCCommand_CopyFile = 14, RPCCommand_MoveFile = 15, RPCCommand_RemoveFile = 16, RPCCommand_MakeDirectory = 17, RPCCommand_ReadTail = 18, RPCCommand_FileChecksum = 19, RPCCommand_FreeMemory = 40 } RPCCommand; typedef enum { ErrorResponse_ErrorScope_PROTOCOL = 1, ErrorResponse_ErrorScope_RESOURCES = 2, ErrorResponse_ErrorScope_FILESYSTEM = 3, ErrorResponse_ErrorScope_HARDWARE = 4 } ErrorResponse_ErrorScope; typedef enum { ErrorResponse_FileSystemError_FR_OK = 0, ErrorResponse_FileSystemError_FR_DISK_ERR = 1, ErrorResponse_FileSystemError_FR_INT_ERR = 2, ErrorResponse_FileSystemError_FR_NOT_READY = 3, ErrorResponse_FileSystemError_FR_NO_FILE = 4, ErrorResponse_FileSystemError_FR_NO_PATH = 5, ErrorResponse_FileSystemError_FR_INVALID_NAME = 6, ErrorResponse_FileSystemError_FR_DENIED = 7, ErrorResponse_FileSystemError_FR_EXIST = 8, ErrorResponse_FileSystemError_FR_INVALID_OBJECT = 9, ErrorResponse_FileSystemError_FR_WRITE_PROTECTED = 10, ErrorResponse_FileSystemError_FR_INVALID_DRIVE = 11, ErrorResponse_FileSystemError_FR_NOT_ENABLED = 12, ErrorResponse_FileSystemError_FR_NO_FILESYSTEM = 13, ErrorResponse_FileSystemError_FR_MKFS_ABORTED = 14, ErrorResponse_FileSystemError_FR_TIMEOUT = 15, ErrorResponse_FileSystemError_FR_LOCKED = 16, ErrorResponse_FileSystemError_FR_NOT_ENOUGH_CORE = 17, ErrorResponse_FileSystemError_FR_TOO_MANY_OPEN_FILES = 18 } ErrorResponse_FileSystemError; /* Struct definitions */ typedef struct { } CopyFileResponse; typedef struct { } DiscSpaceRequest; typedef struct { } FreeMemoryRequest; typedef struct { } LoginResponse; typedef struct { } MakeDirectoryResponse; typedef struct { } MoveFileResponse; typedef struct { } PingRequest; typedef struct { } PingResponse; typedef struct { } RemoveFileResponse; typedef struct { } WriteFileResponse; typedef struct { pb_callback_t source; pb_callback_t destination; bool has_overwrite; bool overwrite; } CopyFileRequest; typedef struct { pb_callback_t path; } DirectoryListingRequest; typedef struct { pb_callback_t file; } DirectoryListingResponse; typedef struct { uint64_t free_bytes; bool has_total_bytes; uint64_t total_bytes; bool has_cluster_size; uint32_t cluster_size; } DiscSpaceResponse; typedef struct { ErrorResponse_ErrorScope scope; pb_callback_t message; bool has_fs_error; ErrorResponse_FileSystemError fs_error; } ErrorResponse; typedef struct { pb_callback_t path; bool has_offset; uint32_t offset; bool has_count; uint32_t count; } FileChecksumRequest; typedef struct { uint32_t checksum; uint32_t blocks; } FileChecksumResponse; typedef struct { pb_callback_t path; uint32_t size; bool is_directory; pb_callback_t time; bool has_is_readonly; bool is_readonly; bool has_is_system; bool is_system; bool has_is_hidden; bool is_hidden; bool has_is_archive; bool is_archive; } FileInfo; typedef struct { uint32_t free_bytes; bool has_largest_free_block; uint32_t largest_free_block; } FreeMemoryResponse; typedef struct { bool has_im_rpc_server; bool im_rpc_server; } LoginRequest; typedef struct { pb_callback_t path; } MakeDirectoryRequest; typedef struct { pb_callback_t source; pb_callback_t destination; bool has_overwrite; bool overwrite; } MoveFileRequest; typedef struct { pb_callback_t path; bool has_count; uint32_t count; bool has_offset; uint32_t offset; } ReadFileRequest; typedef struct { pb_callback_t data; bool has_end_of_file; bool end_of_file; } ReadFileResponse; typedef struct { pb_callback_t path; bool has_number_of_lines; uint32_t number_of_lines; } ReadTailRequest; typedef struct { pb_callback_t data; } ReadTailResponse; typedef struct { pb_callback_t path; } RemoveFileRequest; typedef struct { pb_callback_t path; pb_callback_t data; bool has_offset; uint32_t offset; bool has_truncate; bool truncate; } WriteFileRequest; /* Default values for struct fields */ extern const bool LoginRequest_im_rpc_server_default; extern const bool FileInfo_is_readonly_default; extern const bool FileInfo_is_system_default; extern const bool FileInfo_is_hidden_default; extern const bool FileInfo_is_archive_default; extern const uint32_t WriteFileRequest_offset_default; extern const bool WriteFileRequest_truncate_default; extern const uint32_t ReadFileRequest_count_default; extern const uint32_t ReadFileRequest_offset_default; extern const bool ReadFileResponse_end_of_file_default; extern const bool CopyFileRequest_overwrite_default; extern const bool MoveFileRequest_overwrite_default; extern const uint32_t ReadTailRequest_number_of_lines_default; extern const uint32_t FileChecksumRequest_offset_default; extern const uint32_t FileChecksumRequest_count_default; /* Struct field encoding specification for nanopb */ extern const pb_field_t ErrorResponse_fields[4]; extern const pb_field_t LoginRequest_fields[2]; extern const pb_field_t LoginResponse_fields[1]; extern const pb_field_t PingRequest_fields[1]; extern const pb_field_t PingResponse_fields[1]; extern const pb_field_t DiscSpaceRequest_fields[1]; extern const pb_field_t DiscSpaceResponse_fields[4]; extern const pb_field_t DirectoryListingRequest_fields[2]; extern const pb_field_t FileInfo_fields[9]; extern const pb_field_t DirectoryListingResponse_fields[2]; extern const pb_field_t WriteFileRequest_fields[5]; extern const pb_field_t WriteFileResponse_fields[1]; extern const pb_field_t ReadFileRequest_fields[4]; extern const pb_field_t ReadFileResponse_fields[3]; extern const pb_field_t CopyFileRequest_fields[4]; extern const pb_field_t CopyFileResponse_fields[1]; extern const pb_field_t MoveFileRequest_fields[4]; extern const pb_field_t MoveFileResponse_fields[1]; extern const pb_field_t RemoveFileRequest_fields[2]; extern const pb_field_t RemoveFileResponse_fields[1]; extern const pb_field_t MakeDirectoryRequest_fields[2]; extern const pb_field_t MakeDirectoryResponse_fields[1]; extern const pb_field_t ReadTailRequest_fields[3]; extern const pb_field_t ReadTailResponse_fields[2]; extern const pb_field_t FileChecksumRequest_fields[4]; extern const pb_field_t FileChecksumResponse_fields[3]; extern const pb_field_t FreeMemoryRequest_fields[1]; extern const pb_field_t FreeMemoryResponse_fields[3]; #endif