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] #1258

Closed
iphydf opened this issue Nov 4, 2018 · 2 comments
Closed

Proposal: TFCL [Tox Friend Capabilities Level] #1258

iphydf opened this issue Nov 4, 2018 · 2 comments
Labels
P3 Low priority proposal Proposals
Milestone

Comments

@iphydf
Copy link
Member

iphydf commented Nov 4, 2018

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

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
... ...
... ...
@iphydf iphydf added this to the v0.2.x milestone Nov 4, 2018
@hugbubby
Copy link
Member

hugbubby commented Nov 5, 2018

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.

@pranomostro pranomostro added the proposal Proposals label Nov 8, 2018
@iphydf iphydf added the P3 Low priority label Apr 27, 2020
@iphydf iphydf modified the milestones: v0.2.x, meta Feb 4, 2022
@iphydf
Copy link
Member Author

iphydf commented Feb 4, 2022

We'll have capabilities, but not like in this proposal.

@iphydf iphydf closed this as completed Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Low priority proposal Proposals
Development

No branches or pull requests

3 participants