libsignal-protocol-c  master
protobuf-c.h File Reference
#include <assert.h>
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
Include dependency graph for protobuf-c.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ProtobufCAllocator
 
struct  ProtobufCBinaryData
 
struct  ProtobufCBuffer
 
struct  ProtobufCBufferSimple
 
struct  ProtobufCEnumDescriptor
 
struct  ProtobufCEnumValue
 
struct  ProtobufCEnumValueIndex
 
struct  ProtobufCFieldDescriptor
 
struct  ProtobufCIntRange
 
struct  ProtobufCMessage
 
struct  ProtobufCMessageDescriptor
 
struct  ProtobufCMessageUnknownField
 
struct  ProtobufCMethodDescriptor
 
struct  ProtobufCService
 
struct  ProtobufCServiceDescriptor
 

Macros

#define PROTOBUF_C__BEGIN_DECLS
 
#define PROTOBUF_C__END_DECLS
 
#define PROTOBUF_C__API
 
#define PROTOBUF_C__DEPRECATED
 
#define PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(enum_name)   , _##enum_name##_IS_INT_SIZE = INT_MAX
 
#define PROTOBUF_C__SERVICE_DESCRIPTOR_MAGIC   0x14159bc3
 
#define PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC   0x28aaeef9
 
#define PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC   0x114315af
 
#define PROTOBUF_C_VERSION   "1.1.1"
 
#define PROTOBUF_C_VERSION_NUMBER   1001001
 
#define PROTOBUF_C_MIN_COMPILER_VERSION   1000000
 
#define PROTOBUF_C_MESSAGE_INIT(descriptor)   { descriptor, 0, NULL }
 
#define PROTOBUF_C_BUFFER_SIMPLE_INIT(array_of_bytes)
 
#define PROTOBUF_C_BUFFER_SIMPLE_CLEAR(simp_buf)
 

Typedefs

typedef struct ProtobufCAllocator ProtobufCAllocator
 
typedef struct ProtobufCBinaryData ProtobufCBinaryData
 
typedef struct ProtobufCBuffer ProtobufCBuffer
 
typedef struct ProtobufCBufferSimple ProtobufCBufferSimple
 
typedef struct ProtobufCEnumDescriptor ProtobufCEnumDescriptor
 
typedef struct ProtobufCEnumValue ProtobufCEnumValue
 
typedef struct ProtobufCEnumValueIndex ProtobufCEnumValueIndex
 
typedef struct ProtobufCFieldDescriptor ProtobufCFieldDescriptor
 
typedef struct ProtobufCIntRange ProtobufCIntRange
 
typedef struct ProtobufCMessage ProtobufCMessage
 
typedef struct ProtobufCMessageDescriptor ProtobufCMessageDescriptor
 
typedef struct ProtobufCMessageUnknownField ProtobufCMessageUnknownField
 
typedef struct ProtobufCMethodDescriptor ProtobufCMethodDescriptor
 
typedef struct ProtobufCService ProtobufCService
 
typedef struct ProtobufCServiceDescriptor ProtobufCServiceDescriptor
 
typedef int protobuf_c_boolean
 
typedef void(* ProtobufCClosure) (const ProtobufCMessage *, void *closure_data)
 
typedef void(* ProtobufCMessageInit) (ProtobufCMessage *)
 
typedef void(* ProtobufCServiceDestroy) (ProtobufCService *)
 

Enumerations

enum  ProtobufCFieldFlag { PROTOBUF_C_FIELD_FLAG_PACKED = (1 << 0), PROTOBUF_C_FIELD_FLAG_DEPRECATED = (1 << 1), PROTOBUF_C_FIELD_FLAG_ONEOF = (1 << 2) }
 
enum  ProtobufCLabel { PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_LABEL_REPEATED }
 
enum  ProtobufCType {
  PROTOBUF_C_TYPE_INT32, PROTOBUF_C_TYPE_SINT32, PROTOBUF_C_TYPE_SFIXED32, PROTOBUF_C_TYPE_INT64,
  PROTOBUF_C_TYPE_SINT64, PROTOBUF_C_TYPE_SFIXED64, PROTOBUF_C_TYPE_UINT32, PROTOBUF_C_TYPE_FIXED32,
  PROTOBUF_C_TYPE_UINT64, PROTOBUF_C_TYPE_FIXED64, PROTOBUF_C_TYPE_FLOAT, PROTOBUF_C_TYPE_DOUBLE,
  PROTOBUF_C_TYPE_BOOL, PROTOBUF_C_TYPE_ENUM, PROTOBUF_C_TYPE_STRING, PROTOBUF_C_TYPE_BYTES,
  PROTOBUF_C_TYPE_MESSAGE
}
 
enum  ProtobufCWireType { PROTOBUF_C_WIRE_TYPE_VARINT = 0, PROTOBUF_C_WIRE_TYPE_64BIT = 1, PROTOBUF_C_WIRE_TYPE_LENGTH_PREFIXED = 2, PROTOBUF_C_WIRE_TYPE_32BIT = 5 }
 

Functions

PROTOBUF_C__API const char * protobuf_c_version (void)
 
PROTOBUF_C__API uint32_t protobuf_c_version_number (void)
 
PROTOBUF_C__API const ProtobufCEnumValueprotobuf_c_enum_descriptor_get_value_by_name (const ProtobufCEnumDescriptor *desc, const char *name)
 
PROTOBUF_C__API const ProtobufCEnumValueprotobuf_c_enum_descriptor_get_value (const ProtobufCEnumDescriptor *desc, int value)
 
PROTOBUF_C__API const ProtobufCFieldDescriptorprotobuf_c_message_descriptor_get_field_by_name (const ProtobufCMessageDescriptor *desc, const char *name)
 
PROTOBUF_C__API const ProtobufCFieldDescriptorprotobuf_c_message_descriptor_get_field (const ProtobufCMessageDescriptor *desc, unsigned value)
 
PROTOBUF_C__API size_t protobuf_c_message_get_packed_size (const ProtobufCMessage *message)
 
PROTOBUF_C__API size_t protobuf_c_message_pack (const ProtobufCMessage *message, uint8_t *out)
 
PROTOBUF_C__API size_t protobuf_c_message_pack_to_buffer (const ProtobufCMessage *message, ProtobufCBuffer *buffer)
 
PROTOBUF_C__API ProtobufCMessageprotobuf_c_message_unpack (const ProtobufCMessageDescriptor *descriptor, ProtobufCAllocator *allocator, size_t len, const uint8_t *data)
 
PROTOBUF_C__API void protobuf_c_message_free_unpacked (ProtobufCMessage *message, ProtobufCAllocator *allocator)
 
PROTOBUF_C__API protobuf_c_boolean protobuf_c_message_check (const ProtobufCMessage *)
 
PROTOBUF_C__API void protobuf_c_message_init (const ProtobufCMessageDescriptor *descriptor, void *message)
 
PROTOBUF_C__API void protobuf_c_service_destroy (ProtobufCService *service)
 
PROTOBUF_C__API const ProtobufCMethodDescriptorprotobuf_c_service_descriptor_get_method_by_name (const ProtobufCServiceDescriptor *desc, const char *name)
 
PROTOBUF_C__API void protobuf_c_buffer_simple_append (ProtobufCBuffer *buffer, size_t len, const unsigned char *data)
 
PROTOBUF_C__API void protobuf_c_service_generated_init (ProtobufCService *service, const ProtobufCServiceDescriptor *descriptor, ProtobufCServiceDestroy destroy)
 
PROTOBUF_C__API void protobuf_c_service_invoke_internal (ProtobufCService *service, unsigned method_index, const ProtobufCMessage *input, ProtobufCClosure closure, void *closure_data)