qTox
Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
|
#include <coreext.h>
Classes | |
class | Packet |
struct | PacketPassKey |
Public Slots | |
void | onFriendStatusChanged (uint32_t friendId, Status::Status status) |
Signals | |
void | extendedMessageReceived (uint32_t friendId, const QString &message) |
void | extendedReceiptReceived (uint32_t friendId, uint64_t receiptId) |
void | extendedMessageSupport (uint32_t friendId, bool supported) |
Public Member Functions | |
CoreExt (CoreExt const &other)=delete | |
CoreExt (CoreExt &&other)=delete | |
CoreExt & | operator= (CoreExt const &other)=delete |
CoreExt & | operator= (CoreExt &&other)=delete |
void | process () |
Periodic service function. More... | |
void | onLosslessPacket (uint32_t friendId, const uint8_t *data, size_t length) |
Handles extension related lossless packets. More... | |
std::unique_ptr< ICoreExtPacket > | getPacket (uint32_t friendId) override |
Gets a new packet builder for friend with core friend id friendId. More... | |
uint64_t | getMaxExtendedMessageSize () |
![]() | |
virtual | ~ICoreExtPacketAllocator () |
Static Public Member Functions | |
static std::unique_ptr< CoreExt > | makeCoreExt (Tox *core) |
Creates a CoreExt instance. Using a pointer here makes our registrations with extensions significantly easier to manage. More... | |
Private Types | |
template<class T > | |
using | ExtensionPtr = std::unique_ptr< T, void(*)(T *)> |
Private Member Functions | |
CoreExt (ExtensionPtr< ToxExt > toxExt) | |
Static Private Member Functions | |
static void | onExtendedMessageReceived (uint32_t friendId, const uint8_t *data, size_t size, void *userData) |
static void | onExtendedMessageReceipt (uint32_t friendId, uint64_t receiptId, void *userData) |
static void | onExtendedMessageNegotiation (uint32_t friendId, bool compatible, uint64_t maxMessageSize, void *userData) |
Private Attributes | |
std::mutex | toxext_mutex |
std::unordered_map< uint32_t, Status::Status > | currentStatuses |
ExtensionPtr< ToxExt > | toxExt |
ExtensionPtr< ToxExtensionMessages > | toxExtMessages |
|
private |
|
delete |
|
delete |
|
private |
|
signal |
|
signal |
|
signal |
uint64_t CoreExt::getMaxExtendedMessageSize | ( | ) |
|
overridevirtual |
Gets a new packet builder for friend with core friend id friendId.
Implements ICoreExtPacketAllocator.
Definition at line 88 of file coreext.cpp.
|
static |
Creates a CoreExt instance. Using a pointer here makes our registrations with extensions significantly easier to manage.
[in] | pointer | to core tox instance |
Definition at line 35 of file coreext.cpp.
|
staticprivate |
Definition at line 186 of file coreext.cpp.
|
staticprivate |
|
staticprivate |
Definition at line 175 of file coreext.cpp.
|
slot |
void CoreExt::onLosslessPacket | ( | uint32_t | friendId, |
const uint8_t * | data, | ||
size_t | length | ||
) |
Handles extension related lossless packets.
Definition at line 66 of file coreext.cpp.
void CoreExt::process | ( | ) |
Periodic service function.
Definition at line 60 of file coreext.cpp.
|
private |
|
private |
|
private |