-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: TFCL [Tox Friend Capabilities Level] #777
Comments
Nice but this doesn't allow to tell what features every client does support. :/ |
@SkyzohKey what do you mean? it works the same way as Android API Level |
What I mean is that clients should be able to know that Bob's client can handle text/action messages, file transfers and avatars, but do not handle inline stuffs, groupchats & stickers. Each client should publish a capabilities packet which makes friend's clients aware of which feature your client does supports. This allows to hide audio/video calls buttons if your friend's client do not have support for that, per exemple. |
i don't know. it seems unneeded. @SkyzohKey your are not very often on the IRC channel :-( |
@zoff99 this is absolutely needed for nice UX. Instead of having the user waiting for a call that will never succeed, we could display them a message saying that the contact do not supports calls. Or stickers. Or wathever I'm mostly h24 online on Wire (@SkyzohKey) |
I think the capabilities should also include the following flags:
|
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: