summaryrefslogtreecommitdiff
path: root/core/Messenger.h
diff options
context:
space:
mode:
authorSebastian Stal <stal@pyboard.net>2013-08-07 10:06:07 -0700
committerSebastian Stal <stal@pyboard.net>2013-08-07 10:06:07 -0700
commitc0828667e70fdd92fd01c581ce04dfc451e01860 (patch)
tree4946808ce4e0b0d40532a5b96e7c56c31cb5ccd6 /core/Messenger.h
parent9f6262f3ddb7be3cbb9a12c9b4a2e1f96c5dcfbf (diff)
Document functions, and fix bug.
Diffstat (limited to 'core/Messenger.h')
-rw-r--r--core/Messenger.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/Messenger.h b/core/Messenger.h
index 0e4eabe0..f0444b91 100644
--- a/core/Messenger.h
+++ b/core/Messenger.h
@@ -171,6 +171,10 @@ int m_copy_self_userstatus(uint8_t *buf, uint32_t maxlen);
171USERSTATUS_KIND m_get_userstatus_kind(int friendnumber); 171USERSTATUS_KIND m_get_userstatus_kind(int friendnumber);
172USERSTATUS_KIND m_get_self_userstatus_kind(void); 172USERSTATUS_KIND m_get_self_userstatus_kind(void);
173 173
174/* Sets whether we send read receipts for friendnumber.
175 * This function is not lazy, and it will fail if yesno is not (0 or 1).*/
176void m_set_sends_receipts(int friendnumber, int yesno);
177
174/* set the function that will be executed when a friend request is received. 178/* set the function that will be executed when a friend request is received.
175 function format is function(uint8_t * public_key, uint8_t * data, uint16_t length) */ 179 function format is function(uint8_t * public_key, uint8_t * data, uint16_t length) */
176void m_callback_friendrequest(void (*function)(uint8_t *, uint8_t *, uint16_t)); 180void m_callback_friendrequest(void (*function)(uint8_t *, uint8_t *, uint16_t));
@@ -189,6 +193,13 @@ void m_callback_namechange(void (*function)(int, uint8_t *, uint16_t));
189 you are not responsible for freeing newstatus */ 193 you are not responsible for freeing newstatus */
190void m_callback_userstatus(void (*function)(int, USERSTATUS_KIND, uint8_t *, uint16_t)); 194void m_callback_userstatus(void (*function)(int, USERSTATUS_KIND, uint8_t *, uint16_t));
191 195
196/* set the callback for read receipts
197 function(int friendnumber, uint32_t receipt)
198 if you are keeping a record of returns from m_sendmessage,
199 receipt might be one of those values, and that means the message
200 has been received on the other side. since core doesn't
201 track ids for you, receipt may not correspond to any message
202 in that case, you should discard it. */
192void m_callback_read_receipt(void (*function)(int, uint32_t)); 203void m_callback_read_receipt(void (*function)(int, uint32_t));
193 204
194/* run this at startup 205/* run this at startup