#include <toxchannel.hpp>
|
static void | friendRequestCallback (Tox *tox, const uint8_t *public_key, const uint8_t *data, size_t length, void *userdata) |
|
static void | messageCallback (Tox *tox, uint32_t friendnumber, TOX_MESSAGE_TYPE type, const uint8_t *message, size_t length, void *userdata) |
|
template<typename MsgType > |
static void | groupMessageCallback (Tox *tox, int32_t groupnumber, int32_t peernumber, const uint8_t *message, uint16_t length, void *userdata) |
|
§ ToxChannel()
toxChannel::ToxChannel::ToxChannel |
( |
Hub::Hub * |
hub, |
|
|
const std::string & |
config |
|
) |
| |
|
explicit |
§ ~ToxChannel()
toxChannel::ToxChannel::~ToxChannel |
( |
| ) |
|
§ activate()
std::future< void > toxChannel::ToxChannel::activate |
( |
| ) |
|
|
overrideprivatevirtual |
Prepare all prerequisites for polling thread or prepare the output and start working
Opening file descriptors, connecting to network must be done here. After future is valid channel is considered to be ready for work.
- Exceptions
-
activate_error | in case of problems |
Implements channeling::Channel.
§ friendRequestCallback()
void toxChannel::ToxChannel::friendRequestCallback |
( |
Tox * |
tox, |
|
|
const uint8_t * |
public_key, |
|
|
const uint8_t * |
data, |
|
|
size_t |
length, |
|
|
void * |
userdata |
|
) |
| |
|
staticprivate |
§ groupMessageCallback()
template<typename MsgType >
void toxChannel::ToxChannel::groupMessageCallback |
( |
Tox * |
tox, |
|
|
int32_t |
groupnumber, |
|
|
int32_t |
peernumber, |
|
|
const uint8_t * |
message, |
|
|
uint16_t |
length, |
|
|
void * |
userdata |
|
) |
| |
|
staticprivate |
§ incoming()
Parse line and send it to needed output place in case of Output direction
- Parameters
-
msg | Incoming message from hub. Passed by value to preserve ownership and ensure existence during processing in all output channels. |
Implements channeling::Channel.
§ messageCallback()
void toxChannel::ToxChannel::messageCallback |
( |
Tox * |
tox, |
|
|
uint32_t |
friendnumber, |
|
|
TOX_MESSAGE_TYPE |
type, |
|
|
const uint8_t * |
message, |
|
|
size_t |
length, |
|
|
void * |
userdata |
|
) |
| |
|
staticprivate |
§ parse()
§ pollThread()
void toxChannel::ToxChannel::pollThread |
( |
| ) |
|
|
overrideprivatevirtual |
§ toxStart()
int toxChannel::ToxChannel::toxStart |
( |
| ) |
|
|
private |
§ type()
std::string toxChannel::ToxChannel::type |
( |
| ) |
const |
|
inlineoverridevirtual |
Return channel "type" — unique string to identify channel in config file
- Return values
-
Implements channeling::Channel.
§ _tox
Tox* const toxChannel::ToxChannel::_tox |
|
private |
§ creator
§ wasConnected
bool toxChannel::ToxChannel::wasConnected |
|
private |
The documentation for this class was generated from the following files: