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

tox.scm
tox/bindings.scm

diff --git a/tox.scm b/tox.scm
index 9bfe7ed..8f4e751 100644 (file)
--- a/tox.scm
+++ b/tox.scm
@@ -51,7 +51,7 @@
             tox-friend-last-online
             set-tox-friend-typing tox-friend-typing?
             set-tox-send-receipts
-            tox-friend-count))
+            tox-friend-count tox-online-friend-count))
 
 (define-enumeration tox-friend-add-error
   (too-long -1)
@@ -380,3 +380,8 @@ the messenger TOX.  SEND-RECEIPTS? should be either #t of #f."
 (define/unwrap tox-friend-count
   "Return the number of friends in the friend list for the messenger TOX."
   %tox-count-friendlist)
+
+(define/unwrap tox-online-friend-count
+  "Return the number of online friends in the friend list for the messenger
+TOX."
+  %tox-get-num-online-friends)
index e6b84b0..4d1d26e 100644 (file)
 
 (define-tox tox-count-friendlist
   uint32 "tox_count_friendlist" '(*))
+
+(define-tox tox-get-num-online-friends
+  uint32 "tox_get_num_online_friends" '(*))