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

#ifndef PROTOBUF_C_peer_2fpeer_2eproto__INCLUDED
#define PROTOBUF_C_peer_2fpeer_2eproto__INCLUDED

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

PROTOBUF_C__BEGIN_DECLS

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

#include "peer/proposal.pb-c.h"
#include "peer/proposal_response.pb-c.h"

typedef struct _Protos__PeerID Protos__PeerID;
typedef struct _Protos__PeerEndpoint Protos__PeerEndpoint;


/* --- enums --- */


/* --- messages --- */

struct  _Protos__PeerID
{
  ProtobufCMessage base;
  char *name;
};
#define PROTOS__PEER_ID__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&protos__peer_id__descriptor) \
    , NULL }


struct  _Protos__PeerEndpoint
{
  ProtobufCMessage base;
  Protos__PeerID *id;
  char *address;
};
#define PROTOS__PEER_ENDPOINT__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&protos__peer_endpoint__descriptor) \
    , NULL, NULL }


/* Protos__PeerID methods */
void   protos__peer_id__init
                     (Protos__PeerID         *message);
size_t protos__peer_id__get_packed_size
                     (const Protos__PeerID   *message);
size_t protos__peer_id__pack
                     (const Protos__PeerID   *message,
                      uint8_t             *out);
size_t protos__peer_id__pack_to_buffer
                     (const Protos__PeerID   *message,
                      ProtobufCBuffer     *buffer);
Protos__PeerID *
       protos__peer_id__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   protos__peer_id__free_unpacked
                     (Protos__PeerID *message,
                      ProtobufCAllocator *allocator);
/* Protos__PeerEndpoint methods */
void   protos__peer_endpoint__init
                     (Protos__PeerEndpoint         *message);
size_t protos__peer_endpoint__get_packed_size
                     (const Protos__PeerEndpoint   *message);
size_t protos__peer_endpoint__pack
                     (const Protos__PeerEndpoint   *message,
                      uint8_t             *out);
size_t protos__peer_endpoint__pack_to_buffer
                     (const Protos__PeerEndpoint   *message,
                      ProtobufCBuffer     *buffer);
Protos__PeerEndpoint *
       protos__peer_endpoint__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   protos__peer_endpoint__free_unpacked
                     (Protos__PeerEndpoint *message,
                      ProtobufCAllocator *allocator);
/* --- per-message closures --- */

typedef void (*Protos__PeerID_Closure)
                 (const Protos__PeerID *message,
                  void *closure_data);
typedef void (*Protos__PeerEndpoint_Closure)
                 (const Protos__PeerEndpoint *message,
                  void *closure_data);

/* --- services --- */

typedef struct _Protos__Endorser_Service Protos__Endorser_Service;
struct _Protos__Endorser_Service
{
  ProtobufCService base;
  void (*process_proposal)(Protos__Endorser_Service *service,
                           const Protos__SignedProposal *input,
                           Protos__ProposalResponse_Closure closure,
                           void *closure_data);
};
typedef void (*Protos__Endorser_ServiceDestroy)(Protos__Endorser_Service *);
void protos__endorser__init (Protos__Endorser_Service *service,
                             Protos__Endorser_ServiceDestroy destroy);
#define PROTOS__ENDORSER__BASE_INIT \
    { &protos__endorser__descriptor, protobuf_c_service_invoke_internal, NULL }
#define PROTOS__ENDORSER__INIT(function_prefix__) \
    { PROTOS__ENDORSER__BASE_INIT,\
      function_prefix__ ## process_proposal  }
void protos__endorser__process_proposal(ProtobufCService *service,
                                        const Protos__SignedProposal *input,
                                        Protos__ProposalResponse_Closure closure,
                                        void *closure_data);

/* --- descriptors --- */

extern const ProtobufCMessageDescriptor protos__peer_id__descriptor;
extern const ProtobufCMessageDescriptor protos__peer_endpoint__descriptor;
extern const ProtobufCServiceDescriptor protos__endorser__descriptor;

PROTOBUF_C__END_DECLS


#endif  /* PROTOBUF_C_peer_2fpeer_2eproto__INCLUDED */
