Skip to content
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

Closed
zoff99 opened this issue Feb 13, 2018 · 6 comments
Closed

Proposal: TFCL [Tox Friend Capabilities Level] #777

zoff99 opened this issue Feb 13, 2018 · 6 comments
Labels
messenger Messenger P3 Low priority proposal Proposals
Milestone

Comments

@zoff99
Copy link

zoff99 commented Feb 13, 2018

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
... ...
... ...
@zoff99 zoff99 added enhancement New feature for the user, not a new feature for build script messenger Messenger labels Feb 13, 2018
@zoff99 zoff99 mentioned this issue Feb 13, 2018
6 tasks
@SkyzohKey
Copy link

Nice but this doesn't allow to tell what features every client does support. :/

@SkyzohKey SkyzohKey added proposal Proposals and removed enhancement New feature for the user, not a new feature for build script labels Feb 13, 2018
@zoff99
Copy link
Author

zoff99 commented Feb 13, 2018

@SkyzohKey what do you mean? it works the same way as Android API Level

@SkyzohKey
Copy link

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.

@zoff99
Copy link
Author

zoff99 commented Feb 13, 2018

i don't know. it seems unneeded.
audio and video will just not connect.
there are no stickers and inline stuff.

@SkyzohKey your are not very often on the IRC channel :-(

@SkyzohKey
Copy link

SkyzohKey commented Feb 14, 2018

@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)

@sudden6
Copy link

sudden6 commented Mar 4, 2018

I think the capabilities should also include the following flags:

  • supports audio
  • supports video
  • supports filetransfer
  • supports groups/conferences

@sudden6 sudden6 mentioned this issue Mar 15, 2018
@iphydf iphydf added this to the v0.2.x milestone Jul 16, 2018
@zoff99 zoff99 closed this as completed Nov 4, 2018
@robinlinden robinlinden modified the milestones: v0.2.x, v0.2.9 Jan 3, 2019
@iphydf iphydf added the P3 Low priority label Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
messenger Messenger P3 Low priority proposal Proposals
Development

No branches or pull requests

5 participants