qTox
Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
|
#include <avatarbroadcaster.h>
Public Member Functions | |
AvatarBroadcaster (Core &_core) | |
void | setAvatar (QByteArray data) |
Set our current avatar. More... | |
void | sendAvatarTo (uint32_t friendId) |
Send our current avatar to this friend, if not already sent. More... | |
void | enableAutoBroadcast (bool state=true) |
Setup auto broadcast sending avatar. More... | |
Private Attributes | |
Core & | core |
QByteArray | avatarData |
QMap< uint32_t, bool > | friendsSentTo |
Takes care of broadcasting avatar changes to our friends in a smart way Cache a copy of our current avatar and friends who have received it so we don't spam avatar transfers to a friend who already has it.
Definition at line 28 of file avatarbroadcaster.h.
AvatarBroadcaster::AvatarBroadcaster | ( | Core & | _core | ) |
Definition at line 36 of file avatarbroadcaster.cpp.
void AvatarBroadcaster::enableAutoBroadcast | ( | bool | state = true | ) |
Setup auto broadcast sending avatar.
state | If true, we automatically broadcast our avatar to friends when they come online. |
Definition at line 82 of file avatarbroadcaster.cpp.
void AvatarBroadcaster::sendAvatarTo | ( | uint32_t | friendId | ) |
Send our current avatar to this friend, if not already sent.
friendId | Id of friend to send avatar. |
Definition at line 63 of file avatarbroadcaster.cpp.
void AvatarBroadcaster::setAvatar | ( | QByteArray | data | ) |
Set our current avatar.
data | Byte array on avater. |
Definition at line 44 of file avatarbroadcaster.cpp.
|
private |
Definition at line 40 of file avatarbroadcaster.h.
|
private |
Definition at line 39 of file avatarbroadcaster.h.
|
private |
Definition at line 41 of file avatarbroadcaster.h.