/* Automatically generated nanopb header */
/* Generated by nanopb-0.4.9.1 */

#ifndef PB_SNS_CLIENT_GLINK_PB_H_INCLUDED
#define PB_SNS_CLIENT_GLINK_PB_H_INCLUDED
#include <pb.h>
#include "sns_client.pb.h"
#include "sns_std_type.pb.h"

#if PB_PROTO_HEADER_VERSION != 40
#error Regenerate this file with the current version of nanopb generator.
#endif

/* Struct definitions */
/* @brief Connect message
 Client shall send "sns_client_glink_connect" message to connect to the sensor
 service */
typedef struct _sns_client_glink_connect { /* Empty payload. */
    char dummy_field;
} sns_client_glink_connect;

/* @brief Connect acknowledgement message
 "sns_client_glink_connect_ack" message is sent by the Sensor service
 in response to "sns_client_glink_connect" message */
typedef struct _sns_client_glink_connect_ack {
    /* @brief Connection handle identifies the connection
 "connection_handle" shall be non-zero when connection is successful
 "connection_handle" shall be zero when connection is failed */
    bool has_connection_handle;
    uint32_t connection_handle;
    /* @brief Maximum size of request supported by QSH Client manager over Glink. */
    bool has_max_request_size;
    uint32_t max_request_size;
    /* @brief Maximum size of indication that QSH Client manager sends over Glink. */
    bool has_max_indication_size;
    uint32_t max_indication_size;
} sns_client_glink_connect_ack;

/* @brief Disconnect message
 Client shall send "sns_client_glink_disconnect" message to disconnect the
 connection with Sensor service */
typedef struct _sns_client_glink_disconnect {
    /* @brief Connection handle identifies the connection */
    bool has_connection_handle;
    uint32_t connection_handle;
} sns_client_glink_disconnect;

/* @brief Request message */
typedef struct _sns_client_glink_req {
    /* @brief Connection handle identifies the connection */
    bool has_connection_handle;
    uint32_t connection_handle;
    /* @brief Request message */
    bool has_request;
    sns_client_request_msg request;
} sns_client_glink_req;

/* @brief Indication message */
typedef struct _sns_client_glink_ind {
    /* @brief Connection handle identifies the connection */
    bool has_connection_handle;
    uint32_t connection_handle;
    /* @brief Event message */
    bool has_event;
    sns_client_event_msg event;
} sns_client_glink_ind;

/* @brief Response message
 @brief Response Message is sent in response to every request message */
typedef struct _sns_client_glink_resp {
    /* @brief Connection handle identifies the connection */
    bool has_connection_handle;
    uint32_t connection_handle;
    /* @brief Error */
    bool has_error;
    sns_std_error error;
} sns_client_glink_resp;

/* @brief Top level message for all glink clients
 If the Sensor Service receives a message type it does not understand, it will
 return a sns_client_glink_resp with error code SNS_STD_ERROR_NOT_SUPPORTED */
typedef struct _sns_client_glink_msg {
    pb_callback_t cb_msg;
    pb_size_t which_msg;
    union {
        /* @brief messages "0x1 - 0x3F" are reserved for client to server messages */
        sns_client_glink_connect connect;
        sns_client_glink_disconnect disconnect;
        sns_client_glink_req req;
        /* @brief messages "0x40 - 0x7F" are reserved for server to client messages */
        sns_client_glink_connect_ack connect_ack;
        sns_client_glink_resp resp;
        sns_client_glink_ind ind;
    } msg;
} sns_client_glink_msg;


#ifdef __cplusplus
extern "C" {
#endif

/* Initializer values for message structs */
#define sns_client_glink_connect_init_default    {0}
#define sns_client_glink_connect_ack_init_default {false, 0, false, 0, false, 0}
#define sns_client_glink_disconnect_init_default {false, 0}
#define sns_client_glink_req_init_default        {false, 0, false, sns_client_request_msg_init_default}
#define sns_client_glink_ind_init_default        {false, 0, false, sns_client_event_msg_init_default}
#define sns_client_glink_resp_init_default       {false, 0, false, _sns_std_error_MIN}
#define sns_client_glink_msg_init_default        {{{NULL}, NULL}, 0, {sns_client_glink_connect_init_default}}
#define sns_client_glink_connect_init_zero       {0}
#define sns_client_glink_connect_ack_init_zero   {false, 0, false, 0, false, 0}
#define sns_client_glink_disconnect_init_zero    {false, 0}
#define sns_client_glink_req_init_zero           {false, 0, false, sns_client_request_msg_init_zero}
#define sns_client_glink_ind_init_zero           {false, 0, false, sns_client_event_msg_init_zero}
#define sns_client_glink_resp_init_zero          {false, 0, false, _sns_std_error_MIN}
#define sns_client_glink_msg_init_zero           {{{NULL}, NULL}, 0, {sns_client_glink_connect_init_zero}}

/* Field tags (for use in manual encoding/decoding) */
#define sns_client_glink_connect_ack_connection_handle_tag 1
#define sns_client_glink_connect_ack_max_request_size_tag 2
#define sns_client_glink_connect_ack_max_indication_size_tag 3
#define sns_client_glink_disconnect_connection_handle_tag 1
#define sns_client_glink_req_connection_handle_tag 1
#define sns_client_glink_req_request_tag         2
#define sns_client_glink_ind_connection_handle_tag 1
#define sns_client_glink_ind_event_tag           2
#define sns_client_glink_resp_connection_handle_tag 1
#define sns_client_glink_resp_error_tag          2
#define sns_client_glink_msg_connect_tag         1
#define sns_client_glink_msg_disconnect_tag      2
#define sns_client_glink_msg_req_tag             3
#define sns_client_glink_msg_connect_ack_tag     64
#define sns_client_glink_msg_resp_tag            65
#define sns_client_glink_msg_ind_tag             66

/* Struct field encoding specification for nanopb */
#define sns_client_glink_connect_FIELDLIST(X, a) \

#define sns_client_glink_connect_CALLBACK NULL
#define sns_client_glink_connect_DEFAULT NULL

#define sns_client_glink_connect_ack_FIELDLIST(X, a) \
X(a, STATIC,   OPTIONAL, FIXED32,  connection_handle,   1) \
X(a, STATIC,   OPTIONAL, FIXED32,  max_request_size,   2) \
X(a, STATIC,   OPTIONAL, FIXED32,  max_indication_size,   3)
#define sns_client_glink_connect_ack_CALLBACK NULL
#define sns_client_glink_connect_ack_DEFAULT NULL

#define sns_client_glink_disconnect_FIELDLIST(X, a) \
X(a, STATIC,   OPTIONAL, FIXED32,  connection_handle,   1)
#define sns_client_glink_disconnect_CALLBACK NULL
#define sns_client_glink_disconnect_DEFAULT NULL

#define sns_client_glink_req_FIELDLIST(X, a) \
X(a, STATIC,   OPTIONAL, FIXED32,  connection_handle,   1) \
X(a, STATIC,   OPTIONAL, MESSAGE,  request,           2)
#define sns_client_glink_req_CALLBACK NULL
#define sns_client_glink_req_DEFAULT NULL
#define sns_client_glink_req_request_MSGTYPE sns_client_request_msg

#define sns_client_glink_ind_FIELDLIST(X, a) \
X(a, STATIC,   OPTIONAL, FIXED32,  connection_handle,   1) \
X(a, STATIC,   OPTIONAL, MESSAGE,  event,             2)
#define sns_client_glink_ind_CALLBACK NULL
#define sns_client_glink_ind_DEFAULT NULL
#define sns_client_glink_ind_event_MSGTYPE sns_client_event_msg

#define sns_client_glink_resp_FIELDLIST(X, a) \
X(a, STATIC,   OPTIONAL, FIXED32,  connection_handle,   1) \
X(a, STATIC,   OPTIONAL, UENUM,    error,             2)
#define sns_client_glink_resp_CALLBACK NULL
#define sns_client_glink_resp_DEFAULT NULL

#define sns_client_glink_msg_FIELDLIST(X, a) \
X(a, STATIC,   ONEOF,    MSG_W_CB, (msg,connect,msg.connect),   1) \
X(a, STATIC,   ONEOF,    MSG_W_CB, (msg,disconnect,msg.disconnect),   2) \
X(a, STATIC,   ONEOF,    MSG_W_CB, (msg,req,msg.req),   3) \
X(a, STATIC,   ONEOF,    MSG_W_CB, (msg,connect_ack,msg.connect_ack),  64) \
X(a, STATIC,   ONEOF,    MSG_W_CB, (msg,resp,msg.resp),  65) \
X(a, STATIC,   ONEOF,    MSG_W_CB, (msg,ind,msg.ind),  66)
#define sns_client_glink_msg_CALLBACK NULL
#define sns_client_glink_msg_DEFAULT NULL
#define sns_client_glink_msg_msg_connect_MSGTYPE sns_client_glink_connect
#define sns_client_glink_msg_msg_disconnect_MSGTYPE sns_client_glink_disconnect
#define sns_client_glink_msg_msg_req_MSGTYPE sns_client_glink_req
#define sns_client_glink_msg_msg_connect_ack_MSGTYPE sns_client_glink_connect_ack
#define sns_client_glink_msg_msg_resp_MSGTYPE sns_client_glink_resp
#define sns_client_glink_msg_msg_ind_MSGTYPE sns_client_glink_ind

extern const pb_msgdesc_t sns_client_glink_connect_msg;
extern const pb_msgdesc_t sns_client_glink_connect_ack_msg;
extern const pb_msgdesc_t sns_client_glink_disconnect_msg;
extern const pb_msgdesc_t sns_client_glink_req_msg;
extern const pb_msgdesc_t sns_client_glink_ind_msg;
extern const pb_msgdesc_t sns_client_glink_resp_msg;
extern const pb_msgdesc_t sns_client_glink_msg_msg;

/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
#define sns_client_glink_connect_fields &sns_client_glink_connect_msg
#define sns_client_glink_connect_ack_fields &sns_client_glink_connect_ack_msg
#define sns_client_glink_disconnect_fields &sns_client_glink_disconnect_msg
#define sns_client_glink_req_fields &sns_client_glink_req_msg
#define sns_client_glink_ind_fields &sns_client_glink_ind_msg
#define sns_client_glink_resp_fields &sns_client_glink_resp_msg
#define sns_client_glink_msg_fields &sns_client_glink_msg_msg

/* Maximum encoded size of messages (where known) */
#if defined(sns_client_request_msg_size) && defined(sns_client_event_msg_size)
union sns_client_glink_msg_msg_size_union {char f3[(17 + sns_client_request_msg_size)]; char f66[(18 + sns_client_event_msg_size)]; char f0[18];};
#endif
#define SNS_CLIENT_GLINK_PB_H_MAX_SIZE           sns_client_glink_connect_ack_size
#define sns_client_glink_connect_ack_size        15
#define sns_client_glink_connect_size            0
#define sns_client_glink_disconnect_size         5
#define sns_client_glink_resp_size               7
#if defined(sns_client_request_msg_size)
#define sns_client_glink_req_size                (11 + sns_client_request_msg_size)
#endif
#if defined(sns_client_event_msg_size)
#define sns_client_glink_ind_size                (11 + sns_client_event_msg_size)
#endif
#if defined(sns_client_request_msg_size) && defined(sns_client_event_msg_size)
#define sns_client_glink_msg_size                (0 + sizeof(union sns_client_glink_msg_msg_size_union))
#endif

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif
