diff options
Diffstat (limited to 'src/conversation/conversation.h')
-rw-r--r-- | src/conversation/conversation.h | 56 |
1 files changed, 37 insertions, 19 deletions
diff --git a/src/conversation/conversation.h b/src/conversation/conversation.h index 0a9e2b5fb..ed614ab1b 100644 --- a/src/conversation/conversation.h +++ b/src/conversation/conversation.h | |||
@@ -36,7 +36,8 @@ extern "C" | |||
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | 38 | ||
39 | #define MAX_TRANSMIT_DELAY GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 60) | 39 | #define MAX_TRANSMIT_DELAY GNUNET_TIME_relative_multiply ( \ |
40 | GNUNET_TIME_UNIT_SECONDS, 60) | ||
40 | 41 | ||
41 | 42 | ||
42 | /** | 43 | /** |
@@ -44,7 +45,7 @@ extern "C" | |||
44 | * bit set if we are making an outgoing call, | 45 | * bit set if we are making an outgoing call, |
45 | * bit unset for local lines. | 46 | * bit unset for local lines. |
46 | */ | 47 | */ |
47 | #define HIGH_BIT ((uint32_t)(1LL << 31)) | 48 | #define HIGH_BIT ((uint32_t) (1LL << 31)) |
48 | 49 | ||
49 | GNUNET_NETWORK_STRUCT_BEGIN | 50 | GNUNET_NETWORK_STRUCT_BEGIN |
50 | 51 | ||
@@ -52,7 +53,8 @@ GNUNET_NETWORK_STRUCT_BEGIN | |||
52 | /** | 53 | /** |
53 | * Message to transmit the audio (between client and helpers). | 54 | * Message to transmit the audio (between client and helpers). |
54 | */ | 55 | */ |
55 | struct AudioMessage { | 56 | struct AudioMessage |
57 | { | ||
56 | /** | 58 | /** |
57 | * Type is #GNUNET_MESSAGE_TYPE_CONVERSATION_AUDIO | 59 | * Type is #GNUNET_MESSAGE_TYPE_CONVERSATION_AUDIO |
58 | */ | 60 | */ |
@@ -65,7 +67,8 @@ struct AudioMessage { | |||
65 | /** | 67 | /** |
66 | * Client -> Service message to register a phone. | 68 | * Client -> Service message to register a phone. |
67 | */ | 69 | */ |
68 | struct ClientPhoneRegisterMessage { | 70 | struct ClientPhoneRegisterMessage |
71 | { | ||
69 | /** | 72 | /** |
70 | * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_REGISTER | 73 | * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_REGISTER |
71 | */ | 74 | */ |
@@ -86,7 +89,8 @@ struct ClientPhoneRegisterMessage { | |||
86 | /** | 89 | /** |
87 | * Service -> Client message for phone is ringing. | 90 | * Service -> Client message for phone is ringing. |
88 | */ | 91 | */ |
89 | struct ClientPhoneRingMessage { | 92 | struct ClientPhoneRingMessage |
93 | { | ||
90 | /** | 94 | /** |
91 | * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RING | 95 | * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RING |
92 | */ | 96 | */ |
@@ -108,7 +112,8 @@ struct ClientPhoneRingMessage { | |||
108 | /** | 112 | /** |
109 | * Service <-> Client message for phone was suspended. | 113 | * Service <-> Client message for phone was suspended. |
110 | */ | 114 | */ |
111 | struct ClientPhoneSuspendMessage { | 115 | struct ClientPhoneSuspendMessage |
116 | { | ||
112 | /** | 117 | /** |
113 | * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_SUSPEND | 118 | * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_SUSPEND |
114 | */ | 119 | */ |
@@ -125,7 +130,8 @@ struct ClientPhoneSuspendMessage { | |||
125 | /** | 130 | /** |
126 | * Service <-> Client message for phone was resumed. | 131 | * Service <-> Client message for phone was resumed. |
127 | */ | 132 | */ |
128 | struct ClientPhoneResumeMessage { | 133 | struct ClientPhoneResumeMessage |
134 | { | ||
129 | /** | 135 | /** |
130 | * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RESUME | 136 | * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RESUME |
131 | */ | 137 | */ |
@@ -142,7 +148,8 @@ struct ClientPhoneResumeMessage { | |||
142 | /** | 148 | /** |
143 | * Client -> Service pick up phone that is ringing. | 149 | * Client -> Service pick up phone that is ringing. |
144 | */ | 150 | */ |
145 | struct ClientPhonePickupMessage { | 151 | struct ClientPhonePickupMessage |
152 | { | ||
146 | /** | 153 | /** |
147 | * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_PICK_UP | 154 | * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_PICK_UP |
148 | */ | 155 | */ |
@@ -160,7 +167,8 @@ struct ClientPhonePickupMessage { | |||
160 | * Client <-> Service hang up phone that may or may not be ringing. | 167 | * Client <-> Service hang up phone that may or may not be ringing. |
161 | * Also sent in response to a (failed) `struct ClientCallMessage`. | 168 | * Also sent in response to a (failed) `struct ClientCallMessage`. |
162 | */ | 169 | */ |
163 | struct ClientPhoneHangupMessage { | 170 | struct ClientPhoneHangupMessage |
171 | { | ||
164 | /** | 172 | /** |
165 | * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP | 173 | * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP |
166 | */ | 174 | */ |
@@ -177,7 +185,8 @@ struct ClientPhoneHangupMessage { | |||
177 | /** | 185 | /** |
178 | * Message Client <-> Service to transmit the audio. | 186 | * Message Client <-> Service to transmit the audio. |
179 | */ | 187 | */ |
180 | struct ClientAudioMessage { | 188 | struct ClientAudioMessage |
189 | { | ||
181 | /** | 190 | /** |
182 | * Type is #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO | 191 | * Type is #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO |
183 | */ | 192 | */ |
@@ -196,7 +205,8 @@ struct ClientAudioMessage { | |||
196 | /** | 205 | /** |
197 | * Client -> Service message to call a phone. | 206 | * Client -> Service message to call a phone. |
198 | */ | 207 | */ |
199 | struct ClientCallMessage { | 208 | struct ClientCallMessage |
209 | { | ||
200 | /** | 210 | /** |
201 | * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_CALL | 211 | * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_CALL |
202 | */ | 212 | */ |
@@ -228,7 +238,8 @@ struct ClientCallMessage { | |||
228 | * Service -> Client: other peer has picked up the phone, we are | 238 | * Service -> Client: other peer has picked up the phone, we are |
229 | * now talking. | 239 | * now talking. |
230 | */ | 240 | */ |
231 | struct ClientPhonePickedupMessage { | 241 | struct ClientPhonePickedupMessage |
242 | { | ||
232 | /** | 243 | /** |
233 | * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_PICKED_UP | 244 | * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_PICKED_UP |
234 | */ | 245 | */ |
@@ -246,7 +257,8 @@ struct ClientPhonePickedupMessage { | |||
246 | * Information signed in a `struct CadetPhoneRingMessage` | 257 | * Information signed in a `struct CadetPhoneRingMessage` |
247 | * whereby the caller self-identifies to the receiver. | 258 | * whereby the caller self-identifies to the receiver. |
248 | */ | 259 | */ |
249 | struct CadetPhoneRingInfoPS { | 260 | struct CadetPhoneRingInfoPS |
261 | { | ||
250 | /** | 262 | /** |
251 | * Purpose for the signature, must be | 263 | * Purpose for the signature, must be |
252 | * #GNUNET_SIGNATURE_PURPOSE_CONVERSATION_RING. | 264 | * #GNUNET_SIGNATURE_PURPOSE_CONVERSATION_RING. |
@@ -274,7 +286,8 @@ struct CadetPhoneRingInfoPS { | |||
274 | * Cadet message to make a phone ring. Sent to the port | 286 | * Cadet message to make a phone ring. Sent to the port |
275 | * of the respective phone. | 287 | * of the respective phone. |
276 | */ | 288 | */ |
277 | struct CadetPhoneRingMessage { | 289 | struct CadetPhoneRingMessage |
290 | { | ||
278 | /** | 291 | /** |
279 | * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_RING | 292 | * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_RING |
280 | */ | 293 | */ |
@@ -305,7 +318,8 @@ struct CadetPhoneRingMessage { | |||
305 | /** | 318 | /** |
306 | * Cadet message for hanging up. | 319 | * Cadet message for hanging up. |
307 | */ | 320 | */ |
308 | struct CadetPhoneHangupMessage { | 321 | struct CadetPhoneHangupMessage |
322 | { | ||
309 | /** | 323 | /** |
310 | * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_HANG_UP | 324 | * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_HANG_UP |
311 | */ | 325 | */ |
@@ -316,7 +330,8 @@ struct CadetPhoneHangupMessage { | |||
316 | /** | 330 | /** |
317 | * Cadet message for picking up. | 331 | * Cadet message for picking up. |
318 | */ | 332 | */ |
319 | struct CadetPhonePickupMessage { | 333 | struct CadetPhonePickupMessage |
334 | { | ||
320 | /** | 335 | /** |
321 | * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_PICK_UP | 336 | * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_PICK_UP |
322 | */ | 337 | */ |
@@ -327,7 +342,8 @@ struct CadetPhonePickupMessage { | |||
327 | /** | 342 | /** |
328 | * Cadet message for phone suspended. | 343 | * Cadet message for phone suspended. |
329 | */ | 344 | */ |
330 | struct CadetPhoneSuspendMessage { | 345 | struct CadetPhoneSuspendMessage |
346 | { | ||
331 | /** | 347 | /** |
332 | * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_SUSPEND | 348 | * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_SUSPEND |
333 | */ | 349 | */ |
@@ -338,7 +354,8 @@ struct CadetPhoneSuspendMessage { | |||
338 | /** | 354 | /** |
339 | * Cadet message for phone resumed. | 355 | * Cadet message for phone resumed. |
340 | */ | 356 | */ |
341 | struct CadetPhoneResumeMessage { | 357 | struct CadetPhoneResumeMessage |
358 | { | ||
342 | /** | 359 | /** |
343 | * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_RESUME | 360 | * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_RESUME |
344 | */ | 361 | */ |
@@ -349,7 +366,8 @@ struct CadetPhoneResumeMessage { | |||
349 | /** | 366 | /** |
350 | * Cadet message to transmit the audio. | 367 | * Cadet message to transmit the audio. |
351 | */ | 368 | */ |
352 | struct CadetAudioMessage { | 369 | struct CadetAudioMessage |
370 | { | ||
353 | /** | 371 | /** |
354 | * Type is #GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_AUDIO | 372 | * Type is #GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_AUDIO |
355 | */ | 373 | */ |