2014-04-29 12:26:51 +00:00
|
|
|
/* Automatically generated nanopb header */
|
2016-08-29 10:59:29 +00:00
|
|
|
/* Generated by nanopb-0.2.9.3 */
|
2014-04-29 12:26:51 +00:00
|
|
|
|
2014-12-27 13:32:25 +00:00
|
|
|
#ifndef _PB_STORAGE_PB_H_
|
|
|
|
#define _PB_STORAGE_PB_H_
|
2014-04-29 12:26:51 +00:00
|
|
|
#include "pb.h"
|
|
|
|
#include "types.pb.h"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Enum definitions */
|
|
|
|
/* Struct definitions */
|
2015-02-04 20:27:07 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[1024];
|
|
|
|
} Storage_homescreen_t;
|
|
|
|
|
2014-04-29 12:26:51 +00:00
|
|
|
typedef struct _Storage {
|
|
|
|
uint32_t version;
|
|
|
|
bool has_node;
|
|
|
|
HDNodeType node;
|
|
|
|
bool has_mnemonic;
|
|
|
|
char mnemonic[241];
|
|
|
|
bool has_passphrase_protection;
|
|
|
|
bool passphrase_protection;
|
|
|
|
bool has_pin_failed_attempts;
|
|
|
|
uint32_t pin_failed_attempts;
|
|
|
|
bool has_pin;
|
|
|
|
char pin[10];
|
|
|
|
bool has_language;
|
|
|
|
char language[17];
|
|
|
|
bool has_label;
|
|
|
|
char label[33];
|
2014-05-25 22:58:17 +00:00
|
|
|
bool has_imported;
|
|
|
|
bool imported;
|
2015-02-04 20:27:07 +00:00
|
|
|
bool has_homescreen;
|
|
|
|
Storage_homescreen_t homescreen;
|
2015-11-19 10:48:26 +00:00
|
|
|
bool has_u2f_counter;
|
|
|
|
uint32_t u2f_counter;
|
2017-06-28 16:49:44 +00:00
|
|
|
bool has_needs_backup;
|
|
|
|
bool needs_backup;
|
2017-07-17 16:36:09 +00:00
|
|
|
bool has_flags;
|
|
|
|
uint32_t flags;
|
2014-04-29 12:26:51 +00:00
|
|
|
} Storage;
|
|
|
|
|
|
|
|
/* Default values for struct fields */
|
|
|
|
|
2014-11-12 18:17:14 +00:00
|
|
|
/* Initializer values for message structs */
|
2017-07-17 16:36:09 +00:00
|
|
|
#define Storage_init_default {0, false, HDNodeType_init_default, false, "", false, 0, false, 0, false, "", false, "", false, "", false, 0, false, {0, {0}}, false, 0, false, 0, false, 0}
|
|
|
|
#define Storage_init_zero {0, false, HDNodeType_init_zero, false, "", false, 0, false, 0, false, "", false, "", false, "", false, 0, false, {0, {0}}, false, 0, false, 0, false, 0}
|
2014-11-12 18:17:14 +00:00
|
|
|
|
2014-04-29 12:26:51 +00:00
|
|
|
/* Field tags (for use in manual encoding/decoding) */
|
|
|
|
#define Storage_version_tag 1
|
|
|
|
#define Storage_node_tag 2
|
|
|
|
#define Storage_mnemonic_tag 3
|
|
|
|
#define Storage_passphrase_protection_tag 4
|
|
|
|
#define Storage_pin_failed_attempts_tag 5
|
|
|
|
#define Storage_pin_tag 6
|
|
|
|
#define Storage_language_tag 7
|
|
|
|
#define Storage_label_tag 8
|
2014-05-25 22:58:17 +00:00
|
|
|
#define Storage_imported_tag 9
|
2015-02-04 20:27:07 +00:00
|
|
|
#define Storage_homescreen_tag 10
|
2015-11-19 10:48:26 +00:00
|
|
|
#define Storage_u2f_counter_tag 11
|
2017-06-28 16:49:44 +00:00
|
|
|
#define Storage_needs_backup_tag 12
|
2017-07-17 16:36:09 +00:00
|
|
|
#define Storage_flags_tag 13
|
2014-04-29 12:26:51 +00:00
|
|
|
|
|
|
|
/* Struct field encoding specification for nanopb */
|
2017-07-17 16:36:09 +00:00
|
|
|
extern const pb_field_t Storage_fields[14];
|
2014-04-29 12:26:51 +00:00
|
|
|
|
|
|
|
/* Maximum encoded size of messages (where known) */
|
2017-07-17 16:36:09 +00:00
|
|
|
#define Storage_size (1373 + HDNodeType_size)
|
2014-04-29 12:26:51 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
} /* extern "C" */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|