yats-connectors.git

ref: 7c647735402dafcb78eac1232d0319f3a8ce162a

yats-connector-c/yats-grpc.pb-c.h


  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
/* Generated by the protocol buffer compiler.  DO NOT EDIT! */
/* Generated from: yats-grpc.proto */

#ifndef PROTOBUF_C_yats_2dgrpc_2eproto__INCLUDED
#define PROTOBUF_C_yats_2dgrpc_2eproto__INCLUDED

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

PROTOBUF_C__BEGIN_DECLS

#if PROTOBUF_C_VERSION_NUMBER < 1003000
# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
#elif 1004001 < 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 Yats__Metric Yats__Metric;
typedef struct Yats__Event Yats__Event;
typedef struct Yats__CreateMetricRequest Yats__CreateMetricRequest;
typedef struct Yats__CreateMetricResponse Yats__CreateMetricResponse;
typedef struct Yats__CreateEventRequest Yats__CreateEventRequest;
typedef struct Yats__CreateEventResponse Yats__CreateEventResponse;


/* --- enums --- */


/* --- messages --- */

struct  Yats__Metric
{
  ProtobufCMessage base;
  char *id_client;
  int64_t mtime;
  char *name;
  char *value;
};
#define YATS__METRIC__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&yats__metric__descriptor) \
    , (char *)protobuf_c_empty_string, 0, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string }


struct  Yats__Event
{
  ProtobufCMessage base;
  char *id_client;
  int64_t etime;
  char *name;
};
#define YATS__EVENT__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&yats__event__descriptor) \
    , (char *)protobuf_c_empty_string, 0, (char *)protobuf_c_empty_string }


struct  Yats__CreateMetricRequest
{
  ProtobufCMessage base;
  Yats__Metric *metric;
};
#define YATS__CREATE_METRIC_REQUEST__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&yats__create_metric_request__descriptor) \
    , NULL }


struct  Yats__CreateMetricResponse
{
  ProtobufCMessage base;
  Yats__Metric *metric;
};
#define YATS__CREATE_METRIC_RESPONSE__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&yats__create_metric_response__descriptor) \
    , NULL }


struct  Yats__CreateEventRequest
{
  ProtobufCMessage base;
  Yats__Event *event;
};
#define YATS__CREATE_EVENT_REQUEST__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&yats__create_event_request__descriptor) \
    , NULL }


struct  Yats__CreateEventResponse
{
  ProtobufCMessage base;
  Yats__Event *event;
};
#define YATS__CREATE_EVENT_RESPONSE__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&yats__create_event_response__descriptor) \
    , NULL }


/* Yats__Metric methods */
void   yats__metric__init
                     (Yats__Metric         *message);
size_t yats__metric__get_packed_size
                     (const Yats__Metric   *message);
size_t yats__metric__pack
                     (const Yats__Metric   *message,
                      uint8_t             *out);
size_t yats__metric__pack_to_buffer
                     (const Yats__Metric   *message,
                      ProtobufCBuffer     *buffer);
Yats__Metric *
       yats__metric__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   yats__metric__free_unpacked
                     (Yats__Metric *message,
                      ProtobufCAllocator *allocator);
/* Yats__Event methods */
void   yats__event__init
                     (Yats__Event         *message);
size_t yats__event__get_packed_size
                     (const Yats__Event   *message);
size_t yats__event__pack
                     (const Yats__Event   *message,
                      uint8_t             *out);
size_t yats__event__pack_to_buffer
                     (const Yats__Event   *message,
                      ProtobufCBuffer     *buffer);
Yats__Event *
       yats__event__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   yats__event__free_unpacked
                     (Yats__Event *message,
                      ProtobufCAllocator *allocator);
/* Yats__CreateMetricRequest methods */
void   yats__create_metric_request__init
                     (Yats__CreateMetricRequest         *message);
size_t yats__create_metric_request__get_packed_size
                     (const Yats__CreateMetricRequest   *message);
size_t yats__create_metric_request__pack
                     (const Yats__CreateMetricRequest   *message,
                      uint8_t             *out);
size_t yats__create_metric_request__pack_to_buffer
                     (const Yats__CreateMetricRequest   *message,
                      ProtobufCBuffer     *buffer);
Yats__CreateMetricRequest *
       yats__create_metric_request__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   yats__create_metric_request__free_unpacked
                     (Yats__CreateMetricRequest *message,
                      ProtobufCAllocator *allocator);
/* Yats__CreateMetricResponse methods */
void   yats__create_metric_response__init
                     (Yats__CreateMetricResponse         *message);
size_t yats__create_metric_response__get_packed_size
                     (const Yats__CreateMetricResponse   *message);
size_t yats__create_metric_response__pack
                     (const Yats__CreateMetricResponse   *message,
                      uint8_t             *out);
size_t yats__create_metric_response__pack_to_buffer
                     (const Yats__CreateMetricResponse   *message,
                      ProtobufCBuffer     *buffer);
Yats__CreateMetricResponse *
       yats__create_metric_response__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   yats__create_metric_response__free_unpacked
                     (Yats__CreateMetricResponse *message,
                      ProtobufCAllocator *allocator);
/* Yats__CreateEventRequest methods */
void   yats__create_event_request__init
                     (Yats__CreateEventRequest         *message);
size_t yats__create_event_request__get_packed_size
                     (const Yats__CreateEventRequest   *message);
size_t yats__create_event_request__pack
                     (const Yats__CreateEventRequest   *message,
                      uint8_t             *out);
size_t yats__create_event_request__pack_to_buffer
                     (const Yats__CreateEventRequest   *message,
                      ProtobufCBuffer     *buffer);
Yats__CreateEventRequest *
       yats__create_event_request__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   yats__create_event_request__free_unpacked
                     (Yats__CreateEventRequest *message,
                      ProtobufCAllocator *allocator);
/* Yats__CreateEventResponse methods */
void   yats__create_event_response__init
                     (Yats__CreateEventResponse         *message);
size_t yats__create_event_response__get_packed_size
                     (const Yats__CreateEventResponse   *message);
size_t yats__create_event_response__pack
                     (const Yats__CreateEventResponse   *message,
                      uint8_t             *out);
size_t yats__create_event_response__pack_to_buffer
                     (const Yats__CreateEventResponse   *message,
                      ProtobufCBuffer     *buffer);
Yats__CreateEventResponse *
       yats__create_event_response__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   yats__create_event_response__free_unpacked
                     (Yats__CreateEventResponse *message,
                      ProtobufCAllocator *allocator);
/* --- per-message closures --- */

typedef void (*Yats__Metric_Closure)
                 (const Yats__Metric *message,
                  void *closure_data);
typedef void (*Yats__Event_Closure)
                 (const Yats__Event *message,
                  void *closure_data);
typedef void (*Yats__CreateMetricRequest_Closure)
                 (const Yats__CreateMetricRequest *message,
                  void *closure_data);
typedef void (*Yats__CreateMetricResponse_Closure)
                 (const Yats__CreateMetricResponse *message,
                  void *closure_data);
typedef void (*Yats__CreateEventRequest_Closure)
                 (const Yats__CreateEventRequest *message,
                  void *closure_data);
typedef void (*Yats__CreateEventResponse_Closure)
                 (const Yats__CreateEventResponse *message,
                  void *closure_data);

/* --- services --- */

typedef struct Yats__YatsGrpcService_Service Yats__YatsGrpcService_Service;
struct Yats__YatsGrpcService_Service
{
  ProtobufCService base;
  void (*create_metric)(Yats__YatsGrpcService_Service *service,
                        const Yats__CreateMetricRequest *input,
                        Yats__CreateMetricResponse_Closure closure,
                        void *closure_data);
  void (*create_event)(Yats__YatsGrpcService_Service *service,
                       const Yats__CreateEventRequest *input,
                       Yats__CreateEventResponse_Closure closure,
                       void *closure_data);
};
typedef void (*Yats__YatsGrpcService_ServiceDestroy)(Yats__YatsGrpcService_Service *);
void yats__yats_grpc_service__init (Yats__YatsGrpcService_Service *service,
                                    Yats__YatsGrpcService_ServiceDestroy destroy);
#define YATS__YATS_GRPC_SERVICE__BASE_INIT \
    { &yats__yats_grpc_service__descriptor, protobuf_c_service_invoke_internal, NULL }
#define YATS__YATS_GRPC_SERVICE__INIT(function_prefix__) \
    { YATS__YATS_GRPC_SERVICE__BASE_INIT,\
      function_prefix__ ## create_metric,\
      function_prefix__ ## create_event  }
void yats__yats_grpc_service__create_metric(ProtobufCService *service,
                                            const Yats__CreateMetricRequest *input,
                                            Yats__CreateMetricResponse_Closure closure,
                                            void *closure_data);
void yats__yats_grpc_service__create_event(ProtobufCService *service,
                                           const Yats__CreateEventRequest *input,
                                           Yats__CreateEventResponse_Closure closure,
                                           void *closure_data);

/* --- descriptors --- */

extern const ProtobufCMessageDescriptor yats__metric__descriptor;
extern const ProtobufCMessageDescriptor yats__event__descriptor;
extern const ProtobufCMessageDescriptor yats__create_metric_request__descriptor;
extern const ProtobufCMessageDescriptor yats__create_metric_response__descriptor;
extern const ProtobufCMessageDescriptor yats__create_event_request__descriptor;
extern const ProtobufCMessageDescriptor yats__create_event_response__descriptor;
extern const ProtobufCServiceDescriptor yats__yats_grpc_service__descriptor;

PROTOBUF_C__END_DECLS


#endif  /* PROTOBUF_C_yats_2dgrpc_2eproto__INCLUDED */