You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add a number (a bit like Android API Level) to know what capabilites a node (Friend) has.
so clients can react accordingly. (using a newer API, and so on ...)
getting the capabilites_level for a friend
keep old API function: TOX_CONNECTION tox_friend_get_connection_status(const Tox *tox, uint32_t friend_number, TOX_ERR_FRIEND_QUERY *error);
and add a new one: TOX_CONNECTION tox_friend_get_connection_status_v2(const Tox *tox, uint32_t friend_number, uint32_t *capabilites_level, TOX_ERR_FRIEND_QUERY *error);
keep old API function: void tox_callback_friend_connection_status(Tox *tox, tox_friend_connection_status_cb *callback);
and add a new one: void tox_callback_friend_connection_status_v2(Tox *tox, tox_friend_connection_status_cb_v2 *callback);
keep old API function: typedef void tox_friend_connection_status_cb(Tox *tox, uint32_t friend_number, TOX_CONNECTION connection_status, void *user_data);
and add a new one: typedef void tox_friend_connection_status_cb_v2(Tox *tox, uint32_t friend_number, uint32_t capabilites_level, TOX_CONNECTION connection_status, void *user_data);
getting the capabilites_level of own node
at runtime
add new API function: uint32_t tox_self_get_capabilites_level();
at compile time
in toxcore/tox.h
#define TOX_CAPABILITY_LEVEL 3
description of capabilites_level value
capabilites_level
added capabilities
0
Tox Base capabilites as of c-toxcore v0.1.11
1
added Video Fix
2
added MessageV2 capability
3
added persistent Conferences
...
...
...
...
The text was updated successfully, but these errors were encountered:
Opinion: Capabilities levels should not reference specific, added capabilities, they should reference version numbers or releases that themselves come along with the implication of those things. Toxcore should hold a list of capabilities associated with different clients, forks, and releases - and it should send unique version IDs, not attempt to pack in every feature into a 64 bit integer.
I think that mightve been what you were going for with this but anyways.
Based on #777.
TFCL [Tox Friend Capabilities Level]
add a number (a bit like Android API Level) to know what capabilites a node (Friend) has.
so clients can react accordingly. (using a newer API, and so on ...)
getting the capabilites_level for a friend
keep old API function:
TOX_CONNECTION tox_friend_get_connection_status(const Tox *tox, uint32_t friend_number, TOX_ERR_FRIEND_QUERY *error);
and add a new one:
TOX_CONNECTION tox_friend_get_connection_status_v2(const Tox *tox, uint32_t friend_number, uint32_t *capabilites_level, TOX_ERR_FRIEND_QUERY *error);
keep old API function:
void tox_callback_friend_connection_status(Tox *tox, tox_friend_connection_status_cb *callback);
and add a new one:
void tox_callback_friend_connection_status_v2(Tox *tox, tox_friend_connection_status_cb_v2 *callback);
keep old API function:
typedef void tox_friend_connection_status_cb(Tox *tox, uint32_t friend_number, TOX_CONNECTION connection_status, void *user_data);
and add a new one:
typedef void tox_friend_connection_status_cb_v2(Tox *tox, uint32_t friend_number, uint32_t capabilites_level, TOX_CONNECTION connection_status, void *user_data);
getting the capabilites_level of own node
at runtime
add new API function:
uint32_t tox_self_get_capabilites_level();
at compile time
in toxcore/tox.h
#define TOX_CAPABILITY_LEVEL 3
description of capabilites_level value
The text was updated successfully, but these errors were encountered: