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

Adding "user is typing" functionality to toxcore. #733

Merged
merged 5 commits into from
Feb 18, 2014
Merged

Adding "user is typing" functionality to toxcore. #733

merged 5 commits into from
Feb 18, 2014

Conversation

Jman012
Copy link
Contributor

@Jman012 Jman012 commented Feb 17, 2014

Two API functions:

/* Set our typing status for a friend.
 * You are responsible for turning it on or off.
 *
 * returns 0 on success.
 * returns -1 on failure.
 */
int tox_set_user_is_typing(Tox *tox, int friendnumber, uint8_t is_typing);
/* Get the typing status of a friend.
 *
 * returns 0 if friend is not typing.
 * returns 1 if friend is typing.
 */
int tox_get_is_typing(Tox *tox, int friendnumber);

Also added a new packet ID to messenger for the typing. Everything was done very similarly to the USERSTATUS type messages, as it's just passing a single uint8_t. So it mimics it in the various parts in Messenger as well as the api. If there are better ways to name the variables or functions, please say so. If I missed anything (as in necessary functions, anything with the callbacks, anything in init'ing or memory freeing, etc) please say so.

@Jman012
Copy link
Contributor Author

Jman012 commented Feb 17, 2014

Second function's comment string has a typo. Going to fix that.

@Jman012
Copy link
Contributor Author

Jman012 commented Feb 17, 2014

That should fix it.

@lance0
Copy link
Contributor

lance0 commented Feb 17, 2014

Haven't had time to dig through the code. Did you implement a delay of sorts so if someone just starts typing it doesn't start going? The user should be typing for a few seconds first in my opinion before throwing the flag that they are typing.

@Jman012
Copy link
Contributor Author

Jman012 commented Feb 17, 2014

That should be up to the client to decide.

On Feb 16, 2014, at 5:46 PM, Lance Tuller notifications@github.com wrote:

Haven't had time to dig through the code. Did you implement a delay of
sorts so if someone just starts typing it doesn't start going? The user
should be typing for a few seconds first in my opinion before throwing the
flag that they are typing.

Reply to this email directly or view it on
GitHubhttps://github.com//pull/733#issuecomment-35223235
.

@nurupo
Copy link
Contributor

nurupo commented Feb 17, 2014

@lance0 that's client-side, not toxcore.

@lance0
Copy link
Contributor

lance0 commented Feb 17, 2014

@nurupo wasn't sure if it would be in the core, thank you for clarification.

@irungentoo irungentoo merged commit 5cd5f32 into irungentoo:master Feb 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants