Skip to content

Proposal: TFCL [Tox Friend Capabilities Level] #777

@zoff99

Description

@zoff99

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

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
... ...
... ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions