summaryrefslogtreecommitdiff
path: root/toxcore/tox.api.h
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-02-19 17:03:05 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-02-20 21:36:05 +0000
commit95c03e0e85a0a87418a98c9d832dd9ada680adb9 (patch)
treebe7f3a525a54610b42b1f22f669f48fd0c94aa52 /toxcore/tox.api.h
parent03b55cde1a98b02f9019f068340094b5062857d1 (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.api.h')
-rw-r--r--toxcore/tox.api.h40
1 files changed, 37 insertions, 3 deletions
diff --git a/toxcore/tox.api.h b/toxcore/tox.api.h
index d209d1c0..90020a83 100644
--- a/toxcore/tox.api.h
+++ b/toxcore/tox.api.h
@@ -2105,15 +2105,47 @@ namespace conference {
2105 typedef void(uint32_t conference_number, uint32_t peer_number, const uint8_t[length] title); 2105 typedef void(uint32_t conference_number, uint32_t peer_number, const uint8_t[length] title);
2106 } 2106 }
2107 2107
2108 namespace peer {
2109
2110 /**
2111 * This event is triggered when a peer changes their name.
2112 */
2113 event name const {
2114 /**
2115 * @param conference_number The conference number of the conference the
2116 * peer is in.
2117 * @param peer_number The ID of the peer who changed their nickname.
2118 * @param name A byte array containing the new nickname.
2119 * @param length The size of the name byte array.
2120 */
2121 typedef void(uint32_t conference_number, uint32_t peer_number, const uint8_t[length] name);
2122 }
2123
2124 /**
2125 * This event is triggered when a peer joins or leaves the conference.
2126 */
2127 event list_changed const {
2128 /**
2129 * @param conference_number The conference number of the conference the
2130 * peer is in.
2131 */
2132 typedef void(uint32_t conference_number);
2133 }
2134
2135 }
2136
2108 /** 2137 /**
2109 * Peer list state change types. 2138 * Peer list state change types.
2110 */ 2139 */
2111 enum class STATE_CHANGE { 2140 enum class STATE_CHANGE {
2112 /** 2141 /**
2113 * Some changes to list have occurred. Rebuild of list required. 2142 * A peer has joined the conference.
2114 * peer_number is undefined (always 0 for api compatibility) 2143 */
2144 PEER_JOIN,
2145 /**
2146 * A peer has exited the conference.
2115 */ 2147 */
2116 LIST_CHANGED, 2148 PEER_EXIT,
2117 /** 2149 /**
2118 * A peer has changed their name. 2150 * A peer has changed their name.
2119 */ 2151 */
@@ -2122,6 +2154,8 @@ namespace conference {
2122 2154
2123 /** 2155 /**
2124 * This event is triggered when the peer list changes (name change, peer join, peer exit). 2156 * This event is triggered when the peer list changes (name change, peer join, peer exit).
2157 *
2158 * @deprecated Use the `${event peer.name}` and `${event peer.list_changed}` events, instead.
2125 */ 2159 */
2126 event namelist_change const { 2160 event namelist_change const {
2127 /** 2161 /**