aboutsummaryrefslogtreecommitdiff
path: root/src/chat/chat.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-02-06 23:27:01 +0000
committerChristian Grothoff <christian@grothoff.org>2011-02-06 23:27:01 +0000
commita0b3e179abb44828f76843739487b2686b14cc8e (patch)
tree52b2cfb63a66b13ce39bd1bf8bed04ff74ae102a /src/chat/chat.h
parent7b3d9e8f57db9db2053dd7e25c9dbd92514819e0 (diff)
downloadgnunet-a0b3e179abb44828f76843739487b2686b14cc8e.tar.gz
gnunet-a0b3e179abb44828f76843739487b2686b14cc8e.zip
more chat code from Mantis #1657
Diffstat (limited to 'src/chat/chat.h')
-rw-r--r--src/chat/chat.h38
1 files changed, 31 insertions, 7 deletions
diff --git a/src/chat/chat.h b/src/chat/chat.h
index a9cf83a8c..9a52a2d75 100644
--- a/src/chat/chat.h
+++ b/src/chat/chat.h
@@ -70,8 +70,13 @@ struct ReceiveNotificationMessage
70 uint32_t reserved GNUNET_PACKED; 70 uint32_t reserved GNUNET_PACKED;
71 71
72 /** 72 /**
73 * Timestamp of the message.
74 */
75 struct GNUNET_TIME_AbsoluteNBO timestamp;
76
77 /**
73 * Hash of the public key of the pseudonym of the sender of the message. 78 * Hash of the public key of the pseudonym of the sender of the message.
74 * TBD: Should be all zeros for anonymous. 79 * Should be all zeros for anonymous.
75 */ 80 */
76 GNUNET_HashCode sender; 81 GNUNET_HashCode sender;
77 82
@@ -122,6 +127,11 @@ struct TransmitRequestMessage
122 uint32_t sequence_number GNUNET_PACKED; 127 uint32_t sequence_number GNUNET_PACKED;
123 128
124 /** 129 /**
130 * Timestamp of the message.
131 */
132 struct GNUNET_TIME_AbsoluteNBO timestamp;
133
134 /**
125 * Who should receive this message? Set to all zeros for "everyone". 135 * Who should receive this message? Set to all zeros for "everyone".
126 */ 136 */
127 GNUNET_HashCode target; 137 GNUNET_HashCode target;
@@ -131,12 +141,15 @@ struct TransmitRequestMessage
131 141
132/** 142/**
133 * Receipt sent from a message receiver to the service to confirm delivery of 143 * Receipt sent from a message receiver to the service to confirm delivery of
134 * a chat message. 144 * a chat message and from the service to sender of the original message to
145 * acknowledge delivery.
135 */ 146 */
136struct ConfirmationReceiptMessage 147struct ConfirmationReceiptMessage
137{ 148{
138 /** 149 /**
139 * Message type will be GNUNET_MESSAGE_TYPE_CHAT_CONFIRMATION_RECEIPT 150 * Message type will be
151 * GNUNET_MESSAGE_TYPE_CHAT_CONFIRMATION_RECEIPT when sending from client,
152 * GNUNET_MESSAGE_TYPE_CHAT_CONFIRMATION_NOTIFICATION when sending to client.
140 */ 153 */
141 struct GNUNET_MessageHeader header; 154 struct GNUNET_MessageHeader header;
142 155
@@ -351,8 +364,9 @@ struct P2PLeaveNotificationMessage
351 364
352/** 365/**
353 * Message send by one peer to another to indicate receiving of a chat message. 366 * Message send by one peer to another to indicate receiving of a chat message.
354 * After this struct, the remaining bytes are the actual text message. If the 367 * This struct is followed by the room name (only if the message is anonymous)
355 * mesasge is private, then the text is encrypted, otherwise it's plaintext. 368 * and then the remaining bytes are the actual text message. If the mesasge is
369 * private, then the text is encrypted, otherwise it's plaintext.
356 */ 370 */
357struct P2PReceiveNotificationMessage 371struct P2PReceiveNotificationMessage
358{ 372{
@@ -372,13 +386,23 @@ struct P2PReceiveNotificationMessage
372 uint32_t sequence_number GNUNET_PACKED; 386 uint32_t sequence_number GNUNET_PACKED;
373 387
374 /** 388 /**
389 * Length of the room name. This is only used for anonymous messages.
390 */
391 uint16_t room_name_len GNUNET_PACKED;
392
393 /**
375 * Reserved (for alignment). 394 * Reserved (for alignment).
376 */ 395 */
377 uint32_t reserved GNUNET_PACKED; 396 uint16_t reserved GNUNET_PACKED;
397
398 /**
399 * Timestamp of the message.
400 */
401 struct GNUNET_TIME_AbsoluteNBO timestamp;
378 402
379 /** 403 /**
380 * Hash of the public key of the pseudonym of the sender of the message 404 * Hash of the public key of the pseudonym of the sender of the message
381 * TBD: Should be all zeros for anonymous. 405 * Should be all zeros for anonymous.
382 */ 406 */
383 GNUNET_HashCode sender; 407 GNUNET_HashCode sender;
384 408