log Tox_Event_File_Chunk_Request

This commit is contained in:
Green Sky 2023-06-14 01:47:03 +02:00
parent 58406b2a49
commit 9e3295b19c
No known key found for this signature in database
2 changed files with 8 additions and 2 deletions

View File

@ -8,6 +8,7 @@
struct ToxEventI {
virtual ~ToxEventI(void) {}
// TODO: rename to onEvent()
#define VIRT_EVENT(x) virtual bool onToxEvent(const x*) { return false; }
// return true if the event is handled and should not be given down the chain

View File

@ -30,8 +30,13 @@ bool ToxEventLogger::onToxEvent(const Tox_Event_Conference_Title*) {
return false;
}
bool ToxEventLogger::onToxEvent(const Tox_Event_File_Chunk_Request*) {
_out << "TOX_EVENT: " << tox_event_to_string(TOX_EVENT_FILE_CHUNK_REQUEST) << "\n";
bool ToxEventLogger::onToxEvent(const Tox_Event_File_Chunk_Request* e) {
_out << "TOX_EVENT: " << tox_event_to_string(TOX_EVENT_FILE_CHUNK_REQUEST)
<< " frd:" << tox_event_file_chunk_request_get_friend_number(e)
<< " fnb:" << tox_event_file_chunk_request_get_file_number(e)
<< " pos:" << tox_event_file_chunk_request_get_position(e)
<< " len:" << tox_event_file_chunk_request_get_length(e)
<< "\n";
return false;
}