mirror of
https://github.com/Lurkars/esp-ena.git
synced 2024-11-23 02:16:12 +01:00
148 lines
6.4 KiB
C
148 lines
6.4 KiB
C
|
/* Automatically generated nanopb header */
|
||
|
/* Generated by nanopb-0.4.2 */
|
||
|
|
||
|
#ifndef PB_TEMPORARYEXPOSUREKEYEXPORT_PB_H_INCLUDED
|
||
|
#define PB_TEMPORARYEXPOSUREKEYEXPORT_PB_H_INCLUDED
|
||
|
#include <pb.h>
|
||
|
|
||
|
#if PB_PROTO_HEADER_VERSION != 40
|
||
|
#error Regenerate this file with the current version of nanopb generator.
|
||
|
#endif
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
extern "C" {
|
||
|
#endif
|
||
|
|
||
|
/* Enum definitions */
|
||
|
typedef enum _TemporaryExposureKey_ReportType {
|
||
|
TemporaryExposureKey_ReportType_UNKNOWN = 0,
|
||
|
TemporaryExposureKey_ReportType_CONFIRMED_TEST = 1,
|
||
|
TemporaryExposureKey_ReportType_CONFIRMED_CLINICAL_DIAGNOSIS = 2,
|
||
|
TemporaryExposureKey_ReportType_SELF_REPORT = 3,
|
||
|
TemporaryExposureKey_ReportType_RECURSIVE = 4,
|
||
|
TemporaryExposureKey_ReportType_REVOKED = 5
|
||
|
} TemporaryExposureKey_ReportType;
|
||
|
|
||
|
/* Struct definitions */
|
||
|
typedef struct _SignatureInfo {
|
||
|
pb_callback_t verification_key_version;
|
||
|
pb_callback_t verification_key_id;
|
||
|
pb_callback_t signature_algorithm;
|
||
|
} SignatureInfo;
|
||
|
|
||
|
typedef struct _TemporaryExposureKey {
|
||
|
pb_callback_t key_data;
|
||
|
bool has_transmission_risk_level;
|
||
|
int32_t transmission_risk_level;
|
||
|
bool has_rolling_start_interval_number;
|
||
|
int32_t rolling_start_interval_number;
|
||
|
bool has_rolling_period;
|
||
|
int32_t rolling_period;
|
||
|
bool has_report_type;
|
||
|
TemporaryExposureKey_ReportType report_type;
|
||
|
bool has_days_since_onset_of_symptoms;
|
||
|
int32_t days_since_onset_of_symptoms;
|
||
|
} TemporaryExposureKey;
|
||
|
|
||
|
typedef struct _TemporaryExposureKeyExport {
|
||
|
bool has_start_timestamp;
|
||
|
uint64_t start_timestamp;
|
||
|
bool has_end_timestamp;
|
||
|
uint64_t end_timestamp;
|
||
|
pb_callback_t region;
|
||
|
bool has_batch_num;
|
||
|
int32_t batch_num;
|
||
|
bool has_batch_size;
|
||
|
int32_t batch_size;
|
||
|
pb_callback_t signature_infos;
|
||
|
pb_callback_t keys;
|
||
|
pb_callback_t revised_keys;
|
||
|
} TemporaryExposureKeyExport;
|
||
|
|
||
|
|
||
|
/* Helper constants for enums */
|
||
|
#define _TemporaryExposureKey_ReportType_MIN TemporaryExposureKey_ReportType_UNKNOWN
|
||
|
#define _TemporaryExposureKey_ReportType_MAX TemporaryExposureKey_ReportType_REVOKED
|
||
|
#define _TemporaryExposureKey_ReportType_ARRAYSIZE ((TemporaryExposureKey_ReportType)(TemporaryExposureKey_ReportType_REVOKED+1))
|
||
|
|
||
|
|
||
|
/* Initializer values for message structs */
|
||
|
#define TemporaryExposureKeyExport_init_default {false, 0, false, 0, {{NULL}, NULL}, false, 0, false, 0, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}}
|
||
|
#define SignatureInfo_init_default {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}}
|
||
|
#define TemporaryExposureKey_init_default {{{NULL}, NULL}, false, 0, false, 0, false, 144, false, _TemporaryExposureKey_ReportType_MIN, false, 0}
|
||
|
#define TemporaryExposureKeyExport_init_zero {false, 0, false, 0, {{NULL}, NULL}, false, 0, false, 0, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}}
|
||
|
#define SignatureInfo_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}}
|
||
|
#define TemporaryExposureKey_init_zero {{{NULL}, NULL}, false, 0, false, 0, false, 0, false, _TemporaryExposureKey_ReportType_MIN, false, 0}
|
||
|
|
||
|
/* Field tags (for use in manual encoding/decoding) */
|
||
|
#define SignatureInfo_verification_key_version_tag 3
|
||
|
#define SignatureInfo_verification_key_id_tag 4
|
||
|
#define SignatureInfo_signature_algorithm_tag 5
|
||
|
#define TemporaryExposureKey_key_data_tag 1
|
||
|
#define TemporaryExposureKey_transmission_risk_level_tag 2
|
||
|
#define TemporaryExposureKey_rolling_start_interval_number_tag 3
|
||
|
#define TemporaryExposureKey_rolling_period_tag 4
|
||
|
#define TemporaryExposureKey_report_type_tag 5
|
||
|
#define TemporaryExposureKey_days_since_onset_of_symptoms_tag 6
|
||
|
#define TemporaryExposureKeyExport_start_timestamp_tag 1
|
||
|
#define TemporaryExposureKeyExport_end_timestamp_tag 2
|
||
|
#define TemporaryExposureKeyExport_region_tag 3
|
||
|
#define TemporaryExposureKeyExport_batch_num_tag 4
|
||
|
#define TemporaryExposureKeyExport_batch_size_tag 5
|
||
|
#define TemporaryExposureKeyExport_signature_infos_tag 6
|
||
|
#define TemporaryExposureKeyExport_keys_tag 7
|
||
|
#define TemporaryExposureKeyExport_revised_keys_tag 8
|
||
|
|
||
|
/* Struct field encoding specification for nanopb */
|
||
|
#define TemporaryExposureKeyExport_FIELDLIST(X, a) \
|
||
|
X(a, STATIC, OPTIONAL, FIXED64, start_timestamp, 1) \
|
||
|
X(a, STATIC, OPTIONAL, FIXED64, end_timestamp, 2) \
|
||
|
X(a, CALLBACK, OPTIONAL, STRING, region, 3) \
|
||
|
X(a, STATIC, OPTIONAL, INT32, batch_num, 4) \
|
||
|
X(a, STATIC, OPTIONAL, INT32, batch_size, 5) \
|
||
|
X(a, CALLBACK, REPEATED, MESSAGE, signature_infos, 6) \
|
||
|
X(a, CALLBACK, REPEATED, MESSAGE, keys, 7) \
|
||
|
X(a, CALLBACK, REPEATED, MESSAGE, revised_keys, 8)
|
||
|
#define TemporaryExposureKeyExport_CALLBACK pb_default_field_callback
|
||
|
#define TemporaryExposureKeyExport_DEFAULT NULL
|
||
|
#define TemporaryExposureKeyExport_signature_infos_MSGTYPE SignatureInfo
|
||
|
#define TemporaryExposureKeyExport_keys_MSGTYPE TemporaryExposureKey
|
||
|
#define TemporaryExposureKeyExport_revised_keys_MSGTYPE TemporaryExposureKey
|
||
|
|
||
|
#define SignatureInfo_FIELDLIST(X, a) \
|
||
|
X(a, CALLBACK, OPTIONAL, STRING, verification_key_version, 3) \
|
||
|
X(a, CALLBACK, OPTIONAL, STRING, verification_key_id, 4) \
|
||
|
X(a, CALLBACK, OPTIONAL, STRING, signature_algorithm, 5)
|
||
|
#define SignatureInfo_CALLBACK pb_default_field_callback
|
||
|
#define SignatureInfo_DEFAULT NULL
|
||
|
|
||
|
#define TemporaryExposureKey_FIELDLIST(X, a) \
|
||
|
X(a, CALLBACK, OPTIONAL, BYTES, key_data, 1) \
|
||
|
X(a, STATIC, OPTIONAL, INT32, transmission_risk_level, 2) \
|
||
|
X(a, STATIC, OPTIONAL, INT32, rolling_start_interval_number, 3) \
|
||
|
X(a, STATIC, OPTIONAL, INT32, rolling_period, 4) \
|
||
|
X(a, STATIC, OPTIONAL, UENUM, report_type, 5) \
|
||
|
X(a, STATIC, OPTIONAL, SINT32, days_since_onset_of_symptoms, 6)
|
||
|
#define TemporaryExposureKey_CALLBACK pb_default_field_callback
|
||
|
#define TemporaryExposureKey_DEFAULT (const pb_byte_t*)"\x20\x90\x01\x00"
|
||
|
|
||
|
extern const pb_msgdesc_t TemporaryExposureKeyExport_msg;
|
||
|
extern const pb_msgdesc_t SignatureInfo_msg;
|
||
|
extern const pb_msgdesc_t TemporaryExposureKey_msg;
|
||
|
|
||
|
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
||
|
#define TemporaryExposureKeyExport_fields &TemporaryExposureKeyExport_msg
|
||
|
#define SignatureInfo_fields &SignatureInfo_msg
|
||
|
#define TemporaryExposureKey_fields &TemporaryExposureKey_msg
|
||
|
|
||
|
/* Maximum encoded size of messages (where known) */
|
||
|
/* TemporaryExposureKeyExport_size depends on runtime parameters */
|
||
|
/* SignatureInfo_size depends on runtime parameters */
|
||
|
/* TemporaryExposureKey_size depends on runtime parameters */
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
} /* extern "C" */
|
||
|
#endif
|
||
|
|
||
|
#endif
|