summaryrefslogtreecommitdiff
path: root/toxcore/tox.c
diff options
context:
space:
mode:
authorCoren[m] <Break@Ocean>2013-10-24 22:47:23 +0200
committerCoren[m] <Break@Ocean>2013-10-24 22:47:23 +0200
commit065495cd7c269389af7f834e568d12105589dd97 (patch)
treec38eb6cfd8117b9a721b5d41144502736ed18bac /toxcore/tox.c
parent0a4c3d7e2e080dafd66d25f7a5806b89f7be1bcf (diff)
parentf3be5609049d278ee3f46754ea4b0eb929876dba (diff)
Merge remote-tracking branch 'upstream/master' into cleanup_unix_time_id_eq_cpy_is_timeout
Conflicts: toxcore/net_crypto.c
Diffstat (limited to 'toxcore/tox.c')
-rw-r--r--toxcore/tox.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/toxcore/tox.c b/toxcore/tox.c
index 5f882965..6a0c6a62 100644
--- a/toxcore/tox.c
+++ b/toxcore/tox.c
@@ -609,7 +609,7 @@ int tox_isconnected(Tox *tox)
609 */ 609 */
610Tox *tox_new(uint8_t ipv6enabled) 610Tox *tox_new(uint8_t ipv6enabled)
611{ 611{
612 return initMessenger(ipv6enabled); 612 return new_messenger(ipv6enabled);
613} 613}
614 614
615/* Run this before closing shop. 615/* Run this before closing shop.
@@ -618,14 +618,14 @@ Tox *tox_new(uint8_t ipv6enabled)
618void tox_kill(Tox *tox) 618void tox_kill(Tox *tox)
619{ 619{
620 Messenger *m = tox; 620 Messenger *m = tox;
621 cleanupMessenger(m); 621 kill_messenger(m);
622} 622}
623 623
624/* The main loop that needs to be run at least 20 times per second. */ 624/* The main loop that needs to be run at least 20 times per second. */
625void tox_do(Tox *tox) 625void tox_do(Tox *tox)
626{ 626{
627 Messenger *m = tox; 627 Messenger *m = tox;
628 doMessenger(m); 628 do_messenger(m);
629} 629}
630 630
631/* 631/*
@@ -634,19 +634,19 @@ void tox_do(Tox *tox)
634int tox_wait_prepare(Tox *tox, uint8_t *data, uint16_t *lenptr) 634int tox_wait_prepare(Tox *tox, uint8_t *data, uint16_t *lenptr)
635{ 635{
636 Messenger *m = tox; 636 Messenger *m = tox;
637 return waitprepareMessenger(m, data, lenptr); 637 return wait_prepare_messenger(m, data, lenptr);
638} 638}
639 639
640int tox_wait_execute(Tox *tox, uint8_t *data, uint16_t len, uint16_t milliseconds) 640int tox_wait_execute(Tox *tox, uint8_t *data, uint16_t len, uint16_t milliseconds)
641{ 641{
642 Messenger *m = tox; 642 Messenger *m = tox;
643 return waitexecuteMessenger(m, data, len, milliseconds); 643 return wait_execute_messenger(m, data, len, milliseconds);
644} 644}
645 645
646void tox_wait_cleanup(Tox *tox, uint8_t *data, uint16_t len) 646void tox_wait_cleanup(Tox *tox, uint8_t *data, uint16_t len)
647{ 647{
648 Messenger *m = tox; 648 Messenger *m = tox;
649 waitcleanupMessenger(m, data, len); 649 wait_cleanup_messenger(m, data, len);
650} 650}
651 651
652/* SAVING AND LOADING FUNCTIONS: */ 652/* SAVING AND LOADING FUNCTIONS: */
@@ -655,20 +655,20 @@ void tox_wait_cleanup(Tox *tox, uint8_t *data, uint16_t len)
655uint32_t tox_size(Tox *tox) 655uint32_t tox_size(Tox *tox)
656{ 656{
657 Messenger *m = tox; 657 Messenger *m = tox;
658 return Messenger_size(m); 658 return messenger_size(m);
659} 659}
660 660
661/* Save the messenger in data (must be allocated memory of size Messenger_size()). */ 661/* Save the messenger in data (must be allocated memory of size Messenger_size()). */
662void tox_save(Tox *tox, uint8_t *data) 662void tox_save(Tox *tox, uint8_t *data)
663{ 663{
664 Messenger *m = tox; 664 Messenger *m = tox;
665 Messenger_save(m, data); 665 messenger_save(m, data);
666} 666}
667 667
668/* Load the messenger from data of size length. */ 668/* Load the messenger from data of size length. */
669int tox_load(Tox *tox, uint8_t *data, uint32_t length) 669int tox_load(Tox *tox, uint8_t *data, uint32_t length)
670{ 670{
671 Messenger *m = tox; 671 Messenger *m = tox;
672 return Messenger_load(m, data, length); 672 return messenger_load(m, data, length);
673} 673}
674 674