From 716a6223a7c4410462a8347f16ed34fbf28446f9 Mon Sep 17 00:00:00 2001 From: Nicolas Dextraze Date: Sun, 18 Mar 2018 22:44:23 -0700 Subject: [PATCH] First commit --- .gitignore | 2 + .idea/codeStyles/Project.xml | 29 + .idea/esc.iml | 2 + .idea/misc.xml | 4 + .idea/modules.xml | 8 + CMakeLists.txt | 13 + ClientMessageDtos.pb-c.c | 5421 ++++++++++++++++++++++++++++++++++ ClientMessageDtos.pb-c.h | 1693 +++++++++++ esc.c | 348 +++ esc.h | 58 + main.c | 84 + mutex.c | 28 + mutex.h | 18 + socket.c | 61 + socket.h | 23 + thread.c | 32 + thread.h | 19 + uuid.c | 47 + uuid.h | 19 + 19 files changed, 7909 insertions(+) create mode 100644 .gitignore create mode 100644 .idea/codeStyles/Project.xml create mode 100644 .idea/esc.iml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 CMakeLists.txt create mode 100644 ClientMessageDtos.pb-c.c create mode 100644 ClientMessageDtos.pb-c.h create mode 100644 esc.c create mode 100644 esc.h create mode 100644 main.c create mode 100644 mutex.c create mode 100644 mutex.h create mode 100644 socket.c create mode 100644 socket.h create mode 100644 thread.c create mode 100644 thread.h create mode 100644 uuid.c create mode 100644 uuid.h diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cb6cb9f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +cmake-*/ +.idea/workspace.xml diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..30aa626 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/esc.iml b/.idea/esc.iml new file mode 100644 index 0000000..f08604b --- /dev/null +++ b/.idea/esc.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..79b3c94 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..95d8b8b --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..25bef7a --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,13 @@ +# cmake_minimum_required(VERSION ) +project(esc C) + +set(CMAKE_C_STANDARD 99) + +include_directories(c:/Users/nicol/dev/thirdparty/protobuf-c) +link_directories(c:/Users/nicol/dev/thirdparty/protobuf-c/protobuf-c/.libs) + +add_executable(esc main.c mutex.c mutex.h thread.c thread.h socket.c socket.h esc.c esc.h ClientMessageDtos.pb-c.c ClientMessageDtos.pb-c.h uuid.c uuid.h) + +if(WIN32) + target_link_libraries(esc wsock32 ws2_32 libprotobuf-c.a) +endif() \ No newline at end of file diff --git a/ClientMessageDtos.pb-c.c b/ClientMessageDtos.pb-c.c new file mode 100644 index 0000000..2db183f --- /dev/null +++ b/ClientMessageDtos.pb-c.c @@ -0,0 +1,5421 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: Protos/ClientAPI/ClientMessageDtos.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "ClientMessageDtos.pb-c.h" +void event_store__client__messages__new_event__init + (EventStore__Client__Messages__NewEvent *message) +{ + static const EventStore__Client__Messages__NewEvent init_value = EVENT_STORE__CLIENT__MESSAGES__NEW_EVENT__INIT; + *message = init_value; +} +size_t event_store__client__messages__new_event__get_packed_size + (const EventStore__Client__Messages__NewEvent *message) +{ + assert(message->base.descriptor == &event_store__client__messages__new_event__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__new_event__pack + (const EventStore__Client__Messages__NewEvent *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__new_event__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__new_event__pack_to_buffer + (const EventStore__Client__Messages__NewEvent *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__new_event__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__NewEvent * + event_store__client__messages__new_event__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__NewEvent *) + protobuf_c_message_unpack (&event_store__client__messages__new_event__descriptor, + allocator, len, data); +} +void event_store__client__messages__new_event__free_unpacked + (EventStore__Client__Messages__NewEvent *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__new_event__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__event_record__init + (EventStore__Client__Messages__EventRecord *message) +{ + static const EventStore__Client__Messages__EventRecord init_value = EVENT_STORE__CLIENT__MESSAGES__EVENT_RECORD__INIT; + *message = init_value; +} +size_t event_store__client__messages__event_record__get_packed_size + (const EventStore__Client__Messages__EventRecord *message) +{ + assert(message->base.descriptor == &event_store__client__messages__event_record__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__event_record__pack + (const EventStore__Client__Messages__EventRecord *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__event_record__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__event_record__pack_to_buffer + (const EventStore__Client__Messages__EventRecord *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__event_record__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__EventRecord * + event_store__client__messages__event_record__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__EventRecord *) + protobuf_c_message_unpack (&event_store__client__messages__event_record__descriptor, + allocator, len, data); +} +void event_store__client__messages__event_record__free_unpacked + (EventStore__Client__Messages__EventRecord *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__event_record__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__resolved_indexed_event__init + (EventStore__Client__Messages__ResolvedIndexedEvent *message) +{ + static const EventStore__Client__Messages__ResolvedIndexedEvent init_value = EVENT_STORE__CLIENT__MESSAGES__RESOLVED_INDEXED_EVENT__INIT; + *message = init_value; +} +size_t event_store__client__messages__resolved_indexed_event__get_packed_size + (const EventStore__Client__Messages__ResolvedIndexedEvent *message) +{ + assert(message->base.descriptor == &event_store__client__messages__resolved_indexed_event__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__resolved_indexed_event__pack + (const EventStore__Client__Messages__ResolvedIndexedEvent *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__resolved_indexed_event__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__resolved_indexed_event__pack_to_buffer + (const EventStore__Client__Messages__ResolvedIndexedEvent *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__resolved_indexed_event__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__ResolvedIndexedEvent * + event_store__client__messages__resolved_indexed_event__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__ResolvedIndexedEvent *) + protobuf_c_message_unpack (&event_store__client__messages__resolved_indexed_event__descriptor, + allocator, len, data); +} +void event_store__client__messages__resolved_indexed_event__free_unpacked + (EventStore__Client__Messages__ResolvedIndexedEvent *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__resolved_indexed_event__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__resolved_event__init + (EventStore__Client__Messages__ResolvedEvent *message) +{ + static const EventStore__Client__Messages__ResolvedEvent init_value = EVENT_STORE__CLIENT__MESSAGES__RESOLVED_EVENT__INIT; + *message = init_value; +} +size_t event_store__client__messages__resolved_event__get_packed_size + (const EventStore__Client__Messages__ResolvedEvent *message) +{ + assert(message->base.descriptor == &event_store__client__messages__resolved_event__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__resolved_event__pack + (const EventStore__Client__Messages__ResolvedEvent *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__resolved_event__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__resolved_event__pack_to_buffer + (const EventStore__Client__Messages__ResolvedEvent *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__resolved_event__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__ResolvedEvent * + event_store__client__messages__resolved_event__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__ResolvedEvent *) + protobuf_c_message_unpack (&event_store__client__messages__resolved_event__descriptor, + allocator, len, data); +} +void event_store__client__messages__resolved_event__free_unpacked + (EventStore__Client__Messages__ResolvedEvent *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__resolved_event__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__write_events__init + (EventStore__Client__Messages__WriteEvents *message) +{ + static const EventStore__Client__Messages__WriteEvents init_value = EVENT_STORE__CLIENT__MESSAGES__WRITE_EVENTS__INIT; + *message = init_value; +} +size_t event_store__client__messages__write_events__get_packed_size + (const EventStore__Client__Messages__WriteEvents *message) +{ + assert(message->base.descriptor == &event_store__client__messages__write_events__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__write_events__pack + (const EventStore__Client__Messages__WriteEvents *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__write_events__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__write_events__pack_to_buffer + (const EventStore__Client__Messages__WriteEvents *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__write_events__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__WriteEvents * + event_store__client__messages__write_events__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__WriteEvents *) + protobuf_c_message_unpack (&event_store__client__messages__write_events__descriptor, + allocator, len, data); +} +void event_store__client__messages__write_events__free_unpacked + (EventStore__Client__Messages__WriteEvents *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__write_events__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__write_events_completed__init + (EventStore__Client__Messages__WriteEventsCompleted *message) +{ + static const EventStore__Client__Messages__WriteEventsCompleted init_value = EVENT_STORE__CLIENT__MESSAGES__WRITE_EVENTS_COMPLETED__INIT; + *message = init_value; +} +size_t event_store__client__messages__write_events_completed__get_packed_size + (const EventStore__Client__Messages__WriteEventsCompleted *message) +{ + assert(message->base.descriptor == &event_store__client__messages__write_events_completed__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__write_events_completed__pack + (const EventStore__Client__Messages__WriteEventsCompleted *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__write_events_completed__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__write_events_completed__pack_to_buffer + (const EventStore__Client__Messages__WriteEventsCompleted *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__write_events_completed__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__WriteEventsCompleted * + event_store__client__messages__write_events_completed__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__WriteEventsCompleted *) + protobuf_c_message_unpack (&event_store__client__messages__write_events_completed__descriptor, + allocator, len, data); +} +void event_store__client__messages__write_events_completed__free_unpacked + (EventStore__Client__Messages__WriteEventsCompleted *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__write_events_completed__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__delete_stream__init + (EventStore__Client__Messages__DeleteStream *message) +{ + static const EventStore__Client__Messages__DeleteStream init_value = EVENT_STORE__CLIENT__MESSAGES__DELETE_STREAM__INIT; + *message = init_value; +} +size_t event_store__client__messages__delete_stream__get_packed_size + (const EventStore__Client__Messages__DeleteStream *message) +{ + assert(message->base.descriptor == &event_store__client__messages__delete_stream__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__delete_stream__pack + (const EventStore__Client__Messages__DeleteStream *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__delete_stream__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__delete_stream__pack_to_buffer + (const EventStore__Client__Messages__DeleteStream *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__delete_stream__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__DeleteStream * + event_store__client__messages__delete_stream__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__DeleteStream *) + protobuf_c_message_unpack (&event_store__client__messages__delete_stream__descriptor, + allocator, len, data); +} +void event_store__client__messages__delete_stream__free_unpacked + (EventStore__Client__Messages__DeleteStream *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__delete_stream__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__delete_stream_completed__init + (EventStore__Client__Messages__DeleteStreamCompleted *message) +{ + static const EventStore__Client__Messages__DeleteStreamCompleted init_value = EVENT_STORE__CLIENT__MESSAGES__DELETE_STREAM_COMPLETED__INIT; + *message = init_value; +} +size_t event_store__client__messages__delete_stream_completed__get_packed_size + (const EventStore__Client__Messages__DeleteStreamCompleted *message) +{ + assert(message->base.descriptor == &event_store__client__messages__delete_stream_completed__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__delete_stream_completed__pack + (const EventStore__Client__Messages__DeleteStreamCompleted *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__delete_stream_completed__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__delete_stream_completed__pack_to_buffer + (const EventStore__Client__Messages__DeleteStreamCompleted *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__delete_stream_completed__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__DeleteStreamCompleted * + event_store__client__messages__delete_stream_completed__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__DeleteStreamCompleted *) + protobuf_c_message_unpack (&event_store__client__messages__delete_stream_completed__descriptor, + allocator, len, data); +} +void event_store__client__messages__delete_stream_completed__free_unpacked + (EventStore__Client__Messages__DeleteStreamCompleted *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__delete_stream_completed__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__transaction_start__init + (EventStore__Client__Messages__TransactionStart *message) +{ + static const EventStore__Client__Messages__TransactionStart init_value = EVENT_STORE__CLIENT__MESSAGES__TRANSACTION_START__INIT; + *message = init_value; +} +size_t event_store__client__messages__transaction_start__get_packed_size + (const EventStore__Client__Messages__TransactionStart *message) +{ + assert(message->base.descriptor == &event_store__client__messages__transaction_start__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__transaction_start__pack + (const EventStore__Client__Messages__TransactionStart *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__transaction_start__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__transaction_start__pack_to_buffer + (const EventStore__Client__Messages__TransactionStart *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__transaction_start__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__TransactionStart * + event_store__client__messages__transaction_start__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__TransactionStart *) + protobuf_c_message_unpack (&event_store__client__messages__transaction_start__descriptor, + allocator, len, data); +} +void event_store__client__messages__transaction_start__free_unpacked + (EventStore__Client__Messages__TransactionStart *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__transaction_start__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__transaction_start_completed__init + (EventStore__Client__Messages__TransactionStartCompleted *message) +{ + static const EventStore__Client__Messages__TransactionStartCompleted init_value = EVENT_STORE__CLIENT__MESSAGES__TRANSACTION_START_COMPLETED__INIT; + *message = init_value; +} +size_t event_store__client__messages__transaction_start_completed__get_packed_size + (const EventStore__Client__Messages__TransactionStartCompleted *message) +{ + assert(message->base.descriptor == &event_store__client__messages__transaction_start_completed__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__transaction_start_completed__pack + (const EventStore__Client__Messages__TransactionStartCompleted *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__transaction_start_completed__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__transaction_start_completed__pack_to_buffer + (const EventStore__Client__Messages__TransactionStartCompleted *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__transaction_start_completed__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__TransactionStartCompleted * + event_store__client__messages__transaction_start_completed__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__TransactionStartCompleted *) + protobuf_c_message_unpack (&event_store__client__messages__transaction_start_completed__descriptor, + allocator, len, data); +} +void event_store__client__messages__transaction_start_completed__free_unpacked + (EventStore__Client__Messages__TransactionStartCompleted *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__transaction_start_completed__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__transaction_write__init + (EventStore__Client__Messages__TransactionWrite *message) +{ + static const EventStore__Client__Messages__TransactionWrite init_value = EVENT_STORE__CLIENT__MESSAGES__TRANSACTION_WRITE__INIT; + *message = init_value; +} +size_t event_store__client__messages__transaction_write__get_packed_size + (const EventStore__Client__Messages__TransactionWrite *message) +{ + assert(message->base.descriptor == &event_store__client__messages__transaction_write__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__transaction_write__pack + (const EventStore__Client__Messages__TransactionWrite *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__transaction_write__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__transaction_write__pack_to_buffer + (const EventStore__Client__Messages__TransactionWrite *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__transaction_write__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__TransactionWrite * + event_store__client__messages__transaction_write__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__TransactionWrite *) + protobuf_c_message_unpack (&event_store__client__messages__transaction_write__descriptor, + allocator, len, data); +} +void event_store__client__messages__transaction_write__free_unpacked + (EventStore__Client__Messages__TransactionWrite *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__transaction_write__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__transaction_write_completed__init + (EventStore__Client__Messages__TransactionWriteCompleted *message) +{ + static const EventStore__Client__Messages__TransactionWriteCompleted init_value = EVENT_STORE__CLIENT__MESSAGES__TRANSACTION_WRITE_COMPLETED__INIT; + *message = init_value; +} +size_t event_store__client__messages__transaction_write_completed__get_packed_size + (const EventStore__Client__Messages__TransactionWriteCompleted *message) +{ + assert(message->base.descriptor == &event_store__client__messages__transaction_write_completed__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__transaction_write_completed__pack + (const EventStore__Client__Messages__TransactionWriteCompleted *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__transaction_write_completed__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__transaction_write_completed__pack_to_buffer + (const EventStore__Client__Messages__TransactionWriteCompleted *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__transaction_write_completed__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__TransactionWriteCompleted * + event_store__client__messages__transaction_write_completed__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__TransactionWriteCompleted *) + protobuf_c_message_unpack (&event_store__client__messages__transaction_write_completed__descriptor, + allocator, len, data); +} +void event_store__client__messages__transaction_write_completed__free_unpacked + (EventStore__Client__Messages__TransactionWriteCompleted *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__transaction_write_completed__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__transaction_commit__init + (EventStore__Client__Messages__TransactionCommit *message) +{ + static const EventStore__Client__Messages__TransactionCommit init_value = EVENT_STORE__CLIENT__MESSAGES__TRANSACTION_COMMIT__INIT; + *message = init_value; +} +size_t event_store__client__messages__transaction_commit__get_packed_size + (const EventStore__Client__Messages__TransactionCommit *message) +{ + assert(message->base.descriptor == &event_store__client__messages__transaction_commit__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__transaction_commit__pack + (const EventStore__Client__Messages__TransactionCommit *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__transaction_commit__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__transaction_commit__pack_to_buffer + (const EventStore__Client__Messages__TransactionCommit *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__transaction_commit__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__TransactionCommit * + event_store__client__messages__transaction_commit__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__TransactionCommit *) + protobuf_c_message_unpack (&event_store__client__messages__transaction_commit__descriptor, + allocator, len, data); +} +void event_store__client__messages__transaction_commit__free_unpacked + (EventStore__Client__Messages__TransactionCommit *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__transaction_commit__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__transaction_commit_completed__init + (EventStore__Client__Messages__TransactionCommitCompleted *message) +{ + static const EventStore__Client__Messages__TransactionCommitCompleted init_value = EVENT_STORE__CLIENT__MESSAGES__TRANSACTION_COMMIT_COMPLETED__INIT; + *message = init_value; +} +size_t event_store__client__messages__transaction_commit_completed__get_packed_size + (const EventStore__Client__Messages__TransactionCommitCompleted *message) +{ + assert(message->base.descriptor == &event_store__client__messages__transaction_commit_completed__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__transaction_commit_completed__pack + (const EventStore__Client__Messages__TransactionCommitCompleted *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__transaction_commit_completed__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__transaction_commit_completed__pack_to_buffer + (const EventStore__Client__Messages__TransactionCommitCompleted *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__transaction_commit_completed__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__TransactionCommitCompleted * + event_store__client__messages__transaction_commit_completed__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__TransactionCommitCompleted *) + protobuf_c_message_unpack (&event_store__client__messages__transaction_commit_completed__descriptor, + allocator, len, data); +} +void event_store__client__messages__transaction_commit_completed__free_unpacked + (EventStore__Client__Messages__TransactionCommitCompleted *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__transaction_commit_completed__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__read_event__init + (EventStore__Client__Messages__ReadEvent *message) +{ + static const EventStore__Client__Messages__ReadEvent init_value = EVENT_STORE__CLIENT__MESSAGES__READ_EVENT__INIT; + *message = init_value; +} +size_t event_store__client__messages__read_event__get_packed_size + (const EventStore__Client__Messages__ReadEvent *message) +{ + assert(message->base.descriptor == &event_store__client__messages__read_event__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__read_event__pack + (const EventStore__Client__Messages__ReadEvent *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__read_event__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__read_event__pack_to_buffer + (const EventStore__Client__Messages__ReadEvent *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__read_event__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__ReadEvent * + event_store__client__messages__read_event__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__ReadEvent *) + protobuf_c_message_unpack (&event_store__client__messages__read_event__descriptor, + allocator, len, data); +} +void event_store__client__messages__read_event__free_unpacked + (EventStore__Client__Messages__ReadEvent *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__read_event__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__read_event_completed__init + (EventStore__Client__Messages__ReadEventCompleted *message) +{ + static const EventStore__Client__Messages__ReadEventCompleted init_value = EVENT_STORE__CLIENT__MESSAGES__READ_EVENT_COMPLETED__INIT; + *message = init_value; +} +size_t event_store__client__messages__read_event_completed__get_packed_size + (const EventStore__Client__Messages__ReadEventCompleted *message) +{ + assert(message->base.descriptor == &event_store__client__messages__read_event_completed__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__read_event_completed__pack + (const EventStore__Client__Messages__ReadEventCompleted *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__read_event_completed__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__read_event_completed__pack_to_buffer + (const EventStore__Client__Messages__ReadEventCompleted *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__read_event_completed__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__ReadEventCompleted * + event_store__client__messages__read_event_completed__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__ReadEventCompleted *) + protobuf_c_message_unpack (&event_store__client__messages__read_event_completed__descriptor, + allocator, len, data); +} +void event_store__client__messages__read_event_completed__free_unpacked + (EventStore__Client__Messages__ReadEventCompleted *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__read_event_completed__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__read_stream_events__init + (EventStore__Client__Messages__ReadStreamEvents *message) +{ + static const EventStore__Client__Messages__ReadStreamEvents init_value = EVENT_STORE__CLIENT__MESSAGES__READ_STREAM_EVENTS__INIT; + *message = init_value; +} +size_t event_store__client__messages__read_stream_events__get_packed_size + (const EventStore__Client__Messages__ReadStreamEvents *message) +{ + assert(message->base.descriptor == &event_store__client__messages__read_stream_events__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__read_stream_events__pack + (const EventStore__Client__Messages__ReadStreamEvents *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__read_stream_events__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__read_stream_events__pack_to_buffer + (const EventStore__Client__Messages__ReadStreamEvents *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__read_stream_events__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__ReadStreamEvents * + event_store__client__messages__read_stream_events__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__ReadStreamEvents *) + protobuf_c_message_unpack (&event_store__client__messages__read_stream_events__descriptor, + allocator, len, data); +} +void event_store__client__messages__read_stream_events__free_unpacked + (EventStore__Client__Messages__ReadStreamEvents *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__read_stream_events__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__read_stream_events_completed__init + (EventStore__Client__Messages__ReadStreamEventsCompleted *message) +{ + static const EventStore__Client__Messages__ReadStreamEventsCompleted init_value = EVENT_STORE__CLIENT__MESSAGES__READ_STREAM_EVENTS_COMPLETED__INIT; + *message = init_value; +} +size_t event_store__client__messages__read_stream_events_completed__get_packed_size + (const EventStore__Client__Messages__ReadStreamEventsCompleted *message) +{ + assert(message->base.descriptor == &event_store__client__messages__read_stream_events_completed__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__read_stream_events_completed__pack + (const EventStore__Client__Messages__ReadStreamEventsCompleted *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__read_stream_events_completed__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__read_stream_events_completed__pack_to_buffer + (const EventStore__Client__Messages__ReadStreamEventsCompleted *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__read_stream_events_completed__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__ReadStreamEventsCompleted * + event_store__client__messages__read_stream_events_completed__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__ReadStreamEventsCompleted *) + protobuf_c_message_unpack (&event_store__client__messages__read_stream_events_completed__descriptor, + allocator, len, data); +} +void event_store__client__messages__read_stream_events_completed__free_unpacked + (EventStore__Client__Messages__ReadStreamEventsCompleted *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__read_stream_events_completed__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__read_all_events__init + (EventStore__Client__Messages__ReadAllEvents *message) +{ + static const EventStore__Client__Messages__ReadAllEvents init_value = EVENT_STORE__CLIENT__MESSAGES__READ_ALL_EVENTS__INIT; + *message = init_value; +} +size_t event_store__client__messages__read_all_events__get_packed_size + (const EventStore__Client__Messages__ReadAllEvents *message) +{ + assert(message->base.descriptor == &event_store__client__messages__read_all_events__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__read_all_events__pack + (const EventStore__Client__Messages__ReadAllEvents *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__read_all_events__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__read_all_events__pack_to_buffer + (const EventStore__Client__Messages__ReadAllEvents *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__read_all_events__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__ReadAllEvents * + event_store__client__messages__read_all_events__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__ReadAllEvents *) + protobuf_c_message_unpack (&event_store__client__messages__read_all_events__descriptor, + allocator, len, data); +} +void event_store__client__messages__read_all_events__free_unpacked + (EventStore__Client__Messages__ReadAllEvents *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__read_all_events__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__read_all_events_completed__init + (EventStore__Client__Messages__ReadAllEventsCompleted *message) +{ + static const EventStore__Client__Messages__ReadAllEventsCompleted init_value = EVENT_STORE__CLIENT__MESSAGES__READ_ALL_EVENTS_COMPLETED__INIT; + *message = init_value; +} +size_t event_store__client__messages__read_all_events_completed__get_packed_size + (const EventStore__Client__Messages__ReadAllEventsCompleted *message) +{ + assert(message->base.descriptor == &event_store__client__messages__read_all_events_completed__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__read_all_events_completed__pack + (const EventStore__Client__Messages__ReadAllEventsCompleted *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__read_all_events_completed__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__read_all_events_completed__pack_to_buffer + (const EventStore__Client__Messages__ReadAllEventsCompleted *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__read_all_events_completed__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__ReadAllEventsCompleted * + event_store__client__messages__read_all_events_completed__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__ReadAllEventsCompleted *) + protobuf_c_message_unpack (&event_store__client__messages__read_all_events_completed__descriptor, + allocator, len, data); +} +void event_store__client__messages__read_all_events_completed__free_unpacked + (EventStore__Client__Messages__ReadAllEventsCompleted *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__read_all_events_completed__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__create_persistent_subscription__init + (EventStore__Client__Messages__CreatePersistentSubscription *message) +{ + static const EventStore__Client__Messages__CreatePersistentSubscription init_value = EVENT_STORE__CLIENT__MESSAGES__CREATE_PERSISTENT_SUBSCRIPTION__INIT; + *message = init_value; +} +size_t event_store__client__messages__create_persistent_subscription__get_packed_size + (const EventStore__Client__Messages__CreatePersistentSubscription *message) +{ + assert(message->base.descriptor == &event_store__client__messages__create_persistent_subscription__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__create_persistent_subscription__pack + (const EventStore__Client__Messages__CreatePersistentSubscription *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__create_persistent_subscription__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__create_persistent_subscription__pack_to_buffer + (const EventStore__Client__Messages__CreatePersistentSubscription *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__create_persistent_subscription__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__CreatePersistentSubscription * + event_store__client__messages__create_persistent_subscription__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__CreatePersistentSubscription *) + protobuf_c_message_unpack (&event_store__client__messages__create_persistent_subscription__descriptor, + allocator, len, data); +} +void event_store__client__messages__create_persistent_subscription__free_unpacked + (EventStore__Client__Messages__CreatePersistentSubscription *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__create_persistent_subscription__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__delete_persistent_subscription__init + (EventStore__Client__Messages__DeletePersistentSubscription *message) +{ + static const EventStore__Client__Messages__DeletePersistentSubscription init_value = EVENT_STORE__CLIENT__MESSAGES__DELETE_PERSISTENT_SUBSCRIPTION__INIT; + *message = init_value; +} +size_t event_store__client__messages__delete_persistent_subscription__get_packed_size + (const EventStore__Client__Messages__DeletePersistentSubscription *message) +{ + assert(message->base.descriptor == &event_store__client__messages__delete_persistent_subscription__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__delete_persistent_subscription__pack + (const EventStore__Client__Messages__DeletePersistentSubscription *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__delete_persistent_subscription__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__delete_persistent_subscription__pack_to_buffer + (const EventStore__Client__Messages__DeletePersistentSubscription *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__delete_persistent_subscription__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__DeletePersistentSubscription * + event_store__client__messages__delete_persistent_subscription__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__DeletePersistentSubscription *) + protobuf_c_message_unpack (&event_store__client__messages__delete_persistent_subscription__descriptor, + allocator, len, data); +} +void event_store__client__messages__delete_persistent_subscription__free_unpacked + (EventStore__Client__Messages__DeletePersistentSubscription *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__delete_persistent_subscription__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__update_persistent_subscription__init + (EventStore__Client__Messages__UpdatePersistentSubscription *message) +{ + static const EventStore__Client__Messages__UpdatePersistentSubscription init_value = EVENT_STORE__CLIENT__MESSAGES__UPDATE_PERSISTENT_SUBSCRIPTION__INIT; + *message = init_value; +} +size_t event_store__client__messages__update_persistent_subscription__get_packed_size + (const EventStore__Client__Messages__UpdatePersistentSubscription *message) +{ + assert(message->base.descriptor == &event_store__client__messages__update_persistent_subscription__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__update_persistent_subscription__pack + (const EventStore__Client__Messages__UpdatePersistentSubscription *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__update_persistent_subscription__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__update_persistent_subscription__pack_to_buffer + (const EventStore__Client__Messages__UpdatePersistentSubscription *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__update_persistent_subscription__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__UpdatePersistentSubscription * + event_store__client__messages__update_persistent_subscription__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__UpdatePersistentSubscription *) + protobuf_c_message_unpack (&event_store__client__messages__update_persistent_subscription__descriptor, + allocator, len, data); +} +void event_store__client__messages__update_persistent_subscription__free_unpacked + (EventStore__Client__Messages__UpdatePersistentSubscription *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__update_persistent_subscription__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__update_persistent_subscription_completed__init + (EventStore__Client__Messages__UpdatePersistentSubscriptionCompleted *message) +{ + static const EventStore__Client__Messages__UpdatePersistentSubscriptionCompleted init_value = EVENT_STORE__CLIENT__MESSAGES__UPDATE_PERSISTENT_SUBSCRIPTION_COMPLETED__INIT; + *message = init_value; +} +size_t event_store__client__messages__update_persistent_subscription_completed__get_packed_size + (const EventStore__Client__Messages__UpdatePersistentSubscriptionCompleted *message) +{ + assert(message->base.descriptor == &event_store__client__messages__update_persistent_subscription_completed__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__update_persistent_subscription_completed__pack + (const EventStore__Client__Messages__UpdatePersistentSubscriptionCompleted *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__update_persistent_subscription_completed__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__update_persistent_subscription_completed__pack_to_buffer + (const EventStore__Client__Messages__UpdatePersistentSubscriptionCompleted *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__update_persistent_subscription_completed__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__UpdatePersistentSubscriptionCompleted * + event_store__client__messages__update_persistent_subscription_completed__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__UpdatePersistentSubscriptionCompleted *) + protobuf_c_message_unpack (&event_store__client__messages__update_persistent_subscription_completed__descriptor, + allocator, len, data); +} +void event_store__client__messages__update_persistent_subscription_completed__free_unpacked + (EventStore__Client__Messages__UpdatePersistentSubscriptionCompleted *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__update_persistent_subscription_completed__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__create_persistent_subscription_completed__init + (EventStore__Client__Messages__CreatePersistentSubscriptionCompleted *message) +{ + static const EventStore__Client__Messages__CreatePersistentSubscriptionCompleted init_value = EVENT_STORE__CLIENT__MESSAGES__CREATE_PERSISTENT_SUBSCRIPTION_COMPLETED__INIT; + *message = init_value; +} +size_t event_store__client__messages__create_persistent_subscription_completed__get_packed_size + (const EventStore__Client__Messages__CreatePersistentSubscriptionCompleted *message) +{ + assert(message->base.descriptor == &event_store__client__messages__create_persistent_subscription_completed__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__create_persistent_subscription_completed__pack + (const EventStore__Client__Messages__CreatePersistentSubscriptionCompleted *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__create_persistent_subscription_completed__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__create_persistent_subscription_completed__pack_to_buffer + (const EventStore__Client__Messages__CreatePersistentSubscriptionCompleted *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__create_persistent_subscription_completed__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__CreatePersistentSubscriptionCompleted * + event_store__client__messages__create_persistent_subscription_completed__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__CreatePersistentSubscriptionCompleted *) + protobuf_c_message_unpack (&event_store__client__messages__create_persistent_subscription_completed__descriptor, + allocator, len, data); +} +void event_store__client__messages__create_persistent_subscription_completed__free_unpacked + (EventStore__Client__Messages__CreatePersistentSubscriptionCompleted *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__create_persistent_subscription_completed__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__delete_persistent_subscription_completed__init + (EventStore__Client__Messages__DeletePersistentSubscriptionCompleted *message) +{ + static const EventStore__Client__Messages__DeletePersistentSubscriptionCompleted init_value = EVENT_STORE__CLIENT__MESSAGES__DELETE_PERSISTENT_SUBSCRIPTION_COMPLETED__INIT; + *message = init_value; +} +size_t event_store__client__messages__delete_persistent_subscription_completed__get_packed_size + (const EventStore__Client__Messages__DeletePersistentSubscriptionCompleted *message) +{ + assert(message->base.descriptor == &event_store__client__messages__delete_persistent_subscription_completed__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__delete_persistent_subscription_completed__pack + (const EventStore__Client__Messages__DeletePersistentSubscriptionCompleted *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__delete_persistent_subscription_completed__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__delete_persistent_subscription_completed__pack_to_buffer + (const EventStore__Client__Messages__DeletePersistentSubscriptionCompleted *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__delete_persistent_subscription_completed__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__DeletePersistentSubscriptionCompleted * + event_store__client__messages__delete_persistent_subscription_completed__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__DeletePersistentSubscriptionCompleted *) + protobuf_c_message_unpack (&event_store__client__messages__delete_persistent_subscription_completed__descriptor, + allocator, len, data); +} +void event_store__client__messages__delete_persistent_subscription_completed__free_unpacked + (EventStore__Client__Messages__DeletePersistentSubscriptionCompleted *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__delete_persistent_subscription_completed__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__connect_to_persistent_subscription__init + (EventStore__Client__Messages__ConnectToPersistentSubscription *message) +{ + static const EventStore__Client__Messages__ConnectToPersistentSubscription init_value = EVENT_STORE__CLIENT__MESSAGES__CONNECT_TO_PERSISTENT_SUBSCRIPTION__INIT; + *message = init_value; +} +size_t event_store__client__messages__connect_to_persistent_subscription__get_packed_size + (const EventStore__Client__Messages__ConnectToPersistentSubscription *message) +{ + assert(message->base.descriptor == &event_store__client__messages__connect_to_persistent_subscription__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__connect_to_persistent_subscription__pack + (const EventStore__Client__Messages__ConnectToPersistentSubscription *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__connect_to_persistent_subscription__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__connect_to_persistent_subscription__pack_to_buffer + (const EventStore__Client__Messages__ConnectToPersistentSubscription *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__connect_to_persistent_subscription__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__ConnectToPersistentSubscription * + event_store__client__messages__connect_to_persistent_subscription__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__ConnectToPersistentSubscription *) + protobuf_c_message_unpack (&event_store__client__messages__connect_to_persistent_subscription__descriptor, + allocator, len, data); +} +void event_store__client__messages__connect_to_persistent_subscription__free_unpacked + (EventStore__Client__Messages__ConnectToPersistentSubscription *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__connect_to_persistent_subscription__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__persistent_subscription_ack_events__init + (EventStore__Client__Messages__PersistentSubscriptionAckEvents *message) +{ + static const EventStore__Client__Messages__PersistentSubscriptionAckEvents init_value = EVENT_STORE__CLIENT__MESSAGES__PERSISTENT_SUBSCRIPTION_ACK_EVENTS__INIT; + *message = init_value; +} +size_t event_store__client__messages__persistent_subscription_ack_events__get_packed_size + (const EventStore__Client__Messages__PersistentSubscriptionAckEvents *message) +{ + assert(message->base.descriptor == &event_store__client__messages__persistent_subscription_ack_events__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__persistent_subscription_ack_events__pack + (const EventStore__Client__Messages__PersistentSubscriptionAckEvents *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__persistent_subscription_ack_events__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__persistent_subscription_ack_events__pack_to_buffer + (const EventStore__Client__Messages__PersistentSubscriptionAckEvents *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__persistent_subscription_ack_events__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__PersistentSubscriptionAckEvents * + event_store__client__messages__persistent_subscription_ack_events__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__PersistentSubscriptionAckEvents *) + protobuf_c_message_unpack (&event_store__client__messages__persistent_subscription_ack_events__descriptor, + allocator, len, data); +} +void event_store__client__messages__persistent_subscription_ack_events__free_unpacked + (EventStore__Client__Messages__PersistentSubscriptionAckEvents *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__persistent_subscription_ack_events__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__persistent_subscription_nak_events__init + (EventStore__Client__Messages__PersistentSubscriptionNakEvents *message) +{ + static const EventStore__Client__Messages__PersistentSubscriptionNakEvents init_value = EVENT_STORE__CLIENT__MESSAGES__PERSISTENT_SUBSCRIPTION_NAK_EVENTS__INIT; + *message = init_value; +} +size_t event_store__client__messages__persistent_subscription_nak_events__get_packed_size + (const EventStore__Client__Messages__PersistentSubscriptionNakEvents *message) +{ + assert(message->base.descriptor == &event_store__client__messages__persistent_subscription_nak_events__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__persistent_subscription_nak_events__pack + (const EventStore__Client__Messages__PersistentSubscriptionNakEvents *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__persistent_subscription_nak_events__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__persistent_subscription_nak_events__pack_to_buffer + (const EventStore__Client__Messages__PersistentSubscriptionNakEvents *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__persistent_subscription_nak_events__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__PersistentSubscriptionNakEvents * + event_store__client__messages__persistent_subscription_nak_events__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__PersistentSubscriptionNakEvents *) + protobuf_c_message_unpack (&event_store__client__messages__persistent_subscription_nak_events__descriptor, + allocator, len, data); +} +void event_store__client__messages__persistent_subscription_nak_events__free_unpacked + (EventStore__Client__Messages__PersistentSubscriptionNakEvents *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__persistent_subscription_nak_events__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__persistent_subscription_confirmation__init + (EventStore__Client__Messages__PersistentSubscriptionConfirmation *message) +{ + static const EventStore__Client__Messages__PersistentSubscriptionConfirmation init_value = EVENT_STORE__CLIENT__MESSAGES__PERSISTENT_SUBSCRIPTION_CONFIRMATION__INIT; + *message = init_value; +} +size_t event_store__client__messages__persistent_subscription_confirmation__get_packed_size + (const EventStore__Client__Messages__PersistentSubscriptionConfirmation *message) +{ + assert(message->base.descriptor == &event_store__client__messages__persistent_subscription_confirmation__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__persistent_subscription_confirmation__pack + (const EventStore__Client__Messages__PersistentSubscriptionConfirmation *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__persistent_subscription_confirmation__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__persistent_subscription_confirmation__pack_to_buffer + (const EventStore__Client__Messages__PersistentSubscriptionConfirmation *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__persistent_subscription_confirmation__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__PersistentSubscriptionConfirmation * + event_store__client__messages__persistent_subscription_confirmation__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__PersistentSubscriptionConfirmation *) + protobuf_c_message_unpack (&event_store__client__messages__persistent_subscription_confirmation__descriptor, + allocator, len, data); +} +void event_store__client__messages__persistent_subscription_confirmation__free_unpacked + (EventStore__Client__Messages__PersistentSubscriptionConfirmation *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__persistent_subscription_confirmation__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__persistent_subscription_stream_event_appeared__init + (EventStore__Client__Messages__PersistentSubscriptionStreamEventAppeared *message) +{ + static const EventStore__Client__Messages__PersistentSubscriptionStreamEventAppeared init_value = EVENT_STORE__CLIENT__MESSAGES__PERSISTENT_SUBSCRIPTION_STREAM_EVENT_APPEARED__INIT; + *message = init_value; +} +size_t event_store__client__messages__persistent_subscription_stream_event_appeared__get_packed_size + (const EventStore__Client__Messages__PersistentSubscriptionStreamEventAppeared *message) +{ + assert(message->base.descriptor == &event_store__client__messages__persistent_subscription_stream_event_appeared__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__persistent_subscription_stream_event_appeared__pack + (const EventStore__Client__Messages__PersistentSubscriptionStreamEventAppeared *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__persistent_subscription_stream_event_appeared__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__persistent_subscription_stream_event_appeared__pack_to_buffer + (const EventStore__Client__Messages__PersistentSubscriptionStreamEventAppeared *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__persistent_subscription_stream_event_appeared__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__PersistentSubscriptionStreamEventAppeared * + event_store__client__messages__persistent_subscription_stream_event_appeared__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__PersistentSubscriptionStreamEventAppeared *) + protobuf_c_message_unpack (&event_store__client__messages__persistent_subscription_stream_event_appeared__descriptor, + allocator, len, data); +} +void event_store__client__messages__persistent_subscription_stream_event_appeared__free_unpacked + (EventStore__Client__Messages__PersistentSubscriptionStreamEventAppeared *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__persistent_subscription_stream_event_appeared__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__subscribe_to_stream__init + (EventStore__Client__Messages__SubscribeToStream *message) +{ + static const EventStore__Client__Messages__SubscribeToStream init_value = EVENT_STORE__CLIENT__MESSAGES__SUBSCRIBE_TO_STREAM__INIT; + *message = init_value; +} +size_t event_store__client__messages__subscribe_to_stream__get_packed_size + (const EventStore__Client__Messages__SubscribeToStream *message) +{ + assert(message->base.descriptor == &event_store__client__messages__subscribe_to_stream__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__subscribe_to_stream__pack + (const EventStore__Client__Messages__SubscribeToStream *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__subscribe_to_stream__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__subscribe_to_stream__pack_to_buffer + (const EventStore__Client__Messages__SubscribeToStream *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__subscribe_to_stream__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__SubscribeToStream * + event_store__client__messages__subscribe_to_stream__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__SubscribeToStream *) + protobuf_c_message_unpack (&event_store__client__messages__subscribe_to_stream__descriptor, + allocator, len, data); +} +void event_store__client__messages__subscribe_to_stream__free_unpacked + (EventStore__Client__Messages__SubscribeToStream *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__subscribe_to_stream__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__subscription_confirmation__init + (EventStore__Client__Messages__SubscriptionConfirmation *message) +{ + static const EventStore__Client__Messages__SubscriptionConfirmation init_value = EVENT_STORE__CLIENT__MESSAGES__SUBSCRIPTION_CONFIRMATION__INIT; + *message = init_value; +} +size_t event_store__client__messages__subscription_confirmation__get_packed_size + (const EventStore__Client__Messages__SubscriptionConfirmation *message) +{ + assert(message->base.descriptor == &event_store__client__messages__subscription_confirmation__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__subscription_confirmation__pack + (const EventStore__Client__Messages__SubscriptionConfirmation *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__subscription_confirmation__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__subscription_confirmation__pack_to_buffer + (const EventStore__Client__Messages__SubscriptionConfirmation *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__subscription_confirmation__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__SubscriptionConfirmation * + event_store__client__messages__subscription_confirmation__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__SubscriptionConfirmation *) + protobuf_c_message_unpack (&event_store__client__messages__subscription_confirmation__descriptor, + allocator, len, data); +} +void event_store__client__messages__subscription_confirmation__free_unpacked + (EventStore__Client__Messages__SubscriptionConfirmation *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__subscription_confirmation__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__stream_event_appeared__init + (EventStore__Client__Messages__StreamEventAppeared *message) +{ + static const EventStore__Client__Messages__StreamEventAppeared init_value = EVENT_STORE__CLIENT__MESSAGES__STREAM_EVENT_APPEARED__INIT; + *message = init_value; +} +size_t event_store__client__messages__stream_event_appeared__get_packed_size + (const EventStore__Client__Messages__StreamEventAppeared *message) +{ + assert(message->base.descriptor == &event_store__client__messages__stream_event_appeared__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__stream_event_appeared__pack + (const EventStore__Client__Messages__StreamEventAppeared *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__stream_event_appeared__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__stream_event_appeared__pack_to_buffer + (const EventStore__Client__Messages__StreamEventAppeared *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__stream_event_appeared__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__StreamEventAppeared * + event_store__client__messages__stream_event_appeared__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__StreamEventAppeared *) + protobuf_c_message_unpack (&event_store__client__messages__stream_event_appeared__descriptor, + allocator, len, data); +} +void event_store__client__messages__stream_event_appeared__free_unpacked + (EventStore__Client__Messages__StreamEventAppeared *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__stream_event_appeared__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__unsubscribe_from_stream__init + (EventStore__Client__Messages__UnsubscribeFromStream *message) +{ + static const EventStore__Client__Messages__UnsubscribeFromStream init_value = EVENT_STORE__CLIENT__MESSAGES__UNSUBSCRIBE_FROM_STREAM__INIT; + *message = init_value; +} +size_t event_store__client__messages__unsubscribe_from_stream__get_packed_size + (const EventStore__Client__Messages__UnsubscribeFromStream *message) +{ + assert(message->base.descriptor == &event_store__client__messages__unsubscribe_from_stream__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__unsubscribe_from_stream__pack + (const EventStore__Client__Messages__UnsubscribeFromStream *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__unsubscribe_from_stream__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__unsubscribe_from_stream__pack_to_buffer + (const EventStore__Client__Messages__UnsubscribeFromStream *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__unsubscribe_from_stream__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__UnsubscribeFromStream * + event_store__client__messages__unsubscribe_from_stream__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__UnsubscribeFromStream *) + protobuf_c_message_unpack (&event_store__client__messages__unsubscribe_from_stream__descriptor, + allocator, len, data); +} +void event_store__client__messages__unsubscribe_from_stream__free_unpacked + (EventStore__Client__Messages__UnsubscribeFromStream *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__unsubscribe_from_stream__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__subscription_dropped__init + (EventStore__Client__Messages__SubscriptionDropped *message) +{ + static const EventStore__Client__Messages__SubscriptionDropped init_value = EVENT_STORE__CLIENT__MESSAGES__SUBSCRIPTION_DROPPED__INIT; + *message = init_value; +} +size_t event_store__client__messages__subscription_dropped__get_packed_size + (const EventStore__Client__Messages__SubscriptionDropped *message) +{ + assert(message->base.descriptor == &event_store__client__messages__subscription_dropped__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__subscription_dropped__pack + (const EventStore__Client__Messages__SubscriptionDropped *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__subscription_dropped__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__subscription_dropped__pack_to_buffer + (const EventStore__Client__Messages__SubscriptionDropped *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__subscription_dropped__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__SubscriptionDropped * + event_store__client__messages__subscription_dropped__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__SubscriptionDropped *) + protobuf_c_message_unpack (&event_store__client__messages__subscription_dropped__descriptor, + allocator, len, data); +} +void event_store__client__messages__subscription_dropped__free_unpacked + (EventStore__Client__Messages__SubscriptionDropped *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__subscription_dropped__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__not_handled__master_info__init + (EventStore__Client__Messages__NotHandled__MasterInfo *message) +{ + static const EventStore__Client__Messages__NotHandled__MasterInfo init_value = EVENT_STORE__CLIENT__MESSAGES__NOT_HANDLED__MASTER_INFO__INIT; + *message = init_value; +} +void event_store__client__messages__not_handled__init + (EventStore__Client__Messages__NotHandled *message) +{ + static const EventStore__Client__Messages__NotHandled init_value = EVENT_STORE__CLIENT__MESSAGES__NOT_HANDLED__INIT; + *message = init_value; +} +size_t event_store__client__messages__not_handled__get_packed_size + (const EventStore__Client__Messages__NotHandled *message) +{ + assert(message->base.descriptor == &event_store__client__messages__not_handled__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__not_handled__pack + (const EventStore__Client__Messages__NotHandled *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__not_handled__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__not_handled__pack_to_buffer + (const EventStore__Client__Messages__NotHandled *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__not_handled__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__NotHandled * + event_store__client__messages__not_handled__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__NotHandled *) + protobuf_c_message_unpack (&event_store__client__messages__not_handled__descriptor, + allocator, len, data); +} +void event_store__client__messages__not_handled__free_unpacked + (EventStore__Client__Messages__NotHandled *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__not_handled__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__scavenge_database__init + (EventStore__Client__Messages__ScavengeDatabase *message) +{ + static const EventStore__Client__Messages__ScavengeDatabase init_value = EVENT_STORE__CLIENT__MESSAGES__SCAVENGE_DATABASE__INIT; + *message = init_value; +} +size_t event_store__client__messages__scavenge_database__get_packed_size + (const EventStore__Client__Messages__ScavengeDatabase *message) +{ + assert(message->base.descriptor == &event_store__client__messages__scavenge_database__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__scavenge_database__pack + (const EventStore__Client__Messages__ScavengeDatabase *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__scavenge_database__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__scavenge_database__pack_to_buffer + (const EventStore__Client__Messages__ScavengeDatabase *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__scavenge_database__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__ScavengeDatabase * + event_store__client__messages__scavenge_database__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__ScavengeDatabase *) + protobuf_c_message_unpack (&event_store__client__messages__scavenge_database__descriptor, + allocator, len, data); +} +void event_store__client__messages__scavenge_database__free_unpacked + (EventStore__Client__Messages__ScavengeDatabase *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__scavenge_database__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__scavenge_database_completed__init + (EventStore__Client__Messages__ScavengeDatabaseCompleted *message) +{ + static const EventStore__Client__Messages__ScavengeDatabaseCompleted init_value = EVENT_STORE__CLIENT__MESSAGES__SCAVENGE_DATABASE_COMPLETED__INIT; + *message = init_value; +} +size_t event_store__client__messages__scavenge_database_completed__get_packed_size + (const EventStore__Client__Messages__ScavengeDatabaseCompleted *message) +{ + assert(message->base.descriptor == &event_store__client__messages__scavenge_database_completed__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__scavenge_database_completed__pack + (const EventStore__Client__Messages__ScavengeDatabaseCompleted *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__scavenge_database_completed__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__scavenge_database_completed__pack_to_buffer + (const EventStore__Client__Messages__ScavengeDatabaseCompleted *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__scavenge_database_completed__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__ScavengeDatabaseCompleted * + event_store__client__messages__scavenge_database_completed__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__ScavengeDatabaseCompleted *) + protobuf_c_message_unpack (&event_store__client__messages__scavenge_database_completed__descriptor, + allocator, len, data); +} +void event_store__client__messages__scavenge_database_completed__free_unpacked + (EventStore__Client__Messages__ScavengeDatabaseCompleted *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__scavenge_database_completed__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__identify_client__init + (EventStore__Client__Messages__IdentifyClient *message) +{ + static const EventStore__Client__Messages__IdentifyClient init_value = EVENT_STORE__CLIENT__MESSAGES__IDENTIFY_CLIENT__INIT; + *message = init_value; +} +size_t event_store__client__messages__identify_client__get_packed_size + (const EventStore__Client__Messages__IdentifyClient *message) +{ + assert(message->base.descriptor == &event_store__client__messages__identify_client__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__identify_client__pack + (const EventStore__Client__Messages__IdentifyClient *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__identify_client__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__identify_client__pack_to_buffer + (const EventStore__Client__Messages__IdentifyClient *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__identify_client__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__IdentifyClient * + event_store__client__messages__identify_client__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__IdentifyClient *) + protobuf_c_message_unpack (&event_store__client__messages__identify_client__descriptor, + allocator, len, data); +} +void event_store__client__messages__identify_client__free_unpacked + (EventStore__Client__Messages__IdentifyClient *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__identify_client__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void event_store__client__messages__client_identified__init + (EventStore__Client__Messages__ClientIdentified *message) +{ + static const EventStore__Client__Messages__ClientIdentified init_value = EVENT_STORE__CLIENT__MESSAGES__CLIENT_IDENTIFIED__INIT; + *message = init_value; +} +size_t event_store__client__messages__client_identified__get_packed_size + (const EventStore__Client__Messages__ClientIdentified *message) +{ + assert(message->base.descriptor == &event_store__client__messages__client_identified__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t event_store__client__messages__client_identified__pack + (const EventStore__Client__Messages__ClientIdentified *message, + uint8_t *out) +{ + assert(message->base.descriptor == &event_store__client__messages__client_identified__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t event_store__client__messages__client_identified__pack_to_buffer + (const EventStore__Client__Messages__ClientIdentified *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &event_store__client__messages__client_identified__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +EventStore__Client__Messages__ClientIdentified * + event_store__client__messages__client_identified__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (EventStore__Client__Messages__ClientIdentified *) + protobuf_c_message_unpack (&event_store__client__messages__client_identified__descriptor, + allocator, len, data); +} +void event_store__client__messages__client_identified__free_unpacked + (EventStore__Client__Messages__ClientIdentified *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &event_store__client__messages__client_identified__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor event_store__client__messages__new_event__field_descriptors[6] = +{ + { + "event_id", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_BYTES, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__NewEvent, event_id), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "event_type", + 2, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__NewEvent, event_type), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "data_content_type", + 3, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__NewEvent, data_content_type), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "metadata_content_type", + 4, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__NewEvent, metadata_content_type), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "data", + 5, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_BYTES, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__NewEvent, data), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "metadata", + 6, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BYTES, + offsetof(EventStore__Client__Messages__NewEvent, has_metadata), + offsetof(EventStore__Client__Messages__NewEvent, metadata), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__new_event__field_indices_by_name[] = { + 4, /* field[4] = data */ + 2, /* field[2] = data_content_type */ + 0, /* field[0] = event_id */ + 1, /* field[1] = event_type */ + 5, /* field[5] = metadata */ + 3, /* field[3] = metadata_content_type */ +}; +static const ProtobufCIntRange event_store__client__messages__new_event__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 6 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__new_event__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.NewEvent", + "NewEvent", + "EventStore__Client__Messages__NewEvent", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__NewEvent), + 6, + event_store__client__messages__new_event__field_descriptors, + event_store__client__messages__new_event__field_indices_by_name, + 1, event_store__client__messages__new_event__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__new_event__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__event_record__field_descriptors[10] = +{ + { + "event_stream_id", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__EventRecord, event_stream_id), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "event_number", + 2, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__EventRecord, event_number), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "event_id", + 3, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_BYTES, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__EventRecord, event_id), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "event_type", + 4, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__EventRecord, event_type), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "data_content_type", + 5, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__EventRecord, data_content_type), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "metadata_content_type", + 6, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__EventRecord, metadata_content_type), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "data", + 7, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_BYTES, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__EventRecord, data), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "metadata", + 8, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BYTES, + offsetof(EventStore__Client__Messages__EventRecord, has_metadata), + offsetof(EventStore__Client__Messages__EventRecord, metadata), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "created", + 9, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_INT64, + offsetof(EventStore__Client__Messages__EventRecord, has_created), + offsetof(EventStore__Client__Messages__EventRecord, created), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "created_epoch", + 10, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_INT64, + offsetof(EventStore__Client__Messages__EventRecord, has_created_epoch), + offsetof(EventStore__Client__Messages__EventRecord, created_epoch), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__event_record__field_indices_by_name[] = { + 8, /* field[8] = created */ + 9, /* field[9] = created_epoch */ + 6, /* field[6] = data */ + 4, /* field[4] = data_content_type */ + 2, /* field[2] = event_id */ + 1, /* field[1] = event_number */ + 0, /* field[0] = event_stream_id */ + 3, /* field[3] = event_type */ + 7, /* field[7] = metadata */ + 5, /* field[5] = metadata_content_type */ +}; +static const ProtobufCIntRange event_store__client__messages__event_record__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 10 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__event_record__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.EventRecord", + "EventRecord", + "EventStore__Client__Messages__EventRecord", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__EventRecord), + 10, + event_store__client__messages__event_record__field_descriptors, + event_store__client__messages__event_record__field_indices_by_name, + 1, event_store__client__messages__event_record__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__event_record__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__resolved_indexed_event__field_descriptors[2] = +{ + { + "event", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ResolvedIndexedEvent, event), + &event_store__client__messages__event_record__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "link", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ResolvedIndexedEvent, link), + &event_store__client__messages__event_record__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__resolved_indexed_event__field_indices_by_name[] = { + 0, /* field[0] = event */ + 1, /* field[1] = link */ +}; +static const ProtobufCIntRange event_store__client__messages__resolved_indexed_event__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__resolved_indexed_event__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.ResolvedIndexedEvent", + "ResolvedIndexedEvent", + "EventStore__Client__Messages__ResolvedIndexedEvent", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__ResolvedIndexedEvent), + 2, + event_store__client__messages__resolved_indexed_event__field_descriptors, + event_store__client__messages__resolved_indexed_event__field_indices_by_name, + 1, event_store__client__messages__resolved_indexed_event__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__resolved_indexed_event__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__resolved_event__field_descriptors[4] = +{ + { + "event", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ResolvedEvent, event), + &event_store__client__messages__event_record__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "link", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ResolvedEvent, link), + &event_store__client__messages__event_record__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "commit_position", + 3, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ResolvedEvent, commit_position), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "prepare_position", + 4, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ResolvedEvent, prepare_position), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__resolved_event__field_indices_by_name[] = { + 2, /* field[2] = commit_position */ + 0, /* field[0] = event */ + 1, /* field[1] = link */ + 3, /* field[3] = prepare_position */ +}; +static const ProtobufCIntRange event_store__client__messages__resolved_event__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 4 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__resolved_event__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.ResolvedEvent", + "ResolvedEvent", + "EventStore__Client__Messages__ResolvedEvent", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__ResolvedEvent), + 4, + event_store__client__messages__resolved_event__field_descriptors, + event_store__client__messages__resolved_event__field_indices_by_name, + 1, event_store__client__messages__resolved_event__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__resolved_event__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__write_events__field_descriptors[4] = +{ + { + "event_stream_id", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__WriteEvents, event_stream_id), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "expected_version", + 2, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__WriteEvents, expected_version), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "events", + 3, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(EventStore__Client__Messages__WriteEvents, n_events), + offsetof(EventStore__Client__Messages__WriteEvents, events), + &event_store__client__messages__new_event__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "require_master", + 4, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_BOOL, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__WriteEvents, require_master), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__write_events__field_indices_by_name[] = { + 0, /* field[0] = event_stream_id */ + 2, /* field[2] = events */ + 1, /* field[1] = expected_version */ + 3, /* field[3] = require_master */ +}; +static const ProtobufCIntRange event_store__client__messages__write_events__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 4 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__write_events__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.WriteEvents", + "WriteEvents", + "EventStore__Client__Messages__WriteEvents", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__WriteEvents), + 4, + event_store__client__messages__write_events__field_descriptors, + event_store__client__messages__write_events__field_indices_by_name, + 1, event_store__client__messages__write_events__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__write_events__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__write_events_completed__field_descriptors[7] = +{ + { + "result", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_ENUM, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__WriteEventsCompleted, result), + &event_store__client__messages__operation_result__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "message", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__WriteEventsCompleted, message), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "first_event_number", + 3, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__WriteEventsCompleted, first_event_number), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "last_event_number", + 4, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__WriteEventsCompleted, last_event_number), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "prepare_position", + 5, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_INT64, + offsetof(EventStore__Client__Messages__WriteEventsCompleted, has_prepare_position), + offsetof(EventStore__Client__Messages__WriteEventsCompleted, prepare_position), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "commit_position", + 6, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_INT64, + offsetof(EventStore__Client__Messages__WriteEventsCompleted, has_commit_position), + offsetof(EventStore__Client__Messages__WriteEventsCompleted, commit_position), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "current_version", + 7, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_INT64, + offsetof(EventStore__Client__Messages__WriteEventsCompleted, has_current_version), + offsetof(EventStore__Client__Messages__WriteEventsCompleted, current_version), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__write_events_completed__field_indices_by_name[] = { + 5, /* field[5] = commit_position */ + 6, /* field[6] = current_version */ + 2, /* field[2] = first_event_number */ + 3, /* field[3] = last_event_number */ + 1, /* field[1] = message */ + 4, /* field[4] = prepare_position */ + 0, /* field[0] = result */ +}; +static const ProtobufCIntRange event_store__client__messages__write_events_completed__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 7 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__write_events_completed__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.WriteEventsCompleted", + "WriteEventsCompleted", + "EventStore__Client__Messages__WriteEventsCompleted", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__WriteEventsCompleted), + 7, + event_store__client__messages__write_events_completed__field_descriptors, + event_store__client__messages__write_events_completed__field_indices_by_name, + 1, event_store__client__messages__write_events_completed__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__write_events_completed__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__delete_stream__field_descriptors[4] = +{ + { + "event_stream_id", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__DeleteStream, event_stream_id), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "expected_version", + 2, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__DeleteStream, expected_version), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "require_master", + 3, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_BOOL, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__DeleteStream, require_master), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "hard_delete", + 4, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BOOL, + offsetof(EventStore__Client__Messages__DeleteStream, has_hard_delete), + offsetof(EventStore__Client__Messages__DeleteStream, hard_delete), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__delete_stream__field_indices_by_name[] = { + 0, /* field[0] = event_stream_id */ + 1, /* field[1] = expected_version */ + 3, /* field[3] = hard_delete */ + 2, /* field[2] = require_master */ +}; +static const ProtobufCIntRange event_store__client__messages__delete_stream__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 4 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__delete_stream__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.DeleteStream", + "DeleteStream", + "EventStore__Client__Messages__DeleteStream", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__DeleteStream), + 4, + event_store__client__messages__delete_stream__field_descriptors, + event_store__client__messages__delete_stream__field_indices_by_name, + 1, event_store__client__messages__delete_stream__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__delete_stream__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__delete_stream_completed__field_descriptors[4] = +{ + { + "result", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_ENUM, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__DeleteStreamCompleted, result), + &event_store__client__messages__operation_result__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "message", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__DeleteStreamCompleted, message), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "prepare_position", + 3, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_INT64, + offsetof(EventStore__Client__Messages__DeleteStreamCompleted, has_prepare_position), + offsetof(EventStore__Client__Messages__DeleteStreamCompleted, prepare_position), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "commit_position", + 4, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_INT64, + offsetof(EventStore__Client__Messages__DeleteStreamCompleted, has_commit_position), + offsetof(EventStore__Client__Messages__DeleteStreamCompleted, commit_position), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__delete_stream_completed__field_indices_by_name[] = { + 3, /* field[3] = commit_position */ + 1, /* field[1] = message */ + 2, /* field[2] = prepare_position */ + 0, /* field[0] = result */ +}; +static const ProtobufCIntRange event_store__client__messages__delete_stream_completed__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 4 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__delete_stream_completed__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.DeleteStreamCompleted", + "DeleteStreamCompleted", + "EventStore__Client__Messages__DeleteStreamCompleted", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__DeleteStreamCompleted), + 4, + event_store__client__messages__delete_stream_completed__field_descriptors, + event_store__client__messages__delete_stream_completed__field_indices_by_name, + 1, event_store__client__messages__delete_stream_completed__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__delete_stream_completed__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__transaction_start__field_descriptors[3] = +{ + { + "event_stream_id", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__TransactionStart, event_stream_id), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "expected_version", + 2, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__TransactionStart, expected_version), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "require_master", + 3, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_BOOL, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__TransactionStart, require_master), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__transaction_start__field_indices_by_name[] = { + 0, /* field[0] = event_stream_id */ + 1, /* field[1] = expected_version */ + 2, /* field[2] = require_master */ +}; +static const ProtobufCIntRange event_store__client__messages__transaction_start__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 3 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__transaction_start__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.TransactionStart", + "TransactionStart", + "EventStore__Client__Messages__TransactionStart", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__TransactionStart), + 3, + event_store__client__messages__transaction_start__field_descriptors, + event_store__client__messages__transaction_start__field_indices_by_name, + 1, event_store__client__messages__transaction_start__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__transaction_start__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__transaction_start_completed__field_descriptors[3] = +{ + { + "transaction_id", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__TransactionStartCompleted, transaction_id), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "result", + 2, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_ENUM, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__TransactionStartCompleted, result), + &event_store__client__messages__operation_result__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "message", + 3, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__TransactionStartCompleted, message), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__transaction_start_completed__field_indices_by_name[] = { + 2, /* field[2] = message */ + 1, /* field[1] = result */ + 0, /* field[0] = transaction_id */ +}; +static const ProtobufCIntRange event_store__client__messages__transaction_start_completed__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 3 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__transaction_start_completed__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.TransactionStartCompleted", + "TransactionStartCompleted", + "EventStore__Client__Messages__TransactionStartCompleted", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__TransactionStartCompleted), + 3, + event_store__client__messages__transaction_start_completed__field_descriptors, + event_store__client__messages__transaction_start_completed__field_indices_by_name, + 1, event_store__client__messages__transaction_start_completed__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__transaction_start_completed__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__transaction_write__field_descriptors[3] = +{ + { + "transaction_id", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__TransactionWrite, transaction_id), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "events", + 2, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(EventStore__Client__Messages__TransactionWrite, n_events), + offsetof(EventStore__Client__Messages__TransactionWrite, events), + &event_store__client__messages__new_event__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "require_master", + 3, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_BOOL, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__TransactionWrite, require_master), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__transaction_write__field_indices_by_name[] = { + 1, /* field[1] = events */ + 2, /* field[2] = require_master */ + 0, /* field[0] = transaction_id */ +}; +static const ProtobufCIntRange event_store__client__messages__transaction_write__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 3 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__transaction_write__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.TransactionWrite", + "TransactionWrite", + "EventStore__Client__Messages__TransactionWrite", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__TransactionWrite), + 3, + event_store__client__messages__transaction_write__field_descriptors, + event_store__client__messages__transaction_write__field_indices_by_name, + 1, event_store__client__messages__transaction_write__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__transaction_write__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__transaction_write_completed__field_descriptors[3] = +{ + { + "transaction_id", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__TransactionWriteCompleted, transaction_id), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "result", + 2, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_ENUM, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__TransactionWriteCompleted, result), + &event_store__client__messages__operation_result__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "message", + 3, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__TransactionWriteCompleted, message), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__transaction_write_completed__field_indices_by_name[] = { + 2, /* field[2] = message */ + 1, /* field[1] = result */ + 0, /* field[0] = transaction_id */ +}; +static const ProtobufCIntRange event_store__client__messages__transaction_write_completed__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 3 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__transaction_write_completed__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.TransactionWriteCompleted", + "TransactionWriteCompleted", + "EventStore__Client__Messages__TransactionWriteCompleted", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__TransactionWriteCompleted), + 3, + event_store__client__messages__transaction_write_completed__field_descriptors, + event_store__client__messages__transaction_write_completed__field_indices_by_name, + 1, event_store__client__messages__transaction_write_completed__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__transaction_write_completed__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__transaction_commit__field_descriptors[2] = +{ + { + "transaction_id", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__TransactionCommit, transaction_id), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "require_master", + 2, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_BOOL, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__TransactionCommit, require_master), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__transaction_commit__field_indices_by_name[] = { + 1, /* field[1] = require_master */ + 0, /* field[0] = transaction_id */ +}; +static const ProtobufCIntRange event_store__client__messages__transaction_commit__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__transaction_commit__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.TransactionCommit", + "TransactionCommit", + "EventStore__Client__Messages__TransactionCommit", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__TransactionCommit), + 2, + event_store__client__messages__transaction_commit__field_descriptors, + event_store__client__messages__transaction_commit__field_indices_by_name, + 1, event_store__client__messages__transaction_commit__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__transaction_commit__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__transaction_commit_completed__field_descriptors[7] = +{ + { + "transaction_id", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__TransactionCommitCompleted, transaction_id), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "result", + 2, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_ENUM, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__TransactionCommitCompleted, result), + &event_store__client__messages__operation_result__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "message", + 3, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__TransactionCommitCompleted, message), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "first_event_number", + 4, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__TransactionCommitCompleted, first_event_number), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "last_event_number", + 5, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__TransactionCommitCompleted, last_event_number), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "prepare_position", + 6, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_INT64, + offsetof(EventStore__Client__Messages__TransactionCommitCompleted, has_prepare_position), + offsetof(EventStore__Client__Messages__TransactionCommitCompleted, prepare_position), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "commit_position", + 7, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_INT64, + offsetof(EventStore__Client__Messages__TransactionCommitCompleted, has_commit_position), + offsetof(EventStore__Client__Messages__TransactionCommitCompleted, commit_position), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__transaction_commit_completed__field_indices_by_name[] = { + 6, /* field[6] = commit_position */ + 3, /* field[3] = first_event_number */ + 4, /* field[4] = last_event_number */ + 2, /* field[2] = message */ + 5, /* field[5] = prepare_position */ + 1, /* field[1] = result */ + 0, /* field[0] = transaction_id */ +}; +static const ProtobufCIntRange event_store__client__messages__transaction_commit_completed__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 7 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__transaction_commit_completed__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.TransactionCommitCompleted", + "TransactionCommitCompleted", + "EventStore__Client__Messages__TransactionCommitCompleted", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__TransactionCommitCompleted), + 7, + event_store__client__messages__transaction_commit_completed__field_descriptors, + event_store__client__messages__transaction_commit_completed__field_indices_by_name, + 1, event_store__client__messages__transaction_commit_completed__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__transaction_commit_completed__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__read_event__field_descriptors[4] = +{ + { + "event_stream_id", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ReadEvent, event_stream_id), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "event_number", + 2, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ReadEvent, event_number), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resolve_link_tos", + 3, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_BOOL, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ReadEvent, resolve_link_tos), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "require_master", + 4, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_BOOL, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ReadEvent, require_master), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__read_event__field_indices_by_name[] = { + 1, /* field[1] = event_number */ + 0, /* field[0] = event_stream_id */ + 3, /* field[3] = require_master */ + 2, /* field[2] = resolve_link_tos */ +}; +static const ProtobufCIntRange event_store__client__messages__read_event__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 4 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__read_event__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.ReadEvent", + "ReadEvent", + "EventStore__Client__Messages__ReadEvent", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__ReadEvent), + 4, + event_store__client__messages__read_event__field_descriptors, + event_store__client__messages__read_event__field_indices_by_name, + 1, event_store__client__messages__read_event__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__read_event__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCEnumValue event_store__client__messages__read_event_completed__read_event_result__enum_values_by_number[6] = +{ + { "Success", "EVENT_STORE__CLIENT__MESSAGES__READ_EVENT_COMPLETED__READ_EVENT_RESULT__Success", 0 }, + { "NotFound", "EVENT_STORE__CLIENT__MESSAGES__READ_EVENT_COMPLETED__READ_EVENT_RESULT__NotFound", 1 }, + { "NoStream", "EVENT_STORE__CLIENT__MESSAGES__READ_EVENT_COMPLETED__READ_EVENT_RESULT__NoStream", 2 }, + { "StreamDeleted", "EVENT_STORE__CLIENT__MESSAGES__READ_EVENT_COMPLETED__READ_EVENT_RESULT__StreamDeleted", 3 }, + { "Error", "EVENT_STORE__CLIENT__MESSAGES__READ_EVENT_COMPLETED__READ_EVENT_RESULT__Error", 4 }, + { "AccessDenied", "EVENT_STORE__CLIENT__MESSAGES__READ_EVENT_COMPLETED__READ_EVENT_RESULT__AccessDenied", 5 }, +}; +static const ProtobufCIntRange event_store__client__messages__read_event_completed__read_event_result__value_ranges[] = { +{0, 0},{0, 6} +}; +static const ProtobufCEnumValueIndex event_store__client__messages__read_event_completed__read_event_result__enum_values_by_name[6] = +{ + { "AccessDenied", 5 }, + { "Error", 4 }, + { "NoStream", 2 }, + { "NotFound", 1 }, + { "StreamDeleted", 3 }, + { "Success", 0 }, +}; +const ProtobufCEnumDescriptor event_store__client__messages__read_event_completed__read_event_result__descriptor = +{ + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.ReadEventCompleted.ReadEventResult", + "ReadEventResult", + "EventStore__Client__Messages__ReadEventCompleted__ReadEventResult", + "EventStore.Client.Messages", + 6, + event_store__client__messages__read_event_completed__read_event_result__enum_values_by_number, + 6, + event_store__client__messages__read_event_completed__read_event_result__enum_values_by_name, + 1, + event_store__client__messages__read_event_completed__read_event_result__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__read_event_completed__field_descriptors[3] = +{ + { + "result", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_ENUM, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ReadEventCompleted, result), + &event_store__client__messages__read_event_completed__read_event_result__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "event", + 2, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ReadEventCompleted, event), + &event_store__client__messages__resolved_indexed_event__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "error", + 3, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ReadEventCompleted, error), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__read_event_completed__field_indices_by_name[] = { + 2, /* field[2] = error */ + 1, /* field[1] = event */ + 0, /* field[0] = result */ +}; +static const ProtobufCIntRange event_store__client__messages__read_event_completed__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 3 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__read_event_completed__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.ReadEventCompleted", + "ReadEventCompleted", + "EventStore__Client__Messages__ReadEventCompleted", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__ReadEventCompleted), + 3, + event_store__client__messages__read_event_completed__field_descriptors, + event_store__client__messages__read_event_completed__field_indices_by_name, + 1, event_store__client__messages__read_event_completed__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__read_event_completed__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__read_stream_events__field_descriptors[5] = +{ + { + "event_stream_id", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ReadStreamEvents, event_stream_id), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "from_event_number", + 2, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ReadStreamEvents, from_event_number), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "max_count", + 3, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ReadStreamEvents, max_count), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resolve_link_tos", + 4, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_BOOL, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ReadStreamEvents, resolve_link_tos), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "require_master", + 5, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_BOOL, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ReadStreamEvents, require_master), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__read_stream_events__field_indices_by_name[] = { + 0, /* field[0] = event_stream_id */ + 1, /* field[1] = from_event_number */ + 2, /* field[2] = max_count */ + 4, /* field[4] = require_master */ + 3, /* field[3] = resolve_link_tos */ +}; +static const ProtobufCIntRange event_store__client__messages__read_stream_events__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 5 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__read_stream_events__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.ReadStreamEvents", + "ReadStreamEvents", + "EventStore__Client__Messages__ReadStreamEvents", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__ReadStreamEvents), + 5, + event_store__client__messages__read_stream_events__field_descriptors, + event_store__client__messages__read_stream_events__field_indices_by_name, + 1, event_store__client__messages__read_stream_events__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__read_stream_events__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCEnumValue event_store__client__messages__read_stream_events_completed__read_stream_result__enum_values_by_number[6] = +{ + { "Success", "EVENT_STORE__CLIENT__MESSAGES__READ_STREAM_EVENTS_COMPLETED__READ_STREAM_RESULT__Success", 0 }, + { "NoStream", "EVENT_STORE__CLIENT__MESSAGES__READ_STREAM_EVENTS_COMPLETED__READ_STREAM_RESULT__NoStream", 1 }, + { "StreamDeleted", "EVENT_STORE__CLIENT__MESSAGES__READ_STREAM_EVENTS_COMPLETED__READ_STREAM_RESULT__StreamDeleted", 2 }, + { "NotModified", "EVENT_STORE__CLIENT__MESSAGES__READ_STREAM_EVENTS_COMPLETED__READ_STREAM_RESULT__NotModified", 3 }, + { "Error", "EVENT_STORE__CLIENT__MESSAGES__READ_STREAM_EVENTS_COMPLETED__READ_STREAM_RESULT__Error", 4 }, + { "AccessDenied", "EVENT_STORE__CLIENT__MESSAGES__READ_STREAM_EVENTS_COMPLETED__READ_STREAM_RESULT__AccessDenied", 5 }, +}; +static const ProtobufCIntRange event_store__client__messages__read_stream_events_completed__read_stream_result__value_ranges[] = { +{0, 0},{0, 6} +}; +static const ProtobufCEnumValueIndex event_store__client__messages__read_stream_events_completed__read_stream_result__enum_values_by_name[6] = +{ + { "AccessDenied", 5 }, + { "Error", 4 }, + { "NoStream", 1 }, + { "NotModified", 3 }, + { "StreamDeleted", 2 }, + { "Success", 0 }, +}; +const ProtobufCEnumDescriptor event_store__client__messages__read_stream_events_completed__read_stream_result__descriptor = +{ + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.ReadStreamEventsCompleted.ReadStreamResult", + "ReadStreamResult", + "EventStore__Client__Messages__ReadStreamEventsCompleted__ReadStreamResult", + "EventStore.Client.Messages", + 6, + event_store__client__messages__read_stream_events_completed__read_stream_result__enum_values_by_number, + 6, + event_store__client__messages__read_stream_events_completed__read_stream_result__enum_values_by_name, + 1, + event_store__client__messages__read_stream_events_completed__read_stream_result__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__read_stream_events_completed__field_descriptors[7] = +{ + { + "events", + 1, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(EventStore__Client__Messages__ReadStreamEventsCompleted, n_events), + offsetof(EventStore__Client__Messages__ReadStreamEventsCompleted, events), + &event_store__client__messages__resolved_indexed_event__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "result", + 2, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_ENUM, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ReadStreamEventsCompleted, result), + &event_store__client__messages__read_stream_events_completed__read_stream_result__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "next_event_number", + 3, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ReadStreamEventsCompleted, next_event_number), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "last_event_number", + 4, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ReadStreamEventsCompleted, last_event_number), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "is_end_of_stream", + 5, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_BOOL, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ReadStreamEventsCompleted, is_end_of_stream), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "last_commit_position", + 6, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ReadStreamEventsCompleted, last_commit_position), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "error", + 7, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ReadStreamEventsCompleted, error), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__read_stream_events_completed__field_indices_by_name[] = { + 6, /* field[6] = error */ + 0, /* field[0] = events */ + 4, /* field[4] = is_end_of_stream */ + 5, /* field[5] = last_commit_position */ + 3, /* field[3] = last_event_number */ + 2, /* field[2] = next_event_number */ + 1, /* field[1] = result */ +}; +static const ProtobufCIntRange event_store__client__messages__read_stream_events_completed__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 7 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__read_stream_events_completed__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.ReadStreamEventsCompleted", + "ReadStreamEventsCompleted", + "EventStore__Client__Messages__ReadStreamEventsCompleted", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__ReadStreamEventsCompleted), + 7, + event_store__client__messages__read_stream_events_completed__field_descriptors, + event_store__client__messages__read_stream_events_completed__field_indices_by_name, + 1, event_store__client__messages__read_stream_events_completed__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__read_stream_events_completed__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__read_all_events__field_descriptors[5] = +{ + { + "commit_position", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ReadAllEvents, commit_position), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "prepare_position", + 2, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ReadAllEvents, prepare_position), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "max_count", + 3, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ReadAllEvents, max_count), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resolve_link_tos", + 4, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_BOOL, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ReadAllEvents, resolve_link_tos), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "require_master", + 5, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_BOOL, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ReadAllEvents, require_master), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__read_all_events__field_indices_by_name[] = { + 0, /* field[0] = commit_position */ + 2, /* field[2] = max_count */ + 1, /* field[1] = prepare_position */ + 4, /* field[4] = require_master */ + 3, /* field[3] = resolve_link_tos */ +}; +static const ProtobufCIntRange event_store__client__messages__read_all_events__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 5 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__read_all_events__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.ReadAllEvents", + "ReadAllEvents", + "EventStore__Client__Messages__ReadAllEvents", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__ReadAllEvents), + 5, + event_store__client__messages__read_all_events__field_descriptors, + event_store__client__messages__read_all_events__field_indices_by_name, + 1, event_store__client__messages__read_all_events__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__read_all_events__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCEnumValue event_store__client__messages__read_all_events_completed__read_all_result__enum_values_by_number[4] = +{ + { "Success", "EVENT_STORE__CLIENT__MESSAGES__READ_ALL_EVENTS_COMPLETED__READ_ALL_RESULT__Success", 0 }, + { "NotModified", "EVENT_STORE__CLIENT__MESSAGES__READ_ALL_EVENTS_COMPLETED__READ_ALL_RESULT__NotModified", 1 }, + { "Error", "EVENT_STORE__CLIENT__MESSAGES__READ_ALL_EVENTS_COMPLETED__READ_ALL_RESULT__Error", 2 }, + { "AccessDenied", "EVENT_STORE__CLIENT__MESSAGES__READ_ALL_EVENTS_COMPLETED__READ_ALL_RESULT__AccessDenied", 3 }, +}; +static const ProtobufCIntRange event_store__client__messages__read_all_events_completed__read_all_result__value_ranges[] = { +{0, 0},{0, 4} +}; +static const ProtobufCEnumValueIndex event_store__client__messages__read_all_events_completed__read_all_result__enum_values_by_name[4] = +{ + { "AccessDenied", 3 }, + { "Error", 2 }, + { "NotModified", 1 }, + { "Success", 0 }, +}; +const ProtobufCEnumDescriptor event_store__client__messages__read_all_events_completed__read_all_result__descriptor = +{ + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.ReadAllEventsCompleted.ReadAllResult", + "ReadAllResult", + "EventStore__Client__Messages__ReadAllEventsCompleted__ReadAllResult", + "EventStore.Client.Messages", + 4, + event_store__client__messages__read_all_events_completed__read_all_result__enum_values_by_number, + 4, + event_store__client__messages__read_all_events_completed__read_all_result__enum_values_by_name, + 1, + event_store__client__messages__read_all_events_completed__read_all_result__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; +static const EventStore__Client__Messages__ReadAllEventsCompleted__ReadAllResult event_store__client__messages__read_all_events_completed__result__default_value = EVENT_STORE__CLIENT__MESSAGES__READ_ALL_EVENTS_COMPLETED__READ_ALL_RESULT__Success; +static const ProtobufCFieldDescriptor event_store__client__messages__read_all_events_completed__field_descriptors[7] = +{ + { + "commit_position", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ReadAllEventsCompleted, commit_position), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "prepare_position", + 2, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ReadAllEventsCompleted, prepare_position), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "events", + 3, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(EventStore__Client__Messages__ReadAllEventsCompleted, n_events), + offsetof(EventStore__Client__Messages__ReadAllEventsCompleted, events), + &event_store__client__messages__resolved_event__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "next_commit_position", + 4, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ReadAllEventsCompleted, next_commit_position), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "next_prepare_position", + 5, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ReadAllEventsCompleted, next_prepare_position), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "result", + 6, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_ENUM, + offsetof(EventStore__Client__Messages__ReadAllEventsCompleted, has_result), + offsetof(EventStore__Client__Messages__ReadAllEventsCompleted, result), + &event_store__client__messages__read_all_events_completed__read_all_result__descriptor, + &event_store__client__messages__read_all_events_completed__result__default_value, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "error", + 7, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ReadAllEventsCompleted, error), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__read_all_events_completed__field_indices_by_name[] = { + 0, /* field[0] = commit_position */ + 6, /* field[6] = error */ + 2, /* field[2] = events */ + 3, /* field[3] = next_commit_position */ + 4, /* field[4] = next_prepare_position */ + 1, /* field[1] = prepare_position */ + 5, /* field[5] = result */ +}; +static const ProtobufCIntRange event_store__client__messages__read_all_events_completed__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 7 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__read_all_events_completed__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.ReadAllEventsCompleted", + "ReadAllEventsCompleted", + "EventStore__Client__Messages__ReadAllEventsCompleted", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__ReadAllEventsCompleted), + 7, + event_store__client__messages__read_all_events_completed__field_descriptors, + event_store__client__messages__read_all_events_completed__field_indices_by_name, + 1, event_store__client__messages__read_all_events_completed__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__read_all_events_completed__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__create_persistent_subscription__field_descriptors[16] = +{ + { + "subscription_group_name", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__CreatePersistentSubscription, subscription_group_name), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "event_stream_id", + 2, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__CreatePersistentSubscription, event_stream_id), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resolve_link_tos", + 3, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_BOOL, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__CreatePersistentSubscription, resolve_link_tos), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "start_from", + 4, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__CreatePersistentSubscription, start_from), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "message_timeout_milliseconds", + 5, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__CreatePersistentSubscription, message_timeout_milliseconds), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "record_statistics", + 6, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_BOOL, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__CreatePersistentSubscription, record_statistics), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "live_buffer_size", + 7, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__CreatePersistentSubscription, live_buffer_size), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "read_batch_size", + 8, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__CreatePersistentSubscription, read_batch_size), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "buffer_size", + 9, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__CreatePersistentSubscription, buffer_size), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "max_retry_count", + 10, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__CreatePersistentSubscription, max_retry_count), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "prefer_round_robin", + 11, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_BOOL, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__CreatePersistentSubscription, prefer_round_robin), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "checkpoint_after_time", + 12, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__CreatePersistentSubscription, checkpoint_after_time), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "checkpoint_max_count", + 13, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__CreatePersistentSubscription, checkpoint_max_count), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "checkpoint_min_count", + 14, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__CreatePersistentSubscription, checkpoint_min_count), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "subscriber_max_count", + 15, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__CreatePersistentSubscription, subscriber_max_count), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "named_consumer_strategy", + 16, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__CreatePersistentSubscription, named_consumer_strategy), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__create_persistent_subscription__field_indices_by_name[] = { + 8, /* field[8] = buffer_size */ + 11, /* field[11] = checkpoint_after_time */ + 12, /* field[12] = checkpoint_max_count */ + 13, /* field[13] = checkpoint_min_count */ + 1, /* field[1] = event_stream_id */ + 6, /* field[6] = live_buffer_size */ + 9, /* field[9] = max_retry_count */ + 4, /* field[4] = message_timeout_milliseconds */ + 15, /* field[15] = named_consumer_strategy */ + 10, /* field[10] = prefer_round_robin */ + 7, /* field[7] = read_batch_size */ + 5, /* field[5] = record_statistics */ + 2, /* field[2] = resolve_link_tos */ + 3, /* field[3] = start_from */ + 14, /* field[14] = subscriber_max_count */ + 0, /* field[0] = subscription_group_name */ +}; +static const ProtobufCIntRange event_store__client__messages__create_persistent_subscription__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 16 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__create_persistent_subscription__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.CreatePersistentSubscription", + "CreatePersistentSubscription", + "EventStore__Client__Messages__CreatePersistentSubscription", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__CreatePersistentSubscription), + 16, + event_store__client__messages__create_persistent_subscription__field_descriptors, + event_store__client__messages__create_persistent_subscription__field_indices_by_name, + 1, event_store__client__messages__create_persistent_subscription__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__create_persistent_subscription__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__delete_persistent_subscription__field_descriptors[2] = +{ + { + "subscription_group_name", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__DeletePersistentSubscription, subscription_group_name), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "event_stream_id", + 2, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__DeletePersistentSubscription, event_stream_id), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__delete_persistent_subscription__field_indices_by_name[] = { + 1, /* field[1] = event_stream_id */ + 0, /* field[0] = subscription_group_name */ +}; +static const ProtobufCIntRange event_store__client__messages__delete_persistent_subscription__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__delete_persistent_subscription__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.DeletePersistentSubscription", + "DeletePersistentSubscription", + "EventStore__Client__Messages__DeletePersistentSubscription", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__DeletePersistentSubscription), + 2, + event_store__client__messages__delete_persistent_subscription__field_descriptors, + event_store__client__messages__delete_persistent_subscription__field_indices_by_name, + 1, event_store__client__messages__delete_persistent_subscription__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__delete_persistent_subscription__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__update_persistent_subscription__field_descriptors[16] = +{ + { + "subscription_group_name", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__UpdatePersistentSubscription, subscription_group_name), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "event_stream_id", + 2, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__UpdatePersistentSubscription, event_stream_id), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resolve_link_tos", + 3, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_BOOL, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__UpdatePersistentSubscription, resolve_link_tos), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "start_from", + 4, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__UpdatePersistentSubscription, start_from), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "message_timeout_milliseconds", + 5, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__UpdatePersistentSubscription, message_timeout_milliseconds), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "record_statistics", + 6, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_BOOL, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__UpdatePersistentSubscription, record_statistics), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "live_buffer_size", + 7, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__UpdatePersistentSubscription, live_buffer_size), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "read_batch_size", + 8, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__UpdatePersistentSubscription, read_batch_size), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "buffer_size", + 9, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__UpdatePersistentSubscription, buffer_size), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "max_retry_count", + 10, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__UpdatePersistentSubscription, max_retry_count), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "prefer_round_robin", + 11, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_BOOL, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__UpdatePersistentSubscription, prefer_round_robin), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "checkpoint_after_time", + 12, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__UpdatePersistentSubscription, checkpoint_after_time), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "checkpoint_max_count", + 13, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__UpdatePersistentSubscription, checkpoint_max_count), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "checkpoint_min_count", + 14, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__UpdatePersistentSubscription, checkpoint_min_count), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "subscriber_max_count", + 15, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__UpdatePersistentSubscription, subscriber_max_count), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "named_consumer_strategy", + 16, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__UpdatePersistentSubscription, named_consumer_strategy), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__update_persistent_subscription__field_indices_by_name[] = { + 8, /* field[8] = buffer_size */ + 11, /* field[11] = checkpoint_after_time */ + 12, /* field[12] = checkpoint_max_count */ + 13, /* field[13] = checkpoint_min_count */ + 1, /* field[1] = event_stream_id */ + 6, /* field[6] = live_buffer_size */ + 9, /* field[9] = max_retry_count */ + 4, /* field[4] = message_timeout_milliseconds */ + 15, /* field[15] = named_consumer_strategy */ + 10, /* field[10] = prefer_round_robin */ + 7, /* field[7] = read_batch_size */ + 5, /* field[5] = record_statistics */ + 2, /* field[2] = resolve_link_tos */ + 3, /* field[3] = start_from */ + 14, /* field[14] = subscriber_max_count */ + 0, /* field[0] = subscription_group_name */ +}; +static const ProtobufCIntRange event_store__client__messages__update_persistent_subscription__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 16 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__update_persistent_subscription__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.UpdatePersistentSubscription", + "UpdatePersistentSubscription", + "EventStore__Client__Messages__UpdatePersistentSubscription", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__UpdatePersistentSubscription), + 16, + event_store__client__messages__update_persistent_subscription__field_descriptors, + event_store__client__messages__update_persistent_subscription__field_indices_by_name, + 1, event_store__client__messages__update_persistent_subscription__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__update_persistent_subscription__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCEnumValue event_store__client__messages__update_persistent_subscription_completed__update_persistent_subscription_result__enum_values_by_number[4] = +{ + { "Success", "EVENT_STORE__CLIENT__MESSAGES__UPDATE_PERSISTENT_SUBSCRIPTION_COMPLETED__UPDATE_PERSISTENT_SUBSCRIPTION_RESULT__Success", 0 }, + { "DoesNotExist", "EVENT_STORE__CLIENT__MESSAGES__UPDATE_PERSISTENT_SUBSCRIPTION_COMPLETED__UPDATE_PERSISTENT_SUBSCRIPTION_RESULT__DoesNotExist", 1 }, + { "Fail", "EVENT_STORE__CLIENT__MESSAGES__UPDATE_PERSISTENT_SUBSCRIPTION_COMPLETED__UPDATE_PERSISTENT_SUBSCRIPTION_RESULT__Fail", 2 }, + { "AccessDenied", "EVENT_STORE__CLIENT__MESSAGES__UPDATE_PERSISTENT_SUBSCRIPTION_COMPLETED__UPDATE_PERSISTENT_SUBSCRIPTION_RESULT__AccessDenied", 3 }, +}; +static const ProtobufCIntRange event_store__client__messages__update_persistent_subscription_completed__update_persistent_subscription_result__value_ranges[] = { +{0, 0},{0, 4} +}; +static const ProtobufCEnumValueIndex event_store__client__messages__update_persistent_subscription_completed__update_persistent_subscription_result__enum_values_by_name[4] = +{ + { "AccessDenied", 3 }, + { "DoesNotExist", 1 }, + { "Fail", 2 }, + { "Success", 0 }, +}; +const ProtobufCEnumDescriptor event_store__client__messages__update_persistent_subscription_completed__update_persistent_subscription_result__descriptor = +{ + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.UpdatePersistentSubscriptionCompleted.UpdatePersistentSubscriptionResult", + "UpdatePersistentSubscriptionResult", + "EventStore__Client__Messages__UpdatePersistentSubscriptionCompleted__UpdatePersistentSubscriptionResult", + "EventStore.Client.Messages", + 4, + event_store__client__messages__update_persistent_subscription_completed__update_persistent_subscription_result__enum_values_by_number, + 4, + event_store__client__messages__update_persistent_subscription_completed__update_persistent_subscription_result__enum_values_by_name, + 1, + event_store__client__messages__update_persistent_subscription_completed__update_persistent_subscription_result__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; +static const EventStore__Client__Messages__UpdatePersistentSubscriptionCompleted__UpdatePersistentSubscriptionResult event_store__client__messages__update_persistent_subscription_completed__result__default_value = EVENT_STORE__CLIENT__MESSAGES__UPDATE_PERSISTENT_SUBSCRIPTION_COMPLETED__UPDATE_PERSISTENT_SUBSCRIPTION_RESULT__Success; +static const ProtobufCFieldDescriptor event_store__client__messages__update_persistent_subscription_completed__field_descriptors[2] = +{ + { + "result", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_ENUM, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__UpdatePersistentSubscriptionCompleted, result), + &event_store__client__messages__update_persistent_subscription_completed__update_persistent_subscription_result__descriptor, + &event_store__client__messages__update_persistent_subscription_completed__result__default_value, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "reason", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__UpdatePersistentSubscriptionCompleted, reason), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__update_persistent_subscription_completed__field_indices_by_name[] = { + 1, /* field[1] = reason */ + 0, /* field[0] = result */ +}; +static const ProtobufCIntRange event_store__client__messages__update_persistent_subscription_completed__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__update_persistent_subscription_completed__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.UpdatePersistentSubscriptionCompleted", + "UpdatePersistentSubscriptionCompleted", + "EventStore__Client__Messages__UpdatePersistentSubscriptionCompleted", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__UpdatePersistentSubscriptionCompleted), + 2, + event_store__client__messages__update_persistent_subscription_completed__field_descriptors, + event_store__client__messages__update_persistent_subscription_completed__field_indices_by_name, + 1, event_store__client__messages__update_persistent_subscription_completed__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__update_persistent_subscription_completed__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCEnumValue event_store__client__messages__create_persistent_subscription_completed__create_persistent_subscription_result__enum_values_by_number[4] = +{ + { "Success", "EVENT_STORE__CLIENT__MESSAGES__CREATE_PERSISTENT_SUBSCRIPTION_COMPLETED__CREATE_PERSISTENT_SUBSCRIPTION_RESULT__Success", 0 }, + { "AlreadyExists", "EVENT_STORE__CLIENT__MESSAGES__CREATE_PERSISTENT_SUBSCRIPTION_COMPLETED__CREATE_PERSISTENT_SUBSCRIPTION_RESULT__AlreadyExists", 1 }, + { "Fail", "EVENT_STORE__CLIENT__MESSAGES__CREATE_PERSISTENT_SUBSCRIPTION_COMPLETED__CREATE_PERSISTENT_SUBSCRIPTION_RESULT__Fail", 2 }, + { "AccessDenied", "EVENT_STORE__CLIENT__MESSAGES__CREATE_PERSISTENT_SUBSCRIPTION_COMPLETED__CREATE_PERSISTENT_SUBSCRIPTION_RESULT__AccessDenied", 3 }, +}; +static const ProtobufCIntRange event_store__client__messages__create_persistent_subscription_completed__create_persistent_subscription_result__value_ranges[] = { +{0, 0},{0, 4} +}; +static const ProtobufCEnumValueIndex event_store__client__messages__create_persistent_subscription_completed__create_persistent_subscription_result__enum_values_by_name[4] = +{ + { "AccessDenied", 3 }, + { "AlreadyExists", 1 }, + { "Fail", 2 }, + { "Success", 0 }, +}; +const ProtobufCEnumDescriptor event_store__client__messages__create_persistent_subscription_completed__create_persistent_subscription_result__descriptor = +{ + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.CreatePersistentSubscriptionCompleted.CreatePersistentSubscriptionResult", + "CreatePersistentSubscriptionResult", + "EventStore__Client__Messages__CreatePersistentSubscriptionCompleted__CreatePersistentSubscriptionResult", + "EventStore.Client.Messages", + 4, + event_store__client__messages__create_persistent_subscription_completed__create_persistent_subscription_result__enum_values_by_number, + 4, + event_store__client__messages__create_persistent_subscription_completed__create_persistent_subscription_result__enum_values_by_name, + 1, + event_store__client__messages__create_persistent_subscription_completed__create_persistent_subscription_result__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; +static const EventStore__Client__Messages__CreatePersistentSubscriptionCompleted__CreatePersistentSubscriptionResult event_store__client__messages__create_persistent_subscription_completed__result__default_value = EVENT_STORE__CLIENT__MESSAGES__CREATE_PERSISTENT_SUBSCRIPTION_COMPLETED__CREATE_PERSISTENT_SUBSCRIPTION_RESULT__Success; +static const ProtobufCFieldDescriptor event_store__client__messages__create_persistent_subscription_completed__field_descriptors[2] = +{ + { + "result", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_ENUM, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__CreatePersistentSubscriptionCompleted, result), + &event_store__client__messages__create_persistent_subscription_completed__create_persistent_subscription_result__descriptor, + &event_store__client__messages__create_persistent_subscription_completed__result__default_value, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "reason", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__CreatePersistentSubscriptionCompleted, reason), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__create_persistent_subscription_completed__field_indices_by_name[] = { + 1, /* field[1] = reason */ + 0, /* field[0] = result */ +}; +static const ProtobufCIntRange event_store__client__messages__create_persistent_subscription_completed__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__create_persistent_subscription_completed__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.CreatePersistentSubscriptionCompleted", + "CreatePersistentSubscriptionCompleted", + "EventStore__Client__Messages__CreatePersistentSubscriptionCompleted", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__CreatePersistentSubscriptionCompleted), + 2, + event_store__client__messages__create_persistent_subscription_completed__field_descriptors, + event_store__client__messages__create_persistent_subscription_completed__field_indices_by_name, + 1, event_store__client__messages__create_persistent_subscription_completed__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__create_persistent_subscription_completed__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCEnumValue event_store__client__messages__delete_persistent_subscription_completed__delete_persistent_subscription_result__enum_values_by_number[4] = +{ + { "Success", "EVENT_STORE__CLIENT__MESSAGES__DELETE_PERSISTENT_SUBSCRIPTION_COMPLETED__DELETE_PERSISTENT_SUBSCRIPTION_RESULT__Success", 0 }, + { "DoesNotExist", "EVENT_STORE__CLIENT__MESSAGES__DELETE_PERSISTENT_SUBSCRIPTION_COMPLETED__DELETE_PERSISTENT_SUBSCRIPTION_RESULT__DoesNotExist", 1 }, + { "Fail", "EVENT_STORE__CLIENT__MESSAGES__DELETE_PERSISTENT_SUBSCRIPTION_COMPLETED__DELETE_PERSISTENT_SUBSCRIPTION_RESULT__Fail", 2 }, + { "AccessDenied", "EVENT_STORE__CLIENT__MESSAGES__DELETE_PERSISTENT_SUBSCRIPTION_COMPLETED__DELETE_PERSISTENT_SUBSCRIPTION_RESULT__AccessDenied", 3 }, +}; +static const ProtobufCIntRange event_store__client__messages__delete_persistent_subscription_completed__delete_persistent_subscription_result__value_ranges[] = { +{0, 0},{0, 4} +}; +static const ProtobufCEnumValueIndex event_store__client__messages__delete_persistent_subscription_completed__delete_persistent_subscription_result__enum_values_by_name[4] = +{ + { "AccessDenied", 3 }, + { "DoesNotExist", 1 }, + { "Fail", 2 }, + { "Success", 0 }, +}; +const ProtobufCEnumDescriptor event_store__client__messages__delete_persistent_subscription_completed__delete_persistent_subscription_result__descriptor = +{ + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.DeletePersistentSubscriptionCompleted.DeletePersistentSubscriptionResult", + "DeletePersistentSubscriptionResult", + "EventStore__Client__Messages__DeletePersistentSubscriptionCompleted__DeletePersistentSubscriptionResult", + "EventStore.Client.Messages", + 4, + event_store__client__messages__delete_persistent_subscription_completed__delete_persistent_subscription_result__enum_values_by_number, + 4, + event_store__client__messages__delete_persistent_subscription_completed__delete_persistent_subscription_result__enum_values_by_name, + 1, + event_store__client__messages__delete_persistent_subscription_completed__delete_persistent_subscription_result__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; +static const EventStore__Client__Messages__DeletePersistentSubscriptionCompleted__DeletePersistentSubscriptionResult event_store__client__messages__delete_persistent_subscription_completed__result__default_value = EVENT_STORE__CLIENT__MESSAGES__DELETE_PERSISTENT_SUBSCRIPTION_COMPLETED__DELETE_PERSISTENT_SUBSCRIPTION_RESULT__Success; +static const ProtobufCFieldDescriptor event_store__client__messages__delete_persistent_subscription_completed__field_descriptors[2] = +{ + { + "result", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_ENUM, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__DeletePersistentSubscriptionCompleted, result), + &event_store__client__messages__delete_persistent_subscription_completed__delete_persistent_subscription_result__descriptor, + &event_store__client__messages__delete_persistent_subscription_completed__result__default_value, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "reason", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__DeletePersistentSubscriptionCompleted, reason), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__delete_persistent_subscription_completed__field_indices_by_name[] = { + 1, /* field[1] = reason */ + 0, /* field[0] = result */ +}; +static const ProtobufCIntRange event_store__client__messages__delete_persistent_subscription_completed__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__delete_persistent_subscription_completed__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.DeletePersistentSubscriptionCompleted", + "DeletePersistentSubscriptionCompleted", + "EventStore__Client__Messages__DeletePersistentSubscriptionCompleted", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__DeletePersistentSubscriptionCompleted), + 2, + event_store__client__messages__delete_persistent_subscription_completed__field_descriptors, + event_store__client__messages__delete_persistent_subscription_completed__field_indices_by_name, + 1, event_store__client__messages__delete_persistent_subscription_completed__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__delete_persistent_subscription_completed__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__connect_to_persistent_subscription__field_descriptors[3] = +{ + { + "subscription_id", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ConnectToPersistentSubscription, subscription_id), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "event_stream_id", + 2, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ConnectToPersistentSubscription, event_stream_id), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "allowed_in_flight_messages", + 3, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ConnectToPersistentSubscription, allowed_in_flight_messages), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__connect_to_persistent_subscription__field_indices_by_name[] = { + 2, /* field[2] = allowed_in_flight_messages */ + 1, /* field[1] = event_stream_id */ + 0, /* field[0] = subscription_id */ +}; +static const ProtobufCIntRange event_store__client__messages__connect_to_persistent_subscription__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 3 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__connect_to_persistent_subscription__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.ConnectToPersistentSubscription", + "ConnectToPersistentSubscription", + "EventStore__Client__Messages__ConnectToPersistentSubscription", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__ConnectToPersistentSubscription), + 3, + event_store__client__messages__connect_to_persistent_subscription__field_descriptors, + event_store__client__messages__connect_to_persistent_subscription__field_indices_by_name, + 1, event_store__client__messages__connect_to_persistent_subscription__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__connect_to_persistent_subscription__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__persistent_subscription_ack_events__field_descriptors[2] = +{ + { + "subscription_id", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__PersistentSubscriptionAckEvents, subscription_id), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "processed_event_ids", + 2, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_BYTES, + offsetof(EventStore__Client__Messages__PersistentSubscriptionAckEvents, n_processed_event_ids), + offsetof(EventStore__Client__Messages__PersistentSubscriptionAckEvents, processed_event_ids), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__persistent_subscription_ack_events__field_indices_by_name[] = { + 1, /* field[1] = processed_event_ids */ + 0, /* field[0] = subscription_id */ +}; +static const ProtobufCIntRange event_store__client__messages__persistent_subscription_ack_events__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__persistent_subscription_ack_events__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.PersistentSubscriptionAckEvents", + "PersistentSubscriptionAckEvents", + "EventStore__Client__Messages__PersistentSubscriptionAckEvents", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__PersistentSubscriptionAckEvents), + 2, + event_store__client__messages__persistent_subscription_ack_events__field_descriptors, + event_store__client__messages__persistent_subscription_ack_events__field_indices_by_name, + 1, event_store__client__messages__persistent_subscription_ack_events__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__persistent_subscription_ack_events__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCEnumValue event_store__client__messages__persistent_subscription_nak_events__nak_action__enum_values_by_number[5] = +{ + { "Unknown", "EVENT_STORE__CLIENT__MESSAGES__PERSISTENT_SUBSCRIPTION_NAK_EVENTS__NAK_ACTION__Unknown", 0 }, + { "Park", "EVENT_STORE__CLIENT__MESSAGES__PERSISTENT_SUBSCRIPTION_NAK_EVENTS__NAK_ACTION__Park", 1 }, + { "Retry", "EVENT_STORE__CLIENT__MESSAGES__PERSISTENT_SUBSCRIPTION_NAK_EVENTS__NAK_ACTION__Retry", 2 }, + { "Skip", "EVENT_STORE__CLIENT__MESSAGES__PERSISTENT_SUBSCRIPTION_NAK_EVENTS__NAK_ACTION__Skip", 3 }, + { "Stop", "EVENT_STORE__CLIENT__MESSAGES__PERSISTENT_SUBSCRIPTION_NAK_EVENTS__NAK_ACTION__Stop", 4 }, +}; +static const ProtobufCIntRange event_store__client__messages__persistent_subscription_nak_events__nak_action__value_ranges[] = { +{0, 0},{0, 5} +}; +static const ProtobufCEnumValueIndex event_store__client__messages__persistent_subscription_nak_events__nak_action__enum_values_by_name[5] = +{ + { "Park", 1 }, + { "Retry", 2 }, + { "Skip", 3 }, + { "Stop", 4 }, + { "Unknown", 0 }, +}; +const ProtobufCEnumDescriptor event_store__client__messages__persistent_subscription_nak_events__nak_action__descriptor = +{ + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.PersistentSubscriptionNakEvents.NakAction", + "NakAction", + "EventStore__Client__Messages__PersistentSubscriptionNakEvents__NakAction", + "EventStore.Client.Messages", + 5, + event_store__client__messages__persistent_subscription_nak_events__nak_action__enum_values_by_number, + 5, + event_store__client__messages__persistent_subscription_nak_events__nak_action__enum_values_by_name, + 1, + event_store__client__messages__persistent_subscription_nak_events__nak_action__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; +static const EventStore__Client__Messages__PersistentSubscriptionNakEvents__NakAction event_store__client__messages__persistent_subscription_nak_events__action__default_value = EVENT_STORE__CLIENT__MESSAGES__PERSISTENT_SUBSCRIPTION_NAK_EVENTS__NAK_ACTION__Unknown; +static const ProtobufCFieldDescriptor event_store__client__messages__persistent_subscription_nak_events__field_descriptors[4] = +{ + { + "subscription_id", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__PersistentSubscriptionNakEvents, subscription_id), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "processed_event_ids", + 2, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_BYTES, + offsetof(EventStore__Client__Messages__PersistentSubscriptionNakEvents, n_processed_event_ids), + offsetof(EventStore__Client__Messages__PersistentSubscriptionNakEvents, processed_event_ids), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "message", + 3, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__PersistentSubscriptionNakEvents, message), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "action", + 4, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_ENUM, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__PersistentSubscriptionNakEvents, action), + &event_store__client__messages__persistent_subscription_nak_events__nak_action__descriptor, + &event_store__client__messages__persistent_subscription_nak_events__action__default_value, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__persistent_subscription_nak_events__field_indices_by_name[] = { + 3, /* field[3] = action */ + 2, /* field[2] = message */ + 1, /* field[1] = processed_event_ids */ + 0, /* field[0] = subscription_id */ +}; +static const ProtobufCIntRange event_store__client__messages__persistent_subscription_nak_events__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 4 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__persistent_subscription_nak_events__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.PersistentSubscriptionNakEvents", + "PersistentSubscriptionNakEvents", + "EventStore__Client__Messages__PersistentSubscriptionNakEvents", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__PersistentSubscriptionNakEvents), + 4, + event_store__client__messages__persistent_subscription_nak_events__field_descriptors, + event_store__client__messages__persistent_subscription_nak_events__field_indices_by_name, + 1, event_store__client__messages__persistent_subscription_nak_events__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__persistent_subscription_nak_events__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__persistent_subscription_confirmation__field_descriptors[3] = +{ + { + "last_commit_position", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__PersistentSubscriptionConfirmation, last_commit_position), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "subscription_id", + 2, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__PersistentSubscriptionConfirmation, subscription_id), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "last_event_number", + 3, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_INT64, + offsetof(EventStore__Client__Messages__PersistentSubscriptionConfirmation, has_last_event_number), + offsetof(EventStore__Client__Messages__PersistentSubscriptionConfirmation, last_event_number), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__persistent_subscription_confirmation__field_indices_by_name[] = { + 0, /* field[0] = last_commit_position */ + 2, /* field[2] = last_event_number */ + 1, /* field[1] = subscription_id */ +}; +static const ProtobufCIntRange event_store__client__messages__persistent_subscription_confirmation__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 3 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__persistent_subscription_confirmation__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.PersistentSubscriptionConfirmation", + "PersistentSubscriptionConfirmation", + "EventStore__Client__Messages__PersistentSubscriptionConfirmation", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__PersistentSubscriptionConfirmation), + 3, + event_store__client__messages__persistent_subscription_confirmation__field_descriptors, + event_store__client__messages__persistent_subscription_confirmation__field_indices_by_name, + 1, event_store__client__messages__persistent_subscription_confirmation__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__persistent_subscription_confirmation__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__persistent_subscription_stream_event_appeared__field_descriptors[1] = +{ + { + "event", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__PersistentSubscriptionStreamEventAppeared, event), + &event_store__client__messages__resolved_indexed_event__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__persistent_subscription_stream_event_appeared__field_indices_by_name[] = { + 0, /* field[0] = event */ +}; +static const ProtobufCIntRange event_store__client__messages__persistent_subscription_stream_event_appeared__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__persistent_subscription_stream_event_appeared__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.PersistentSubscriptionStreamEventAppeared", + "PersistentSubscriptionStreamEventAppeared", + "EventStore__Client__Messages__PersistentSubscriptionStreamEventAppeared", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__PersistentSubscriptionStreamEventAppeared), + 1, + event_store__client__messages__persistent_subscription_stream_event_appeared__field_descriptors, + event_store__client__messages__persistent_subscription_stream_event_appeared__field_indices_by_name, + 1, event_store__client__messages__persistent_subscription_stream_event_appeared__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__persistent_subscription_stream_event_appeared__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__subscribe_to_stream__field_descriptors[2] = +{ + { + "event_stream_id", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__SubscribeToStream, event_stream_id), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resolve_link_tos", + 2, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_BOOL, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__SubscribeToStream, resolve_link_tos), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__subscribe_to_stream__field_indices_by_name[] = { + 0, /* field[0] = event_stream_id */ + 1, /* field[1] = resolve_link_tos */ +}; +static const ProtobufCIntRange event_store__client__messages__subscribe_to_stream__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__subscribe_to_stream__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.SubscribeToStream", + "SubscribeToStream", + "EventStore__Client__Messages__SubscribeToStream", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__SubscribeToStream), + 2, + event_store__client__messages__subscribe_to_stream__field_descriptors, + event_store__client__messages__subscribe_to_stream__field_indices_by_name, + 1, event_store__client__messages__subscribe_to_stream__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__subscribe_to_stream__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__subscription_confirmation__field_descriptors[2] = +{ + { + "last_commit_position", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__SubscriptionConfirmation, last_commit_position), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "last_event_number", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_INT64, + offsetof(EventStore__Client__Messages__SubscriptionConfirmation, has_last_event_number), + offsetof(EventStore__Client__Messages__SubscriptionConfirmation, last_event_number), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__subscription_confirmation__field_indices_by_name[] = { + 0, /* field[0] = last_commit_position */ + 1, /* field[1] = last_event_number */ +}; +static const ProtobufCIntRange event_store__client__messages__subscription_confirmation__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__subscription_confirmation__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.SubscriptionConfirmation", + "SubscriptionConfirmation", + "EventStore__Client__Messages__SubscriptionConfirmation", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__SubscriptionConfirmation), + 2, + event_store__client__messages__subscription_confirmation__field_descriptors, + event_store__client__messages__subscription_confirmation__field_indices_by_name, + 1, event_store__client__messages__subscription_confirmation__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__subscription_confirmation__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__stream_event_appeared__field_descriptors[1] = +{ + { + "event", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__StreamEventAppeared, event), + &event_store__client__messages__resolved_event__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__stream_event_appeared__field_indices_by_name[] = { + 0, /* field[0] = event */ +}; +static const ProtobufCIntRange event_store__client__messages__stream_event_appeared__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__stream_event_appeared__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.StreamEventAppeared", + "StreamEventAppeared", + "EventStore__Client__Messages__StreamEventAppeared", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__StreamEventAppeared), + 1, + event_store__client__messages__stream_event_appeared__field_descriptors, + event_store__client__messages__stream_event_appeared__field_indices_by_name, + 1, event_store__client__messages__stream_event_appeared__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__stream_event_appeared__init, + NULL,NULL,NULL /* reserved[123] */ +}; +#define event_store__client__messages__unsubscribe_from_stream__field_descriptors NULL +#define event_store__client__messages__unsubscribe_from_stream__field_indices_by_name NULL +#define event_store__client__messages__unsubscribe_from_stream__number_ranges NULL +const ProtobufCMessageDescriptor event_store__client__messages__unsubscribe_from_stream__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.UnsubscribeFromStream", + "UnsubscribeFromStream", + "EventStore__Client__Messages__UnsubscribeFromStream", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__UnsubscribeFromStream), + 0, + event_store__client__messages__unsubscribe_from_stream__field_descriptors, + event_store__client__messages__unsubscribe_from_stream__field_indices_by_name, + 0, event_store__client__messages__unsubscribe_from_stream__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__unsubscribe_from_stream__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCEnumValue event_store__client__messages__subscription_dropped__subscription_drop_reason__enum_values_by_number[5] = +{ + { "Unsubscribed", "EVENT_STORE__CLIENT__MESSAGES__SUBSCRIPTION_DROPPED__SUBSCRIPTION_DROP_REASON__Unsubscribed", 0 }, + { "AccessDenied", "EVENT_STORE__CLIENT__MESSAGES__SUBSCRIPTION_DROPPED__SUBSCRIPTION_DROP_REASON__AccessDenied", 1 }, + { "NotFound", "EVENT_STORE__CLIENT__MESSAGES__SUBSCRIPTION_DROPPED__SUBSCRIPTION_DROP_REASON__NotFound", 2 }, + { "PersistentSubscriptionDeleted", "EVENT_STORE__CLIENT__MESSAGES__SUBSCRIPTION_DROPPED__SUBSCRIPTION_DROP_REASON__PersistentSubscriptionDeleted", 3 }, + { "SubscriberMaxCountReached", "EVENT_STORE__CLIENT__MESSAGES__SUBSCRIPTION_DROPPED__SUBSCRIPTION_DROP_REASON__SubscriberMaxCountReached", 4 }, +}; +static const ProtobufCIntRange event_store__client__messages__subscription_dropped__subscription_drop_reason__value_ranges[] = { +{0, 0},{0, 5} +}; +static const ProtobufCEnumValueIndex event_store__client__messages__subscription_dropped__subscription_drop_reason__enum_values_by_name[5] = +{ + { "AccessDenied", 1 }, + { "NotFound", 2 }, + { "PersistentSubscriptionDeleted", 3 }, + { "SubscriberMaxCountReached", 4 }, + { "Unsubscribed", 0 }, +}; +const ProtobufCEnumDescriptor event_store__client__messages__subscription_dropped__subscription_drop_reason__descriptor = +{ + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.SubscriptionDropped.SubscriptionDropReason", + "SubscriptionDropReason", + "EventStore__Client__Messages__SubscriptionDropped__SubscriptionDropReason", + "EventStore.Client.Messages", + 5, + event_store__client__messages__subscription_dropped__subscription_drop_reason__enum_values_by_number, + 5, + event_store__client__messages__subscription_dropped__subscription_drop_reason__enum_values_by_name, + 1, + event_store__client__messages__subscription_dropped__subscription_drop_reason__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; +static const EventStore__Client__Messages__SubscriptionDropped__SubscriptionDropReason event_store__client__messages__subscription_dropped__reason__default_value = EVENT_STORE__CLIENT__MESSAGES__SUBSCRIPTION_DROPPED__SUBSCRIPTION_DROP_REASON__Unsubscribed; +static const ProtobufCFieldDescriptor event_store__client__messages__subscription_dropped__field_descriptors[1] = +{ + { + "reason", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_ENUM, + offsetof(EventStore__Client__Messages__SubscriptionDropped, has_reason), + offsetof(EventStore__Client__Messages__SubscriptionDropped, reason), + &event_store__client__messages__subscription_dropped__subscription_drop_reason__descriptor, + &event_store__client__messages__subscription_dropped__reason__default_value, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__subscription_dropped__field_indices_by_name[] = { + 0, /* field[0] = reason */ +}; +static const ProtobufCIntRange event_store__client__messages__subscription_dropped__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__subscription_dropped__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.SubscriptionDropped", + "SubscriptionDropped", + "EventStore__Client__Messages__SubscriptionDropped", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__SubscriptionDropped), + 1, + event_store__client__messages__subscription_dropped__field_descriptors, + event_store__client__messages__subscription_dropped__field_indices_by_name, + 1, event_store__client__messages__subscription_dropped__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__subscription_dropped__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__not_handled__master_info__field_descriptors[6] = +{ + { + "external_tcp_address", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__NotHandled__MasterInfo, external_tcp_address), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "external_tcp_port", + 2, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__NotHandled__MasterInfo, external_tcp_port), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "external_http_address", + 3, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__NotHandled__MasterInfo, external_http_address), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "external_http_port", + 4, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__NotHandled__MasterInfo, external_http_port), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "external_secure_tcp_address", + 5, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__NotHandled__MasterInfo, external_secure_tcp_address), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "external_secure_tcp_port", + 6, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_INT32, + offsetof(EventStore__Client__Messages__NotHandled__MasterInfo, has_external_secure_tcp_port), + offsetof(EventStore__Client__Messages__NotHandled__MasterInfo, external_secure_tcp_port), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__not_handled__master_info__field_indices_by_name[] = { + 2, /* field[2] = external_http_address */ + 3, /* field[3] = external_http_port */ + 4, /* field[4] = external_secure_tcp_address */ + 5, /* field[5] = external_secure_tcp_port */ + 0, /* field[0] = external_tcp_address */ + 1, /* field[1] = external_tcp_port */ +}; +static const ProtobufCIntRange event_store__client__messages__not_handled__master_info__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 6 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__not_handled__master_info__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.NotHandled.MasterInfo", + "MasterInfo", + "EventStore__Client__Messages__NotHandled__MasterInfo", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__NotHandled__MasterInfo), + 6, + event_store__client__messages__not_handled__master_info__field_descriptors, + event_store__client__messages__not_handled__master_info__field_indices_by_name, + 1, event_store__client__messages__not_handled__master_info__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__not_handled__master_info__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCEnumValue event_store__client__messages__not_handled__not_handled_reason__enum_values_by_number[3] = +{ + { "NotReady", "EVENT_STORE__CLIENT__MESSAGES__NOT_HANDLED__NOT_HANDLED_REASON__NotReady", 0 }, + { "TooBusy", "EVENT_STORE__CLIENT__MESSAGES__NOT_HANDLED__NOT_HANDLED_REASON__TooBusy", 1 }, + { "NotMaster", "EVENT_STORE__CLIENT__MESSAGES__NOT_HANDLED__NOT_HANDLED_REASON__NotMaster", 2 }, +}; +static const ProtobufCIntRange event_store__client__messages__not_handled__not_handled_reason__value_ranges[] = { +{0, 0},{0, 3} +}; +static const ProtobufCEnumValueIndex event_store__client__messages__not_handled__not_handled_reason__enum_values_by_name[3] = +{ + { "NotMaster", 2 }, + { "NotReady", 0 }, + { "TooBusy", 1 }, +}; +const ProtobufCEnumDescriptor event_store__client__messages__not_handled__not_handled_reason__descriptor = +{ + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.NotHandled.NotHandledReason", + "NotHandledReason", + "EventStore__Client__Messages__NotHandled__NotHandledReason", + "EventStore.Client.Messages", + 3, + event_store__client__messages__not_handled__not_handled_reason__enum_values_by_number, + 3, + event_store__client__messages__not_handled__not_handled_reason__enum_values_by_name, + 1, + event_store__client__messages__not_handled__not_handled_reason__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__not_handled__field_descriptors[2] = +{ + { + "reason", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_ENUM, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__NotHandled, reason), + &event_store__client__messages__not_handled__not_handled_reason__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "additional_info", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BYTES, + offsetof(EventStore__Client__Messages__NotHandled, has_additional_info), + offsetof(EventStore__Client__Messages__NotHandled, additional_info), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__not_handled__field_indices_by_name[] = { + 1, /* field[1] = additional_info */ + 0, /* field[0] = reason */ +}; +static const ProtobufCIntRange event_store__client__messages__not_handled__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__not_handled__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.NotHandled", + "NotHandled", + "EventStore__Client__Messages__NotHandled", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__NotHandled), + 2, + event_store__client__messages__not_handled__field_descriptors, + event_store__client__messages__not_handled__field_indices_by_name, + 1, event_store__client__messages__not_handled__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__not_handled__init, + NULL,NULL,NULL /* reserved[123] */ +}; +#define event_store__client__messages__scavenge_database__field_descriptors NULL +#define event_store__client__messages__scavenge_database__field_indices_by_name NULL +#define event_store__client__messages__scavenge_database__number_ranges NULL +const ProtobufCMessageDescriptor event_store__client__messages__scavenge_database__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.ScavengeDatabase", + "ScavengeDatabase", + "EventStore__Client__Messages__ScavengeDatabase", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__ScavengeDatabase), + 0, + event_store__client__messages__scavenge_database__field_descriptors, + event_store__client__messages__scavenge_database__field_indices_by_name, + 0, event_store__client__messages__scavenge_database__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__scavenge_database__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCEnumValue event_store__client__messages__scavenge_database_completed__scavenge_result__enum_values_by_number[3] = +{ + { "Success", "EVENT_STORE__CLIENT__MESSAGES__SCAVENGE_DATABASE_COMPLETED__SCAVENGE_RESULT__Success", 0 }, + { "InProgress", "EVENT_STORE__CLIENT__MESSAGES__SCAVENGE_DATABASE_COMPLETED__SCAVENGE_RESULT__InProgress", 1 }, + { "Failed", "EVENT_STORE__CLIENT__MESSAGES__SCAVENGE_DATABASE_COMPLETED__SCAVENGE_RESULT__Failed", 2 }, +}; +static const ProtobufCIntRange event_store__client__messages__scavenge_database_completed__scavenge_result__value_ranges[] = { +{0, 0},{0, 3} +}; +static const ProtobufCEnumValueIndex event_store__client__messages__scavenge_database_completed__scavenge_result__enum_values_by_name[3] = +{ + { "Failed", 2 }, + { "InProgress", 1 }, + { "Success", 0 }, +}; +const ProtobufCEnumDescriptor event_store__client__messages__scavenge_database_completed__scavenge_result__descriptor = +{ + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.ScavengeDatabaseCompleted.ScavengeResult", + "ScavengeResult", + "EventStore__Client__Messages__ScavengeDatabaseCompleted__ScavengeResult", + "EventStore.Client.Messages", + 3, + event_store__client__messages__scavenge_database_completed__scavenge_result__enum_values_by_number, + 3, + event_store__client__messages__scavenge_database_completed__scavenge_result__enum_values_by_name, + 1, + event_store__client__messages__scavenge_database_completed__scavenge_result__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__scavenge_database_completed__field_descriptors[4] = +{ + { + "result", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_ENUM, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ScavengeDatabaseCompleted, result), + &event_store__client__messages__scavenge_database_completed__scavenge_result__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "error", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ScavengeDatabaseCompleted, error), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "total_time_ms", + 3, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ScavengeDatabaseCompleted, total_time_ms), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "total_space_saved", + 4, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT64, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__ScavengeDatabaseCompleted, total_space_saved), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__scavenge_database_completed__field_indices_by_name[] = { + 1, /* field[1] = error */ + 0, /* field[0] = result */ + 3, /* field[3] = total_space_saved */ + 2, /* field[2] = total_time_ms */ +}; +static const ProtobufCIntRange event_store__client__messages__scavenge_database_completed__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 4 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__scavenge_database_completed__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.ScavengeDatabaseCompleted", + "ScavengeDatabaseCompleted", + "EventStore__Client__Messages__ScavengeDatabaseCompleted", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__ScavengeDatabaseCompleted), + 4, + event_store__client__messages__scavenge_database_completed__field_descriptors, + event_store__client__messages__scavenge_database_completed__field_indices_by_name, + 1, event_store__client__messages__scavenge_database_completed__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__scavenge_database_completed__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor event_store__client__messages__identify_client__field_descriptors[2] = +{ + { + "version", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__IdentifyClient, version), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "connection_name", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(EventStore__Client__Messages__IdentifyClient, connection_name), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned event_store__client__messages__identify_client__field_indices_by_name[] = { + 1, /* field[1] = connection_name */ + 0, /* field[0] = version */ +}; +static const ProtobufCIntRange event_store__client__messages__identify_client__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor event_store__client__messages__identify_client__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.IdentifyClient", + "IdentifyClient", + "EventStore__Client__Messages__IdentifyClient", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__IdentifyClient), + 2, + event_store__client__messages__identify_client__field_descriptors, + event_store__client__messages__identify_client__field_indices_by_name, + 1, event_store__client__messages__identify_client__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__identify_client__init, + NULL,NULL,NULL /* reserved[123] */ +}; +#define event_store__client__messages__client_identified__field_descriptors NULL +#define event_store__client__messages__client_identified__field_indices_by_name NULL +#define event_store__client__messages__client_identified__number_ranges NULL +const ProtobufCMessageDescriptor event_store__client__messages__client_identified__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.ClientIdentified", + "ClientIdentified", + "EventStore__Client__Messages__ClientIdentified", + "EventStore.Client.Messages", + sizeof(EventStore__Client__Messages__ClientIdentified), + 0, + event_store__client__messages__client_identified__field_descriptors, + event_store__client__messages__client_identified__field_indices_by_name, + 0, event_store__client__messages__client_identified__number_ranges, + (ProtobufCMessageInit) event_store__client__messages__client_identified__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCEnumValue event_store__client__messages__operation_result__enum_values_by_number[8] = +{ + { "Success", "EVENT_STORE__CLIENT__MESSAGES__OPERATION_RESULT__Success", 0 }, + { "PrepareTimeout", "EVENT_STORE__CLIENT__MESSAGES__OPERATION_RESULT__PrepareTimeout", 1 }, + { "CommitTimeout", "EVENT_STORE__CLIENT__MESSAGES__OPERATION_RESULT__CommitTimeout", 2 }, + { "ForwardTimeout", "EVENT_STORE__CLIENT__MESSAGES__OPERATION_RESULT__ForwardTimeout", 3 }, + { "WrongExpectedVersion", "EVENT_STORE__CLIENT__MESSAGES__OPERATION_RESULT__WrongExpectedVersion", 4 }, + { "StreamDeleted", "EVENT_STORE__CLIENT__MESSAGES__OPERATION_RESULT__StreamDeleted", 5 }, + { "InvalidTransaction", "EVENT_STORE__CLIENT__MESSAGES__OPERATION_RESULT__InvalidTransaction", 6 }, + { "AccessDenied", "EVENT_STORE__CLIENT__MESSAGES__OPERATION_RESULT__AccessDenied", 7 }, +}; +static const ProtobufCIntRange event_store__client__messages__operation_result__value_ranges[] = { +{0, 0},{0, 8} +}; +static const ProtobufCEnumValueIndex event_store__client__messages__operation_result__enum_values_by_name[8] = +{ + { "AccessDenied", 7 }, + { "CommitTimeout", 2 }, + { "ForwardTimeout", 3 }, + { "InvalidTransaction", 6 }, + { "PrepareTimeout", 1 }, + { "StreamDeleted", 5 }, + { "Success", 0 }, + { "WrongExpectedVersion", 4 }, +}; +const ProtobufCEnumDescriptor event_store__client__messages__operation_result__descriptor = +{ + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "EventStore.Client.Messages.OperationResult", + "OperationResult", + "EventStore__Client__Messages__OperationResult", + "EventStore.Client.Messages", + 8, + event_store__client__messages__operation_result__enum_values_by_number, + 8, + event_store__client__messages__operation_result__enum_values_by_name, + 1, + event_store__client__messages__operation_result__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; diff --git a/ClientMessageDtos.pb-c.h b/ClientMessageDtos.pb-c.h new file mode 100644 index 0000000..5a60736 --- /dev/null +++ b/ClientMessageDtos.pb-c.h @@ -0,0 +1,1693 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: Protos/ClientAPI/ClientMessageDtos.proto */ + +#ifndef PROTOBUF_C_Protos_2fClientAPI_2fClientMessageDtos_2eproto__INCLUDED +#define PROTOBUF_C_Protos_2fClientAPI_2fClientMessageDtos_2eproto__INCLUDED + +#include + +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 1003000 < 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 + + +typedef struct _EventStore__Client__Messages__NewEvent EventStore__Client__Messages__NewEvent; +typedef struct _EventStore__Client__Messages__EventRecord EventStore__Client__Messages__EventRecord; +typedef struct _EventStore__Client__Messages__ResolvedIndexedEvent EventStore__Client__Messages__ResolvedIndexedEvent; +typedef struct _EventStore__Client__Messages__ResolvedEvent EventStore__Client__Messages__ResolvedEvent; +typedef struct _EventStore__Client__Messages__WriteEvents EventStore__Client__Messages__WriteEvents; +typedef struct _EventStore__Client__Messages__WriteEventsCompleted EventStore__Client__Messages__WriteEventsCompleted; +typedef struct _EventStore__Client__Messages__DeleteStream EventStore__Client__Messages__DeleteStream; +typedef struct _EventStore__Client__Messages__DeleteStreamCompleted EventStore__Client__Messages__DeleteStreamCompleted; +typedef struct _EventStore__Client__Messages__TransactionStart EventStore__Client__Messages__TransactionStart; +typedef struct _EventStore__Client__Messages__TransactionStartCompleted EventStore__Client__Messages__TransactionStartCompleted; +typedef struct _EventStore__Client__Messages__TransactionWrite EventStore__Client__Messages__TransactionWrite; +typedef struct _EventStore__Client__Messages__TransactionWriteCompleted EventStore__Client__Messages__TransactionWriteCompleted; +typedef struct _EventStore__Client__Messages__TransactionCommit EventStore__Client__Messages__TransactionCommit; +typedef struct _EventStore__Client__Messages__TransactionCommitCompleted EventStore__Client__Messages__TransactionCommitCompleted; +typedef struct _EventStore__Client__Messages__ReadEvent EventStore__Client__Messages__ReadEvent; +typedef struct _EventStore__Client__Messages__ReadEventCompleted EventStore__Client__Messages__ReadEventCompleted; +typedef struct _EventStore__Client__Messages__ReadStreamEvents EventStore__Client__Messages__ReadStreamEvents; +typedef struct _EventStore__Client__Messages__ReadStreamEventsCompleted EventStore__Client__Messages__ReadStreamEventsCompleted; +typedef struct _EventStore__Client__Messages__ReadAllEvents EventStore__Client__Messages__ReadAllEvents; +typedef struct _EventStore__Client__Messages__ReadAllEventsCompleted EventStore__Client__Messages__ReadAllEventsCompleted; +typedef struct _EventStore__Client__Messages__CreatePersistentSubscription EventStore__Client__Messages__CreatePersistentSubscription; +typedef struct _EventStore__Client__Messages__DeletePersistentSubscription EventStore__Client__Messages__DeletePersistentSubscription; +typedef struct _EventStore__Client__Messages__UpdatePersistentSubscription EventStore__Client__Messages__UpdatePersistentSubscription; +typedef struct _EventStore__Client__Messages__UpdatePersistentSubscriptionCompleted EventStore__Client__Messages__UpdatePersistentSubscriptionCompleted; +typedef struct _EventStore__Client__Messages__CreatePersistentSubscriptionCompleted EventStore__Client__Messages__CreatePersistentSubscriptionCompleted; +typedef struct _EventStore__Client__Messages__DeletePersistentSubscriptionCompleted EventStore__Client__Messages__DeletePersistentSubscriptionCompleted; +typedef struct _EventStore__Client__Messages__ConnectToPersistentSubscription EventStore__Client__Messages__ConnectToPersistentSubscription; +typedef struct _EventStore__Client__Messages__PersistentSubscriptionAckEvents EventStore__Client__Messages__PersistentSubscriptionAckEvents; +typedef struct _EventStore__Client__Messages__PersistentSubscriptionNakEvents EventStore__Client__Messages__PersistentSubscriptionNakEvents; +typedef struct _EventStore__Client__Messages__PersistentSubscriptionConfirmation EventStore__Client__Messages__PersistentSubscriptionConfirmation; +typedef struct _EventStore__Client__Messages__PersistentSubscriptionStreamEventAppeared EventStore__Client__Messages__PersistentSubscriptionStreamEventAppeared; +typedef struct _EventStore__Client__Messages__SubscribeToStream EventStore__Client__Messages__SubscribeToStream; +typedef struct _EventStore__Client__Messages__SubscriptionConfirmation EventStore__Client__Messages__SubscriptionConfirmation; +typedef struct _EventStore__Client__Messages__StreamEventAppeared EventStore__Client__Messages__StreamEventAppeared; +typedef struct _EventStore__Client__Messages__UnsubscribeFromStream EventStore__Client__Messages__UnsubscribeFromStream; +typedef struct _EventStore__Client__Messages__SubscriptionDropped EventStore__Client__Messages__SubscriptionDropped; +typedef struct _EventStore__Client__Messages__NotHandled EventStore__Client__Messages__NotHandled; +typedef struct _EventStore__Client__Messages__NotHandled__MasterInfo EventStore__Client__Messages__NotHandled__MasterInfo; +typedef struct _EventStore__Client__Messages__ScavengeDatabase EventStore__Client__Messages__ScavengeDatabase; +typedef struct _EventStore__Client__Messages__ScavengeDatabaseCompleted EventStore__Client__Messages__ScavengeDatabaseCompleted; +typedef struct _EventStore__Client__Messages__IdentifyClient EventStore__Client__Messages__IdentifyClient; +typedef struct _EventStore__Client__Messages__ClientIdentified EventStore__Client__Messages__ClientIdentified; + + +/* --- enums --- */ + +typedef enum _EventStore__Client__Messages__ReadEventCompleted__ReadEventResult { + EVENT_STORE__CLIENT__MESSAGES__READ_EVENT_COMPLETED__READ_EVENT_RESULT__Success = 0, + EVENT_STORE__CLIENT__MESSAGES__READ_EVENT_COMPLETED__READ_EVENT_RESULT__NotFound = 1, + EVENT_STORE__CLIENT__MESSAGES__READ_EVENT_COMPLETED__READ_EVENT_RESULT__NoStream = 2, + EVENT_STORE__CLIENT__MESSAGES__READ_EVENT_COMPLETED__READ_EVENT_RESULT__StreamDeleted = 3, + EVENT_STORE__CLIENT__MESSAGES__READ_EVENT_COMPLETED__READ_EVENT_RESULT__Error = 4, + EVENT_STORE__CLIENT__MESSAGES__READ_EVENT_COMPLETED__READ_EVENT_RESULT__AccessDenied = 5 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(EVENT_STORE__CLIENT__MESSAGES__READ_EVENT_COMPLETED__READ_EVENT_RESULT) +} EventStore__Client__Messages__ReadEventCompleted__ReadEventResult; +typedef enum _EventStore__Client__Messages__ReadStreamEventsCompleted__ReadStreamResult { + EVENT_STORE__CLIENT__MESSAGES__READ_STREAM_EVENTS_COMPLETED__READ_STREAM_RESULT__Success = 0, + EVENT_STORE__CLIENT__MESSAGES__READ_STREAM_EVENTS_COMPLETED__READ_STREAM_RESULT__NoStream = 1, + EVENT_STORE__CLIENT__MESSAGES__READ_STREAM_EVENTS_COMPLETED__READ_STREAM_RESULT__StreamDeleted = 2, + EVENT_STORE__CLIENT__MESSAGES__READ_STREAM_EVENTS_COMPLETED__READ_STREAM_RESULT__NotModified = 3, + EVENT_STORE__CLIENT__MESSAGES__READ_STREAM_EVENTS_COMPLETED__READ_STREAM_RESULT__Error = 4, + EVENT_STORE__CLIENT__MESSAGES__READ_STREAM_EVENTS_COMPLETED__READ_STREAM_RESULT__AccessDenied = 5 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(EVENT_STORE__CLIENT__MESSAGES__READ_STREAM_EVENTS_COMPLETED__READ_STREAM_RESULT) +} EventStore__Client__Messages__ReadStreamEventsCompleted__ReadStreamResult; +typedef enum _EventStore__Client__Messages__ReadAllEventsCompleted__ReadAllResult { + EVENT_STORE__CLIENT__MESSAGES__READ_ALL_EVENTS_COMPLETED__READ_ALL_RESULT__Success = 0, + EVENT_STORE__CLIENT__MESSAGES__READ_ALL_EVENTS_COMPLETED__READ_ALL_RESULT__NotModified = 1, + EVENT_STORE__CLIENT__MESSAGES__READ_ALL_EVENTS_COMPLETED__READ_ALL_RESULT__Error = 2, + EVENT_STORE__CLIENT__MESSAGES__READ_ALL_EVENTS_COMPLETED__READ_ALL_RESULT__AccessDenied = 3 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(EVENT_STORE__CLIENT__MESSAGES__READ_ALL_EVENTS_COMPLETED__READ_ALL_RESULT) +} EventStore__Client__Messages__ReadAllEventsCompleted__ReadAllResult; +typedef enum _EventStore__Client__Messages__UpdatePersistentSubscriptionCompleted__UpdatePersistentSubscriptionResult { + EVENT_STORE__CLIENT__MESSAGES__UPDATE_PERSISTENT_SUBSCRIPTION_COMPLETED__UPDATE_PERSISTENT_SUBSCRIPTION_RESULT__Success = 0, + EVENT_STORE__CLIENT__MESSAGES__UPDATE_PERSISTENT_SUBSCRIPTION_COMPLETED__UPDATE_PERSISTENT_SUBSCRIPTION_RESULT__DoesNotExist = 1, + EVENT_STORE__CLIENT__MESSAGES__UPDATE_PERSISTENT_SUBSCRIPTION_COMPLETED__UPDATE_PERSISTENT_SUBSCRIPTION_RESULT__Fail = 2, + EVENT_STORE__CLIENT__MESSAGES__UPDATE_PERSISTENT_SUBSCRIPTION_COMPLETED__UPDATE_PERSISTENT_SUBSCRIPTION_RESULT__AccessDenied = 3 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(EVENT_STORE__CLIENT__MESSAGES__UPDATE_PERSISTENT_SUBSCRIPTION_COMPLETED__UPDATE_PERSISTENT_SUBSCRIPTION_RESULT) +} EventStore__Client__Messages__UpdatePersistentSubscriptionCompleted__UpdatePersistentSubscriptionResult; +typedef enum _EventStore__Client__Messages__CreatePersistentSubscriptionCompleted__CreatePersistentSubscriptionResult { + EVENT_STORE__CLIENT__MESSAGES__CREATE_PERSISTENT_SUBSCRIPTION_COMPLETED__CREATE_PERSISTENT_SUBSCRIPTION_RESULT__Success = 0, + EVENT_STORE__CLIENT__MESSAGES__CREATE_PERSISTENT_SUBSCRIPTION_COMPLETED__CREATE_PERSISTENT_SUBSCRIPTION_RESULT__AlreadyExists = 1, + EVENT_STORE__CLIENT__MESSAGES__CREATE_PERSISTENT_SUBSCRIPTION_COMPLETED__CREATE_PERSISTENT_SUBSCRIPTION_RESULT__Fail = 2, + EVENT_STORE__CLIENT__MESSAGES__CREATE_PERSISTENT_SUBSCRIPTION_COMPLETED__CREATE_PERSISTENT_SUBSCRIPTION_RESULT__AccessDenied = 3 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(EVENT_STORE__CLIENT__MESSAGES__CREATE_PERSISTENT_SUBSCRIPTION_COMPLETED__CREATE_PERSISTENT_SUBSCRIPTION_RESULT) +} EventStore__Client__Messages__CreatePersistentSubscriptionCompleted__CreatePersistentSubscriptionResult; +typedef enum _EventStore__Client__Messages__DeletePersistentSubscriptionCompleted__DeletePersistentSubscriptionResult { + EVENT_STORE__CLIENT__MESSAGES__DELETE_PERSISTENT_SUBSCRIPTION_COMPLETED__DELETE_PERSISTENT_SUBSCRIPTION_RESULT__Success = 0, + EVENT_STORE__CLIENT__MESSAGES__DELETE_PERSISTENT_SUBSCRIPTION_COMPLETED__DELETE_PERSISTENT_SUBSCRIPTION_RESULT__DoesNotExist = 1, + EVENT_STORE__CLIENT__MESSAGES__DELETE_PERSISTENT_SUBSCRIPTION_COMPLETED__DELETE_PERSISTENT_SUBSCRIPTION_RESULT__Fail = 2, + EVENT_STORE__CLIENT__MESSAGES__DELETE_PERSISTENT_SUBSCRIPTION_COMPLETED__DELETE_PERSISTENT_SUBSCRIPTION_RESULT__AccessDenied = 3 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(EVENT_STORE__CLIENT__MESSAGES__DELETE_PERSISTENT_SUBSCRIPTION_COMPLETED__DELETE_PERSISTENT_SUBSCRIPTION_RESULT) +} EventStore__Client__Messages__DeletePersistentSubscriptionCompleted__DeletePersistentSubscriptionResult; +typedef enum _EventStore__Client__Messages__PersistentSubscriptionNakEvents__NakAction { + EVENT_STORE__CLIENT__MESSAGES__PERSISTENT_SUBSCRIPTION_NAK_EVENTS__NAK_ACTION__Unknown = 0, + EVENT_STORE__CLIENT__MESSAGES__PERSISTENT_SUBSCRIPTION_NAK_EVENTS__NAK_ACTION__Park = 1, + EVENT_STORE__CLIENT__MESSAGES__PERSISTENT_SUBSCRIPTION_NAK_EVENTS__NAK_ACTION__Retry = 2, + EVENT_STORE__CLIENT__MESSAGES__PERSISTENT_SUBSCRIPTION_NAK_EVENTS__NAK_ACTION__Skip = 3, + EVENT_STORE__CLIENT__MESSAGES__PERSISTENT_SUBSCRIPTION_NAK_EVENTS__NAK_ACTION__Stop = 4 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(EVENT_STORE__CLIENT__MESSAGES__PERSISTENT_SUBSCRIPTION_NAK_EVENTS__NAK_ACTION) +} EventStore__Client__Messages__PersistentSubscriptionNakEvents__NakAction; +typedef enum _EventStore__Client__Messages__SubscriptionDropped__SubscriptionDropReason { + EVENT_STORE__CLIENT__MESSAGES__SUBSCRIPTION_DROPPED__SUBSCRIPTION_DROP_REASON__Unsubscribed = 0, + EVENT_STORE__CLIENT__MESSAGES__SUBSCRIPTION_DROPPED__SUBSCRIPTION_DROP_REASON__AccessDenied = 1, + EVENT_STORE__CLIENT__MESSAGES__SUBSCRIPTION_DROPPED__SUBSCRIPTION_DROP_REASON__NotFound = 2, + EVENT_STORE__CLIENT__MESSAGES__SUBSCRIPTION_DROPPED__SUBSCRIPTION_DROP_REASON__PersistentSubscriptionDeleted = 3, + EVENT_STORE__CLIENT__MESSAGES__SUBSCRIPTION_DROPPED__SUBSCRIPTION_DROP_REASON__SubscriberMaxCountReached = 4 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(EVENT_STORE__CLIENT__MESSAGES__SUBSCRIPTION_DROPPED__SUBSCRIPTION_DROP_REASON) +} EventStore__Client__Messages__SubscriptionDropped__SubscriptionDropReason; +typedef enum _EventStore__Client__Messages__NotHandled__NotHandledReason { + EVENT_STORE__CLIENT__MESSAGES__NOT_HANDLED__NOT_HANDLED_REASON__NotReady = 0, + EVENT_STORE__CLIENT__MESSAGES__NOT_HANDLED__NOT_HANDLED_REASON__TooBusy = 1, + EVENT_STORE__CLIENT__MESSAGES__NOT_HANDLED__NOT_HANDLED_REASON__NotMaster = 2 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(EVENT_STORE__CLIENT__MESSAGES__NOT_HANDLED__NOT_HANDLED_REASON) +} EventStore__Client__Messages__NotHandled__NotHandledReason; +typedef enum _EventStore__Client__Messages__ScavengeDatabaseCompleted__ScavengeResult { + EVENT_STORE__CLIENT__MESSAGES__SCAVENGE_DATABASE_COMPLETED__SCAVENGE_RESULT__Success = 0, + EVENT_STORE__CLIENT__MESSAGES__SCAVENGE_DATABASE_COMPLETED__SCAVENGE_RESULT__InProgress = 1, + EVENT_STORE__CLIENT__MESSAGES__SCAVENGE_DATABASE_COMPLETED__SCAVENGE_RESULT__Failed = 2 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(EVENT_STORE__CLIENT__MESSAGES__SCAVENGE_DATABASE_COMPLETED__SCAVENGE_RESULT) +} EventStore__Client__Messages__ScavengeDatabaseCompleted__ScavengeResult; +typedef enum _EventStore__Client__Messages__OperationResult { + EVENT_STORE__CLIENT__MESSAGES__OPERATION_RESULT__Success = 0, + EVENT_STORE__CLIENT__MESSAGES__OPERATION_RESULT__PrepareTimeout = 1, + EVENT_STORE__CLIENT__MESSAGES__OPERATION_RESULT__CommitTimeout = 2, + EVENT_STORE__CLIENT__MESSAGES__OPERATION_RESULT__ForwardTimeout = 3, + EVENT_STORE__CLIENT__MESSAGES__OPERATION_RESULT__WrongExpectedVersion = 4, + EVENT_STORE__CLIENT__MESSAGES__OPERATION_RESULT__StreamDeleted = 5, + EVENT_STORE__CLIENT__MESSAGES__OPERATION_RESULT__InvalidTransaction = 6, + EVENT_STORE__CLIENT__MESSAGES__OPERATION_RESULT__AccessDenied = 7 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(EVENT_STORE__CLIENT__MESSAGES__OPERATION_RESULT) +} EventStore__Client__Messages__OperationResult; + +/* --- messages --- */ + +struct _EventStore__Client__Messages__NewEvent +{ + ProtobufCMessage base; + ProtobufCBinaryData event_id; + char *event_type; + int32_t data_content_type; + int32_t metadata_content_type; + ProtobufCBinaryData data; + protobuf_c_boolean has_metadata; + ProtobufCBinaryData metadata; +}; +#define EVENT_STORE__CLIENT__MESSAGES__NEW_EVENT__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__new_event__descriptor) \ + , {0,NULL}, NULL, 0, 0, {0,NULL}, 0, {0,NULL} } + + +struct _EventStore__Client__Messages__EventRecord +{ + ProtobufCMessage base; + char *event_stream_id; + int64_t event_number; + ProtobufCBinaryData event_id; + char *event_type; + int32_t data_content_type; + int32_t metadata_content_type; + ProtobufCBinaryData data; + protobuf_c_boolean has_metadata; + ProtobufCBinaryData metadata; + protobuf_c_boolean has_created; + int64_t created; + protobuf_c_boolean has_created_epoch; + int64_t created_epoch; +}; +#define EVENT_STORE__CLIENT__MESSAGES__EVENT_RECORD__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__event_record__descriptor) \ + , NULL, 0, {0,NULL}, NULL, 0, 0, {0,NULL}, 0, {0,NULL}, 0, 0, 0, 0 } + + +struct _EventStore__Client__Messages__ResolvedIndexedEvent +{ + ProtobufCMessage base; + EventStore__Client__Messages__EventRecord *event; + EventStore__Client__Messages__EventRecord *link; +}; +#define EVENT_STORE__CLIENT__MESSAGES__RESOLVED_INDEXED_EVENT__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__resolved_indexed_event__descriptor) \ + , NULL, NULL } + + +struct _EventStore__Client__Messages__ResolvedEvent +{ + ProtobufCMessage base; + EventStore__Client__Messages__EventRecord *event; + EventStore__Client__Messages__EventRecord *link; + int64_t commit_position; + int64_t prepare_position; +}; +#define EVENT_STORE__CLIENT__MESSAGES__RESOLVED_EVENT__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__resolved_event__descriptor) \ + , NULL, NULL, 0, 0 } + + +struct _EventStore__Client__Messages__WriteEvents +{ + ProtobufCMessage base; + char *event_stream_id; + int64_t expected_version; + size_t n_events; + EventStore__Client__Messages__NewEvent **events; + protobuf_c_boolean require_master; +}; +#define EVENT_STORE__CLIENT__MESSAGES__WRITE_EVENTS__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__write_events__descriptor) \ + , NULL, 0, 0,NULL, 0 } + + +struct _EventStore__Client__Messages__WriteEventsCompleted +{ + ProtobufCMessage base; + EventStore__Client__Messages__OperationResult result; + char *message; + int64_t first_event_number; + int64_t last_event_number; + protobuf_c_boolean has_prepare_position; + int64_t prepare_position; + protobuf_c_boolean has_commit_position; + int64_t commit_position; + protobuf_c_boolean has_current_version; + int64_t current_version; +}; +#define EVENT_STORE__CLIENT__MESSAGES__WRITE_EVENTS_COMPLETED__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__write_events_completed__descriptor) \ + , EVENT_STORE__CLIENT__MESSAGES__OPERATION_RESULT__Success, NULL, 0, 0, 0, 0, 0, 0, 0, 0 } + + +struct _EventStore__Client__Messages__DeleteStream +{ + ProtobufCMessage base; + char *event_stream_id; + int64_t expected_version; + protobuf_c_boolean require_master; + protobuf_c_boolean has_hard_delete; + protobuf_c_boolean hard_delete; +}; +#define EVENT_STORE__CLIENT__MESSAGES__DELETE_STREAM__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__delete_stream__descriptor) \ + , NULL, 0, 0, 0, 0 } + + +struct _EventStore__Client__Messages__DeleteStreamCompleted +{ + ProtobufCMessage base; + EventStore__Client__Messages__OperationResult result; + char *message; + protobuf_c_boolean has_prepare_position; + int64_t prepare_position; + protobuf_c_boolean has_commit_position; + int64_t commit_position; +}; +#define EVENT_STORE__CLIENT__MESSAGES__DELETE_STREAM_COMPLETED__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__delete_stream_completed__descriptor) \ + , EVENT_STORE__CLIENT__MESSAGES__OPERATION_RESULT__Success, NULL, 0, 0, 0, 0 } + + +struct _EventStore__Client__Messages__TransactionStart +{ + ProtobufCMessage base; + char *event_stream_id; + int64_t expected_version; + protobuf_c_boolean require_master; +}; +#define EVENT_STORE__CLIENT__MESSAGES__TRANSACTION_START__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__transaction_start__descriptor) \ + , NULL, 0, 0 } + + +struct _EventStore__Client__Messages__TransactionStartCompleted +{ + ProtobufCMessage base; + int64_t transaction_id; + EventStore__Client__Messages__OperationResult result; + char *message; +}; +#define EVENT_STORE__CLIENT__MESSAGES__TRANSACTION_START_COMPLETED__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__transaction_start_completed__descriptor) \ + , 0, EVENT_STORE__CLIENT__MESSAGES__OPERATION_RESULT__Success, NULL } + + +struct _EventStore__Client__Messages__TransactionWrite +{ + ProtobufCMessage base; + int64_t transaction_id; + size_t n_events; + EventStore__Client__Messages__NewEvent **events; + protobuf_c_boolean require_master; +}; +#define EVENT_STORE__CLIENT__MESSAGES__TRANSACTION_WRITE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__transaction_write__descriptor) \ + , 0, 0,NULL, 0 } + + +struct _EventStore__Client__Messages__TransactionWriteCompleted +{ + ProtobufCMessage base; + int64_t transaction_id; + EventStore__Client__Messages__OperationResult result; + char *message; +}; +#define EVENT_STORE__CLIENT__MESSAGES__TRANSACTION_WRITE_COMPLETED__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__transaction_write_completed__descriptor) \ + , 0, EVENT_STORE__CLIENT__MESSAGES__OPERATION_RESULT__Success, NULL } + + +struct _EventStore__Client__Messages__TransactionCommit +{ + ProtobufCMessage base; + int64_t transaction_id; + protobuf_c_boolean require_master; +}; +#define EVENT_STORE__CLIENT__MESSAGES__TRANSACTION_COMMIT__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__transaction_commit__descriptor) \ + , 0, 0 } + + +struct _EventStore__Client__Messages__TransactionCommitCompleted +{ + ProtobufCMessage base; + int64_t transaction_id; + EventStore__Client__Messages__OperationResult result; + char *message; + int64_t first_event_number; + int64_t last_event_number; + protobuf_c_boolean has_prepare_position; + int64_t prepare_position; + protobuf_c_boolean has_commit_position; + int64_t commit_position; +}; +#define EVENT_STORE__CLIENT__MESSAGES__TRANSACTION_COMMIT_COMPLETED__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__transaction_commit_completed__descriptor) \ + , 0, EVENT_STORE__CLIENT__MESSAGES__OPERATION_RESULT__Success, NULL, 0, 0, 0, 0, 0, 0 } + + +struct _EventStore__Client__Messages__ReadEvent +{ + ProtobufCMessage base; + char *event_stream_id; + int64_t event_number; + protobuf_c_boolean resolve_link_tos; + protobuf_c_boolean require_master; +}; +#define EVENT_STORE__CLIENT__MESSAGES__READ_EVENT__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__read_event__descriptor) \ + , NULL, 0, 0, 0 } + + +struct _EventStore__Client__Messages__ReadEventCompleted +{ + ProtobufCMessage base; + EventStore__Client__Messages__ReadEventCompleted__ReadEventResult result; + EventStore__Client__Messages__ResolvedIndexedEvent *event; + char *error; +}; +#define EVENT_STORE__CLIENT__MESSAGES__READ_EVENT_COMPLETED__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__read_event_completed__descriptor) \ + , EVENT_STORE__CLIENT__MESSAGES__READ_EVENT_COMPLETED__READ_EVENT_RESULT__Success, NULL, NULL } + + +struct _EventStore__Client__Messages__ReadStreamEvents +{ + ProtobufCMessage base; + char *event_stream_id; + int64_t from_event_number; + int32_t max_count; + protobuf_c_boolean resolve_link_tos; + protobuf_c_boolean require_master; +}; +#define EVENT_STORE__CLIENT__MESSAGES__READ_STREAM_EVENTS__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__read_stream_events__descriptor) \ + , NULL, 0, 0, 0, 0 } + + +struct _EventStore__Client__Messages__ReadStreamEventsCompleted +{ + ProtobufCMessage base; + size_t n_events; + EventStore__Client__Messages__ResolvedIndexedEvent **events; + EventStore__Client__Messages__ReadStreamEventsCompleted__ReadStreamResult result; + int64_t next_event_number; + int64_t last_event_number; + protobuf_c_boolean is_end_of_stream; + int64_t last_commit_position; + char *error; +}; +#define EVENT_STORE__CLIENT__MESSAGES__READ_STREAM_EVENTS_COMPLETED__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__read_stream_events_completed__descriptor) \ + , 0,NULL, EVENT_STORE__CLIENT__MESSAGES__READ_STREAM_EVENTS_COMPLETED__READ_STREAM_RESULT__Success, 0, 0, 0, 0, NULL } + + +struct _EventStore__Client__Messages__ReadAllEvents +{ + ProtobufCMessage base; + int64_t commit_position; + int64_t prepare_position; + int32_t max_count; + protobuf_c_boolean resolve_link_tos; + protobuf_c_boolean require_master; +}; +#define EVENT_STORE__CLIENT__MESSAGES__READ_ALL_EVENTS__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__read_all_events__descriptor) \ + , 0, 0, 0, 0, 0 } + + +struct _EventStore__Client__Messages__ReadAllEventsCompleted +{ + ProtobufCMessage base; + int64_t commit_position; + int64_t prepare_position; + size_t n_events; + EventStore__Client__Messages__ResolvedEvent **events; + int64_t next_commit_position; + int64_t next_prepare_position; + protobuf_c_boolean has_result; + EventStore__Client__Messages__ReadAllEventsCompleted__ReadAllResult result; + char *error; +}; +#define EVENT_STORE__CLIENT__MESSAGES__READ_ALL_EVENTS_COMPLETED__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__read_all_events_completed__descriptor) \ + , 0, 0, 0,NULL, 0, 0, 0, EVENT_STORE__CLIENT__MESSAGES__READ_ALL_EVENTS_COMPLETED__READ_ALL_RESULT__Success, NULL } + + +struct _EventStore__Client__Messages__CreatePersistentSubscription +{ + ProtobufCMessage base; + char *subscription_group_name; + char *event_stream_id; + protobuf_c_boolean resolve_link_tos; + int64_t start_from; + int32_t message_timeout_milliseconds; + protobuf_c_boolean record_statistics; + int32_t live_buffer_size; + int32_t read_batch_size; + int32_t buffer_size; + int32_t max_retry_count; + protobuf_c_boolean prefer_round_robin; + int32_t checkpoint_after_time; + int32_t checkpoint_max_count; + int32_t checkpoint_min_count; + int32_t subscriber_max_count; + char *named_consumer_strategy; +}; +#define EVENT_STORE__CLIENT__MESSAGES__CREATE_PERSISTENT_SUBSCRIPTION__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__create_persistent_subscription__descriptor) \ + , NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL } + + +struct _EventStore__Client__Messages__DeletePersistentSubscription +{ + ProtobufCMessage base; + char *subscription_group_name; + char *event_stream_id; +}; +#define EVENT_STORE__CLIENT__MESSAGES__DELETE_PERSISTENT_SUBSCRIPTION__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__delete_persistent_subscription__descriptor) \ + , NULL, NULL } + + +struct _EventStore__Client__Messages__UpdatePersistentSubscription +{ + ProtobufCMessage base; + char *subscription_group_name; + char *event_stream_id; + protobuf_c_boolean resolve_link_tos; + int64_t start_from; + int32_t message_timeout_milliseconds; + protobuf_c_boolean record_statistics; + int32_t live_buffer_size; + int32_t read_batch_size; + int32_t buffer_size; + int32_t max_retry_count; + protobuf_c_boolean prefer_round_robin; + int32_t checkpoint_after_time; + int32_t checkpoint_max_count; + int32_t checkpoint_min_count; + int32_t subscriber_max_count; + char *named_consumer_strategy; +}; +#define EVENT_STORE__CLIENT__MESSAGES__UPDATE_PERSISTENT_SUBSCRIPTION__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__update_persistent_subscription__descriptor) \ + , NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL } + + +struct _EventStore__Client__Messages__UpdatePersistentSubscriptionCompleted +{ + ProtobufCMessage base; + EventStore__Client__Messages__UpdatePersistentSubscriptionCompleted__UpdatePersistentSubscriptionResult result; + char *reason; +}; +#define EVENT_STORE__CLIENT__MESSAGES__UPDATE_PERSISTENT_SUBSCRIPTION_COMPLETED__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__update_persistent_subscription_completed__descriptor) \ + , EVENT_STORE__CLIENT__MESSAGES__UPDATE_PERSISTENT_SUBSCRIPTION_COMPLETED__UPDATE_PERSISTENT_SUBSCRIPTION_RESULT__Success, NULL } + + +struct _EventStore__Client__Messages__CreatePersistentSubscriptionCompleted +{ + ProtobufCMessage base; + EventStore__Client__Messages__CreatePersistentSubscriptionCompleted__CreatePersistentSubscriptionResult result; + char *reason; +}; +#define EVENT_STORE__CLIENT__MESSAGES__CREATE_PERSISTENT_SUBSCRIPTION_COMPLETED__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__create_persistent_subscription_completed__descriptor) \ + , EVENT_STORE__CLIENT__MESSAGES__CREATE_PERSISTENT_SUBSCRIPTION_COMPLETED__CREATE_PERSISTENT_SUBSCRIPTION_RESULT__Success, NULL } + + +struct _EventStore__Client__Messages__DeletePersistentSubscriptionCompleted +{ + ProtobufCMessage base; + EventStore__Client__Messages__DeletePersistentSubscriptionCompleted__DeletePersistentSubscriptionResult result; + char *reason; +}; +#define EVENT_STORE__CLIENT__MESSAGES__DELETE_PERSISTENT_SUBSCRIPTION_COMPLETED__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__delete_persistent_subscription_completed__descriptor) \ + , EVENT_STORE__CLIENT__MESSAGES__DELETE_PERSISTENT_SUBSCRIPTION_COMPLETED__DELETE_PERSISTENT_SUBSCRIPTION_RESULT__Success, NULL } + + +struct _EventStore__Client__Messages__ConnectToPersistentSubscription +{ + ProtobufCMessage base; + char *subscription_id; + char *event_stream_id; + int32_t allowed_in_flight_messages; +}; +#define EVENT_STORE__CLIENT__MESSAGES__CONNECT_TO_PERSISTENT_SUBSCRIPTION__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__connect_to_persistent_subscription__descriptor) \ + , NULL, NULL, 0 } + + +struct _EventStore__Client__Messages__PersistentSubscriptionAckEvents +{ + ProtobufCMessage base; + char *subscription_id; + size_t n_processed_event_ids; + ProtobufCBinaryData *processed_event_ids; +}; +#define EVENT_STORE__CLIENT__MESSAGES__PERSISTENT_SUBSCRIPTION_ACK_EVENTS__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__persistent_subscription_ack_events__descriptor) \ + , NULL, 0,NULL } + + +struct _EventStore__Client__Messages__PersistentSubscriptionNakEvents +{ + ProtobufCMessage base; + char *subscription_id; + size_t n_processed_event_ids; + ProtobufCBinaryData *processed_event_ids; + char *message; + EventStore__Client__Messages__PersistentSubscriptionNakEvents__NakAction action; +}; +#define EVENT_STORE__CLIENT__MESSAGES__PERSISTENT_SUBSCRIPTION_NAK_EVENTS__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__persistent_subscription_nak_events__descriptor) \ + , NULL, 0,NULL, NULL, EVENT_STORE__CLIENT__MESSAGES__PERSISTENT_SUBSCRIPTION_NAK_EVENTS__NAK_ACTION__Unknown } + + +struct _EventStore__Client__Messages__PersistentSubscriptionConfirmation +{ + ProtobufCMessage base; + int64_t last_commit_position; + char *subscription_id; + protobuf_c_boolean has_last_event_number; + int64_t last_event_number; +}; +#define EVENT_STORE__CLIENT__MESSAGES__PERSISTENT_SUBSCRIPTION_CONFIRMATION__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__persistent_subscription_confirmation__descriptor) \ + , 0, NULL, 0, 0 } + + +struct _EventStore__Client__Messages__PersistentSubscriptionStreamEventAppeared +{ + ProtobufCMessage base; + EventStore__Client__Messages__ResolvedIndexedEvent *event; +}; +#define EVENT_STORE__CLIENT__MESSAGES__PERSISTENT_SUBSCRIPTION_STREAM_EVENT_APPEARED__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__persistent_subscription_stream_event_appeared__descriptor) \ + , NULL } + + +struct _EventStore__Client__Messages__SubscribeToStream +{ + ProtobufCMessage base; + char *event_stream_id; + protobuf_c_boolean resolve_link_tos; +}; +#define EVENT_STORE__CLIENT__MESSAGES__SUBSCRIBE_TO_STREAM__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__subscribe_to_stream__descriptor) \ + , NULL, 0 } + + +struct _EventStore__Client__Messages__SubscriptionConfirmation +{ + ProtobufCMessage base; + int64_t last_commit_position; + protobuf_c_boolean has_last_event_number; + int64_t last_event_number; +}; +#define EVENT_STORE__CLIENT__MESSAGES__SUBSCRIPTION_CONFIRMATION__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__subscription_confirmation__descriptor) \ + , 0, 0, 0 } + + +struct _EventStore__Client__Messages__StreamEventAppeared +{ + ProtobufCMessage base; + EventStore__Client__Messages__ResolvedEvent *event; +}; +#define EVENT_STORE__CLIENT__MESSAGES__STREAM_EVENT_APPEARED__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__stream_event_appeared__descriptor) \ + , NULL } + + +struct _EventStore__Client__Messages__UnsubscribeFromStream +{ + ProtobufCMessage base; +}; +#define EVENT_STORE__CLIENT__MESSAGES__UNSUBSCRIBE_FROM_STREAM__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__unsubscribe_from_stream__descriptor) \ + } + + +struct _EventStore__Client__Messages__SubscriptionDropped +{ + ProtobufCMessage base; + protobuf_c_boolean has_reason; + EventStore__Client__Messages__SubscriptionDropped__SubscriptionDropReason reason; +}; +#define EVENT_STORE__CLIENT__MESSAGES__SUBSCRIPTION_DROPPED__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__subscription_dropped__descriptor) \ + , 0, EVENT_STORE__CLIENT__MESSAGES__SUBSCRIPTION_DROPPED__SUBSCRIPTION_DROP_REASON__Unsubscribed } + + +struct _EventStore__Client__Messages__NotHandled__MasterInfo +{ + ProtobufCMessage base; + char *external_tcp_address; + int32_t external_tcp_port; + char *external_http_address; + int32_t external_http_port; + char *external_secure_tcp_address; + protobuf_c_boolean has_external_secure_tcp_port; + int32_t external_secure_tcp_port; +}; +#define EVENT_STORE__CLIENT__MESSAGES__NOT_HANDLED__MASTER_INFO__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__not_handled__master_info__descriptor) \ + , NULL, 0, NULL, 0, NULL, 0, 0 } + + +struct _EventStore__Client__Messages__NotHandled +{ + ProtobufCMessage base; + EventStore__Client__Messages__NotHandled__NotHandledReason reason; + protobuf_c_boolean has_additional_info; + ProtobufCBinaryData additional_info; +}; +#define EVENT_STORE__CLIENT__MESSAGES__NOT_HANDLED__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__not_handled__descriptor) \ + , EVENT_STORE__CLIENT__MESSAGES__NOT_HANDLED__NOT_HANDLED_REASON__NotReady, 0, {0,NULL} } + + +struct _EventStore__Client__Messages__ScavengeDatabase +{ + ProtobufCMessage base; +}; +#define EVENT_STORE__CLIENT__MESSAGES__SCAVENGE_DATABASE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__scavenge_database__descriptor) \ + } + + +struct _EventStore__Client__Messages__ScavengeDatabaseCompleted +{ + ProtobufCMessage base; + EventStore__Client__Messages__ScavengeDatabaseCompleted__ScavengeResult result; + char *error; + int32_t total_time_ms; + int64_t total_space_saved; +}; +#define EVENT_STORE__CLIENT__MESSAGES__SCAVENGE_DATABASE_COMPLETED__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__scavenge_database_completed__descriptor) \ + , EVENT_STORE__CLIENT__MESSAGES__SCAVENGE_DATABASE_COMPLETED__SCAVENGE_RESULT__Success, NULL, 0, 0 } + + +struct _EventStore__Client__Messages__IdentifyClient +{ + ProtobufCMessage base; + int32_t version; + char *connection_name; +}; +#define EVENT_STORE__CLIENT__MESSAGES__IDENTIFY_CLIENT__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__identify_client__descriptor) \ + , 0, NULL } + + +struct _EventStore__Client__Messages__ClientIdentified +{ + ProtobufCMessage base; +}; +#define EVENT_STORE__CLIENT__MESSAGES__CLIENT_IDENTIFIED__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&event_store__client__messages__client_identified__descriptor) \ + } + + +/* EventStore__Client__Messages__NewEvent methods */ +void event_store__client__messages__new_event__init + (EventStore__Client__Messages__NewEvent *message); +size_t event_store__client__messages__new_event__get_packed_size + (const EventStore__Client__Messages__NewEvent *message); +size_t event_store__client__messages__new_event__pack + (const EventStore__Client__Messages__NewEvent *message, + uint8_t *out); +size_t event_store__client__messages__new_event__pack_to_buffer + (const EventStore__Client__Messages__NewEvent *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__NewEvent * + event_store__client__messages__new_event__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__new_event__free_unpacked + (EventStore__Client__Messages__NewEvent *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__EventRecord methods */ +void event_store__client__messages__event_record__init + (EventStore__Client__Messages__EventRecord *message); +size_t event_store__client__messages__event_record__get_packed_size + (const EventStore__Client__Messages__EventRecord *message); +size_t event_store__client__messages__event_record__pack + (const EventStore__Client__Messages__EventRecord *message, + uint8_t *out); +size_t event_store__client__messages__event_record__pack_to_buffer + (const EventStore__Client__Messages__EventRecord *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__EventRecord * + event_store__client__messages__event_record__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__event_record__free_unpacked + (EventStore__Client__Messages__EventRecord *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__ResolvedIndexedEvent methods */ +void event_store__client__messages__resolved_indexed_event__init + (EventStore__Client__Messages__ResolvedIndexedEvent *message); +size_t event_store__client__messages__resolved_indexed_event__get_packed_size + (const EventStore__Client__Messages__ResolvedIndexedEvent *message); +size_t event_store__client__messages__resolved_indexed_event__pack + (const EventStore__Client__Messages__ResolvedIndexedEvent *message, + uint8_t *out); +size_t event_store__client__messages__resolved_indexed_event__pack_to_buffer + (const EventStore__Client__Messages__ResolvedIndexedEvent *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__ResolvedIndexedEvent * + event_store__client__messages__resolved_indexed_event__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__resolved_indexed_event__free_unpacked + (EventStore__Client__Messages__ResolvedIndexedEvent *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__ResolvedEvent methods */ +void event_store__client__messages__resolved_event__init + (EventStore__Client__Messages__ResolvedEvent *message); +size_t event_store__client__messages__resolved_event__get_packed_size + (const EventStore__Client__Messages__ResolvedEvent *message); +size_t event_store__client__messages__resolved_event__pack + (const EventStore__Client__Messages__ResolvedEvent *message, + uint8_t *out); +size_t event_store__client__messages__resolved_event__pack_to_buffer + (const EventStore__Client__Messages__ResolvedEvent *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__ResolvedEvent * + event_store__client__messages__resolved_event__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__resolved_event__free_unpacked + (EventStore__Client__Messages__ResolvedEvent *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__WriteEvents methods */ +void event_store__client__messages__write_events__init + (EventStore__Client__Messages__WriteEvents *message); +size_t event_store__client__messages__write_events__get_packed_size + (const EventStore__Client__Messages__WriteEvents *message); +size_t event_store__client__messages__write_events__pack + (const EventStore__Client__Messages__WriteEvents *message, + uint8_t *out); +size_t event_store__client__messages__write_events__pack_to_buffer + (const EventStore__Client__Messages__WriteEvents *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__WriteEvents * + event_store__client__messages__write_events__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__write_events__free_unpacked + (EventStore__Client__Messages__WriteEvents *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__WriteEventsCompleted methods */ +void event_store__client__messages__write_events_completed__init + (EventStore__Client__Messages__WriteEventsCompleted *message); +size_t event_store__client__messages__write_events_completed__get_packed_size + (const EventStore__Client__Messages__WriteEventsCompleted *message); +size_t event_store__client__messages__write_events_completed__pack + (const EventStore__Client__Messages__WriteEventsCompleted *message, + uint8_t *out); +size_t event_store__client__messages__write_events_completed__pack_to_buffer + (const EventStore__Client__Messages__WriteEventsCompleted *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__WriteEventsCompleted * + event_store__client__messages__write_events_completed__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__write_events_completed__free_unpacked + (EventStore__Client__Messages__WriteEventsCompleted *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__DeleteStream methods */ +void event_store__client__messages__delete_stream__init + (EventStore__Client__Messages__DeleteStream *message); +size_t event_store__client__messages__delete_stream__get_packed_size + (const EventStore__Client__Messages__DeleteStream *message); +size_t event_store__client__messages__delete_stream__pack + (const EventStore__Client__Messages__DeleteStream *message, + uint8_t *out); +size_t event_store__client__messages__delete_stream__pack_to_buffer + (const EventStore__Client__Messages__DeleteStream *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__DeleteStream * + event_store__client__messages__delete_stream__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__delete_stream__free_unpacked + (EventStore__Client__Messages__DeleteStream *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__DeleteStreamCompleted methods */ +void event_store__client__messages__delete_stream_completed__init + (EventStore__Client__Messages__DeleteStreamCompleted *message); +size_t event_store__client__messages__delete_stream_completed__get_packed_size + (const EventStore__Client__Messages__DeleteStreamCompleted *message); +size_t event_store__client__messages__delete_stream_completed__pack + (const EventStore__Client__Messages__DeleteStreamCompleted *message, + uint8_t *out); +size_t event_store__client__messages__delete_stream_completed__pack_to_buffer + (const EventStore__Client__Messages__DeleteStreamCompleted *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__DeleteStreamCompleted * + event_store__client__messages__delete_stream_completed__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__delete_stream_completed__free_unpacked + (EventStore__Client__Messages__DeleteStreamCompleted *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__TransactionStart methods */ +void event_store__client__messages__transaction_start__init + (EventStore__Client__Messages__TransactionStart *message); +size_t event_store__client__messages__transaction_start__get_packed_size + (const EventStore__Client__Messages__TransactionStart *message); +size_t event_store__client__messages__transaction_start__pack + (const EventStore__Client__Messages__TransactionStart *message, + uint8_t *out); +size_t event_store__client__messages__transaction_start__pack_to_buffer + (const EventStore__Client__Messages__TransactionStart *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__TransactionStart * + event_store__client__messages__transaction_start__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__transaction_start__free_unpacked + (EventStore__Client__Messages__TransactionStart *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__TransactionStartCompleted methods */ +void event_store__client__messages__transaction_start_completed__init + (EventStore__Client__Messages__TransactionStartCompleted *message); +size_t event_store__client__messages__transaction_start_completed__get_packed_size + (const EventStore__Client__Messages__TransactionStartCompleted *message); +size_t event_store__client__messages__transaction_start_completed__pack + (const EventStore__Client__Messages__TransactionStartCompleted *message, + uint8_t *out); +size_t event_store__client__messages__transaction_start_completed__pack_to_buffer + (const EventStore__Client__Messages__TransactionStartCompleted *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__TransactionStartCompleted * + event_store__client__messages__transaction_start_completed__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__transaction_start_completed__free_unpacked + (EventStore__Client__Messages__TransactionStartCompleted *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__TransactionWrite methods */ +void event_store__client__messages__transaction_write__init + (EventStore__Client__Messages__TransactionWrite *message); +size_t event_store__client__messages__transaction_write__get_packed_size + (const EventStore__Client__Messages__TransactionWrite *message); +size_t event_store__client__messages__transaction_write__pack + (const EventStore__Client__Messages__TransactionWrite *message, + uint8_t *out); +size_t event_store__client__messages__transaction_write__pack_to_buffer + (const EventStore__Client__Messages__TransactionWrite *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__TransactionWrite * + event_store__client__messages__transaction_write__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__transaction_write__free_unpacked + (EventStore__Client__Messages__TransactionWrite *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__TransactionWriteCompleted methods */ +void event_store__client__messages__transaction_write_completed__init + (EventStore__Client__Messages__TransactionWriteCompleted *message); +size_t event_store__client__messages__transaction_write_completed__get_packed_size + (const EventStore__Client__Messages__TransactionWriteCompleted *message); +size_t event_store__client__messages__transaction_write_completed__pack + (const EventStore__Client__Messages__TransactionWriteCompleted *message, + uint8_t *out); +size_t event_store__client__messages__transaction_write_completed__pack_to_buffer + (const EventStore__Client__Messages__TransactionWriteCompleted *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__TransactionWriteCompleted * + event_store__client__messages__transaction_write_completed__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__transaction_write_completed__free_unpacked + (EventStore__Client__Messages__TransactionWriteCompleted *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__TransactionCommit methods */ +void event_store__client__messages__transaction_commit__init + (EventStore__Client__Messages__TransactionCommit *message); +size_t event_store__client__messages__transaction_commit__get_packed_size + (const EventStore__Client__Messages__TransactionCommit *message); +size_t event_store__client__messages__transaction_commit__pack + (const EventStore__Client__Messages__TransactionCommit *message, + uint8_t *out); +size_t event_store__client__messages__transaction_commit__pack_to_buffer + (const EventStore__Client__Messages__TransactionCommit *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__TransactionCommit * + event_store__client__messages__transaction_commit__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__transaction_commit__free_unpacked + (EventStore__Client__Messages__TransactionCommit *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__TransactionCommitCompleted methods */ +void event_store__client__messages__transaction_commit_completed__init + (EventStore__Client__Messages__TransactionCommitCompleted *message); +size_t event_store__client__messages__transaction_commit_completed__get_packed_size + (const EventStore__Client__Messages__TransactionCommitCompleted *message); +size_t event_store__client__messages__transaction_commit_completed__pack + (const EventStore__Client__Messages__TransactionCommitCompleted *message, + uint8_t *out); +size_t event_store__client__messages__transaction_commit_completed__pack_to_buffer + (const EventStore__Client__Messages__TransactionCommitCompleted *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__TransactionCommitCompleted * + event_store__client__messages__transaction_commit_completed__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__transaction_commit_completed__free_unpacked + (EventStore__Client__Messages__TransactionCommitCompleted *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__ReadEvent methods */ +void event_store__client__messages__read_event__init + (EventStore__Client__Messages__ReadEvent *message); +size_t event_store__client__messages__read_event__get_packed_size + (const EventStore__Client__Messages__ReadEvent *message); +size_t event_store__client__messages__read_event__pack + (const EventStore__Client__Messages__ReadEvent *message, + uint8_t *out); +size_t event_store__client__messages__read_event__pack_to_buffer + (const EventStore__Client__Messages__ReadEvent *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__ReadEvent * + event_store__client__messages__read_event__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__read_event__free_unpacked + (EventStore__Client__Messages__ReadEvent *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__ReadEventCompleted methods */ +void event_store__client__messages__read_event_completed__init + (EventStore__Client__Messages__ReadEventCompleted *message); +size_t event_store__client__messages__read_event_completed__get_packed_size + (const EventStore__Client__Messages__ReadEventCompleted *message); +size_t event_store__client__messages__read_event_completed__pack + (const EventStore__Client__Messages__ReadEventCompleted *message, + uint8_t *out); +size_t event_store__client__messages__read_event_completed__pack_to_buffer + (const EventStore__Client__Messages__ReadEventCompleted *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__ReadEventCompleted * + event_store__client__messages__read_event_completed__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__read_event_completed__free_unpacked + (EventStore__Client__Messages__ReadEventCompleted *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__ReadStreamEvents methods */ +void event_store__client__messages__read_stream_events__init + (EventStore__Client__Messages__ReadStreamEvents *message); +size_t event_store__client__messages__read_stream_events__get_packed_size + (const EventStore__Client__Messages__ReadStreamEvents *message); +size_t event_store__client__messages__read_stream_events__pack + (const EventStore__Client__Messages__ReadStreamEvents *message, + uint8_t *out); +size_t event_store__client__messages__read_stream_events__pack_to_buffer + (const EventStore__Client__Messages__ReadStreamEvents *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__ReadStreamEvents * + event_store__client__messages__read_stream_events__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__read_stream_events__free_unpacked + (EventStore__Client__Messages__ReadStreamEvents *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__ReadStreamEventsCompleted methods */ +void event_store__client__messages__read_stream_events_completed__init + (EventStore__Client__Messages__ReadStreamEventsCompleted *message); +size_t event_store__client__messages__read_stream_events_completed__get_packed_size + (const EventStore__Client__Messages__ReadStreamEventsCompleted *message); +size_t event_store__client__messages__read_stream_events_completed__pack + (const EventStore__Client__Messages__ReadStreamEventsCompleted *message, + uint8_t *out); +size_t event_store__client__messages__read_stream_events_completed__pack_to_buffer + (const EventStore__Client__Messages__ReadStreamEventsCompleted *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__ReadStreamEventsCompleted * + event_store__client__messages__read_stream_events_completed__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__read_stream_events_completed__free_unpacked + (EventStore__Client__Messages__ReadStreamEventsCompleted *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__ReadAllEvents methods */ +void event_store__client__messages__read_all_events__init + (EventStore__Client__Messages__ReadAllEvents *message); +size_t event_store__client__messages__read_all_events__get_packed_size + (const EventStore__Client__Messages__ReadAllEvents *message); +size_t event_store__client__messages__read_all_events__pack + (const EventStore__Client__Messages__ReadAllEvents *message, + uint8_t *out); +size_t event_store__client__messages__read_all_events__pack_to_buffer + (const EventStore__Client__Messages__ReadAllEvents *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__ReadAllEvents * + event_store__client__messages__read_all_events__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__read_all_events__free_unpacked + (EventStore__Client__Messages__ReadAllEvents *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__ReadAllEventsCompleted methods */ +void event_store__client__messages__read_all_events_completed__init + (EventStore__Client__Messages__ReadAllEventsCompleted *message); +size_t event_store__client__messages__read_all_events_completed__get_packed_size + (const EventStore__Client__Messages__ReadAllEventsCompleted *message); +size_t event_store__client__messages__read_all_events_completed__pack + (const EventStore__Client__Messages__ReadAllEventsCompleted *message, + uint8_t *out); +size_t event_store__client__messages__read_all_events_completed__pack_to_buffer + (const EventStore__Client__Messages__ReadAllEventsCompleted *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__ReadAllEventsCompleted * + event_store__client__messages__read_all_events_completed__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__read_all_events_completed__free_unpacked + (EventStore__Client__Messages__ReadAllEventsCompleted *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__CreatePersistentSubscription methods */ +void event_store__client__messages__create_persistent_subscription__init + (EventStore__Client__Messages__CreatePersistentSubscription *message); +size_t event_store__client__messages__create_persistent_subscription__get_packed_size + (const EventStore__Client__Messages__CreatePersistentSubscription *message); +size_t event_store__client__messages__create_persistent_subscription__pack + (const EventStore__Client__Messages__CreatePersistentSubscription *message, + uint8_t *out); +size_t event_store__client__messages__create_persistent_subscription__pack_to_buffer + (const EventStore__Client__Messages__CreatePersistentSubscription *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__CreatePersistentSubscription * + event_store__client__messages__create_persistent_subscription__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__create_persistent_subscription__free_unpacked + (EventStore__Client__Messages__CreatePersistentSubscription *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__DeletePersistentSubscription methods */ +void event_store__client__messages__delete_persistent_subscription__init + (EventStore__Client__Messages__DeletePersistentSubscription *message); +size_t event_store__client__messages__delete_persistent_subscription__get_packed_size + (const EventStore__Client__Messages__DeletePersistentSubscription *message); +size_t event_store__client__messages__delete_persistent_subscription__pack + (const EventStore__Client__Messages__DeletePersistentSubscription *message, + uint8_t *out); +size_t event_store__client__messages__delete_persistent_subscription__pack_to_buffer + (const EventStore__Client__Messages__DeletePersistentSubscription *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__DeletePersistentSubscription * + event_store__client__messages__delete_persistent_subscription__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__delete_persistent_subscription__free_unpacked + (EventStore__Client__Messages__DeletePersistentSubscription *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__UpdatePersistentSubscription methods */ +void event_store__client__messages__update_persistent_subscription__init + (EventStore__Client__Messages__UpdatePersistentSubscription *message); +size_t event_store__client__messages__update_persistent_subscription__get_packed_size + (const EventStore__Client__Messages__UpdatePersistentSubscription *message); +size_t event_store__client__messages__update_persistent_subscription__pack + (const EventStore__Client__Messages__UpdatePersistentSubscription *message, + uint8_t *out); +size_t event_store__client__messages__update_persistent_subscription__pack_to_buffer + (const EventStore__Client__Messages__UpdatePersistentSubscription *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__UpdatePersistentSubscription * + event_store__client__messages__update_persistent_subscription__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__update_persistent_subscription__free_unpacked + (EventStore__Client__Messages__UpdatePersistentSubscription *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__UpdatePersistentSubscriptionCompleted methods */ +void event_store__client__messages__update_persistent_subscription_completed__init + (EventStore__Client__Messages__UpdatePersistentSubscriptionCompleted *message); +size_t event_store__client__messages__update_persistent_subscription_completed__get_packed_size + (const EventStore__Client__Messages__UpdatePersistentSubscriptionCompleted *message); +size_t event_store__client__messages__update_persistent_subscription_completed__pack + (const EventStore__Client__Messages__UpdatePersistentSubscriptionCompleted *message, + uint8_t *out); +size_t event_store__client__messages__update_persistent_subscription_completed__pack_to_buffer + (const EventStore__Client__Messages__UpdatePersistentSubscriptionCompleted *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__UpdatePersistentSubscriptionCompleted * + event_store__client__messages__update_persistent_subscription_completed__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__update_persistent_subscription_completed__free_unpacked + (EventStore__Client__Messages__UpdatePersistentSubscriptionCompleted *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__CreatePersistentSubscriptionCompleted methods */ +void event_store__client__messages__create_persistent_subscription_completed__init + (EventStore__Client__Messages__CreatePersistentSubscriptionCompleted *message); +size_t event_store__client__messages__create_persistent_subscription_completed__get_packed_size + (const EventStore__Client__Messages__CreatePersistentSubscriptionCompleted *message); +size_t event_store__client__messages__create_persistent_subscription_completed__pack + (const EventStore__Client__Messages__CreatePersistentSubscriptionCompleted *message, + uint8_t *out); +size_t event_store__client__messages__create_persistent_subscription_completed__pack_to_buffer + (const EventStore__Client__Messages__CreatePersistentSubscriptionCompleted *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__CreatePersistentSubscriptionCompleted * + event_store__client__messages__create_persistent_subscription_completed__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__create_persistent_subscription_completed__free_unpacked + (EventStore__Client__Messages__CreatePersistentSubscriptionCompleted *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__DeletePersistentSubscriptionCompleted methods */ +void event_store__client__messages__delete_persistent_subscription_completed__init + (EventStore__Client__Messages__DeletePersistentSubscriptionCompleted *message); +size_t event_store__client__messages__delete_persistent_subscription_completed__get_packed_size + (const EventStore__Client__Messages__DeletePersistentSubscriptionCompleted *message); +size_t event_store__client__messages__delete_persistent_subscription_completed__pack + (const EventStore__Client__Messages__DeletePersistentSubscriptionCompleted *message, + uint8_t *out); +size_t event_store__client__messages__delete_persistent_subscription_completed__pack_to_buffer + (const EventStore__Client__Messages__DeletePersistentSubscriptionCompleted *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__DeletePersistentSubscriptionCompleted * + event_store__client__messages__delete_persistent_subscription_completed__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__delete_persistent_subscription_completed__free_unpacked + (EventStore__Client__Messages__DeletePersistentSubscriptionCompleted *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__ConnectToPersistentSubscription methods */ +void event_store__client__messages__connect_to_persistent_subscription__init + (EventStore__Client__Messages__ConnectToPersistentSubscription *message); +size_t event_store__client__messages__connect_to_persistent_subscription__get_packed_size + (const EventStore__Client__Messages__ConnectToPersistentSubscription *message); +size_t event_store__client__messages__connect_to_persistent_subscription__pack + (const EventStore__Client__Messages__ConnectToPersistentSubscription *message, + uint8_t *out); +size_t event_store__client__messages__connect_to_persistent_subscription__pack_to_buffer + (const EventStore__Client__Messages__ConnectToPersistentSubscription *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__ConnectToPersistentSubscription * + event_store__client__messages__connect_to_persistent_subscription__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__connect_to_persistent_subscription__free_unpacked + (EventStore__Client__Messages__ConnectToPersistentSubscription *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__PersistentSubscriptionAckEvents methods */ +void event_store__client__messages__persistent_subscription_ack_events__init + (EventStore__Client__Messages__PersistentSubscriptionAckEvents *message); +size_t event_store__client__messages__persistent_subscription_ack_events__get_packed_size + (const EventStore__Client__Messages__PersistentSubscriptionAckEvents *message); +size_t event_store__client__messages__persistent_subscription_ack_events__pack + (const EventStore__Client__Messages__PersistentSubscriptionAckEvents *message, + uint8_t *out); +size_t event_store__client__messages__persistent_subscription_ack_events__pack_to_buffer + (const EventStore__Client__Messages__PersistentSubscriptionAckEvents *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__PersistentSubscriptionAckEvents * + event_store__client__messages__persistent_subscription_ack_events__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__persistent_subscription_ack_events__free_unpacked + (EventStore__Client__Messages__PersistentSubscriptionAckEvents *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__PersistentSubscriptionNakEvents methods */ +void event_store__client__messages__persistent_subscription_nak_events__init + (EventStore__Client__Messages__PersistentSubscriptionNakEvents *message); +size_t event_store__client__messages__persistent_subscription_nak_events__get_packed_size + (const EventStore__Client__Messages__PersistentSubscriptionNakEvents *message); +size_t event_store__client__messages__persistent_subscription_nak_events__pack + (const EventStore__Client__Messages__PersistentSubscriptionNakEvents *message, + uint8_t *out); +size_t event_store__client__messages__persistent_subscription_nak_events__pack_to_buffer + (const EventStore__Client__Messages__PersistentSubscriptionNakEvents *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__PersistentSubscriptionNakEvents * + event_store__client__messages__persistent_subscription_nak_events__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__persistent_subscription_nak_events__free_unpacked + (EventStore__Client__Messages__PersistentSubscriptionNakEvents *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__PersistentSubscriptionConfirmation methods */ +void event_store__client__messages__persistent_subscription_confirmation__init + (EventStore__Client__Messages__PersistentSubscriptionConfirmation *message); +size_t event_store__client__messages__persistent_subscription_confirmation__get_packed_size + (const EventStore__Client__Messages__PersistentSubscriptionConfirmation *message); +size_t event_store__client__messages__persistent_subscription_confirmation__pack + (const EventStore__Client__Messages__PersistentSubscriptionConfirmation *message, + uint8_t *out); +size_t event_store__client__messages__persistent_subscription_confirmation__pack_to_buffer + (const EventStore__Client__Messages__PersistentSubscriptionConfirmation *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__PersistentSubscriptionConfirmation * + event_store__client__messages__persistent_subscription_confirmation__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__persistent_subscription_confirmation__free_unpacked + (EventStore__Client__Messages__PersistentSubscriptionConfirmation *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__PersistentSubscriptionStreamEventAppeared methods */ +void event_store__client__messages__persistent_subscription_stream_event_appeared__init + (EventStore__Client__Messages__PersistentSubscriptionStreamEventAppeared *message); +size_t event_store__client__messages__persistent_subscription_stream_event_appeared__get_packed_size + (const EventStore__Client__Messages__PersistentSubscriptionStreamEventAppeared *message); +size_t event_store__client__messages__persistent_subscription_stream_event_appeared__pack + (const EventStore__Client__Messages__PersistentSubscriptionStreamEventAppeared *message, + uint8_t *out); +size_t event_store__client__messages__persistent_subscription_stream_event_appeared__pack_to_buffer + (const EventStore__Client__Messages__PersistentSubscriptionStreamEventAppeared *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__PersistentSubscriptionStreamEventAppeared * + event_store__client__messages__persistent_subscription_stream_event_appeared__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__persistent_subscription_stream_event_appeared__free_unpacked + (EventStore__Client__Messages__PersistentSubscriptionStreamEventAppeared *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__SubscribeToStream methods */ +void event_store__client__messages__subscribe_to_stream__init + (EventStore__Client__Messages__SubscribeToStream *message); +size_t event_store__client__messages__subscribe_to_stream__get_packed_size + (const EventStore__Client__Messages__SubscribeToStream *message); +size_t event_store__client__messages__subscribe_to_stream__pack + (const EventStore__Client__Messages__SubscribeToStream *message, + uint8_t *out); +size_t event_store__client__messages__subscribe_to_stream__pack_to_buffer + (const EventStore__Client__Messages__SubscribeToStream *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__SubscribeToStream * + event_store__client__messages__subscribe_to_stream__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__subscribe_to_stream__free_unpacked + (EventStore__Client__Messages__SubscribeToStream *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__SubscriptionConfirmation methods */ +void event_store__client__messages__subscription_confirmation__init + (EventStore__Client__Messages__SubscriptionConfirmation *message); +size_t event_store__client__messages__subscription_confirmation__get_packed_size + (const EventStore__Client__Messages__SubscriptionConfirmation *message); +size_t event_store__client__messages__subscription_confirmation__pack + (const EventStore__Client__Messages__SubscriptionConfirmation *message, + uint8_t *out); +size_t event_store__client__messages__subscription_confirmation__pack_to_buffer + (const EventStore__Client__Messages__SubscriptionConfirmation *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__SubscriptionConfirmation * + event_store__client__messages__subscription_confirmation__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__subscription_confirmation__free_unpacked + (EventStore__Client__Messages__SubscriptionConfirmation *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__StreamEventAppeared methods */ +void event_store__client__messages__stream_event_appeared__init + (EventStore__Client__Messages__StreamEventAppeared *message); +size_t event_store__client__messages__stream_event_appeared__get_packed_size + (const EventStore__Client__Messages__StreamEventAppeared *message); +size_t event_store__client__messages__stream_event_appeared__pack + (const EventStore__Client__Messages__StreamEventAppeared *message, + uint8_t *out); +size_t event_store__client__messages__stream_event_appeared__pack_to_buffer + (const EventStore__Client__Messages__StreamEventAppeared *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__StreamEventAppeared * + event_store__client__messages__stream_event_appeared__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__stream_event_appeared__free_unpacked + (EventStore__Client__Messages__StreamEventAppeared *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__UnsubscribeFromStream methods */ +void event_store__client__messages__unsubscribe_from_stream__init + (EventStore__Client__Messages__UnsubscribeFromStream *message); +size_t event_store__client__messages__unsubscribe_from_stream__get_packed_size + (const EventStore__Client__Messages__UnsubscribeFromStream *message); +size_t event_store__client__messages__unsubscribe_from_stream__pack + (const EventStore__Client__Messages__UnsubscribeFromStream *message, + uint8_t *out); +size_t event_store__client__messages__unsubscribe_from_stream__pack_to_buffer + (const EventStore__Client__Messages__UnsubscribeFromStream *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__UnsubscribeFromStream * + event_store__client__messages__unsubscribe_from_stream__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__unsubscribe_from_stream__free_unpacked + (EventStore__Client__Messages__UnsubscribeFromStream *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__SubscriptionDropped methods */ +void event_store__client__messages__subscription_dropped__init + (EventStore__Client__Messages__SubscriptionDropped *message); +size_t event_store__client__messages__subscription_dropped__get_packed_size + (const EventStore__Client__Messages__SubscriptionDropped *message); +size_t event_store__client__messages__subscription_dropped__pack + (const EventStore__Client__Messages__SubscriptionDropped *message, + uint8_t *out); +size_t event_store__client__messages__subscription_dropped__pack_to_buffer + (const EventStore__Client__Messages__SubscriptionDropped *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__SubscriptionDropped * + event_store__client__messages__subscription_dropped__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__subscription_dropped__free_unpacked + (EventStore__Client__Messages__SubscriptionDropped *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__NotHandled__MasterInfo methods */ +void event_store__client__messages__not_handled__master_info__init + (EventStore__Client__Messages__NotHandled__MasterInfo *message); +/* EventStore__Client__Messages__NotHandled methods */ +void event_store__client__messages__not_handled__init + (EventStore__Client__Messages__NotHandled *message); +size_t event_store__client__messages__not_handled__get_packed_size + (const EventStore__Client__Messages__NotHandled *message); +size_t event_store__client__messages__not_handled__pack + (const EventStore__Client__Messages__NotHandled *message, + uint8_t *out); +size_t event_store__client__messages__not_handled__pack_to_buffer + (const EventStore__Client__Messages__NotHandled *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__NotHandled * + event_store__client__messages__not_handled__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__not_handled__free_unpacked + (EventStore__Client__Messages__NotHandled *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__ScavengeDatabase methods */ +void event_store__client__messages__scavenge_database__init + (EventStore__Client__Messages__ScavengeDatabase *message); +size_t event_store__client__messages__scavenge_database__get_packed_size + (const EventStore__Client__Messages__ScavengeDatabase *message); +size_t event_store__client__messages__scavenge_database__pack + (const EventStore__Client__Messages__ScavengeDatabase *message, + uint8_t *out); +size_t event_store__client__messages__scavenge_database__pack_to_buffer + (const EventStore__Client__Messages__ScavengeDatabase *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__ScavengeDatabase * + event_store__client__messages__scavenge_database__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__scavenge_database__free_unpacked + (EventStore__Client__Messages__ScavengeDatabase *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__ScavengeDatabaseCompleted methods */ +void event_store__client__messages__scavenge_database_completed__init + (EventStore__Client__Messages__ScavengeDatabaseCompleted *message); +size_t event_store__client__messages__scavenge_database_completed__get_packed_size + (const EventStore__Client__Messages__ScavengeDatabaseCompleted *message); +size_t event_store__client__messages__scavenge_database_completed__pack + (const EventStore__Client__Messages__ScavengeDatabaseCompleted *message, + uint8_t *out); +size_t event_store__client__messages__scavenge_database_completed__pack_to_buffer + (const EventStore__Client__Messages__ScavengeDatabaseCompleted *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__ScavengeDatabaseCompleted * + event_store__client__messages__scavenge_database_completed__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__scavenge_database_completed__free_unpacked + (EventStore__Client__Messages__ScavengeDatabaseCompleted *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__IdentifyClient methods */ +void event_store__client__messages__identify_client__init + (EventStore__Client__Messages__IdentifyClient *message); +size_t event_store__client__messages__identify_client__get_packed_size + (const EventStore__Client__Messages__IdentifyClient *message); +size_t event_store__client__messages__identify_client__pack + (const EventStore__Client__Messages__IdentifyClient *message, + uint8_t *out); +size_t event_store__client__messages__identify_client__pack_to_buffer + (const EventStore__Client__Messages__IdentifyClient *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__IdentifyClient * + event_store__client__messages__identify_client__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__identify_client__free_unpacked + (EventStore__Client__Messages__IdentifyClient *message, + ProtobufCAllocator *allocator); +/* EventStore__Client__Messages__ClientIdentified methods */ +void event_store__client__messages__client_identified__init + (EventStore__Client__Messages__ClientIdentified *message); +size_t event_store__client__messages__client_identified__get_packed_size + (const EventStore__Client__Messages__ClientIdentified *message); +size_t event_store__client__messages__client_identified__pack + (const EventStore__Client__Messages__ClientIdentified *message, + uint8_t *out); +size_t event_store__client__messages__client_identified__pack_to_buffer + (const EventStore__Client__Messages__ClientIdentified *message, + ProtobufCBuffer *buffer); +EventStore__Client__Messages__ClientIdentified * + event_store__client__messages__client_identified__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void event_store__client__messages__client_identified__free_unpacked + (EventStore__Client__Messages__ClientIdentified *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*EventStore__Client__Messages__NewEvent_Closure) + (const EventStore__Client__Messages__NewEvent *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__EventRecord_Closure) + (const EventStore__Client__Messages__EventRecord *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__ResolvedIndexedEvent_Closure) + (const EventStore__Client__Messages__ResolvedIndexedEvent *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__ResolvedEvent_Closure) + (const EventStore__Client__Messages__ResolvedEvent *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__WriteEvents_Closure) + (const EventStore__Client__Messages__WriteEvents *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__WriteEventsCompleted_Closure) + (const EventStore__Client__Messages__WriteEventsCompleted *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__DeleteStream_Closure) + (const EventStore__Client__Messages__DeleteStream *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__DeleteStreamCompleted_Closure) + (const EventStore__Client__Messages__DeleteStreamCompleted *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__TransactionStart_Closure) + (const EventStore__Client__Messages__TransactionStart *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__TransactionStartCompleted_Closure) + (const EventStore__Client__Messages__TransactionStartCompleted *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__TransactionWrite_Closure) + (const EventStore__Client__Messages__TransactionWrite *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__TransactionWriteCompleted_Closure) + (const EventStore__Client__Messages__TransactionWriteCompleted *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__TransactionCommit_Closure) + (const EventStore__Client__Messages__TransactionCommit *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__TransactionCommitCompleted_Closure) + (const EventStore__Client__Messages__TransactionCommitCompleted *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__ReadEvent_Closure) + (const EventStore__Client__Messages__ReadEvent *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__ReadEventCompleted_Closure) + (const EventStore__Client__Messages__ReadEventCompleted *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__ReadStreamEvents_Closure) + (const EventStore__Client__Messages__ReadStreamEvents *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__ReadStreamEventsCompleted_Closure) + (const EventStore__Client__Messages__ReadStreamEventsCompleted *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__ReadAllEvents_Closure) + (const EventStore__Client__Messages__ReadAllEvents *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__ReadAllEventsCompleted_Closure) + (const EventStore__Client__Messages__ReadAllEventsCompleted *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__CreatePersistentSubscription_Closure) + (const EventStore__Client__Messages__CreatePersistentSubscription *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__DeletePersistentSubscription_Closure) + (const EventStore__Client__Messages__DeletePersistentSubscription *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__UpdatePersistentSubscription_Closure) + (const EventStore__Client__Messages__UpdatePersistentSubscription *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__UpdatePersistentSubscriptionCompleted_Closure) + (const EventStore__Client__Messages__UpdatePersistentSubscriptionCompleted *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__CreatePersistentSubscriptionCompleted_Closure) + (const EventStore__Client__Messages__CreatePersistentSubscriptionCompleted *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__DeletePersistentSubscriptionCompleted_Closure) + (const EventStore__Client__Messages__DeletePersistentSubscriptionCompleted *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__ConnectToPersistentSubscription_Closure) + (const EventStore__Client__Messages__ConnectToPersistentSubscription *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__PersistentSubscriptionAckEvents_Closure) + (const EventStore__Client__Messages__PersistentSubscriptionAckEvents *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__PersistentSubscriptionNakEvents_Closure) + (const EventStore__Client__Messages__PersistentSubscriptionNakEvents *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__PersistentSubscriptionConfirmation_Closure) + (const EventStore__Client__Messages__PersistentSubscriptionConfirmation *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__PersistentSubscriptionStreamEventAppeared_Closure) + (const EventStore__Client__Messages__PersistentSubscriptionStreamEventAppeared *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__SubscribeToStream_Closure) + (const EventStore__Client__Messages__SubscribeToStream *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__SubscriptionConfirmation_Closure) + (const EventStore__Client__Messages__SubscriptionConfirmation *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__StreamEventAppeared_Closure) + (const EventStore__Client__Messages__StreamEventAppeared *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__UnsubscribeFromStream_Closure) + (const EventStore__Client__Messages__UnsubscribeFromStream *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__SubscriptionDropped_Closure) + (const EventStore__Client__Messages__SubscriptionDropped *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__NotHandled__MasterInfo_Closure) + (const EventStore__Client__Messages__NotHandled__MasterInfo *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__NotHandled_Closure) + (const EventStore__Client__Messages__NotHandled *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__ScavengeDatabase_Closure) + (const EventStore__Client__Messages__ScavengeDatabase *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__ScavengeDatabaseCompleted_Closure) + (const EventStore__Client__Messages__ScavengeDatabaseCompleted *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__IdentifyClient_Closure) + (const EventStore__Client__Messages__IdentifyClient *message, + void *closure_data); +typedef void (*EventStore__Client__Messages__ClientIdentified_Closure) + (const EventStore__Client__Messages__ClientIdentified *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCEnumDescriptor event_store__client__messages__operation_result__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__new_event__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__event_record__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__resolved_indexed_event__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__resolved_event__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__write_events__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__write_events_completed__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__delete_stream__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__delete_stream_completed__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__transaction_start__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__transaction_start_completed__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__transaction_write__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__transaction_write_completed__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__transaction_commit__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__transaction_commit_completed__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__read_event__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__read_event_completed__descriptor; +extern const ProtobufCEnumDescriptor event_store__client__messages__read_event_completed__read_event_result__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__read_stream_events__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__read_stream_events_completed__descriptor; +extern const ProtobufCEnumDescriptor event_store__client__messages__read_stream_events_completed__read_stream_result__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__read_all_events__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__read_all_events_completed__descriptor; +extern const ProtobufCEnumDescriptor event_store__client__messages__read_all_events_completed__read_all_result__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__create_persistent_subscription__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__delete_persistent_subscription__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__update_persistent_subscription__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__update_persistent_subscription_completed__descriptor; +extern const ProtobufCEnumDescriptor event_store__client__messages__update_persistent_subscription_completed__update_persistent_subscription_result__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__create_persistent_subscription_completed__descriptor; +extern const ProtobufCEnumDescriptor event_store__client__messages__create_persistent_subscription_completed__create_persistent_subscription_result__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__delete_persistent_subscription_completed__descriptor; +extern const ProtobufCEnumDescriptor event_store__client__messages__delete_persistent_subscription_completed__delete_persistent_subscription_result__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__connect_to_persistent_subscription__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__persistent_subscription_ack_events__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__persistent_subscription_nak_events__descriptor; +extern const ProtobufCEnumDescriptor event_store__client__messages__persistent_subscription_nak_events__nak_action__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__persistent_subscription_confirmation__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__persistent_subscription_stream_event_appeared__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__subscribe_to_stream__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__subscription_confirmation__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__stream_event_appeared__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__unsubscribe_from_stream__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__subscription_dropped__descriptor; +extern const ProtobufCEnumDescriptor event_store__client__messages__subscription_dropped__subscription_drop_reason__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__not_handled__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__not_handled__master_info__descriptor; +extern const ProtobufCEnumDescriptor event_store__client__messages__not_handled__not_handled_reason__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__scavenge_database__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__scavenge_database_completed__descriptor; +extern const ProtobufCEnumDescriptor event_store__client__messages__scavenge_database_completed__scavenge_result__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__identify_client__descriptor; +extern const ProtobufCMessageDescriptor event_store__client__messages__client_identified__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_Protos_2fClientAPI_2fClientMessageDtos_2eproto__INCLUDED */ diff --git a/esc.c b/esc.c new file mode 100644 index 0000000..9e2bb91 --- /dev/null +++ b/esc.c @@ -0,0 +1,348 @@ +// +// Created by nicol on 2018-03-18. +// + +#include +#include +#include +#include +#include "esc.h" +#include "socket.h" +#include "uuid.h" +#include "ClientMessageDtos.pb-c.h" + +struct st_buffer { + uint32_t size; + uint8_t* data; +}; +typedef struct st_buffer buffer_t; + +const buffer_t buffer_create(uint32_t size) { + buffer_t buf = {size, malloc(size)}; + return buf; +} + +const buffer_t buffer_from(uint8_t* data, uint32_t size) { + buffer_t buf = {size, data}; + return buf; +} + +void buffer_free(buffer_t buffer) { + free(buffer.data); +} + +struct st_tcp_package { + uint8_t command; + uint8_t flags; + esc_uuid_t correlation_id; + const char* login; + const char* password; + buffer_t data; +}; +typedef struct st_tcp_package tcp_package_t; + +const uint32_t CommandOffset = 0; +const uint32_t FlagsOffset = 1; +const uint32_t CorrelationOffset = 2; +const uint32_t AuthOffset = 18; +const uint32_t MandatorySize = 18; + +const tcp_package_t* tcp_package_create(uint8_t command, const esc_uuid_t* correlation_id, buffer_t data) { + tcp_package_t* pkg = malloc(sizeof(tcp_package_t)); + pkg->command = command; + pkg->flags = 0; + pkg->correlation_id = *correlation_id; + pkg->login = 0; + pkg->password = 0; + pkg->data = data; + return pkg; +} + +const tcp_package_t* tcp_package_create_authenticated(uint8_t command, const esc_uuid_t* correlation_id, buffer_t data, const char* username, const char* password) { + tcp_package_t* pkg = malloc(sizeof(tcp_package_t)); + pkg->command = command; + pkg->flags = 1; + pkg->correlation_id = *correlation_id; + pkg->login = username; + pkg->password = password; + pkg->data = data; + return pkg; +} + +void tcp_package_free(const tcp_package_t* pkg) { + buffer_free(pkg->data); + free((void*)pkg); +} + +buffer_t tcp_package_to_buffer(const tcp_package_t* pkg) { + uint8_t* _dst = malloc(MandatorySize + pkg->data.size + (pkg->flags ? 257*2 : 0)); + _dst[CommandOffset] = pkg->command; + _dst[FlagsOffset] = pkg->flags; + memcpy(&_dst[CorrelationOffset], &pkg->correlation_id, sizeof(esc_uuid_t)); + size_t size = MandatorySize; + if (pkg->flags) { + size_t l_len = strlen(pkg->login); + _dst[AuthOffset] = l_len; + strcpy(&_dst[AuthOffset+1], pkg->login); + size_t p_len = strlen(pkg->password); + _dst[AuthOffset+1+l_len] = p_len; + strcpy(&_dst[AuthOffset+2+l_len], pkg->password); + memcpy(&_dst[AuthOffset+2+l_len+p_len], pkg->data.data, pkg->data.size); + size += 2 + l_len + p_len + pkg->data.size; + } else { + memcpy(&_dst[AuthOffset], pkg->data.data, pkg->data.size); + size += pkg->data.size; + } + return buffer_from(_dst, size); +} + +const tcp_package_t* tcp_package_from_buffer(buffer_t buffer) { + tcp_package_t* pkg = malloc(sizeof(tcp_package_t)); + pkg->command = buffer.data[CommandOffset]; + pkg->flags = buffer.data[FlagsOffset]; + memcpy(&pkg->correlation_id, &buffer.data[CorrelationOffset], sizeof(esc_uuid_t)); + if (pkg->flags) { + size_t l_len = buffer.data[AuthOffset]; + size_t p_len = buffer.data[AuthOffset+1+l_len]; + pkg->data = buffer_create(buffer.size - MandatorySize - 2 - l_len - p_len); + memcpy(pkg->data.data, &buffer.data[MandatorySize + 2 + l_len + p_len], buffer.size - MandatorySize - 2 - l_len - p_len); + } else { + pkg->login = 0; + pkg->password = 0; + pkg->data = buffer_create(buffer.size - MandatorySize); + memcpy(pkg->data.data, &buffer.data[MandatorySize], buffer.size - MandatorySize); + } + return pkg; +} + +struct st_connection_settings { + unsigned char use_ssl_connection; +}; + +const esc_connection_settings_t default_connection_settings = { +}; + +const esc_connection_settings_t* esc_default_connection_settings = &default_connection_settings; + +struct st_tcp_endpoint { + char* host; + unsigned short port; +}; +typedef struct st_tcp_endpoint tcp_endpoint_t; + +struct st_node_endpoints { + tcp_endpoint_t tcp_endpoint; + tcp_endpoint_t secure_tcp_endpoint; +}; +typedef struct st_node_endpoints node_endpoints_t; + +typedef const node_endpoints_t* (*endpoint_discoverer_t)(const void* discover_data, const tcp_endpoint_t* failed_tcp_endpoint); + +struct st_connection { + esc_connection_settings_t settings; + void* discoverer_data; + endpoint_discoverer_t discover; + socket_t tcp_conn; + ProtobufCAllocator protobuf_c_allocator; +}; + +struct st_static_endpoint_discoverer { + tcp_endpoint_t tcp_endpoint; + unsigned char use_ssl_connection; +}; +typedef struct st_static_endpoint_discoverer static_endpoint_discoverer_t; + +const node_endpoints_t* static_discover(const static_endpoint_discoverer_t* discover_data, const tcp_endpoint_t* failed_tcp_endpoint) { + node_endpoints_t* result = malloc(sizeof(node_endpoints_t)); + if (discover_data->use_ssl_connection) { + result->secure_tcp_endpoint = discover_data->tcp_endpoint; + } else { + result->tcp_endpoint = discover_data->tcp_endpoint; + } + return result; +} + +int connection_send_tcp_package(const esc_connection_t* conn, const tcp_package_t* pkg) { + char uuid_buf[37]; + printf("connection_send_tcp_package: %u %u %s %u\n", pkg->command, pkg->flags, esc_uuid_format(&pkg->correlation_id, uuid_buf, 37), pkg->data.size); + buffer_t send_buffer = tcp_package_to_buffer(pkg); + if (socket_send(conn->tcp_conn, (char *) &send_buffer.size, sizeof(uint32_t)) <= 0) { + buffer_free(send_buffer); + return -1; + } + if (socket_send(conn->tcp_conn, (char *) send_buffer.data, send_buffer.size) <= 0) { + buffer_free(send_buffer); + return -2; + } + buffer_free(send_buffer); + return 0; +} + +const tcp_package_t* connection_recv_tcp_package(const esc_connection_t* conn) { + uint32_t recv_size; + int rc; + if ((rc = socket_recv(conn->tcp_conn, (char *)&recv_size, sizeof(uint32_t))) != 4) { + printf("%d %d", rc, socket_error()); + return 0; + } + buffer_t recv_buffer = buffer_create(recv_size); + while(recv_size > 0) { + int pos = recv_buffer.size - recv_size; + rc = socket_recv(conn->tcp_conn, (char *)&recv_buffer.data[pos], recv_size); + recv_size -= rc; + } + const tcp_package_t* recv_pkg = tcp_package_from_buffer(recv_buffer); + buffer_free(recv_buffer); + char uuid_buf[37]; + printf("connection_recv_tcp_package: %u %u %s %u\n", recv_pkg->command, recv_pkg->flags, esc_uuid_format(&recv_pkg->correlation_id, uuid_buf, 37), recv_pkg->data.size); + //for (int32_t i=0;idata.size;i++) { + // printf("%x (%c) ", recv_pkg->data.data[i], recv_pkg->data.data[i]); + //} + //printf("\n"); + return recv_pkg; +} + +void* protobuf_c_alloc(void *alloc_data, size_t size) { + return malloc(size); +} + +void protobuf_c_free(void *alloc_data, void* p) { + free(p); +} + +const esc_connection_t* esc_connection_create(const esc_connection_settings_t* connection_settings, const char* addr, const char* connection_name) { + if (strncmp(addr, "tcp://", 6) != 0) { + return 0; + } + char* pos = strrchr(addr, ':'); + if (pos == 0) { + return 0; + } + char* host = malloc(pos - addr - 5); + strncpy(host, addr+6, pos-addr-6); + host[pos-addr-6] = 0; + unsigned short port = (unsigned short)atoi(pos+1); + static_endpoint_discoverer_t discover_data = { + {host, port}, connection_settings->use_ssl_connection + }; + struct st_connection* conn = malloc(sizeof(struct st_connection)); + conn->settings = *connection_settings; + conn->discoverer_data = malloc(sizeof(static_endpoint_discoverer_t)); + memcpy(conn->discoverer_data, &discover_data, sizeof(static_endpoint_discoverer_t)); + conn->discover = (endpoint_discoverer_t)static_discover; + conn->protobuf_c_allocator.alloc = protobuf_c_alloc; + conn->protobuf_c_allocator.free = protobuf_c_free; + conn->protobuf_c_allocator.allocator_data = 0; + return conn; +} + +// return 0 on success +// return non-zero on failure and sets last_error on connection +int esc_connection_connect(const esc_connection_t* conn) { + // Discover endpoint + const node_endpoints_t* endpoints = conn->discover(conn->discoverer_data, 0); + if (endpoints == 0) { + return -1; + } + // Establish Tcp Connection + esc_connection_t* _conn = (esc_connection_t*)conn; + _conn->tcp_conn = socket_create(SOCKET_TYPE_TCP); + tcp_endpoint_t endpoint = conn->settings.use_ssl_connection ? endpoints->secure_tcp_endpoint : endpoints->tcp_endpoint; + if (socket_connect(conn->tcp_conn, endpoint.host, endpoint.port) != 0) { + return -2; + } + // Identify + // build message + EventStore__Client__Messages__IdentifyClient identify_client; + event_store__client__messages__identify_client__init(&identify_client); + identify_client.connection_name = "abc123"; + identify_client.version = 1; + size_t s = event_store__client__messages__identify_client__get_packed_size(&identify_client); + uint8_t buffer[s]; + event_store__client__messages__identify_client__pack(&identify_client, buffer); + // build tcp_package + const tcp_package_t* send_pkg = tcp_package_create(0xF5, esc_uuid_create(), buffer_from(buffer, s)); + if (connection_send_tcp_package(conn, send_pkg) != 0) { + return -3; + } + const tcp_package_t* recv_pkg = connection_recv_tcp_package(conn); + if (recv_pkg == 0) { + return -4; + } + if (recv_pkg->command != 0xF6) { + return -5; + } + + return 0; +} + +const esc_credentials_t* esc_credentials_create(const char* username, const char* password) { + esc_credentials_t* creds = malloc(sizeof(struct st_credentials)); + creds->username = username; + creds->password = password; + return creds; +} + +const esc_recorded_event_t* recorded_event_create(EventStore__Client__Messages__EventRecord* msg) { + if (msg == 0) return 0; + esc_recorded_event_t* ev = malloc(sizeof(esc_recorded_event_t)); + ev->event_id = esc_uuid_from(msg->event_id.data, msg->event_id.len); + return ev; +} + +esc_resolved_event_t* resolved_event_create(EventStore__Client__Messages__ResolvedEvent* msg) { + esc_resolved_event_t* ev = malloc(sizeof(esc_resolved_event_t)); + ev->original_position.prepare_position = msg->prepare_position; + ev->original_position.commit_position = msg->commit_position; + ev->event = recorded_event_create(msg->event); + ev->link = recorded_event_create(msg->link); + return ev; +} + +const esc_all_events_slice_t* esc_connection_read_all_forward(const esc_connection_t* conn, const esc_position_t* last_checkpoint, unsigned int count, const esc_credentials_t* credentials) { + EventStore__Client__Messages__ReadAllEvents send_msg; + event_store__client__messages__read_all_events__init(&send_msg); + send_msg.prepare_position = last_checkpoint ? last_checkpoint->prepare_position : 0; + send_msg.commit_position = last_checkpoint ? last_checkpoint->commit_position : 0; + send_msg.max_count = count; + send_msg.require_master = 0; + send_msg.resolve_link_tos = 0; + size_t s = event_store__client__messages__read_all_events__get_packed_size(&send_msg); + uint8_t buffer[s]; + event_store__client__messages__read_all_events__pack(&send_msg, buffer); + const tcp_package_t* send_pkg = tcp_package_create_authenticated(0xB6, esc_uuid_create(), buffer_from(buffer, s), credentials->username, credentials->password); + if (connection_send_tcp_package(conn, send_pkg) != 0) { + return 0; + } + + const tcp_package_t* recv_pkg = connection_recv_tcp_package(conn); + if (recv_pkg == 0) { + return 0; + } + if (recv_pkg->command != 0xB7) { + return 0; + } + + EventStore__Client__Messages__ReadAllEventsCompleted *recv_msg = + event_store__client__messages__read_all_events_completed__unpack(&conn->protobuf_c_allocator, recv_pkg->data.size, recv_pkg->data.data); + + esc_all_events_slice_t* result = malloc(sizeof(esc_all_events_slice_t)); + result->read_direction = "forward"; + result->is_end_of_stream = (recv_msg->events == 0 || recv_msg->n_events == 0) ? 1 : 0; + result->from_position.prepare_position = recv_msg->prepare_position; + result->from_position.commit_position = recv_msg->commit_position; + result->next_position.prepare_position = recv_msg->next_prepare_position; + result->next_position.commit_position = recv_msg->next_commit_position; + result->n_events = recv_msg->n_events; + result->events = malloc(recv_msg->n_events * sizeof(esc_resolved_event_t*)); + for (size_t i = 0; i < recv_msg->n_events; i++) { + result->events[i] = resolved_event_create(recv_msg->events[i]); + } + + return result; +} + +const char* esc_position_format(const esc_position_t* position, char* buffer, size_t buf_size) { + snprintf(buffer, buf_size, "%llu/%llu", position->prepare_position, position->commit_position); + return buffer; +} diff --git a/esc.h b/esc.h new file mode 100644 index 0000000..26ab8c6 --- /dev/null +++ b/esc.h @@ -0,0 +1,58 @@ +// +// Created by nicol on 2018-03-18. +// + +#ifndef ESC_ESC_H +#define ESC_ESC_H + +#include "uuid.h" + +struct st_connection_settings; +typedef struct st_connection_settings esc_connection_settings_t; + +struct st_connection; +typedef struct st_connection esc_connection_t; + +struct st_credentials { + const char* username; + const char* password; +}; +typedef struct st_credentials esc_credentials_t; + +struct st_esc_position { + __int64 prepare_position; + __int64 commit_position; +}; +typedef struct st_esc_position esc_position_t; + +struct st_recorded_event { + const esc_uuid_t* event_id; +}; +typedef struct st_recorded_event esc_recorded_event_t; + +struct st_resolved_event { + const esc_recorded_event_t* event; + const esc_recorded_event_t* link; + esc_position_t original_position; +}; +typedef struct st_resolved_event esc_resolved_event_t; + +struct st_all_events_slice { + char* read_direction; + esc_position_t from_position; + esc_position_t next_position; + size_t n_events; + esc_resolved_event_t** events; + int is_end_of_stream; +}; +typedef struct st_all_events_slice esc_all_events_slice_t; + +const esc_connection_settings_t* esc_default_connection_settings; + +const esc_connection_t* esc_connection_create(const esc_connection_settings_t* connection_settings, const char* addr, const char* connection_name); +int esc_connection_connect(const esc_connection_t* conn); +const esc_credentials_t* esc_credentials_create(const char* username, const char* password); +const esc_all_events_slice_t* esc_connection_read_all_forward(const esc_connection_t* conn, const esc_position_t* last_checkpoint, unsigned int count, const esc_credentials_t* credentials); +const char* esc_position_format(const esc_position_t* position, char* buffer, size_t buf_size); + +#endif //ESC_ESC_H diff --git a/main.c b/main.c new file mode 100644 index 0000000..89b5993 --- /dev/null +++ b/main.c @@ -0,0 +1,84 @@ +#include + +#include "mutex.h" +#include "thread.h" +#include "socket.h" +#include "esc.h" + + +/* +unsigned long my_first_thread(void* arg) { + mutex_t mut = arg; + mutex_lock(mut); + printf("1\n"); + mutex_unlock(mut); + return 0; +} + +unsigned long my_second_thread(void* arg) { + mutex_t mut = arg; + mutex_lock(mut); + printf("2\n"); + mutex_unlock(mut); + return 0; +} +*/ + +int main() { +#ifdef _WIN32 + WSADATA wsaData; + WSAStartup(MAKEWORD(2,0), &wsaData); +#endif + + const esc_connection_t* conn = esc_connection_create(esc_default_connection_settings, "tcp://127.0.0.1:1113", NULL); + if (conn == 0) { + return -1; + } + if (esc_connection_connect(conn) != 0) { + return -2; + } + const esc_credentials_t* credentials = esc_credentials_create("admin", "changeit"); + const esc_all_events_slice_t* result = esc_connection_read_all_forward(conn, NULL, 1024, credentials); + if (result == 0) { + return -3; + } + char posbuf1[44]; + char posbuf2[44]; + printf("%s %s %s %u\n", result->read_direction, + esc_position_format(&result->from_position, posbuf1, 44), + esc_position_format(&result->next_position, posbuf2, 44), + result->is_end_of_stream); + char uuid_buf[37]; + for(size_t i = 0; i < result->n_events; i++) { + printf("%s\n", esc_uuid_format(result->events[i]->event->event_id, uuid_buf, 37)); + } + +/* + socket_t s = socket_create(IPPROTO_TCP); + socket_connect(s, "www.google.ca", 80); + char* req = "GET / HTTP/1.1\r\nHost: www.google.ca\r\nConnection: close\r\n\r\n"; + socket_send(s, req, strlen(req)); + char buffer[4096]; + memset(buffer, 0, 4096); + int rc; + while ((rc = socket_recv(s, buffer, 4096)) > 0) { + printf_s("%s", buffer); + memset(buffer, 0, 4096); + } + socket_close(s); + + mutex_t sync = mutex_create(); + thread_t one = thread_create(my_first_thread, sync); + thread_t two = thread_create(my_second_thread, sync); + thread_start(one); + thread_start(two); + printf("Hello, World!\n"); + thread_destroy(one); + thread_destroy(two); + mutex_destroy(sync); +*/ +#ifdef _WIN32 + WSACleanup(); +#endif + return 0; +} diff --git a/mutex.c b/mutex.c new file mode 100644 index 0000000..902431e --- /dev/null +++ b/mutex.c @@ -0,0 +1,28 @@ +// +// Created by nicol on 2018-03-18. +// + +#ifdef _WIN32 +#include +#endif +#include "mutex.h" + +#ifdef _WIN32 +mutex_t mutex_create() { + mutex_t mutex = malloc(sizeof(CRITICAL_SECTION)); + InitializeCriticalSection(mutex); + return mutex; +} + +void mutex_lock(mutex_t mutex) { + EnterCriticalSection(mutex); +} + +void mutex_unlock(mutex_t mutex) { + LeaveCriticalSection(mutex); +} + +void mutex_destroy(mutex_t mutex) { + DeleteCriticalSection(mutex); +} +#endif \ No newline at end of file diff --git a/mutex.h b/mutex.h new file mode 100644 index 0000000..fc2ec45 --- /dev/null +++ b/mutex.h @@ -0,0 +1,18 @@ +// +// Created by nicol on 2018-03-18. +// + +#ifndef ESC_MUTEX_H +#define ESC_MUTEX_H + +#ifdef _WIN32 +#include +typedef LPCRITICAL_SECTION mutex_t; +#endif + +mutex_t mutex_create(); +void mutex_lock(mutex_t mutex); +void mutex_unlock(mutex_t mutex); +void mutex_destroy(mutex_t mutex); + +#endif //ESC_MUTEX_H diff --git a/socket.c b/socket.c new file mode 100644 index 0000000..6b819a9 --- /dev/null +++ b/socket.c @@ -0,0 +1,61 @@ +// +// Created by nicol on 2018-03-18. +// + +#include "socket.h" + +#ifdef _WIN32 +#include +struct st_socket { + SOCKET s; + int af; + int type; + int proto; +}; + +socket_t socket_create(int type) { + if (type == SOCKET_TYPE_TCP) { + socket_t s = malloc(sizeof(struct st_socket)); + s->af = AF_INET; + s->type = SOCK_STREAM; + s->proto = IPPROTO_TCP; + s->s = socket(s->af, s->type, s->proto); + if (s->s == INVALID_SOCKET) { + free(s); + return NULL; + } + return s; + } + return NULL; +} + +void socket_close(socket_t s) { + closesocket(s->s); +} + +int socket_connect(socket_t s, char* addr, unsigned short port) { + char port_s[6]; + ADDRINFO hints; + memset(&hints, 0, sizeof(ADDRINFO)); + hints.ai_family = s->af; + hints.ai_socktype = s->type; + hints.ai_protocol = s->proto; + ADDRINFO* result; + if (getaddrinfo(addr, itoa(port, port_s, 10), &hints, &result) != 0) { + return -1; + } + return connect(s->s, result->ai_addr, (int)result->ai_addrlen); +} + +int socket_send(socket_t s, char* data, int len) { + return send(s->s, data, len, 0); +} + +int socket_recv(socket_t s, char* buf, int len) { + return recv(s->s, buf, len, 0); +} + +int socket_error() { + return WSAGetLastError(); +} +#endif \ No newline at end of file diff --git a/socket.h b/socket.h new file mode 100644 index 0000000..ec468f1 --- /dev/null +++ b/socket.h @@ -0,0 +1,23 @@ +// +// Created by nicol on 2018-03-18. +// + +#ifndef ESC_SOCKET_H +#define ESC_SOCKET_H + +struct st_socket; +typedef struct st_socket* socket_t; + +enum { + SOCKET_TYPE_TCP = 1, + SOCKET_TYPE_UDP = 2 +}; + +socket_t socket_create(int type); +void socket_close(socket_t s); +int socket_connect(socket_t s, char* addr, unsigned short port); +int socket_send(socket_t s, char* data, int len); +int socket_recv(socket_t s, char* buf, int len); +int socket_error(); + +#endif //ESC_SOCKET_H diff --git a/thread.c b/thread.c new file mode 100644 index 0000000..aed1bf3 --- /dev/null +++ b/thread.c @@ -0,0 +1,32 @@ +// +// Created by nicol on 2018-03-18. +// + +#include "thread.h" + +#ifdef _WIN32 +thread_t thread_create(thread_start_t thread_start, thread_arg_t thread_arg) { + thread_t thread = malloc(sizeof(struct st_thread)); + thread->handle = CreateThread(NULL, 0, thread_start, thread_arg, CREATE_SUSPENDED, &thread->id); + if (thread->handle == NULL) { + free(thread); + return NULL; + } + return thread; +} + +int thread_start(thread_t thread) { + if (ResumeThread(thread->handle) == -1) return -1; + return 0; +} + +int thread_wait(thread_t thread) { + if (WaitForSingleObject(thread->handle, INFINITE) != WAIT_OBJECT_0) return -1; + return 0; +} + +int thread_destroy(thread_t thread) { + if (thread_wait(thread) != 0) SuspendThread(thread->handle); + CloseHandle(thread->handle); +} +#endif \ No newline at end of file diff --git a/thread.h b/thread.h new file mode 100644 index 0000000..d34c77d --- /dev/null +++ b/thread.h @@ -0,0 +1,19 @@ +// +// Created by nicol on 2018-03-18. +// + +#ifndef ESC_THREAD_H +#define ESC_THREAD_H + +#ifdef _WIN32 +#include +struct st_thread { + DWORD id; + HANDLE handle; +}; +typedef struct st_thread* thread_t; +typedef LPTHREAD_START_ROUTINE thread_start_t; +typedef LPVOID thread_arg_t; +#endif + +#endif //ESC_THREAD_H diff --git a/uuid.c b/uuid.c new file mode 100644 index 0000000..198000c --- /dev/null +++ b/uuid.c @@ -0,0 +1,47 @@ +// +// Created by nicol on 2018-03-18. +// + +#include +#include +#include +#include "uuid.h" + +const esc_uuid_t* esc_uuid_create() { + esc_uuid_t* result = malloc(sizeof(esc_uuid_t)); + srand(time(NULL)); + for(int i=0;i<16;i++) + result->data[i] = (uint8_t)(rand() & 0xff); + return result; +} + +const esc_uuid_t* esc_uuid_from(uint8_t* src, size_t size) { + if (size != 16) { + return 0; + } + esc_uuid_t* uuid = malloc(sizeof(esc_uuid_t)); + for (size_t i=0; idata[i] = src[i]; + return uuid; +} + +const char* esc_uuid_format(const esc_uuid_t* uuid, char* buffer, size_t buf_size) { + snprintf(buffer, buf_size, "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", + uuid->data[0], + uuid->data[1], + uuid->data[2], + uuid->data[3], + uuid->data[4], + uuid->data[5], + uuid->data[6], + uuid->data[7], + uuid->data[8], + uuid->data[9], + uuid->data[10], + uuid->data[11], + uuid->data[12], + uuid->data[13], + uuid->data[14], + uuid->data[15]); + return buffer; +} diff --git a/uuid.h b/uuid.h new file mode 100644 index 0000000..b54c9e3 --- /dev/null +++ b/uuid.h @@ -0,0 +1,19 @@ +// +// Created by nicol on 2018-03-18. +// + +#ifndef ESC_UUID_H +#define ESC_UUID_H + +#include + +struct st_uuid { + uint8_t data[16]; +}; +typedef struct st_uuid esc_uuid_t; + +const esc_uuid_t* esc_uuid_create(); +const esc_uuid_t* esc_uuid_from(uint8_t* src, size_t size); +const char* esc_uuid_format(const esc_uuid_t* uuid, char* buffer, size_t buf_size); + +#endif //ESC_UUID_H