nmsg  0.9.0
logline.pb-c.c
1 /* Generated by the protocol buffer compiler. DO NOT EDIT! */
2 /* Generated from: nmsg/base/logline.proto */
3 
4 /* Do not generate deprecated warnings for self */
5 #ifndef PROTOBUF_C__NO_DEPRECATED
6 #define PROTOBUF_C__NO_DEPRECATED
7 #endif
8 
9 #include "nmsg/base/logline.pb-c.h"
10 void nmsg__base__log_line__init
11  (Nmsg__Base__LogLine *message)
12 {
13  static Nmsg__Base__LogLine init_value = NMSG__BASE__LOG_LINE__INIT;
14  *message = init_value;
15 }
16 size_t nmsg__base__log_line__get_packed_size
17  (const Nmsg__Base__LogLine *message)
18 {
19  assert(message->base.descriptor == &nmsg__base__log_line__descriptor);
20  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
21 }
22 size_t nmsg__base__log_line__pack
23  (const Nmsg__Base__LogLine *message,
24  uint8_t *out)
25 {
26  assert(message->base.descriptor == &nmsg__base__log_line__descriptor);
27  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
28 }
29 size_t nmsg__base__log_line__pack_to_buffer
30  (const Nmsg__Base__LogLine *message,
31  ProtobufCBuffer *buffer)
32 {
33  assert(message->base.descriptor == &nmsg__base__log_line__descriptor);
34  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
35 }
36 Nmsg__Base__LogLine *
37  nmsg__base__log_line__unpack
38  (ProtobufCAllocator *allocator,
39  size_t len,
40  const uint8_t *data)
41 {
42  return (Nmsg__Base__LogLine *)
43  protobuf_c_message_unpack (&nmsg__base__log_line__descriptor,
44  allocator, len, data);
45 }
46 void nmsg__base__log_line__free_unpacked
47  (Nmsg__Base__LogLine *message,
48  ProtobufCAllocator *allocator)
49 {
50  assert(message->base.descriptor == &nmsg__base__log_line__descriptor);
51  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
52 }
53 static const ProtobufCFieldDescriptor nmsg__base__log_line__field_descriptors[2] =
54 {
55  {
56  "category",
57  1,
58  PROTOBUF_C_LABEL_OPTIONAL,
59  PROTOBUF_C_TYPE_BYTES,
60  offsetof(Nmsg__Base__LogLine, has_category),
61  offsetof(Nmsg__Base__LogLine, category),
62  NULL,
63  NULL,
64  0, /* flags */
65  0,NULL,NULL /* reserved1,reserved2, etc */
66  },
67  {
68  "message",
69  2,
70  PROTOBUF_C_LABEL_OPTIONAL,
71  PROTOBUF_C_TYPE_BYTES,
72  offsetof(Nmsg__Base__LogLine, has_message),
73  offsetof(Nmsg__Base__LogLine, message),
74  NULL,
75  NULL,
76  0, /* flags */
77  0,NULL,NULL /* reserved1,reserved2, etc */
78  },
79 };
80 static const unsigned nmsg__base__log_line__field_indices_by_name[] = {
81  0, /* field[0] = category */
82  1, /* field[1] = message */
83 };
84 static const ProtobufCIntRange nmsg__base__log_line__number_ranges[1 + 1] =
85 {
86  { 1, 0 },
87  { 0, 2 }
88 };
89 const ProtobufCMessageDescriptor nmsg__base__log_line__descriptor =
90 {
91  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
92  "nmsg.base.LogLine",
93  "LogLine",
94  "Nmsg__Base__LogLine",
95  "nmsg.base",
96  sizeof(Nmsg__Base__LogLine),
97  2,
98  nmsg__base__log_line__field_descriptors,
99  nmsg__base__log_line__field_indices_by_name,
100  1, nmsg__base__log_line__number_ranges,
101  (ProtobufCMessageInit) nmsg__base__log_line__init,
102  NULL,NULL,NULL /* reserved[123] */
103 };