From c0828667e70fdd92fd01c581ce04dfc451e01860 Mon Sep 17 00:00:00 2001 From: Sebastian Stal Date: Wed, 7 Aug 2013 10:06:07 -0700 Subject: Document functions, and fix bug. --- core/Messenger.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'core/Messenger.h') 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); USERSTATUS_KIND m_get_userstatus_kind(int friendnumber); USERSTATUS_KIND m_get_self_userstatus_kind(void); +/* Sets whether we send read receipts for friendnumber. + * This function is not lazy, and it will fail if yesno is not (0 or 1).*/ +void m_set_sends_receipts(int friendnumber, int yesno); + /* set the function that will be executed when a friend request is received. function format is function(uint8_t * public_key, uint8_t * data, uint16_t length) */ void 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)); you are not responsible for freeing newstatus */ void m_callback_userstatus(void (*function)(int, USERSTATUS_KIND, uint8_t *, uint16_t)); +/* set the callback for read receipts + function(int friendnumber, uint32_t receipt) + if you are keeping a record of returns from m_sendmessage, + receipt might be one of those values, and that means the message + has been received on the other side. since core doesn't + track ids for you, receipt may not correspond to any message + in that case, you should discard it. */ void m_callback_read_receipt(void (*function)(int, uint32_t)); /* run this at startup -- cgit v1.2.3