From 23db4c3f4e619d964c290dae55b46701fd7565e1 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Sat, 6 Feb 2016 13:38:43 +0100 Subject: [PATCH] [chromecast] Support protobuf v1 --- configure.ac | 7 +- src/Makefile.am | 4 + src/outputs/cast.c | 5 + src/outputs/cast_channel.pb-c.c | 141 +++--- src/outputs/cast_channel.pb-c.h | 19 +- src/outputs/cast_channel.v0.pb-c.c | 672 +++++++++++++++++++++++++++++ src/outputs/cast_channel.v0.pb-c.h | 236 ++++++++++ 7 files changed, 1009 insertions(+), 75 deletions(-) create mode 100644 src/outputs/cast_channel.v0.pb-c.c create mode 100644 src/outputs/cast_channel.v0.pb-c.h diff --git a/configure.ac b/configure.ac index 097ef30e..15720ecb 100644 --- a/configure.ac +++ b/configure.ac @@ -186,11 +186,16 @@ dnl ChromeCast support with libprotobuf-c AC_ARG_ENABLE(chromecast, AS_HELP_STRING([--enable-chromecast], [enable ChromeCast support (default=no)])) AS_IF([test "x$enable_chromecast" = "xyes"], [ AC_DEFINE(CHROMECAST, 1, [Define to 1 to enable Chromecast support]) - PKG_CHECK_MODULES(LIBPROTOBUF_C, [ libprotobuf-c ], , [ LDFLAGS="${LDFLAGS} -lprotobuf-c" ]) + PKG_CHECK_MODULES(LIBPROTOBUF_C, [ libprotobuf-c >= 1.0.0 ], , [ protobuf_old="yes" ]) PKG_CHECK_MODULES(GNUTLS, [ gnutls ]) PKG_CHECK_MODULES(JSON_C, [ json-c ]) ]) +AS_IF([test "x$protobuf_old" = "xyes"], [ + AC_DEFINE(HAVE_PROTOBUF_OLD, 1, [Define to 1 if you have libprotobuf < 1.0.0]) + LDFLAGS="${LDFLAGS} -lprotobuf-c" +]) AM_CONDITIONAL(COND_CHROMECAST, [test "x$enable_chromecast" = "xyes"]) +AM_CONDITIONAL(COND_PROTOBUF_OLD, [test "x$protobuf_old" = "xyes"]) dnl MPD support AC_ARG_ENABLE(mpd, AS_HELP_STRING([--disable-mpd], [disable MPD client protocol support (default=no)])) diff --git a/src/Makefile.am b/src/Makefile.am index 1a1b9b46..cce264bf 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -14,8 +14,12 @@ LASTFM_SRC=lastfm.c lastfm.h endif if COND_CHROMECAST +if COND_PROTOBUF_OLD +CHROMECAST_SRC=outputs/cast.c outputs/cast_channel.v0.pb-c.h outputs/cast_channel.v0.pb-c.c +else CHROMECAST_SRC=outputs/cast.c outputs/cast_channel.pb-c.h outputs/cast_channel.pb-c.c endif +endif if COND_MPD MPD_SRC=mpd.c mpd.h diff --git a/src/outputs/cast.c b/src/outputs/cast.c index dee8bb0b..6617f5dd 100644 --- a/src/outputs/cast.c +++ b/src/outputs/cast.c @@ -44,7 +44,12 @@ #include "logger.h" #include "player.h" #include "outputs.h" + +#ifdef HAVE_PROTOBUF_OLD +#include "cast_channel.v0.pb-c.h" +#else #include "cast_channel.pb-c.h" +#endif // Number of bytes to request from TLS connection #define MAX_BUF 4096 diff --git a/src/outputs/cast_channel.pb-c.c b/src/outputs/cast_channel.pb-c.c index c02003cc..140d2ec6 100644 --- a/src/outputs/cast_channel.pb-c.c +++ b/src/outputs/cast_channel.pb-c.c @@ -1,11 +1,12 @@ /* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: cast_channel.proto */ /* Do not generate deprecated warnings for self */ -#ifndef PROTOBUF_C_NO_DEPRECATED -#define PROTOBUF_C_NO_DEPRECATED +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED #endif -#include "cast_channel.pb-c.h" +#include "cast_channel.v1.pb-c.h" void extensions__core_api__cast_channel__cast_message__init (Extensions__CoreApi__CastChannel__CastMessage *message) { @@ -15,21 +16,21 @@ void extensions__core_api__cast_channel__cast_message__init size_t extensions__core_api__cast_channel__cast_message__get_packed_size (const Extensions__CoreApi__CastChannel__CastMessage *message) { - PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__cast_message__descriptor); + assert(message->base.descriptor == &extensions__core_api__cast_channel__cast_message__descriptor); return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); } size_t extensions__core_api__cast_channel__cast_message__pack (const Extensions__CoreApi__CastChannel__CastMessage *message, uint8_t *out) { - PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__cast_message__descriptor); + assert(message->base.descriptor == &extensions__core_api__cast_channel__cast_message__descriptor); return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); } size_t extensions__core_api__cast_channel__cast_message__pack_to_buffer (const Extensions__CoreApi__CastChannel__CastMessage *message, ProtobufCBuffer *buffer) { - PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__cast_message__descriptor); + assert(message->base.descriptor == &extensions__core_api__cast_channel__cast_message__descriptor); return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); } Extensions__CoreApi__CastChannel__CastMessage * @@ -46,7 +47,7 @@ void extensions__core_api__cast_channel__cast_message__free_unpacked (Extensions__CoreApi__CastChannel__CastMessage *message, ProtobufCAllocator *allocator) { - PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__cast_message__descriptor); + assert(message->base.descriptor == &extensions__core_api__cast_channel__cast_message__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); } void extensions__core_api__cast_channel__auth_challenge__init @@ -58,21 +59,21 @@ void extensions__core_api__cast_channel__auth_challenge__init size_t extensions__core_api__cast_channel__auth_challenge__get_packed_size (const Extensions__CoreApi__CastChannel__AuthChallenge *message) { - PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__auth_challenge__descriptor); + assert(message->base.descriptor == &extensions__core_api__cast_channel__auth_challenge__descriptor); return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); } size_t extensions__core_api__cast_channel__auth_challenge__pack (const Extensions__CoreApi__CastChannel__AuthChallenge *message, uint8_t *out) { - PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__auth_challenge__descriptor); + assert(message->base.descriptor == &extensions__core_api__cast_channel__auth_challenge__descriptor); return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); } size_t extensions__core_api__cast_channel__auth_challenge__pack_to_buffer (const Extensions__CoreApi__CastChannel__AuthChallenge *message, ProtobufCBuffer *buffer) { - PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__auth_challenge__descriptor); + assert(message->base.descriptor == &extensions__core_api__cast_channel__auth_challenge__descriptor); return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); } Extensions__CoreApi__CastChannel__AuthChallenge * @@ -89,7 +90,7 @@ void extensions__core_api__cast_channel__auth_challenge__free_unpacked (Extensions__CoreApi__CastChannel__AuthChallenge *message, ProtobufCAllocator *allocator) { - PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__auth_challenge__descriptor); + assert(message->base.descriptor == &extensions__core_api__cast_channel__auth_challenge__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); } void extensions__core_api__cast_channel__auth_response__init @@ -101,21 +102,21 @@ void extensions__core_api__cast_channel__auth_response__init size_t extensions__core_api__cast_channel__auth_response__get_packed_size (const Extensions__CoreApi__CastChannel__AuthResponse *message) { - PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__auth_response__descriptor); + assert(message->base.descriptor == &extensions__core_api__cast_channel__auth_response__descriptor); return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); } size_t extensions__core_api__cast_channel__auth_response__pack (const Extensions__CoreApi__CastChannel__AuthResponse *message, uint8_t *out) { - PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__auth_response__descriptor); + assert(message->base.descriptor == &extensions__core_api__cast_channel__auth_response__descriptor); return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); } size_t extensions__core_api__cast_channel__auth_response__pack_to_buffer (const Extensions__CoreApi__CastChannel__AuthResponse *message, ProtobufCBuffer *buffer) { - PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__auth_response__descriptor); + assert(message->base.descriptor == &extensions__core_api__cast_channel__auth_response__descriptor); return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); } Extensions__CoreApi__CastChannel__AuthResponse * @@ -132,7 +133,7 @@ void extensions__core_api__cast_channel__auth_response__free_unpacked (Extensions__CoreApi__CastChannel__AuthResponse *message, ProtobufCAllocator *allocator) { - PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__auth_response__descriptor); + assert(message->base.descriptor == &extensions__core_api__cast_channel__auth_response__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); } void extensions__core_api__cast_channel__auth_error__init @@ -144,21 +145,21 @@ void extensions__core_api__cast_channel__auth_error__init size_t extensions__core_api__cast_channel__auth_error__get_packed_size (const Extensions__CoreApi__CastChannel__AuthError *message) { - PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__auth_error__descriptor); + assert(message->base.descriptor == &extensions__core_api__cast_channel__auth_error__descriptor); return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); } size_t extensions__core_api__cast_channel__auth_error__pack (const Extensions__CoreApi__CastChannel__AuthError *message, uint8_t *out) { - PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__auth_error__descriptor); + assert(message->base.descriptor == &extensions__core_api__cast_channel__auth_error__descriptor); return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); } size_t extensions__core_api__cast_channel__auth_error__pack_to_buffer (const Extensions__CoreApi__CastChannel__AuthError *message, ProtobufCBuffer *buffer) { - PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__auth_error__descriptor); + assert(message->base.descriptor == &extensions__core_api__cast_channel__auth_error__descriptor); return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); } Extensions__CoreApi__CastChannel__AuthError * @@ -175,7 +176,7 @@ void extensions__core_api__cast_channel__auth_error__free_unpacked (Extensions__CoreApi__CastChannel__AuthError *message, ProtobufCAllocator *allocator) { - PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__auth_error__descriptor); + assert(message->base.descriptor == &extensions__core_api__cast_channel__auth_error__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); } void extensions__core_api__cast_channel__device_auth_message__init @@ -187,21 +188,21 @@ void extensions__core_api__cast_channel__device_auth_message__init size_t extensions__core_api__cast_channel__device_auth_message__get_packed_size (const Extensions__CoreApi__CastChannel__DeviceAuthMessage *message) { - PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__device_auth_message__descriptor); + assert(message->base.descriptor == &extensions__core_api__cast_channel__device_auth_message__descriptor); return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); } size_t extensions__core_api__cast_channel__device_auth_message__pack (const Extensions__CoreApi__CastChannel__DeviceAuthMessage *message, uint8_t *out) { - PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__device_auth_message__descriptor); + assert(message->base.descriptor == &extensions__core_api__cast_channel__device_auth_message__descriptor); return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); } size_t extensions__core_api__cast_channel__device_auth_message__pack_to_buffer (const Extensions__CoreApi__CastChannel__DeviceAuthMessage *message, ProtobufCBuffer *buffer) { - PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__device_auth_message__descriptor); + assert(message->base.descriptor == &extensions__core_api__cast_channel__device_auth_message__descriptor); return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); } Extensions__CoreApi__CastChannel__DeviceAuthMessage * @@ -218,7 +219,7 @@ void extensions__core_api__cast_channel__device_auth_message__free_unpacked (Extensions__CoreApi__CastChannel__DeviceAuthMessage *message, ProtobufCAllocator *allocator) { - PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__device_auth_message__descriptor); + assert(message->base.descriptor == &extensions__core_api__cast_channel__device_auth_message__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); } const ProtobufCEnumValue extensions__core_api__cast_channel__cast_message__protocol_version__enum_values_by_number[1] = @@ -234,7 +235,7 @@ const ProtobufCEnumValueIndex extensions__core_api__cast_channel__cast_message__ }; const ProtobufCEnumDescriptor extensions__core_api__cast_channel__cast_message__protocol_version__descriptor = { - PROTOBUF_C_ENUM_DESCRIPTOR_MAGIC, + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, "extensions.core_api.cast_channel.CastMessage.ProtocolVersion", "ProtocolVersion", "Extensions__CoreApi__CastChannel__CastMessage__ProtocolVersion", @@ -262,7 +263,7 @@ const ProtobufCEnumValueIndex extensions__core_api__cast_channel__cast_message__ }; const ProtobufCEnumDescriptor extensions__core_api__cast_channel__cast_message__payload_type__descriptor = { - PROTOBUF_C_ENUM_DESCRIPTOR_MAGIC, + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, "extensions.core_api.cast_channel.CastMessage.PayloadType", "PayloadType", "Extensions__CoreApi__CastChannel__CastMessage__PayloadType", @@ -283,10 +284,10 @@ static const ProtobufCFieldDescriptor extensions__core_api__cast_channel__cast_m PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_ENUM, 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__CastMessage, protocol_version), + offsetof(Extensions__CoreApi__CastChannel__CastMessage, protocol_version), &extensions__core_api__cast_channel__cast_message__protocol_version__descriptor, NULL, - 0, /* packed */ + 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { @@ -295,10 +296,10 @@ static const ProtobufCFieldDescriptor extensions__core_api__cast_channel__cast_m PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_STRING, 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__CastMessage, source_id), + offsetof(Extensions__CoreApi__CastChannel__CastMessage, source_id), NULL, NULL, - 0, /* packed */ + 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { @@ -307,10 +308,10 @@ static const ProtobufCFieldDescriptor extensions__core_api__cast_channel__cast_m PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_STRING, 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__CastMessage, destination_id), + offsetof(Extensions__CoreApi__CastChannel__CastMessage, destination_id), NULL, NULL, - 0, /* packed */ + 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { @@ -319,10 +320,10 @@ static const ProtobufCFieldDescriptor extensions__core_api__cast_channel__cast_m PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_STRING, 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__CastMessage, namespace_), + offsetof(Extensions__CoreApi__CastChannel__CastMessage, namespace_), NULL, NULL, - 0, /* packed */ + 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { @@ -331,10 +332,10 @@ static const ProtobufCFieldDescriptor extensions__core_api__cast_channel__cast_m PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_ENUM, 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__CastMessage, payload_type), + offsetof(Extensions__CoreApi__CastChannel__CastMessage, payload_type), &extensions__core_api__cast_channel__cast_message__payload_type__descriptor, NULL, - 0, /* packed */ + 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { @@ -343,10 +344,10 @@ static const ProtobufCFieldDescriptor extensions__core_api__cast_channel__cast_m PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_STRING, 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__CastMessage, payload_utf8), + offsetof(Extensions__CoreApi__CastChannel__CastMessage, payload_utf8), NULL, NULL, - 0, /* packed */ + 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { @@ -354,11 +355,11 @@ static const ProtobufCFieldDescriptor extensions__core_api__cast_channel__cast_m 7, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BYTES, - PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__CastMessage, has_payload_binary), - PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__CastMessage, payload_binary), + offsetof(Extensions__CoreApi__CastChannel__CastMessage, has_payload_binary), + offsetof(Extensions__CoreApi__CastChannel__CastMessage, payload_binary), NULL, NULL, - 0, /* packed */ + 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, }; @@ -378,7 +379,7 @@ static const ProtobufCIntRange extensions__core_api__cast_channel__cast_message_ }; const ProtobufCMessageDescriptor extensions__core_api__cast_channel__cast_message__descriptor = { - PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC, + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, "extensions.core_api.cast_channel.CastMessage", "CastMessage", "Extensions__CoreApi__CastChannel__CastMessage", @@ -399,11 +400,11 @@ static const ProtobufCFieldDescriptor extensions__core_api__cast_channel__auth_c 1, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_ENUM, - PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__AuthChallenge, has_signature_algorithm), - PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__AuthChallenge, signature_algorithm), + offsetof(Extensions__CoreApi__CastChannel__AuthChallenge, has_signature_algorithm), + offsetof(Extensions__CoreApi__CastChannel__AuthChallenge, signature_algorithm), &extensions__core_api__cast_channel__signature_algorithm__descriptor, &extensions__core_api__cast_channel__auth_challenge__signature_algorithm__default_value, - 0, /* packed */ + 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, }; @@ -417,7 +418,7 @@ static const ProtobufCIntRange extensions__core_api__cast_channel__auth_challeng }; const ProtobufCMessageDescriptor extensions__core_api__cast_channel__auth_challenge__descriptor = { - PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC, + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, "extensions.core_api.cast_channel.AuthChallenge", "AuthChallenge", "Extensions__CoreApi__CastChannel__AuthChallenge", @@ -439,10 +440,10 @@ static const ProtobufCFieldDescriptor extensions__core_api__cast_channel__auth_r PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_BYTES, 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__AuthResponse, signature), + offsetof(Extensions__CoreApi__CastChannel__AuthResponse, signature), NULL, NULL, - 0, /* packed */ + 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { @@ -451,10 +452,10 @@ static const ProtobufCFieldDescriptor extensions__core_api__cast_channel__auth_r PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_BYTES, 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__AuthResponse, client_auth_certificate), + offsetof(Extensions__CoreApi__CastChannel__AuthResponse, client_auth_certificate), NULL, NULL, - 0, /* packed */ + 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { @@ -462,11 +463,11 @@ static const ProtobufCFieldDescriptor extensions__core_api__cast_channel__auth_r 3, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_BYTES, - PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__AuthResponse, n_intermediate_certificate), - PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__AuthResponse, intermediate_certificate), + offsetof(Extensions__CoreApi__CastChannel__AuthResponse, n_intermediate_certificate), + offsetof(Extensions__CoreApi__CastChannel__AuthResponse, intermediate_certificate), NULL, NULL, - 0, /* packed */ + 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { @@ -474,11 +475,11 @@ static const ProtobufCFieldDescriptor extensions__core_api__cast_channel__auth_r 4, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_ENUM, - PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__AuthResponse, has_signature_algorithm), - PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__AuthResponse, signature_algorithm), + offsetof(Extensions__CoreApi__CastChannel__AuthResponse, has_signature_algorithm), + offsetof(Extensions__CoreApi__CastChannel__AuthResponse, signature_algorithm), &extensions__core_api__cast_channel__signature_algorithm__descriptor, &extensions__core_api__cast_channel__auth_response__signature_algorithm__default_value, - 0, /* packed */ + 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, }; @@ -495,7 +496,7 @@ static const ProtobufCIntRange extensions__core_api__cast_channel__auth_response }; const ProtobufCMessageDescriptor extensions__core_api__cast_channel__auth_response__descriptor = { - PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC, + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, "extensions.core_api.cast_channel.AuthResponse", "AuthResponse", "Extensions__CoreApi__CastChannel__AuthResponse", @@ -525,7 +526,7 @@ const ProtobufCEnumValueIndex extensions__core_api__cast_channel__auth_error__er }; const ProtobufCEnumDescriptor extensions__core_api__cast_channel__auth_error__error_type__descriptor = { - PROTOBUF_C_ENUM_DESCRIPTOR_MAGIC, + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, "extensions.core_api.cast_channel.AuthError.ErrorType", "ErrorType", "Extensions__CoreApi__CastChannel__AuthError__ErrorType", @@ -546,10 +547,10 @@ static const ProtobufCFieldDescriptor extensions__core_api__cast_channel__auth_e PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_ENUM, 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__AuthError, error_type), + offsetof(Extensions__CoreApi__CastChannel__AuthError, error_type), &extensions__core_api__cast_channel__auth_error__error_type__descriptor, NULL, - 0, /* packed */ + 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, }; @@ -563,7 +564,7 @@ static const ProtobufCIntRange extensions__core_api__cast_channel__auth_error__n }; const ProtobufCMessageDescriptor extensions__core_api__cast_channel__auth_error__descriptor = { - PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC, + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, "extensions.core_api.cast_channel.AuthError", "AuthError", "Extensions__CoreApi__CastChannel__AuthError", @@ -584,10 +585,10 @@ static const ProtobufCFieldDescriptor extensions__core_api__cast_channel__device PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_MESSAGE, 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__DeviceAuthMessage, challenge), + offsetof(Extensions__CoreApi__CastChannel__DeviceAuthMessage, challenge), &extensions__core_api__cast_channel__auth_challenge__descriptor, NULL, - 0, /* packed */ + 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { @@ -596,10 +597,10 @@ static const ProtobufCFieldDescriptor extensions__core_api__cast_channel__device PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_MESSAGE, 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__DeviceAuthMessage, response), + offsetof(Extensions__CoreApi__CastChannel__DeviceAuthMessage, response), &extensions__core_api__cast_channel__auth_response__descriptor, NULL, - 0, /* packed */ + 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { @@ -608,10 +609,10 @@ static const ProtobufCFieldDescriptor extensions__core_api__cast_channel__device PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_MESSAGE, 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__DeviceAuthMessage, error), + offsetof(Extensions__CoreApi__CastChannel__DeviceAuthMessage, error), &extensions__core_api__cast_channel__auth_error__descriptor, NULL, - 0, /* packed */ + 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, }; @@ -627,7 +628,7 @@ static const ProtobufCIntRange extensions__core_api__cast_channel__device_auth_m }; const ProtobufCMessageDescriptor extensions__core_api__cast_channel__device_auth_message__descriptor = { - PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC, + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, "extensions.core_api.cast_channel.DeviceAuthMessage", "DeviceAuthMessage", "Extensions__CoreApi__CastChannel__DeviceAuthMessage", @@ -643,7 +644,7 @@ const ProtobufCMessageDescriptor extensions__core_api__cast_channel__device_auth const ProtobufCEnumValue extensions__core_api__cast_channel__signature_algorithm__enum_values_by_number[3] = { { "UNSPECIFIED", "EXTENSIONS__CORE_API__CAST_CHANNEL__SIGNATURE_ALGORITHM__UNSPECIFIED", 0 }, - { "RSASSA_PKCS1v15", "EXTENSIONS__CORE_API__CAST_CHANNEL__SIGNATURE_ALGORITHM__RSASSA_PKCS1V15", 1 }, + { "RSASSA_PKCS1V15", "EXTENSIONS__CORE_API__CAST_CHANNEL__SIGNATURE_ALGORITHM__RSASSA_PKCS1V15", 1 }, { "RSASSA_PSS", "EXTENSIONS__CORE_API__CAST_CHANNEL__SIGNATURE_ALGORITHM__RSASSA_PSS", 2 }, }; static const ProtobufCIntRange extensions__core_api__cast_channel__signature_algorithm__value_ranges[] = { @@ -651,13 +652,13 @@ static const ProtobufCIntRange extensions__core_api__cast_channel__signature_alg }; const ProtobufCEnumValueIndex extensions__core_api__cast_channel__signature_algorithm__enum_values_by_name[3] = { - { "RSASSA_PKCS1v15", 1 }, + { "RSASSA_PKCS1V15", 1 }, { "RSASSA_PSS", 2 }, { "UNSPECIFIED", 0 }, }; const ProtobufCEnumDescriptor extensions__core_api__cast_channel__signature_algorithm__descriptor = { - PROTOBUF_C_ENUM_DESCRIPTOR_MAGIC, + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, "extensions.core_api.cast_channel.SignatureAlgorithm", "SignatureAlgorithm", "Extensions__CoreApi__CastChannel__SignatureAlgorithm", diff --git a/src/outputs/cast_channel.pb-c.h b/src/outputs/cast_channel.pb-c.h index ade6ba57..db64c0a2 100644 --- a/src/outputs/cast_channel.pb-c.h +++ b/src/outputs/cast_channel.pb-c.h @@ -1,11 +1,18 @@ /* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: cast_channel.proto */ #ifndef PROTOBUF_C_cast_5fchannel_2eproto__INCLUDED #define PROTOBUF_C_cast_5fchannel_2eproto__INCLUDED -#include +#include -PROTOBUF_C_BEGIN_DECLS +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 1000002 < 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 _Extensions__CoreApi__CastChannel__CastMessage Extensions__CoreApi__CastChannel__CastMessage; @@ -19,20 +26,24 @@ typedef struct _Extensions__CoreApi__CastChannel__DeviceAuthMessage Extensions__ typedef enum _Extensions__CoreApi__CastChannel__CastMessage__ProtocolVersion { EXTENSIONS__CORE_API__CAST_CHANNEL__CAST_MESSAGE__PROTOCOL_VERSION__CASTV2_1_0 = 0 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(EXTENSIONS__CORE_API__CAST_CHANNEL__CAST_MESSAGE__PROTOCOL_VERSION) } Extensions__CoreApi__CastChannel__CastMessage__ProtocolVersion; typedef enum _Extensions__CoreApi__CastChannel__CastMessage__PayloadType { EXTENSIONS__CORE_API__CAST_CHANNEL__CAST_MESSAGE__PAYLOAD_TYPE__STRING = 0, EXTENSIONS__CORE_API__CAST_CHANNEL__CAST_MESSAGE__PAYLOAD_TYPE__BINARY = 1 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(EXTENSIONS__CORE_API__CAST_CHANNEL__CAST_MESSAGE__PAYLOAD_TYPE) } Extensions__CoreApi__CastChannel__CastMessage__PayloadType; typedef enum _Extensions__CoreApi__CastChannel__AuthError__ErrorType { EXTENSIONS__CORE_API__CAST_CHANNEL__AUTH_ERROR__ERROR_TYPE__INTERNAL_ERROR = 0, EXTENSIONS__CORE_API__CAST_CHANNEL__AUTH_ERROR__ERROR_TYPE__NO_TLS = 1, EXTENSIONS__CORE_API__CAST_CHANNEL__AUTH_ERROR__ERROR_TYPE__SIGNATURE_ALGORITHM_UNAVAILABLE = 2 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(EXTENSIONS__CORE_API__CAST_CHANNEL__AUTH_ERROR__ERROR_TYPE) } Extensions__CoreApi__CastChannel__AuthError__ErrorType; typedef enum _Extensions__CoreApi__CastChannel__SignatureAlgorithm { EXTENSIONS__CORE_API__CAST_CHANNEL__SIGNATURE_ALGORITHM__UNSPECIFIED = 0, EXTENSIONS__CORE_API__CAST_CHANNEL__SIGNATURE_ALGORITHM__RSASSA_PKCS1V15 = 1, EXTENSIONS__CORE_API__CAST_CHANNEL__SIGNATURE_ALGORITHM__RSASSA_PSS = 2 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(EXTENSIONS__CORE_API__CAST_CHANNEL__SIGNATURE_ALGORITHM) } Extensions__CoreApi__CastChannel__SignatureAlgorithm; /* --- messages --- */ @@ -230,7 +241,7 @@ extern const ProtobufCMessageDescriptor extensions__core_api__cast_channel__auth extern const ProtobufCEnumDescriptor extensions__core_api__cast_channel__auth_error__error_type__descriptor; extern const ProtobufCMessageDescriptor extensions__core_api__cast_channel__device_auth_message__descriptor; -PROTOBUF_C_END_DECLS +PROTOBUF_C__END_DECLS -#endif /* PROTOBUF_cast_5fchannel_2eproto__INCLUDED */ +#endif /* PROTOBUF_C_cast_5fchannel_2eproto__INCLUDED */ diff --git a/src/outputs/cast_channel.v0.pb-c.c b/src/outputs/cast_channel.v0.pb-c.c new file mode 100644 index 00000000..29234460 --- /dev/null +++ b/src/outputs/cast_channel.v0.pb-c.c @@ -0,0 +1,672 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C_NO_DEPRECATED +#define PROTOBUF_C_NO_DEPRECATED +#endif + +#include "cast_channel.v0.pb-c.h" +void extensions__core_api__cast_channel__cast_message__init + (Extensions__CoreApi__CastChannel__CastMessage *message) +{ + static Extensions__CoreApi__CastChannel__CastMessage init_value = EXTENSIONS__CORE_API__CAST_CHANNEL__CAST_MESSAGE__INIT; + *message = init_value; +} +size_t extensions__core_api__cast_channel__cast_message__get_packed_size + (const Extensions__CoreApi__CastChannel__CastMessage *message) +{ + PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__cast_message__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t extensions__core_api__cast_channel__cast_message__pack + (const Extensions__CoreApi__CastChannel__CastMessage *message, + uint8_t *out) +{ + PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__cast_message__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t extensions__core_api__cast_channel__cast_message__pack_to_buffer + (const Extensions__CoreApi__CastChannel__CastMessage *message, + ProtobufCBuffer *buffer) +{ + PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__cast_message__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +Extensions__CoreApi__CastChannel__CastMessage * + extensions__core_api__cast_channel__cast_message__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (Extensions__CoreApi__CastChannel__CastMessage *) + protobuf_c_message_unpack (&extensions__core_api__cast_channel__cast_message__descriptor, + allocator, len, data); +} +void extensions__core_api__cast_channel__cast_message__free_unpacked + (Extensions__CoreApi__CastChannel__CastMessage *message, + ProtobufCAllocator *allocator) +{ + PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__cast_message__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void extensions__core_api__cast_channel__auth_challenge__init + (Extensions__CoreApi__CastChannel__AuthChallenge *message) +{ + static Extensions__CoreApi__CastChannel__AuthChallenge init_value = EXTENSIONS__CORE_API__CAST_CHANNEL__AUTH_CHALLENGE__INIT; + *message = init_value; +} +size_t extensions__core_api__cast_channel__auth_challenge__get_packed_size + (const Extensions__CoreApi__CastChannel__AuthChallenge *message) +{ + PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__auth_challenge__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t extensions__core_api__cast_channel__auth_challenge__pack + (const Extensions__CoreApi__CastChannel__AuthChallenge *message, + uint8_t *out) +{ + PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__auth_challenge__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t extensions__core_api__cast_channel__auth_challenge__pack_to_buffer + (const Extensions__CoreApi__CastChannel__AuthChallenge *message, + ProtobufCBuffer *buffer) +{ + PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__auth_challenge__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +Extensions__CoreApi__CastChannel__AuthChallenge * + extensions__core_api__cast_channel__auth_challenge__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (Extensions__CoreApi__CastChannel__AuthChallenge *) + protobuf_c_message_unpack (&extensions__core_api__cast_channel__auth_challenge__descriptor, + allocator, len, data); +} +void extensions__core_api__cast_channel__auth_challenge__free_unpacked + (Extensions__CoreApi__CastChannel__AuthChallenge *message, + ProtobufCAllocator *allocator) +{ + PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__auth_challenge__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void extensions__core_api__cast_channel__auth_response__init + (Extensions__CoreApi__CastChannel__AuthResponse *message) +{ + static Extensions__CoreApi__CastChannel__AuthResponse init_value = EXTENSIONS__CORE_API__CAST_CHANNEL__AUTH_RESPONSE__INIT; + *message = init_value; +} +size_t extensions__core_api__cast_channel__auth_response__get_packed_size + (const Extensions__CoreApi__CastChannel__AuthResponse *message) +{ + PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__auth_response__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t extensions__core_api__cast_channel__auth_response__pack + (const Extensions__CoreApi__CastChannel__AuthResponse *message, + uint8_t *out) +{ + PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__auth_response__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t extensions__core_api__cast_channel__auth_response__pack_to_buffer + (const Extensions__CoreApi__CastChannel__AuthResponse *message, + ProtobufCBuffer *buffer) +{ + PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__auth_response__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +Extensions__CoreApi__CastChannel__AuthResponse * + extensions__core_api__cast_channel__auth_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (Extensions__CoreApi__CastChannel__AuthResponse *) + protobuf_c_message_unpack (&extensions__core_api__cast_channel__auth_response__descriptor, + allocator, len, data); +} +void extensions__core_api__cast_channel__auth_response__free_unpacked + (Extensions__CoreApi__CastChannel__AuthResponse *message, + ProtobufCAllocator *allocator) +{ + PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__auth_response__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void extensions__core_api__cast_channel__auth_error__init + (Extensions__CoreApi__CastChannel__AuthError *message) +{ + static Extensions__CoreApi__CastChannel__AuthError init_value = EXTENSIONS__CORE_API__CAST_CHANNEL__AUTH_ERROR__INIT; + *message = init_value; +} +size_t extensions__core_api__cast_channel__auth_error__get_packed_size + (const Extensions__CoreApi__CastChannel__AuthError *message) +{ + PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__auth_error__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t extensions__core_api__cast_channel__auth_error__pack + (const Extensions__CoreApi__CastChannel__AuthError *message, + uint8_t *out) +{ + PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__auth_error__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t extensions__core_api__cast_channel__auth_error__pack_to_buffer + (const Extensions__CoreApi__CastChannel__AuthError *message, + ProtobufCBuffer *buffer) +{ + PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__auth_error__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +Extensions__CoreApi__CastChannel__AuthError * + extensions__core_api__cast_channel__auth_error__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (Extensions__CoreApi__CastChannel__AuthError *) + protobuf_c_message_unpack (&extensions__core_api__cast_channel__auth_error__descriptor, + allocator, len, data); +} +void extensions__core_api__cast_channel__auth_error__free_unpacked + (Extensions__CoreApi__CastChannel__AuthError *message, + ProtobufCAllocator *allocator) +{ + PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__auth_error__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void extensions__core_api__cast_channel__device_auth_message__init + (Extensions__CoreApi__CastChannel__DeviceAuthMessage *message) +{ + static Extensions__CoreApi__CastChannel__DeviceAuthMessage init_value = EXTENSIONS__CORE_API__CAST_CHANNEL__DEVICE_AUTH_MESSAGE__INIT; + *message = init_value; +} +size_t extensions__core_api__cast_channel__device_auth_message__get_packed_size + (const Extensions__CoreApi__CastChannel__DeviceAuthMessage *message) +{ + PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__device_auth_message__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t extensions__core_api__cast_channel__device_auth_message__pack + (const Extensions__CoreApi__CastChannel__DeviceAuthMessage *message, + uint8_t *out) +{ + PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__device_auth_message__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t extensions__core_api__cast_channel__device_auth_message__pack_to_buffer + (const Extensions__CoreApi__CastChannel__DeviceAuthMessage *message, + ProtobufCBuffer *buffer) +{ + PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__device_auth_message__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +Extensions__CoreApi__CastChannel__DeviceAuthMessage * + extensions__core_api__cast_channel__device_auth_message__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (Extensions__CoreApi__CastChannel__DeviceAuthMessage *) + protobuf_c_message_unpack (&extensions__core_api__cast_channel__device_auth_message__descriptor, + allocator, len, data); +} +void extensions__core_api__cast_channel__device_auth_message__free_unpacked + (Extensions__CoreApi__CastChannel__DeviceAuthMessage *message, + ProtobufCAllocator *allocator) +{ + PROTOBUF_C_ASSERT (message->base.descriptor == &extensions__core_api__cast_channel__device_auth_message__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +const ProtobufCEnumValue extensions__core_api__cast_channel__cast_message__protocol_version__enum_values_by_number[1] = +{ + { "CASTV2_1_0", "EXTENSIONS__CORE_API__CAST_CHANNEL__CAST_MESSAGE__PROTOCOL_VERSION__CASTV2_1_0", 0 }, +}; +static const ProtobufCIntRange extensions__core_api__cast_channel__cast_message__protocol_version__value_ranges[] = { +{0, 0},{0, 1} +}; +const ProtobufCEnumValueIndex extensions__core_api__cast_channel__cast_message__protocol_version__enum_values_by_name[1] = +{ + { "CASTV2_1_0", 0 }, +}; +const ProtobufCEnumDescriptor extensions__core_api__cast_channel__cast_message__protocol_version__descriptor = +{ + PROTOBUF_C_ENUM_DESCRIPTOR_MAGIC, + "extensions.core_api.cast_channel.CastMessage.ProtocolVersion", + "ProtocolVersion", + "Extensions__CoreApi__CastChannel__CastMessage__ProtocolVersion", + "extensions.core_api.cast_channel", + 1, + extensions__core_api__cast_channel__cast_message__protocol_version__enum_values_by_number, + 1, + extensions__core_api__cast_channel__cast_message__protocol_version__enum_values_by_name, + 1, + extensions__core_api__cast_channel__cast_message__protocol_version__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; +const ProtobufCEnumValue extensions__core_api__cast_channel__cast_message__payload_type__enum_values_by_number[2] = +{ + { "STRING", "EXTENSIONS__CORE_API__CAST_CHANNEL__CAST_MESSAGE__PAYLOAD_TYPE__STRING", 0 }, + { "BINARY", "EXTENSIONS__CORE_API__CAST_CHANNEL__CAST_MESSAGE__PAYLOAD_TYPE__BINARY", 1 }, +}; +static const ProtobufCIntRange extensions__core_api__cast_channel__cast_message__payload_type__value_ranges[] = { +{0, 0},{0, 2} +}; +const ProtobufCEnumValueIndex extensions__core_api__cast_channel__cast_message__payload_type__enum_values_by_name[2] = +{ + { "BINARY", 1 }, + { "STRING", 0 }, +}; +const ProtobufCEnumDescriptor extensions__core_api__cast_channel__cast_message__payload_type__descriptor = +{ + PROTOBUF_C_ENUM_DESCRIPTOR_MAGIC, + "extensions.core_api.cast_channel.CastMessage.PayloadType", + "PayloadType", + "Extensions__CoreApi__CastChannel__CastMessage__PayloadType", + "extensions.core_api.cast_channel", + 2, + extensions__core_api__cast_channel__cast_message__payload_type__enum_values_by_number, + 2, + extensions__core_api__cast_channel__cast_message__payload_type__enum_values_by_name, + 1, + extensions__core_api__cast_channel__cast_message__payload_type__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; +static const ProtobufCFieldDescriptor extensions__core_api__cast_channel__cast_message__field_descriptors[7] = +{ + { + "protocol_version", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_ENUM, + 0, /* quantifier_offset */ + PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__CastMessage, protocol_version), + &extensions__core_api__cast_channel__cast_message__protocol_version__descriptor, + NULL, + 0, /* packed */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "source_id", + 2, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__CastMessage, source_id), + NULL, + NULL, + 0, /* packed */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "destination_id", + 3, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__CastMessage, destination_id), + NULL, + NULL, + 0, /* packed */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "namespace", + 4, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__CastMessage, namespace_), + NULL, + NULL, + 0, /* packed */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "payload_type", + 5, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_ENUM, + 0, /* quantifier_offset */ + PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__CastMessage, payload_type), + &extensions__core_api__cast_channel__cast_message__payload_type__descriptor, + NULL, + 0, /* packed */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "payload_utf8", + 6, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__CastMessage, payload_utf8), + NULL, + NULL, + 0, /* packed */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "payload_binary", + 7, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BYTES, + PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__CastMessage, has_payload_binary), + PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__CastMessage, payload_binary), + NULL, + NULL, + 0, /* packed */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned extensions__core_api__cast_channel__cast_message__field_indices_by_name[] = { + 2, /* field[2] = destination_id */ + 3, /* field[3] = namespace */ + 6, /* field[6] = payload_binary */ + 4, /* field[4] = payload_type */ + 5, /* field[5] = payload_utf8 */ + 0, /* field[0] = protocol_version */ + 1, /* field[1] = source_id */ +}; +static const ProtobufCIntRange extensions__core_api__cast_channel__cast_message__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 7 } +}; +const ProtobufCMessageDescriptor extensions__core_api__cast_channel__cast_message__descriptor = +{ + PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC, + "extensions.core_api.cast_channel.CastMessage", + "CastMessage", + "Extensions__CoreApi__CastChannel__CastMessage", + "extensions.core_api.cast_channel", + sizeof(Extensions__CoreApi__CastChannel__CastMessage), + 7, + extensions__core_api__cast_channel__cast_message__field_descriptors, + extensions__core_api__cast_channel__cast_message__field_indices_by_name, + 1, extensions__core_api__cast_channel__cast_message__number_ranges, + (ProtobufCMessageInit) extensions__core_api__cast_channel__cast_message__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const Extensions__CoreApi__CastChannel__SignatureAlgorithm extensions__core_api__cast_channel__auth_challenge__signature_algorithm__default_value = EXTENSIONS__CORE_API__CAST_CHANNEL__SIGNATURE_ALGORITHM__RSASSA_PKCS1V15; +static const ProtobufCFieldDescriptor extensions__core_api__cast_channel__auth_challenge__field_descriptors[1] = +{ + { + "signature_algorithm", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_ENUM, + PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__AuthChallenge, has_signature_algorithm), + PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__AuthChallenge, signature_algorithm), + &extensions__core_api__cast_channel__signature_algorithm__descriptor, + &extensions__core_api__cast_channel__auth_challenge__signature_algorithm__default_value, + 0, /* packed */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned extensions__core_api__cast_channel__auth_challenge__field_indices_by_name[] = { + 0, /* field[0] = signature_algorithm */ +}; +static const ProtobufCIntRange extensions__core_api__cast_channel__auth_challenge__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor extensions__core_api__cast_channel__auth_challenge__descriptor = +{ + PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC, + "extensions.core_api.cast_channel.AuthChallenge", + "AuthChallenge", + "Extensions__CoreApi__CastChannel__AuthChallenge", + "extensions.core_api.cast_channel", + sizeof(Extensions__CoreApi__CastChannel__AuthChallenge), + 1, + extensions__core_api__cast_channel__auth_challenge__field_descriptors, + extensions__core_api__cast_channel__auth_challenge__field_indices_by_name, + 1, extensions__core_api__cast_channel__auth_challenge__number_ranges, + (ProtobufCMessageInit) extensions__core_api__cast_channel__auth_challenge__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const Extensions__CoreApi__CastChannel__SignatureAlgorithm extensions__core_api__cast_channel__auth_response__signature_algorithm__default_value = EXTENSIONS__CORE_API__CAST_CHANNEL__SIGNATURE_ALGORITHM__RSASSA_PKCS1V15; +static const ProtobufCFieldDescriptor extensions__core_api__cast_channel__auth_response__field_descriptors[4] = +{ + { + "signature", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_BYTES, + 0, /* quantifier_offset */ + PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__AuthResponse, signature), + NULL, + NULL, + 0, /* packed */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "client_auth_certificate", + 2, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_BYTES, + 0, /* quantifier_offset */ + PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__AuthResponse, client_auth_certificate), + NULL, + NULL, + 0, /* packed */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "intermediate_certificate", + 3, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_BYTES, + PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__AuthResponse, n_intermediate_certificate), + PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__AuthResponse, intermediate_certificate), + NULL, + NULL, + 0, /* packed */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "signature_algorithm", + 4, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_ENUM, + PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__AuthResponse, has_signature_algorithm), + PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__AuthResponse, signature_algorithm), + &extensions__core_api__cast_channel__signature_algorithm__descriptor, + &extensions__core_api__cast_channel__auth_response__signature_algorithm__default_value, + 0, /* packed */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned extensions__core_api__cast_channel__auth_response__field_indices_by_name[] = { + 1, /* field[1] = client_auth_certificate */ + 2, /* field[2] = intermediate_certificate */ + 0, /* field[0] = signature */ + 3, /* field[3] = signature_algorithm */ +}; +static const ProtobufCIntRange extensions__core_api__cast_channel__auth_response__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 4 } +}; +const ProtobufCMessageDescriptor extensions__core_api__cast_channel__auth_response__descriptor = +{ + PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC, + "extensions.core_api.cast_channel.AuthResponse", + "AuthResponse", + "Extensions__CoreApi__CastChannel__AuthResponse", + "extensions.core_api.cast_channel", + sizeof(Extensions__CoreApi__CastChannel__AuthResponse), + 4, + extensions__core_api__cast_channel__auth_response__field_descriptors, + extensions__core_api__cast_channel__auth_response__field_indices_by_name, + 1, extensions__core_api__cast_channel__auth_response__number_ranges, + (ProtobufCMessageInit) extensions__core_api__cast_channel__auth_response__init, + NULL,NULL,NULL /* reserved[123] */ +}; +const ProtobufCEnumValue extensions__core_api__cast_channel__auth_error__error_type__enum_values_by_number[3] = +{ + { "INTERNAL_ERROR", "EXTENSIONS__CORE_API__CAST_CHANNEL__AUTH_ERROR__ERROR_TYPE__INTERNAL_ERROR", 0 }, + { "NO_TLS", "EXTENSIONS__CORE_API__CAST_CHANNEL__AUTH_ERROR__ERROR_TYPE__NO_TLS", 1 }, + { "SIGNATURE_ALGORITHM_UNAVAILABLE", "EXTENSIONS__CORE_API__CAST_CHANNEL__AUTH_ERROR__ERROR_TYPE__SIGNATURE_ALGORITHM_UNAVAILABLE", 2 }, +}; +static const ProtobufCIntRange extensions__core_api__cast_channel__auth_error__error_type__value_ranges[] = { +{0, 0},{0, 3} +}; +const ProtobufCEnumValueIndex extensions__core_api__cast_channel__auth_error__error_type__enum_values_by_name[3] = +{ + { "INTERNAL_ERROR", 0 }, + { "NO_TLS", 1 }, + { "SIGNATURE_ALGORITHM_UNAVAILABLE", 2 }, +}; +const ProtobufCEnumDescriptor extensions__core_api__cast_channel__auth_error__error_type__descriptor = +{ + PROTOBUF_C_ENUM_DESCRIPTOR_MAGIC, + "extensions.core_api.cast_channel.AuthError.ErrorType", + "ErrorType", + "Extensions__CoreApi__CastChannel__AuthError__ErrorType", + "extensions.core_api.cast_channel", + 3, + extensions__core_api__cast_channel__auth_error__error_type__enum_values_by_number, + 3, + extensions__core_api__cast_channel__auth_error__error_type__enum_values_by_name, + 1, + extensions__core_api__cast_channel__auth_error__error_type__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; +static const ProtobufCFieldDescriptor extensions__core_api__cast_channel__auth_error__field_descriptors[1] = +{ + { + "error_type", + 1, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_ENUM, + 0, /* quantifier_offset */ + PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__AuthError, error_type), + &extensions__core_api__cast_channel__auth_error__error_type__descriptor, + NULL, + 0, /* packed */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned extensions__core_api__cast_channel__auth_error__field_indices_by_name[] = { + 0, /* field[0] = error_type */ +}; +static const ProtobufCIntRange extensions__core_api__cast_channel__auth_error__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor extensions__core_api__cast_channel__auth_error__descriptor = +{ + PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC, + "extensions.core_api.cast_channel.AuthError", + "AuthError", + "Extensions__CoreApi__CastChannel__AuthError", + "extensions.core_api.cast_channel", + sizeof(Extensions__CoreApi__CastChannel__AuthError), + 1, + extensions__core_api__cast_channel__auth_error__field_descriptors, + extensions__core_api__cast_channel__auth_error__field_indices_by_name, + 1, extensions__core_api__cast_channel__auth_error__number_ranges, + (ProtobufCMessageInit) extensions__core_api__cast_channel__auth_error__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor extensions__core_api__cast_channel__device_auth_message__field_descriptors[3] = +{ + { + "challenge", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__DeviceAuthMessage, challenge), + &extensions__core_api__cast_channel__auth_challenge__descriptor, + NULL, + 0, /* packed */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "response", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__DeviceAuthMessage, response), + &extensions__core_api__cast_channel__auth_response__descriptor, + NULL, + 0, /* packed */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "error", + 3, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + PROTOBUF_C_OFFSETOF(Extensions__CoreApi__CastChannel__DeviceAuthMessage, error), + &extensions__core_api__cast_channel__auth_error__descriptor, + NULL, + 0, /* packed */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned extensions__core_api__cast_channel__device_auth_message__field_indices_by_name[] = { + 0, /* field[0] = challenge */ + 2, /* field[2] = error */ + 1, /* field[1] = response */ +}; +static const ProtobufCIntRange extensions__core_api__cast_channel__device_auth_message__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 3 } +}; +const ProtobufCMessageDescriptor extensions__core_api__cast_channel__device_auth_message__descriptor = +{ + PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC, + "extensions.core_api.cast_channel.DeviceAuthMessage", + "DeviceAuthMessage", + "Extensions__CoreApi__CastChannel__DeviceAuthMessage", + "extensions.core_api.cast_channel", + sizeof(Extensions__CoreApi__CastChannel__DeviceAuthMessage), + 3, + extensions__core_api__cast_channel__device_auth_message__field_descriptors, + extensions__core_api__cast_channel__device_auth_message__field_indices_by_name, + 1, extensions__core_api__cast_channel__device_auth_message__number_ranges, + (ProtobufCMessageInit) extensions__core_api__cast_channel__device_auth_message__init, + NULL,NULL,NULL /* reserved[123] */ +}; +const ProtobufCEnumValue extensions__core_api__cast_channel__signature_algorithm__enum_values_by_number[3] = +{ + { "UNSPECIFIED", "EXTENSIONS__CORE_API__CAST_CHANNEL__SIGNATURE_ALGORITHM__UNSPECIFIED", 0 }, + { "RSASSA_PKCS1v15", "EXTENSIONS__CORE_API__CAST_CHANNEL__SIGNATURE_ALGORITHM__RSASSA_PKCS1V15", 1 }, + { "RSASSA_PSS", "EXTENSIONS__CORE_API__CAST_CHANNEL__SIGNATURE_ALGORITHM__RSASSA_PSS", 2 }, +}; +static const ProtobufCIntRange extensions__core_api__cast_channel__signature_algorithm__value_ranges[] = { +{0, 0},{0, 3} +}; +const ProtobufCEnumValueIndex extensions__core_api__cast_channel__signature_algorithm__enum_values_by_name[3] = +{ + { "RSASSA_PKCS1v15", 1 }, + { "RSASSA_PSS", 2 }, + { "UNSPECIFIED", 0 }, +}; +const ProtobufCEnumDescriptor extensions__core_api__cast_channel__signature_algorithm__descriptor = +{ + PROTOBUF_C_ENUM_DESCRIPTOR_MAGIC, + "extensions.core_api.cast_channel.SignatureAlgorithm", + "SignatureAlgorithm", + "Extensions__CoreApi__CastChannel__SignatureAlgorithm", + "extensions.core_api.cast_channel", + 3, + extensions__core_api__cast_channel__signature_algorithm__enum_values_by_number, + 3, + extensions__core_api__cast_channel__signature_algorithm__enum_values_by_name, + 1, + extensions__core_api__cast_channel__signature_algorithm__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; diff --git a/src/outputs/cast_channel.v0.pb-c.h b/src/outputs/cast_channel.v0.pb-c.h new file mode 100644 index 00000000..ade6ba57 --- /dev/null +++ b/src/outputs/cast_channel.v0.pb-c.h @@ -0,0 +1,236 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ + +#ifndef PROTOBUF_C_cast_5fchannel_2eproto__INCLUDED +#define PROTOBUF_C_cast_5fchannel_2eproto__INCLUDED + +#include + +PROTOBUF_C_BEGIN_DECLS + + +typedef struct _Extensions__CoreApi__CastChannel__CastMessage Extensions__CoreApi__CastChannel__CastMessage; +typedef struct _Extensions__CoreApi__CastChannel__AuthChallenge Extensions__CoreApi__CastChannel__AuthChallenge; +typedef struct _Extensions__CoreApi__CastChannel__AuthResponse Extensions__CoreApi__CastChannel__AuthResponse; +typedef struct _Extensions__CoreApi__CastChannel__AuthError Extensions__CoreApi__CastChannel__AuthError; +typedef struct _Extensions__CoreApi__CastChannel__DeviceAuthMessage Extensions__CoreApi__CastChannel__DeviceAuthMessage; + + +/* --- enums --- */ + +typedef enum _Extensions__CoreApi__CastChannel__CastMessage__ProtocolVersion { + EXTENSIONS__CORE_API__CAST_CHANNEL__CAST_MESSAGE__PROTOCOL_VERSION__CASTV2_1_0 = 0 +} Extensions__CoreApi__CastChannel__CastMessage__ProtocolVersion; +typedef enum _Extensions__CoreApi__CastChannel__CastMessage__PayloadType { + EXTENSIONS__CORE_API__CAST_CHANNEL__CAST_MESSAGE__PAYLOAD_TYPE__STRING = 0, + EXTENSIONS__CORE_API__CAST_CHANNEL__CAST_MESSAGE__PAYLOAD_TYPE__BINARY = 1 +} Extensions__CoreApi__CastChannel__CastMessage__PayloadType; +typedef enum _Extensions__CoreApi__CastChannel__AuthError__ErrorType { + EXTENSIONS__CORE_API__CAST_CHANNEL__AUTH_ERROR__ERROR_TYPE__INTERNAL_ERROR = 0, + EXTENSIONS__CORE_API__CAST_CHANNEL__AUTH_ERROR__ERROR_TYPE__NO_TLS = 1, + EXTENSIONS__CORE_API__CAST_CHANNEL__AUTH_ERROR__ERROR_TYPE__SIGNATURE_ALGORITHM_UNAVAILABLE = 2 +} Extensions__CoreApi__CastChannel__AuthError__ErrorType; +typedef enum _Extensions__CoreApi__CastChannel__SignatureAlgorithm { + EXTENSIONS__CORE_API__CAST_CHANNEL__SIGNATURE_ALGORITHM__UNSPECIFIED = 0, + EXTENSIONS__CORE_API__CAST_CHANNEL__SIGNATURE_ALGORITHM__RSASSA_PKCS1V15 = 1, + EXTENSIONS__CORE_API__CAST_CHANNEL__SIGNATURE_ALGORITHM__RSASSA_PSS = 2 +} Extensions__CoreApi__CastChannel__SignatureAlgorithm; + +/* --- messages --- */ + +struct _Extensions__CoreApi__CastChannel__CastMessage +{ + ProtobufCMessage base; + Extensions__CoreApi__CastChannel__CastMessage__ProtocolVersion protocol_version; + char *source_id; + char *destination_id; + char *namespace_; + Extensions__CoreApi__CastChannel__CastMessage__PayloadType payload_type; + char *payload_utf8; + protobuf_c_boolean has_payload_binary; + ProtobufCBinaryData payload_binary; +}; +#define EXTENSIONS__CORE_API__CAST_CHANNEL__CAST_MESSAGE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&extensions__core_api__cast_channel__cast_message__descriptor) \ + , 0, NULL, NULL, NULL, 0, NULL, 0,{0,NULL} } + + +struct _Extensions__CoreApi__CastChannel__AuthChallenge +{ + ProtobufCMessage base; + protobuf_c_boolean has_signature_algorithm; + Extensions__CoreApi__CastChannel__SignatureAlgorithm signature_algorithm; +}; +#define EXTENSIONS__CORE_API__CAST_CHANNEL__AUTH_CHALLENGE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&extensions__core_api__cast_channel__auth_challenge__descriptor) \ + , 0,EXTENSIONS__CORE_API__CAST_CHANNEL__SIGNATURE_ALGORITHM__RSASSA_PKCS1V15 } + + +struct _Extensions__CoreApi__CastChannel__AuthResponse +{ + ProtobufCMessage base; + ProtobufCBinaryData signature; + ProtobufCBinaryData client_auth_certificate; + size_t n_intermediate_certificate; + ProtobufCBinaryData *intermediate_certificate; + protobuf_c_boolean has_signature_algorithm; + Extensions__CoreApi__CastChannel__SignatureAlgorithm signature_algorithm; +}; +#define EXTENSIONS__CORE_API__CAST_CHANNEL__AUTH_RESPONSE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&extensions__core_api__cast_channel__auth_response__descriptor) \ + , {0,NULL}, {0,NULL}, 0,NULL, 0,EXTENSIONS__CORE_API__CAST_CHANNEL__SIGNATURE_ALGORITHM__RSASSA_PKCS1V15 } + + +struct _Extensions__CoreApi__CastChannel__AuthError +{ + ProtobufCMessage base; + Extensions__CoreApi__CastChannel__AuthError__ErrorType error_type; +}; +#define EXTENSIONS__CORE_API__CAST_CHANNEL__AUTH_ERROR__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&extensions__core_api__cast_channel__auth_error__descriptor) \ + , 0 } + + +struct _Extensions__CoreApi__CastChannel__DeviceAuthMessage +{ + ProtobufCMessage base; + Extensions__CoreApi__CastChannel__AuthChallenge *challenge; + Extensions__CoreApi__CastChannel__AuthResponse *response; + Extensions__CoreApi__CastChannel__AuthError *error; +}; +#define EXTENSIONS__CORE_API__CAST_CHANNEL__DEVICE_AUTH_MESSAGE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&extensions__core_api__cast_channel__device_auth_message__descriptor) \ + , NULL, NULL, NULL } + + +/* Extensions__CoreApi__CastChannel__CastMessage methods */ +void extensions__core_api__cast_channel__cast_message__init + (Extensions__CoreApi__CastChannel__CastMessage *message); +size_t extensions__core_api__cast_channel__cast_message__get_packed_size + (const Extensions__CoreApi__CastChannel__CastMessage *message); +size_t extensions__core_api__cast_channel__cast_message__pack + (const Extensions__CoreApi__CastChannel__CastMessage *message, + uint8_t *out); +size_t extensions__core_api__cast_channel__cast_message__pack_to_buffer + (const Extensions__CoreApi__CastChannel__CastMessage *message, + ProtobufCBuffer *buffer); +Extensions__CoreApi__CastChannel__CastMessage * + extensions__core_api__cast_channel__cast_message__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void extensions__core_api__cast_channel__cast_message__free_unpacked + (Extensions__CoreApi__CastChannel__CastMessage *message, + ProtobufCAllocator *allocator); +/* Extensions__CoreApi__CastChannel__AuthChallenge methods */ +void extensions__core_api__cast_channel__auth_challenge__init + (Extensions__CoreApi__CastChannel__AuthChallenge *message); +size_t extensions__core_api__cast_channel__auth_challenge__get_packed_size + (const Extensions__CoreApi__CastChannel__AuthChallenge *message); +size_t extensions__core_api__cast_channel__auth_challenge__pack + (const Extensions__CoreApi__CastChannel__AuthChallenge *message, + uint8_t *out); +size_t extensions__core_api__cast_channel__auth_challenge__pack_to_buffer + (const Extensions__CoreApi__CastChannel__AuthChallenge *message, + ProtobufCBuffer *buffer); +Extensions__CoreApi__CastChannel__AuthChallenge * + extensions__core_api__cast_channel__auth_challenge__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void extensions__core_api__cast_channel__auth_challenge__free_unpacked + (Extensions__CoreApi__CastChannel__AuthChallenge *message, + ProtobufCAllocator *allocator); +/* Extensions__CoreApi__CastChannel__AuthResponse methods */ +void extensions__core_api__cast_channel__auth_response__init + (Extensions__CoreApi__CastChannel__AuthResponse *message); +size_t extensions__core_api__cast_channel__auth_response__get_packed_size + (const Extensions__CoreApi__CastChannel__AuthResponse *message); +size_t extensions__core_api__cast_channel__auth_response__pack + (const Extensions__CoreApi__CastChannel__AuthResponse *message, + uint8_t *out); +size_t extensions__core_api__cast_channel__auth_response__pack_to_buffer + (const Extensions__CoreApi__CastChannel__AuthResponse *message, + ProtobufCBuffer *buffer); +Extensions__CoreApi__CastChannel__AuthResponse * + extensions__core_api__cast_channel__auth_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void extensions__core_api__cast_channel__auth_response__free_unpacked + (Extensions__CoreApi__CastChannel__AuthResponse *message, + ProtobufCAllocator *allocator); +/* Extensions__CoreApi__CastChannel__AuthError methods */ +void extensions__core_api__cast_channel__auth_error__init + (Extensions__CoreApi__CastChannel__AuthError *message); +size_t extensions__core_api__cast_channel__auth_error__get_packed_size + (const Extensions__CoreApi__CastChannel__AuthError *message); +size_t extensions__core_api__cast_channel__auth_error__pack + (const Extensions__CoreApi__CastChannel__AuthError *message, + uint8_t *out); +size_t extensions__core_api__cast_channel__auth_error__pack_to_buffer + (const Extensions__CoreApi__CastChannel__AuthError *message, + ProtobufCBuffer *buffer); +Extensions__CoreApi__CastChannel__AuthError * + extensions__core_api__cast_channel__auth_error__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void extensions__core_api__cast_channel__auth_error__free_unpacked + (Extensions__CoreApi__CastChannel__AuthError *message, + ProtobufCAllocator *allocator); +/* Extensions__CoreApi__CastChannel__DeviceAuthMessage methods */ +void extensions__core_api__cast_channel__device_auth_message__init + (Extensions__CoreApi__CastChannel__DeviceAuthMessage *message); +size_t extensions__core_api__cast_channel__device_auth_message__get_packed_size + (const Extensions__CoreApi__CastChannel__DeviceAuthMessage *message); +size_t extensions__core_api__cast_channel__device_auth_message__pack + (const Extensions__CoreApi__CastChannel__DeviceAuthMessage *message, + uint8_t *out); +size_t extensions__core_api__cast_channel__device_auth_message__pack_to_buffer + (const Extensions__CoreApi__CastChannel__DeviceAuthMessage *message, + ProtobufCBuffer *buffer); +Extensions__CoreApi__CastChannel__DeviceAuthMessage * + extensions__core_api__cast_channel__device_auth_message__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void extensions__core_api__cast_channel__device_auth_message__free_unpacked + (Extensions__CoreApi__CastChannel__DeviceAuthMessage *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*Extensions__CoreApi__CastChannel__CastMessage_Closure) + (const Extensions__CoreApi__CastChannel__CastMessage *message, + void *closure_data); +typedef void (*Extensions__CoreApi__CastChannel__AuthChallenge_Closure) + (const Extensions__CoreApi__CastChannel__AuthChallenge *message, + void *closure_data); +typedef void (*Extensions__CoreApi__CastChannel__AuthResponse_Closure) + (const Extensions__CoreApi__CastChannel__AuthResponse *message, + void *closure_data); +typedef void (*Extensions__CoreApi__CastChannel__AuthError_Closure) + (const Extensions__CoreApi__CastChannel__AuthError *message, + void *closure_data); +typedef void (*Extensions__CoreApi__CastChannel__DeviceAuthMessage_Closure) + (const Extensions__CoreApi__CastChannel__DeviceAuthMessage *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCEnumDescriptor extensions__core_api__cast_channel__signature_algorithm__descriptor; +extern const ProtobufCMessageDescriptor extensions__core_api__cast_channel__cast_message__descriptor; +extern const ProtobufCEnumDescriptor extensions__core_api__cast_channel__cast_message__protocol_version__descriptor; +extern const ProtobufCEnumDescriptor extensions__core_api__cast_channel__cast_message__payload_type__descriptor; +extern const ProtobufCMessageDescriptor extensions__core_api__cast_channel__auth_challenge__descriptor; +extern const ProtobufCMessageDescriptor extensions__core_api__cast_channel__auth_response__descriptor; +extern const ProtobufCMessageDescriptor extensions__core_api__cast_channel__auth_error__descriptor; +extern const ProtobufCEnumDescriptor extensions__core_api__cast_channel__auth_error__error_type__descriptor; +extern const ProtobufCMessageDescriptor extensions__core_api__cast_channel__device_auth_message__descriptor; + +PROTOBUF_C_END_DECLS + + +#endif /* PROTOBUF_cast_5fchannel_2eproto__INCLUDED */