Add binding for tox_count_friendlist.
authorDavid Thompson <dthompson2@worcester.edu>
Sun, 13 Jul 2014 00:53:20 +0000 (20:53 -0400)
committerDavid Thompson <dthompson2@worcester.edu>
Sun, 13 Jul 2014 00:53:20 +0000 (20:53 -0400)
* tox.scm (tox-friend-count): New procedure.
* tox/bindings.scm (tox-count-friendlist): New procedure.

tox.scm
tox/bindings.scm

diff --git a/tox.scm b/tox.scm
index fca6586..9bfe7ed 100644 (file)
--- a/tox.scm
+++ b/tox.scm
@@ -50,7 +50,8 @@
             tox-status tox-friend-status
             tox-friend-last-online
             set-tox-friend-typing tox-friend-typing?
-            set-tox-send-receipts))
+            set-tox-send-receipts
+            tox-friend-count))
 
 (define-enumeration tox-friend-add-error
   (too-long -1)
@@ -375,3 +376,7 @@ the messenger TOX.  SEND-RECEIPTS? should be either #t of #f."
   (%tox-set-sends-receipts (unwrap-tox tox)
                            friend-number
                            (boolean->number send-receipts?)))
+
+(define/unwrap tox-friend-count
+  "Return the number of friends in the friend list for the messenger TOX."
+  %tox-count-friendlist)
index 1acffd2..e6b84b0 100644 (file)
 
 (define-tox tox-set-sends-receipts
   void "tox_set_sends_receipts" (list '* int32 int))
+
+(define-tox tox-count-friendlist
+  uint32 "tox_count_friendlist" '(*))