diff options
Diffstat (limited to 'core/Messenger.h')
-rw-r--r-- | core/Messenger.h | 11 |
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); | |||
171 | USERSTATUS_KIND m_get_userstatus_kind(int friendnumber); | 171 | USERSTATUS_KIND m_get_userstatus_kind(int friendnumber); |
172 | USERSTATUS_KIND m_get_self_userstatus_kind(void); | 172 | USERSTATUS_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).*/ | ||
176 | void 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) */ |
176 | void m_callback_friendrequest(void (*function)(uint8_t *, uint8_t *, uint16_t)); | 180 | 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)); | |||
189 | you are not responsible for freeing newstatus */ | 193 | you are not responsible for freeing newstatus */ |
190 | void m_callback_userstatus(void (*function)(int, USERSTATUS_KIND, uint8_t *, uint16_t)); | 194 | void 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. */ | ||
192 | void m_callback_read_receipt(void (*function)(int, uint32_t)); | 203 | void m_callback_read_receipt(void (*function)(int, uint32_t)); |
193 | 204 | ||
194 | /* run this at startup | 205 | /* run this at startup |