/* Generated by the protocol buffer compiler.  DO NOT EDIT! */
/* Generated from: netpoker.proto */

#ifndef PROTOBUF_C_netpoker_2eproto__INCLUDED
#define PROTOBUF_C_netpoker_2eproto__INCLUDED

#include <protobuf-c/protobuf-c.h>

PROTOBUF_C__BEGIN_DECLS

#if PROTOBUF_C_VERSION_NUMBER < 1003000
# error This file was generated by a newer version of protobuf-c which is incompatible with your libprotobuf-c headers. Please update your headers.
#elif 1005002 < PROTOBUF_C_MIN_COMPILER_VERSION
# error This file was generated by an older version of protobuf-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protobuf-c.
#endif


typedef struct Card Card;
typedef struct Hand Hand;
typedef struct Player Player;
typedef struct GameState GameState;
typedef struct GameSettings GameSettings;
typedef struct PingRequest PingRequest;
typedef struct PingResponse PingResponse;
typedef struct PingEntry PingEntry;
typedef struct PingBroadcast PingBroadcast;


/* --- enums --- */

typedef enum _MessageType {
  MESSAGE_TYPE__MSG_PING_REQUEST = 0,
  MESSAGE_TYPE__MSG_PING_RESPONSE = 1,
  MESSAGE_TYPE__MSG_PING_BROADCAST = 2
    PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(MESSAGE_TYPE)
} MessageType;

/* --- messages --- */

struct  Card
{
  ProtobufCMessage base;
  int32_t face_val;
  int32_t suit;
};
#define CARD__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&card__descriptor) \
, 0, 0 }


struct  Hand
{
  ProtobufCMessage base;
  size_t n_card;
  Card **card;
};
#define HAND__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&hand__descriptor) \
, 0,NULL }


struct  Player
{
  ProtobufCMessage base;
  char *nick;
  int32_t id;
  Hand *hand;
  int32_t coins;
  protobuf_c_boolean in;
  protobuf_c_boolean winner;
  protobuf_c_boolean is_connected;
};
#define PLAYER__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&player__descriptor) \
, (char *)protobuf_c_empty_string, 0, NULL, 0, 0, 0, 0 }


struct  GameState
{
  ProtobufCMessage base;
  uint32_t pot;
  int32_t dealer_id;
  protobuf_c_boolean at_menu;
  uint32_t player_count;
  uint32_t raises_remaining;
  uint32_t prev_bet_amount;
  protobuf_c_boolean winner_declared;
  protobuf_c_boolean player_exchanging;
  size_t n_player;
  Player **player;
};
#define GAME_STATE__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&game_state__descriptor) \
, 0, 0, 0, 0, 0, 0, 0, 0, 0,NULL }


struct  GameSettings
{
  ProtobufCMessage base;
  int32_t client_id;
  uint32_t action_timeout_ms;
  uint32_t wild_exchange_timeout_ms;
  uint32_t end_of_game_timeout_ms;
  uint32_t bet_minimum;
  uint32_t bet_median;
  uint32_t bet_maximum;
};
#define GAME_SETTINGS__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&game_settings__descriptor) \
, 0, 0, 0, 0, 0, 0, 0 }


struct  PingRequest
{
  ProtobufCMessage base;
  /*
   * SDL_GetTicks() when sent
   */
  uint32_t timestamp;
};
#define PING_REQUEST__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&ping_request__descriptor) \
, 0 }


struct  PingResponse
{
  ProtobufCMessage base;
  /*
   * Echo timestamp from request
   */
  uint32_t timestamp;
};
#define PING_RESPONSE__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&ping_response__descriptor) \
, 0 }


struct  PingEntry
{
  ProtobufCMessage base;
  uint32_t player_id;
  uint32_t ping_ms;
};
#define PING_ENTRY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&ping_entry__descriptor) \
, 0, 0 }


struct  PingBroadcast
{
  ProtobufCMessage base;
  size_t n_entries;
  PingEntry **entries;
};
#define PING_BROADCAST__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&ping_broadcast__descriptor) \
, 0,NULL }


/* Card methods */
void   card__init
                     (Card         *message);
size_t card__get_packed_size
                     (const Card   *message);
size_t card__pack
                     (const Card   *message,
                      uint8_t             *out);
size_t card__pack_to_buffer
                     (const Card   *message,
                      ProtobufCBuffer     *buffer);
Card *
       card__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   card__free_unpacked
                     (Card *message,
                      ProtobufCAllocator *allocator);
/* Hand methods */
void   hand__init
                     (Hand         *message);
size_t hand__get_packed_size
                     (const Hand   *message);
size_t hand__pack
                     (const Hand   *message,
                      uint8_t             *out);
size_t hand__pack_to_buffer
                     (const Hand   *message,
                      ProtobufCBuffer     *buffer);
Hand *
       hand__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   hand__free_unpacked
                     (Hand *message,
                      ProtobufCAllocator *allocator);
/* Player methods */
void   player__init
                     (Player         *message);
size_t player__get_packed_size
                     (const Player   *message);
size_t player__pack
                     (const Player   *message,
                      uint8_t             *out);
size_t player__pack_to_buffer
                     (const Player   *message,
                      ProtobufCBuffer     *buffer);
Player *
       player__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   player__free_unpacked
                     (Player *message,
                      ProtobufCAllocator *allocator);
/* GameState methods */
void   game_state__init
                     (GameState         *message);
size_t game_state__get_packed_size
                     (const GameState   *message);
size_t game_state__pack
                     (const GameState   *message,
                      uint8_t             *out);
size_t game_state__pack_to_buffer
                     (const GameState   *message,
                      ProtobufCBuffer     *buffer);
GameState *
       game_state__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   game_state__free_unpacked
                     (GameState *message,
                      ProtobufCAllocator *allocator);
/* GameSettings methods */
void   game_settings__init
                     (GameSettings         *message);
size_t game_settings__get_packed_size
                     (const GameSettings   *message);
size_t game_settings__pack
                     (const GameSettings   *message,
                      uint8_t             *out);
size_t game_settings__pack_to_buffer
                     (const GameSettings   *message,
                      ProtobufCBuffer     *buffer);
GameSettings *
       game_settings__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   game_settings__free_unpacked
                     (GameSettings *message,
                      ProtobufCAllocator *allocator);
/* PingRequest methods */
void   ping_request__init
                     (PingRequest         *message);
size_t ping_request__get_packed_size
                     (const PingRequest   *message);
size_t ping_request__pack
                     (const PingRequest   *message,
                      uint8_t             *out);
size_t ping_request__pack_to_buffer
                     (const PingRequest   *message,
                      ProtobufCBuffer     *buffer);
PingRequest *
       ping_request__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   ping_request__free_unpacked
                     (PingRequest *message,
                      ProtobufCAllocator *allocator);
/* PingResponse methods */
void   ping_response__init
                     (PingResponse         *message);
size_t ping_response__get_packed_size
                     (const PingResponse   *message);
size_t ping_response__pack
                     (const PingResponse   *message,
                      uint8_t             *out);
size_t ping_response__pack_to_buffer
                     (const PingResponse   *message,
                      ProtobufCBuffer     *buffer);
PingResponse *
       ping_response__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   ping_response__free_unpacked
                     (PingResponse *message,
                      ProtobufCAllocator *allocator);
/* PingEntry methods */
void   ping_entry__init
                     (PingEntry         *message);
size_t ping_entry__get_packed_size
                     (const PingEntry   *message);
size_t ping_entry__pack
                     (const PingEntry   *message,
                      uint8_t             *out);
size_t ping_entry__pack_to_buffer
                     (const PingEntry   *message,
                      ProtobufCBuffer     *buffer);
PingEntry *
       ping_entry__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   ping_entry__free_unpacked
                     (PingEntry *message,
                      ProtobufCAllocator *allocator);
/* PingBroadcast methods */
void   ping_broadcast__init
                     (PingBroadcast         *message);
size_t ping_broadcast__get_packed_size
                     (const PingBroadcast   *message);
size_t ping_broadcast__pack
                     (const PingBroadcast   *message,
                      uint8_t             *out);
size_t ping_broadcast__pack_to_buffer
                     (const PingBroadcast   *message,
                      ProtobufCBuffer     *buffer);
PingBroadcast *
       ping_broadcast__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   ping_broadcast__free_unpacked
                     (PingBroadcast *message,
                      ProtobufCAllocator *allocator);
/* --- per-message closures --- */

typedef void (*Card_Closure)
                 (const Card *message,
                  void *closure_data);
typedef void (*Hand_Closure)
                 (const Hand *message,
                  void *closure_data);
typedef void (*Player_Closure)
                 (const Player *message,
                  void *closure_data);
typedef void (*GameState_Closure)
                 (const GameState *message,
                  void *closure_data);
typedef void (*GameSettings_Closure)
                 (const GameSettings *message,
                  void *closure_data);
typedef void (*PingRequest_Closure)
                 (const PingRequest *message,
                  void *closure_data);
typedef void (*PingResponse_Closure)
                 (const PingResponse *message,
                  void *closure_data);
typedef void (*PingEntry_Closure)
                 (const PingEntry *message,
                  void *closure_data);
typedef void (*PingBroadcast_Closure)
                 (const PingBroadcast *message,
                  void *closure_data);

/* --- services --- */


/* --- descriptors --- */

extern const ProtobufCEnumDescriptor    message_type__descriptor;
extern const ProtobufCMessageDescriptor card__descriptor;
extern const ProtobufCMessageDescriptor hand__descriptor;
extern const ProtobufCMessageDescriptor player__descriptor;
extern const ProtobufCMessageDescriptor game_state__descriptor;
extern const ProtobufCMessageDescriptor game_settings__descriptor;
extern const ProtobufCMessageDescriptor ping_request__descriptor;
extern const ProtobufCMessageDescriptor ping_response__descriptor;
extern const ProtobufCMessageDescriptor ping_entry__descriptor;
extern const ProtobufCMessageDescriptor ping_broadcast__descriptor;

PROTOBUF_C__END_DECLS


#endif  /* PROTOBUF_C_netpoker_2eproto__INCLUDED */
