diff options
Diffstat (limited to 'toxcore/tox.h')
-rw-r--r-- | toxcore/tox.h | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/toxcore/tox.h b/toxcore/tox.h index ab28be40..32f215d8 100644 --- a/toxcore/tox.h +++ b/toxcore/tox.h | |||
@@ -2541,7 +2541,7 @@ typedef enum TOX_ERR_CONFERENCE_NEW { | |||
2541 | /** | 2541 | /** |
2542 | * Creates a new conference. | 2542 | * Creates a new conference. |
2543 | * | 2543 | * |
2544 | * This function creates a new text conference. | 2544 | * This function creates and connects to a new text conference. |
2545 | * | 2545 | * |
2546 | * @return conference number on success, or an unspecified value on failure. | 2546 | * @return conference number on success, or an unspecified value on failure. |
2547 | */ | 2547 | */ |
@@ -2600,7 +2600,10 @@ typedef enum TOX_ERR_CONFERENCE_PEER_QUERY { | |||
2600 | 2600 | ||
2601 | 2601 | ||
2602 | /** | 2602 | /** |
2603 | * Return the number of peers in the conference. Return value is unspecified on failure. | 2603 | * Return the number of online peers in the conference. The unsigned |
2604 | * integers less than this number are the valid values of peer_number for | ||
2605 | * the functions querying these peers. Return value is unspecified on | ||
2606 | * failure. | ||
2604 | */ | 2607 | */ |
2605 | uint32_t tox_conference_peer_count(const Tox *tox, uint32_t conference_number, TOX_ERR_CONFERENCE_PEER_QUERY *error); | 2608 | uint32_t tox_conference_peer_count(const Tox *tox, uint32_t conference_number, TOX_ERR_CONFERENCE_PEER_QUERY *error); |
2606 | 2609 | ||
@@ -2638,7 +2641,9 @@ bool tox_conference_peer_number_is_ours(const Tox *tox, uint32_t conference_numb | |||
2638 | TOX_ERR_CONFERENCE_PEER_QUERY *error); | 2641 | TOX_ERR_CONFERENCE_PEER_QUERY *error); |
2639 | 2642 | ||
2640 | /** | 2643 | /** |
2641 | * Return the number of offline peers in the conference. Return value is unspecified on failure. | 2644 | * Return the number of offline peers in the conference. The unsigned |
2645 | * integers less than this number are the valid values of offline_peer_number for | ||
2646 | * the functions querying these peers. Return value is unspecified on failure. | ||
2642 | */ | 2647 | */ |
2643 | uint32_t tox_conference_offline_peer_count(const Tox *tox, uint32_t conference_number, | 2648 | uint32_t tox_conference_offline_peer_count(const Tox *tox, uint32_t conference_number, |
2644 | TOX_ERR_CONFERENCE_PEER_QUERY *error); | 2649 | TOX_ERR_CONFERENCE_PEER_QUERY *error); |
@@ -2725,10 +2730,6 @@ typedef enum TOX_ERR_CONFERENCE_INVITE { | |||
2725 | /** | 2730 | /** |
2726 | * Invites a friend to a conference. | 2731 | * Invites a friend to a conference. |
2727 | * | 2732 | * |
2728 | * We must be connected to the conference, meaning that the conference has not | ||
2729 | * been deleted, and either we created the conference with the tox_conference_new function, | ||
2730 | * or a `conference_connected` event has occurred for the conference. | ||
2731 | * | ||
2732 | * @param friend_number The friend number of the friend we want to invite. | 2733 | * @param friend_number The friend number of the friend we want to invite. |
2733 | * @param conference_number The conference number of the conference we want to invite the friend to. | 2734 | * @param conference_number The conference number of the conference we want to invite the friend to. |
2734 | * | 2735 | * |
@@ -2780,6 +2781,14 @@ typedef enum TOX_ERR_CONFERENCE_JOIN { | |||
2780 | /** | 2781 | /** |
2781 | * Joins a conference that the client has been invited to. | 2782 | * Joins a conference that the client has been invited to. |
2782 | * | 2783 | * |
2784 | * After successfully joining the conference, the client will not be "connected" | ||
2785 | * to it until a handshaking procedure has been completed. A | ||
2786 | * `conference_connected` event will then occur for the conference. The client | ||
2787 | * will then remain connected to the conference until the conference is deleted, | ||
2788 | * even across core restarts. Many operations on a conference will fail with a | ||
2789 | * corresponding error if attempted on a conference to which the client is not | ||
2790 | * yet connected. | ||
2791 | * | ||
2783 | * @param friend_number The friend number of the friend who sent the invite. | 2792 | * @param friend_number The friend number of the friend who sent the invite. |
2784 | * @param cookie Received via the `conference_invite` event. | 2793 | * @param cookie Received via the `conference_invite` event. |
2785 | * @param length The size of cookie. | 2794 | * @param length The size of cookie. |
@@ -2906,8 +2915,16 @@ bool tox_conference_set_title(Tox *tox, uint32_t conference_number, const uint8_ | |||
2906 | size_t tox_conference_get_chatlist_size(const Tox *tox); | 2915 | size_t tox_conference_get_chatlist_size(const Tox *tox); |
2907 | 2916 | ||
2908 | /** | 2917 | /** |
2909 | * Copy a list of valid conference IDs into the array chatlist. Determine how much space | 2918 | * Copy a list of valid conference numbers into the array chatlist. Determine |
2910 | * to allocate for the array with the `tox_conference_get_chatlist_size` function. | 2919 | * how much space to allocate for the array with the `tox_conference_get_chatlist_size` function. |
2920 | * | ||
2921 | * Note that `tox_get_savedata` saves all connected conferences; | ||
2922 | * when toxcore is created from savedata in which conferences were saved, those | ||
2923 | * conferences will be connected at startup, and will be listed by | ||
2924 | * `tox_conference_get_chatlist`. | ||
2925 | * | ||
2926 | * The conference number of a loaded conference may differ from the conference | ||
2927 | * number it had when it was saved. | ||
2911 | */ | 2928 | */ |
2912 | void tox_conference_get_chatlist(const Tox *tox, uint32_t *chatlist); | 2929 | void tox_conference_get_chatlist(const Tox *tox, uint32_t *chatlist); |
2913 | 2930 | ||