guile-toxcore.git
3 years agoexample: echo: Remove unused code. master
David Thompson [Fri, 25 Sep 2015 19:14:32 +0000 (15:14 -0400)] 
example: echo: Remove unused code.

3 years agoexamples: Add old echo bot script.
David Thompson [Fri, 25 Sep 2015 19:11:45 +0000 (15:11 -0400)] 
examples: Add old echo bot script.

5 years agoclient: Don't try to load tox_save if it doesn't exist.
David Thompson [Tue, 15 Jul 2014 02:10:42 +0000 (22:10 -0400)] 
client: Don't try to load tox_save if it doesn't exist.

* examples/client.scm (load!): Test for tox_save file before loading.

5 years agoUpdate example client configuration sample.
David Thompson [Tue, 15 Jul 2014 01:28:49 +0000 (21:28 -0400)] 
Update example client configuration sample.

* examples/guile-tox.sample: Add some new hooks.

5 years agoFix crashing problems caused by C callbacks.
David Thompson [Tue, 15 Jul 2014 01:22:26 +0000 (21:22 -0400)] 
Fix crashing problems caused by C callbacks.

* tox.scm (<tox>): Revert to a wrapped pointer type and remove hooks as
  fields.
  (tox-friend-request-hook, tox-message-hook, tox-action-hook,
  tox-name-change-hook, tox-status-message-hook, tox-status-hook,
  tox-typing-hook, tox-read-receipt-hook, tox-online-hook): Change to
  variables instead of procedures.
  (friend-request-callback, friend-message-callback, friend-action-callback,
  name-change-callback, status-message-callback, user-status-callback,
  typing-change-callback, read-receipt-callback, connection-status-callback):
  New procedures.
  (wrap-tox): Register callback, but do not make any new C function pointers.

5 years agoAdd example client.
David Thompson [Mon, 14 Jul 2014 01:32:16 +0000 (21:32 -0400)] 
Add example client.

* .gitignore: Ignore examples/tox_save
* README.md: Add instructions for using example client.
* examples/client.scm: New file.
* examples/guile-tox.sample: New file.

5 years agoUpdate code snippet in README.
David Thompson [Mon, 14 Jul 2014 01:21:26 +0000 (21:21 -0400)] 
Update code snippet in README.

* README.md (Usage): Update high-level API code snippet.

5 years agoSuppress warning that htons overrides core binding.
David Thompson [Mon, 14 Jul 2014 00:42:58 +0000 (20:42 -0400)] 
Suppress warning that htons overrides core binding.

* tox/util.scm: Add replace directive for htons.

5 years agoEnable the rest of the messenger hooks.
David Thompson [Sun, 13 Jul 2014 21:17:25 +0000 (17:17 -0400)] 
Enable the rest of the messenger hooks.

* tox.scm (wrap-tox): Register all messenger callbacks and run hooks.
  (<tox>): Rename connection-status-hook field to online-hook.

5 years agoFix bytevector->hex-string.
David Thompson [Sun, 13 Jul 2014 14:17:37 +0000 (10:17 -0400)] 
Fix bytevector->hex-string.

* tox/util.scm (bytevector->hex-string): Add leading 0 when formatting hex
  digits less than A.

5 years agoEnable tox-friend-request-hook.
David Thompson [Sun, 13 Jul 2014 14:16:14 +0000 (10:16 -0400)] 
Enable tox-friend-request-hook.

* tox.scm (wrap-tox): Add friend request callback that runs the hook.

5 years agoAdd bindings for the rest of the callback setters.
David Thompson [Sun, 13 Jul 2014 13:12:59 +0000 (09:12 -0400)] 
Add bindings for the rest of the callback setters.

* tox/bindings.scm (tox-callback-friend-request, tox-callback-friend-action,
  tox-callback-name-change, tox-callback-status-message,
  tox-callback-user-status, tox-callback-typing-change,
  tox-callback-read-receipt, tox-callback-connection-status): New procedures.

5 years agoAdd utf8-pointer->string procedure.
David Thompson [Sun, 13 Jul 2014 13:09:25 +0000 (09:09 -0400)] 
Add utf8-pointer->string procedure.

* tox.scm (wrap-tox): Use it.
* tox/util.scm (utf8-pointer->string): New procedure.

5 years agoFix warning when compiling tox/util.scm.
David Thompson [Sun, 13 Jul 2014 13:03:41 +0000 (09:03 -0400)] 
Fix warning when compiling tox/util.scm.

* tox/util.scm: Use (ice-9 format) module.

5 years agoAdd binding for tox_callback_friend_message.
David Thompson [Sun, 13 Jul 2014 13:01:25 +0000 (09:01 -0400)] 
Add binding for tox_callback_friend_message.

* tox.scm (<tox>): Add hook fields.
  (wrap-tox): Use new <tox> type and bootstrap tox-message-hook.
  (unwrap-tox): Use new <tox> type.
* tox/bindings.scm (tox-callback-friend-message): New procedure.

5 years agoSplit set-tox-status into two procedures.
David Thompson [Sun, 13 Jul 2014 11:59:19 +0000 (07:59 -0400)] 
Split set-tox-status into two procedures.

* tox.scm (set-tox-status): Only set status code.
  (set-tox-status-message): New procedure.

5 years agoAdd binding for tox_get_friendlist.
David Thompson [Sun, 13 Jul 2014 01:07:08 +0000 (21:07 -0400)] 
Add binding for tox_get_friendlist.

* tox.scm (tox-friend-list): New procedure.
* tox/bindings.scm (tox-get-friendlist): New procedure.

5 years agoAdd binding for tox_get_num_online_friends.
David Thompson [Sun, 13 Jul 2014 00:56:13 +0000 (20:56 -0400)] 
Add binding for tox_get_num_online_friends.

* tox.scm (tox-online-friend-count): New procedure.
* tox/bindings.scm (tox-get-num-online-friends): New procedure.

5 years agoAdd binding for tox_count_friendlist.
David Thompson [Sun, 13 Jul 2014 00:53:20 +0000 (20:53 -0400)] 
Add binding for tox_count_friendlist.

* tox.scm (tox-friend-count): New procedure.
* tox/bindings.scm (tox-count-friendlist): New procedure.

5 years agoAdd binding for tox_set_sends_receipts.
David Thompson [Sun, 13 Jul 2014 00:49:13 +0000 (20:49 -0400)] 
Add binding for tox_set_sends_receipts.

* tox.scm (set-tox-send-receipts): New procedure.
* tox/bindings.scm (tox-set-sends-receipts): New procedure.

5 years agoAdd bindings for tox_set_user_is_typing and tox_get_is_typing.
David Thompson [Sun, 13 Jul 2014 00:41:15 +0000 (20:41 -0400)] 
Add bindings for tox_set_user_is_typing and tox_get_is_typing.

* tox.scm (set-tox-friend-typing, tox-friend-typing?): New procedures.
* tox/bindings.scm (tox-set-user-is-typing, tox-get-is-typing): New procedure.

5 years agoAdd binding for tox_get_last_online.
David Thompson [Sun, 13 Jul 2014 00:39:03 +0000 (20:39 -0400)] 
Add binding for tox_get_last_online.

* tox.scm (tox-friend-last-online): New procedure.
* tox/bindings.scm (tox-get-last-online): New procedure.

5 years agoAdd bindings for tox_get_user_status and tox_get_self_user_status.
David Thompson [Sun, 13 Jul 2014 00:07:46 +0000 (20:07 -0400)] 
Add bindings for tox_get_user_status and tox_get_self_user_status.

* tox.scm (tox-status, tox-friend-status): New procedures.
* tox/bindings.scm (tox-get-user-status, tox-get-self-user-status): New
  procedures.

5 years agoAdd bindings tox_get_status_message and tox_get_self_status_message.
David Thompson [Sat, 12 Jul 2014 23:22:06 +0000 (19:22 -0400)] 
Add bindings tox_get_status_message and tox_get_self_status_message.

* tox.scm (tox-status-message, tox-friend-status-message): New procedures.
* tox/bindings.scm (tox-get-status-message, tox-get-self-status-message): New
  procedures.

5 years agoAdd bindings for tox_get_status_message_size and tox_get_self_status_message_size.
David Thompson [Sat, 12 Jul 2014 23:12:22 +0000 (19:12 -0400)] 
Add bindings for tox_get_status_message_size and tox_get_self_status_message_size.

* tox/bindings.scm (tox-get-status-message-size,
  tox-get-self-status-message-size): New procedures.

5 years agoAdd bindings for tox_set_status_message and tox_set_user_status.
David Thompson [Sat, 12 Jul 2014 23:08:39 +0000 (19:08 -0400)] 
Add bindings for tox_set_status_message and tox_set_user_status.

* tox.scm (set-tox-status): New procedure.
* tox/bindings.scm (tox-set-status-message, tox-set-user-status): New
  procedures.

5 years agoFix error with shadowed variable.
David Thompson [Sat, 12 Jul 2014 23:08:10 +0000 (19:08 -0400)] 
Fix error with shadowed variable.

* tox.scm (set-tox-name): Don't shadow name variable.

5 years agoAdd bindings for tox_get_name, tox_get_name_size, and tox_get_self_name_size.
David Thompson [Sat, 12 Jul 2014 22:52:00 +0000 (18:52 -0400)] 
Add bindings for tox_get_name, tox_get_name_size, and tox_get_self_name_size.

* tox.scm (tox-friend-name): New procedure.
* tox/bindings.scm (tox-get-name, tox-get-name-size, tox-get-self-name-size):
  New procedures.

5 years agoAdd bindings for tox_set_name and tox_get_self_name.
David Thompson [Sat, 12 Jul 2014 22:46:18 +0000 (18:46 -0400)] 
Add bindings for tox_set_name and tox_get_self_name.

* tox.scm (set-tox-name, tox-name): New procedures.
* tox/bindings.scm (tox-set-name, tox-get-self-name): New procedures.
* tox/util.scm (bytevector-slice): New procedure.

5 years agoAdd bindings for tox_send_action and tox_send_action_withid.
David Thompson [Sat, 12 Jul 2014 22:27:24 +0000 (18:27 -0400)] 
Add bindings for tox_send_action and tox_send_action_withid.

* tox.scm (tox-send): New procedure.
  (tox-send-message): Refactor.
  (tox-send-action): New procedure.
* tox/bindings.scm (tox-send-action, tox-send-action-withid): New procedures.

5 years agoAdd bindings for tox_send_message and tox_send_message_withid.
David Thompson [Sat, 12 Jul 2014 22:20:20 +0000 (18:20 -0400)] 
Add bindings for tox_send_message and tox_send_message_withid.

* tox.scm (tox-send-message): New procedure.
* tox/bindings.scm (tox-send-message, tox-send-message-withid): New
  procedures.
* tox/util.scm (false-if-zero): New procedure.

5 years agoRemove non-destructive version of tox-load.
David Thompson [Sat, 12 Jul 2014 22:05:35 +0000 (18:05 -0400)] 
Remove non-destructive version of tox-load.

* tox.scm (tox-load, tox-load!): Keep tox-load!, rename to tox-load.

5 years agoFix tox-friend-connected?
David Thompson [Sat, 12 Jul 2014 22:03:50 +0000 (18:03 -0400)] 
Fix tox-friend-connected?

* tox.scm (tox-friend-connected?): Check for return value of 1, not 0.

5 years agoChange message parameter in tox-add-friend to string.
David Thompson [Sat, 12 Jul 2014 21:59:26 +0000 (17:59 -0400)] 
Change message parameter in tox-add-friend to string.

* tox.scm (tox-add-friend): Message is expected to be a string, not a
  bytevector.

5 years agoAdd bytevector->hex-string procedure.
David Thompson [Sat, 12 Jul 2014 21:58:10 +0000 (17:58 -0400)] 
Add bytevector->hex-string procedure.

* tox/util.scm (bytevector->hex-string): New procedure.

5 years agoFix docstring for hex-string->bytevector.
David Thompson [Sat, 12 Jul 2014 21:57:12 +0000 (17:57 -0400)] 
Fix docstring for hex-string->bytevector.

* tox/util.scm (hex-string->bytevector): Fix docstring.

5 years agoAdd additional constant variables.
David Thompson [Sat, 12 Jul 2014 21:56:07 +0000 (17:56 -0400)] 
Add additional constant variables.

* tox.scm (tox-max-name-length, tox-max-message-length,
  tox-max-status-message-length): New variables.

5 years agoAdd htons procedure.
David Thompson [Sat, 12 Jul 2014 21:16:25 +0000 (17:16 -0400)] 
Add htons procedure.

* tox/util.scm (htons): New procedure.

5 years agoImport missing module.
David Thompson [Sat, 12 Jul 2014 21:16:09 +0000 (17:16 -0400)] 
Import missing module.

* tox/util.scm: Import (rnrs bytevectors).

5 years agoAdd indentation rule for with-tox.
David Thompson [Sat, 12 Jul 2014 14:41:08 +0000 (10:41 -0400)] 
Add indentation rule for with-tox.

* .dir-locals.el (scheme-mode): Add indent rule for with-tox.

5 years agoAdd information about high-level and low-level API to README.
David Thompson [Sat, 12 Jul 2014 14:28:50 +0000 (10:28 -0400)] 
Add information about high-level and low-level API to README.

* README.md: Explain the difference between the high and low level APIs.

5 years agoAdd binding for tox_friend_exists.
David Thompson [Sat, 12 Jul 2014 14:18:51 +0000 (10:18 -0400)] 
Add binding for tox_friend_exists.

* tox.scm (tox-friend-exists?): New procedure.
* tox/bindings.scm (tox-friend-exists): New procedure.

5 years agoAdd binding for tox_get_friend_connection_status.
David Thompson [Sat, 12 Jul 2014 14:16:37 +0000 (10:16 -0400)] 
Add binding for tox_get_friend_connection_status.

* tox.scm (tox-friend-connected?): New procedure.
* tox/bindings.scm (tox-get-friend-connection-status): New procedure.

5 years agoAdd binding for tox_del_friend.
David Thompson [Sat, 12 Jul 2014 14:08:58 +0000 (10:08 -0400)] 
Add binding for tox_del_friend.

* tox.scm (tox-delete-friend): New procedure.
* tox/bindings.scm (tox-del-friend): New procedure.

5 years agoExport tox-friend-number.
David Thompson [Sat, 12 Jul 2014 14:06:16 +0000 (10:06 -0400)] 
Export tox-friend-number.

* tox.scm: Export it.

5 years agoAdd binding for tox_get_client_id.
David Thompson [Sat, 12 Jul 2014 14:05:20 +0000 (10:05 -0400)] 
Add binding for tox_get_client_id.

* tox.scm (tox-friend-client-id): New procedure.
* tox/bindings.scm (tox-get-client-id): New procedure.

5 years agoAdd binding for tox_get_friend_number.
David Thompson [Sat, 12 Jul 2014 13:50:13 +0000 (09:50 -0400)] 
Add binding for tox_get_friend_number.

* tox.scm (tox-friend-number): New procedure.
  (tox-add-friend-no-request): Refactor.
* tox/bindings.scm (tox-get-friend-number): New procedure.
* tox/util.scm (false-if-negative): New procedure.

5 years agoAdd with-tox form.
David Thompson [Sat, 12 Jul 2014 13:42:09 +0000 (09:42 -0400)] 
Add with-tox form.

* tox.scm (with-tox): New macro.

5 years agoAdd binding for tox_add_friend_norequest.
David Thompson [Sat, 12 Jul 2014 13:31:07 +0000 (09:31 -0400)] 
Add binding for tox_add_friend_norequest.

* tox.scm (tox-add-friend-no-request): New procedure.
* tox/bindings.scm (tox-add-friend-norequest): New procedure.

5 years agoAdd tox-friend-address procedure.
David Thompson [Sat, 12 Jul 2014 13:19:19 +0000 (09:19 -0400)] 
Add tox-friend-address procedure.

* tox.scm (tox-friend-address): New procedure.
  (tox-client-id): Refactor.
* tox/util.scm (hex-string->bytevector): New procedure.

5 years agoAdd binding for tox_add_friend.
David Thompson [Sat, 12 Jul 2014 13:05:35 +0000 (09:05 -0400)] 
Add binding for tox_add_friend.

* tox.scm (tox-add-friend): New procedure.
* tox/bindings.scm (tox-add-friend): New procedure.

5 years agoAdd tox-friend-add-error and tox-user-status enumerations.
David Thompson [Sat, 12 Jul 2014 12:44:37 +0000 (08:44 -0400)] 
Add tox-friend-add-error and tox-user-status enumerations.

* tox.scm (tox-friend-add-error, tox-user-status): New macros.
* tox/util.scm (define-enumeration): New macro.

5 years agoImprove error message text in make-tox.
David Thompson [Sat, 12 Jul 2014 12:16:28 +0000 (08:16 -0400)] 
Improve error message text in make-tox.

* tox.scm (make-tox): Improve error message.

5 years agoUpdate README.
David Thompson [Sat, 12 Jul 2014 12:13:02 +0000 (08:13 -0400)] 
Update README.

* README.md: s/tox-new/make-tox/

5 years agoRename client-id to tox-client-id.
David Thompson [Sat, 12 Jul 2014 12:11:53 +0000 (08:11 -0400)] 
Rename client-id to tox-client-id.

* tox.scm (client-id, tox-client-id): Rename.

5 years agoAdd docstring for tox-address.
David Thompson [Sat, 12 Jul 2014 04:27:50 +0000 (00:27 -0400)] 
Add docstring for tox-address.

* tox.scm (tox-address): Add docstring.

5 years agoAdd binding for tox_get_address.
David Thompson [Sat, 12 Jul 2014 04:26:06 +0000 (00:26 -0400)] 
Add binding for tox_get_address.

* tox.scm (tox-client-id-size, tox-friend-address-size): New variables.
  (tox-address): New procedure.
* tox/bindings.scm (tox-get-address): New procedure.

5 years agoAdd binding for tox_bootstrap_from_address.
David Thompson [Sat, 12 Jul 2014 04:12:33 +0000 (00:12 -0400)] 
Add binding for tox_bootstrap_from_address.

* tox.scm (client-id, tox-bootstrap-from-address): New procedures.
* tox/bindings.scm (tox-bootstrap-from-address): New procedure.

5 years agoAdd binding for tox_isconnected.
David Thompson [Sat, 12 Jul 2014 03:07:33 +0000 (23:07 -0400)] 
Add binding for tox_isconnected.

* tox.scm (tox-connected?): New procedure.
* tox/bindings.scm (tox-isconnected): New procedure.
* tox/util.scm (one?): New procedure.

5 years agoAdd tox-load procedure.
David Thompson [Sat, 12 Jul 2014 02:59:52 +0000 (22:59 -0400)] 
Add tox-load procedure.

* tox.scm (tox-load): New procedure.

5 years agoAdd bindings for tox_size, tox_save, and tox_load.
David Thompson [Sat, 12 Jul 2014 02:57:05 +0000 (22:57 -0400)] 
Add bindings for tox_size, tox_save, and tox_load.

* tox.scm (tox-size, tox-save, tox-load!): New procedures.
* tox/bindings.scm (tox-size, tox-save, tox-load): New procedures.

5 years agoAdd docstring to boolean->number.
David Thompson [Sat, 12 Jul 2014 02:56:35 +0000 (22:56 -0400)] 
Add docstring to boolean->number.

* tox/util.scm (boolean->number): Add docstring.

5 years agoAdd tox_do_interval and tox_do bindings.
David Thompson [Sat, 12 Jul 2014 02:26:33 +0000 (22:26 -0400)] 
Add tox_do_interval and tox_do bindings.

* tox.scm (define/unwrap): New macro.
  (tox-do-interval, tox-do): New procedures.
* tox/bindings.scm (tox-do-interval, tox-do): New procedures.

5 years agoRename tox-new to make-tox.
David Thompson [Sat, 12 Jul 2014 02:09:40 +0000 (22:09 -0400)] 
Rename tox-new to make-tox.

* tox.scm (tox-new, make-tox): Rename.

5 years agoAdd autogen.sh step to installation instructions.
David Thompson [Sat, 12 Jul 2014 02:02:46 +0000 (22:02 -0400)] 
Add autogen.sh step to installation instructions.

* README.md: Add autogen.sh.

5 years agoAdd Emacs config.
David Thompson [Sat, 12 Jul 2014 02:00:59 +0000 (22:00 -0400)] 
Add Emacs config.

* .dir-locals.el: New file.

5 years agoAdd autotools.
David Thompson [Sat, 12 Jul 2014 01:57:25 +0000 (21:57 -0400)] 
Add autotools.

* .gitignore, Makefile.am, autogen.sh, configure.ac, env.in, guile.am: New
  files.

5 years agoAdd bindings for tox_new and tox_kill.
David Thompson [Sat, 12 Jul 2014 00:40:21 +0000 (20:40 -0400)] 
Add bindings for tox_new and tox_kill.

* tox.scm: New file.
* tox/bindings.scm: New file.
* tox/util.scm: New file.

5 years agoFirst commit!
David Thompson [Sat, 12 Jul 2014 00:36:20 +0000 (20:36 -0400)] 
First commit!

* COPYING: New file.
* README.md: New file.