diff options
author | iphydf <iphydf@users.noreply.github.com> | 2018-02-19 17:03:05 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-02-20 21:36:05 +0000 |
commit | 95c03e0e85a0a87418a98c9d832dd9ada680adb9 (patch) | |
tree | be7f3a525a54610b42b1f22f669f48fd0c94aa52 /toxcore/tox.h | |
parent | 03b55cde1a98b02f9019f068340094b5062857d1 (diff) |
Make the "persistent conference" callback changes new functions.
We can now revert the changes to the callbacks and keep supporting them
until clients have moved off them.
Diffstat (limited to 'toxcore/tox.h')
-rw-r--r-- | toxcore/tox.h | 44 |
1 files changed, 41 insertions, 3 deletions
diff --git a/toxcore/tox.h b/toxcore/tox.h index 012a3510..3dac6770 100644 --- a/toxcore/tox.h +++ b/toxcore/tox.h | |||
@@ -2388,15 +2388,51 @@ typedef void tox_conference_title_cb(Tox *tox, uint32_t conference_number, uint3 | |||
2388 | void tox_callback_conference_title(Tox *tox, tox_conference_title_cb *callback); | 2388 | void tox_callback_conference_title(Tox *tox, tox_conference_title_cb *callback); |
2389 | 2389 | ||
2390 | /** | 2390 | /** |
2391 | * @param conference_number The conference number of the conference the | ||
2392 | * peer is in. | ||
2393 | * @param peer_number The ID of the peer who changed their nickname. | ||
2394 | * @param name A byte array containing the new nickname. | ||
2395 | * @param length The size of the name byte array. | ||
2396 | */ | ||
2397 | typedef void tox_conference_peer_name_cb(Tox *tox, uint32_t conference_number, uint32_t peer_number, | ||
2398 | const uint8_t *name, size_t length, void *user_data); | ||
2399 | |||
2400 | |||
2401 | /** | ||
2402 | * Set the callback for the `conference_peer_name` event. Pass NULL to unset. | ||
2403 | * | ||
2404 | * This event is triggered when a peer changes their name. | ||
2405 | */ | ||
2406 | void tox_callback_conference_peer_name(Tox *tox, tox_conference_peer_name_cb *callback); | ||
2407 | |||
2408 | /** | ||
2409 | * @param conference_number The conference number of the conference the | ||
2410 | * peer is in. | ||
2411 | */ | ||
2412 | typedef void tox_conference_peer_list_changed_cb(Tox *tox, uint32_t conference_number, void *user_data); | ||
2413 | |||
2414 | |||
2415 | /** | ||
2416 | * Set the callback for the `conference_peer_list_changed` event. Pass NULL to unset. | ||
2417 | * | ||
2418 | * This event is triggered when a peer joins or leaves the conference. | ||
2419 | */ | ||
2420 | void tox_callback_conference_peer_list_changed(Tox *tox, tox_conference_peer_list_changed_cb *callback); | ||
2421 | |||
2422 | /** | ||
2391 | * Peer list state change types. | 2423 | * Peer list state change types. |
2392 | */ | 2424 | */ |
2393 | typedef enum TOX_CONFERENCE_STATE_CHANGE { | 2425 | typedef enum TOX_CONFERENCE_STATE_CHANGE { |
2394 | 2426 | ||
2395 | /** | 2427 | /** |
2396 | * Some changes to list have occurred. Rebuild of list required. | 2428 | * A peer has joined the conference. |
2397 | * peer_number is undefined (always 0 for api compatibility) | ||
2398 | */ | 2429 | */ |
2399 | TOX_CONFERENCE_STATE_CHANGE_LIST_CHANGED, | 2430 | TOX_CONFERENCE_STATE_CHANGE_PEER_JOIN, |
2431 | |||
2432 | /** | ||
2433 | * A peer has exited the conference. | ||
2434 | */ | ||
2435 | TOX_CONFERENCE_STATE_CHANGE_PEER_EXIT, | ||
2400 | 2436 | ||
2401 | /** | 2437 | /** |
2402 | * A peer has changed their name. | 2438 | * A peer has changed their name. |
@@ -2419,6 +2455,8 @@ typedef void tox_conference_namelist_change_cb(Tox *tox, uint32_t conference_num | |||
2419 | * Set the callback for the `conference_namelist_change` event. Pass NULL to unset. | 2455 | * Set the callback for the `conference_namelist_change` event. Pass NULL to unset. |
2420 | * | 2456 | * |
2421 | * This event is triggered when the peer list changes (name change, peer join, peer exit). | 2457 | * This event is triggered when the peer list changes (name change, peer join, peer exit). |
2458 | * | ||
2459 | * @deprecated Use the `conference_peer_name` and `conference_peer_list_changed` events, instead. | ||
2422 | */ | 2460 | */ |
2423 | void tox_callback_conference_namelist_change(Tox *tox, tox_conference_namelist_change_cb *callback); | 2461 | void tox_callback_conference_namelist_change(Tox *tox, tox_conference_namelist_change_cb *callback); |
2424 | 2462 | ||