1 /* Generated by the protocol buffer compiler. DO NOT EDIT! */
2 /* Generated from: FingerprintProtocol.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 "FingerprintProtocol.pb-c.h"
textsecure__logical_fingerprint__init(Textsecure__LogicalFingerprint * message)10 void textsecure__logical_fingerprint__init
11 (Textsecure__LogicalFingerprint *message)
12 {
13 static Textsecure__LogicalFingerprint init_value = TEXTSECURE__LOGICAL_FINGERPRINT__INIT;
14 *message = init_value;
15 }
textsecure__logical_fingerprint__get_packed_size(const Textsecure__LogicalFingerprint * message)16 size_t textsecure__logical_fingerprint__get_packed_size
17 (const Textsecure__LogicalFingerprint *message)
18 {
19 assert(message->base.descriptor == &textsecure__logical_fingerprint__descriptor);
20 return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
21 }
textsecure__logical_fingerprint__pack(const Textsecure__LogicalFingerprint * message,uint8_t * out)22 size_t textsecure__logical_fingerprint__pack
23 (const Textsecure__LogicalFingerprint *message,
24 uint8_t *out)
25 {
26 assert(message->base.descriptor == &textsecure__logical_fingerprint__descriptor);
27 return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
28 }
textsecure__logical_fingerprint__pack_to_buffer(const Textsecure__LogicalFingerprint * message,ProtobufCBuffer * buffer)29 size_t textsecure__logical_fingerprint__pack_to_buffer
30 (const Textsecure__LogicalFingerprint *message,
31 ProtobufCBuffer *buffer)
32 {
33 assert(message->base.descriptor == &textsecure__logical_fingerprint__descriptor);
34 return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
35 }
36 Textsecure__LogicalFingerprint *
textsecure__logical_fingerprint__unpack(ProtobufCAllocator * allocator,size_t len,const uint8_t * data)37 textsecure__logical_fingerprint__unpack
38 (ProtobufCAllocator *allocator,
39 size_t len,
40 const uint8_t *data)
41 {
42 return (Textsecure__LogicalFingerprint *)
43 protobuf_c_message_unpack (&textsecure__logical_fingerprint__descriptor,
44 allocator, len, data);
45 }
textsecure__logical_fingerprint__free_unpacked(Textsecure__LogicalFingerprint * message,ProtobufCAllocator * allocator)46 void textsecure__logical_fingerprint__free_unpacked
47 (Textsecure__LogicalFingerprint *message,
48 ProtobufCAllocator *allocator)
49 {
50 assert(message->base.descriptor == &textsecure__logical_fingerprint__descriptor);
51 protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
52 }
textsecure__combined_fingerprints__init(Textsecure__CombinedFingerprints * message)53 void textsecure__combined_fingerprints__init
54 (Textsecure__CombinedFingerprints *message)
55 {
56 static Textsecure__CombinedFingerprints init_value = TEXTSECURE__COMBINED_FINGERPRINTS__INIT;
57 *message = init_value;
58 }
textsecure__combined_fingerprints__get_packed_size(const Textsecure__CombinedFingerprints * message)59 size_t textsecure__combined_fingerprints__get_packed_size
60 (const Textsecure__CombinedFingerprints *message)
61 {
62 assert(message->base.descriptor == &textsecure__combined_fingerprints__descriptor);
63 return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
64 }
textsecure__combined_fingerprints__pack(const Textsecure__CombinedFingerprints * message,uint8_t * out)65 size_t textsecure__combined_fingerprints__pack
66 (const Textsecure__CombinedFingerprints *message,
67 uint8_t *out)
68 {
69 assert(message->base.descriptor == &textsecure__combined_fingerprints__descriptor);
70 return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
71 }
textsecure__combined_fingerprints__pack_to_buffer(const Textsecure__CombinedFingerprints * message,ProtobufCBuffer * buffer)72 size_t textsecure__combined_fingerprints__pack_to_buffer
73 (const Textsecure__CombinedFingerprints *message,
74 ProtobufCBuffer *buffer)
75 {
76 assert(message->base.descriptor == &textsecure__combined_fingerprints__descriptor);
77 return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
78 }
79 Textsecure__CombinedFingerprints *
textsecure__combined_fingerprints__unpack(ProtobufCAllocator * allocator,size_t len,const uint8_t * data)80 textsecure__combined_fingerprints__unpack
81 (ProtobufCAllocator *allocator,
82 size_t len,
83 const uint8_t *data)
84 {
85 return (Textsecure__CombinedFingerprints *)
86 protobuf_c_message_unpack (&textsecure__combined_fingerprints__descriptor,
87 allocator, len, data);
88 }
textsecure__combined_fingerprints__free_unpacked(Textsecure__CombinedFingerprints * message,ProtobufCAllocator * allocator)89 void textsecure__combined_fingerprints__free_unpacked
90 (Textsecure__CombinedFingerprints *message,
91 ProtobufCAllocator *allocator)
92 {
93 assert(message->base.descriptor == &textsecure__combined_fingerprints__descriptor);
94 protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
95 }
96 static const ProtobufCFieldDescriptor textsecure__logical_fingerprint__field_descriptors[2] =
97 {
98 {
99 "content",
100 1,
101 PROTOBUF_C_LABEL_OPTIONAL,
102 PROTOBUF_C_TYPE_BYTES,
103 offsetof(Textsecure__LogicalFingerprint, has_content),
104 offsetof(Textsecure__LogicalFingerprint, content),
105 NULL,
106 NULL,
107 0, /* flags */
108 0,NULL,NULL /* reserved1,reserved2, etc */
109 },
110 {
111 "identifier",
112 2,
113 PROTOBUF_C_LABEL_OPTIONAL,
114 PROTOBUF_C_TYPE_BYTES,
115 offsetof(Textsecure__LogicalFingerprint, has_identifier),
116 offsetof(Textsecure__LogicalFingerprint, identifier),
117 NULL,
118 NULL,
119 0, /* flags */
120 0,NULL,NULL /* reserved1,reserved2, etc */
121 },
122 };
123 static const unsigned textsecure__logical_fingerprint__field_indices_by_name[] = {
124 0, /* field[0] = content */
125 1, /* field[1] = identifier */
126 };
127 static const ProtobufCIntRange textsecure__logical_fingerprint__number_ranges[1 + 1] =
128 {
129 { 1, 0 },
130 { 0, 2 }
131 };
132 const ProtobufCMessageDescriptor textsecure__logical_fingerprint__descriptor =
133 {
134 PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
135 "textsecure.LogicalFingerprint",
136 "LogicalFingerprint",
137 "Textsecure__LogicalFingerprint",
138 "textsecure",
139 sizeof(Textsecure__LogicalFingerprint),
140 2,
141 textsecure__logical_fingerprint__field_descriptors,
142 textsecure__logical_fingerprint__field_indices_by_name,
143 1, textsecure__logical_fingerprint__number_ranges,
144 (ProtobufCMessageInit) textsecure__logical_fingerprint__init,
145 NULL,NULL,NULL /* reserved[123] */
146 };
147 static const ProtobufCFieldDescriptor textsecure__combined_fingerprints__field_descriptors[3] =
148 {
149 {
150 "version",
151 1,
152 PROTOBUF_C_LABEL_OPTIONAL,
153 PROTOBUF_C_TYPE_UINT32,
154 offsetof(Textsecure__CombinedFingerprints, has_version),
155 offsetof(Textsecure__CombinedFingerprints, version),
156 NULL,
157 NULL,
158 0, /* flags */
159 0,NULL,NULL /* reserved1,reserved2, etc */
160 },
161 {
162 "localFingerprint",
163 2,
164 PROTOBUF_C_LABEL_OPTIONAL,
165 PROTOBUF_C_TYPE_MESSAGE,
166 0, /* quantifier_offset */
167 offsetof(Textsecure__CombinedFingerprints, localfingerprint),
168 &textsecure__logical_fingerprint__descriptor,
169 NULL,
170 0, /* flags */
171 0,NULL,NULL /* reserved1,reserved2, etc */
172 },
173 {
174 "remoteFingerprint",
175 3,
176 PROTOBUF_C_LABEL_OPTIONAL,
177 PROTOBUF_C_TYPE_MESSAGE,
178 0, /* quantifier_offset */
179 offsetof(Textsecure__CombinedFingerprints, remotefingerprint),
180 &textsecure__logical_fingerprint__descriptor,
181 NULL,
182 0, /* flags */
183 0,NULL,NULL /* reserved1,reserved2, etc */
184 },
185 };
186 static const unsigned textsecure__combined_fingerprints__field_indices_by_name[] = {
187 1, /* field[1] = localFingerprint */
188 2, /* field[2] = remoteFingerprint */
189 0, /* field[0] = version */
190 };
191 static const ProtobufCIntRange textsecure__combined_fingerprints__number_ranges[1 + 1] =
192 {
193 { 1, 0 },
194 { 0, 3 }
195 };
196 const ProtobufCMessageDescriptor textsecure__combined_fingerprints__descriptor =
197 {
198 PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
199 "textsecure.CombinedFingerprints",
200 "CombinedFingerprints",
201 "Textsecure__CombinedFingerprints",
202 "textsecure",
203 sizeof(Textsecure__CombinedFingerprints),
204 3,
205 textsecure__combined_fingerprints__field_descriptors,
206 textsecure__combined_fingerprints__field_indices_by_name,
207 1, textsecure__combined_fingerprints__number_ranges,
208 (ProtobufCMessageInit) textsecure__combined_fingerprints__init,
209 NULL,NULL,NULL /* reserved[123] */
210 };
211