Add binding for tox_set_sends_receipts.
authorDavid Thompson <dthompson2@worcester.edu>
Sun, 13 Jul 2014 00:49:13 +0000 (20:49 -0400)
committerDavid Thompson <dthompson2@worcester.edu>
Sun, 13 Jul 2014 00:49:13 +0000 (20:49 -0400)
* tox.scm (set-tox-send-receipts): New procedure.
* tox/bindings.scm (tox-set-sends-receipts): New procedure.

tox.scm
tox/bindings.scm

diff --git a/tox.scm b/tox.scm
index 2748a9f..fca6586 100644 (file)
--- a/tox.scm
+++ b/tox.scm
@@ -49,7 +49,8 @@
             tox-status-message tox-friend-status-message
             tox-status tox-friend-status
             tox-friend-last-online
-            set-tox-friend-typing tox-friend-typing?))
+            set-tox-friend-typing tox-friend-typing?
+            set-tox-send-receipts))
 
 (define-enumeration tox-friend-add-error
   (too-long -1)
@@ -367,3 +368,10 @@ messenger TOX."
   "Return #t if the friend identified by FRIEND-NUMBER in the messenger TOX is
 typing, or #f otherwise."
   (one? (%tox-get-is-typing (unwrap-tox tox) friend-number)))
+
+(define (set-tox-send-receipts tox friend-number send-receipts?)
+  "Set whether to send receipts to the friend identified by FRIEND-NUMBER in
+the messenger TOX.  SEND-RECEIPTS? should be either #t of #f."
+  (%tox-set-sends-receipts (unwrap-tox tox)
+                           friend-number
+                           (boolean->number send-receipts?)))
index 18a918a..1acffd2 100644 (file)
 
 (define-tox tox-get-is-typing
   uint8 "tox_get_is_typing" (list '* int32))
+
+(define-tox tox-set-sends-receipts
+  void "tox_set_sends_receipts" (list '* int32 int))