#include "./sha1_ngcft1.hpp" #include #include SHA1_NGCFT1::SHA1_NGCFT1( RegistryMessageModel& rmm, NGCFT1EventProviderI& nftep, ToxContactModel2& tcm ) : _rmm(rmm), _nftep(nftep), _tcm(tcm) { _nftep.subscribe(this, NGCFT1_Event::recv_request); _nftep.subscribe(this, NGCFT1_Event::recv_init); _nftep.subscribe(this, NGCFT1_Event::recv_data); _nftep.subscribe(this, NGCFT1_Event::send_data); } bool SHA1_NGCFT1::onEvent(const Events::NGCFT1_recv_request& e) { // only interested in sha1 if (e.file_kind != NGCFT1_file_kind::HASH_SHA1_INFO && e.file_kind != NGCFT1_file_kind::HASH_SHA1_CHUNK) { return false; } //std::cout << "SHA1_NGCFT1: FT1_REQUEST fk:" << int(e.file_kind) << " [" << bin2hex({e.file_id, e.file_id+e.file_id_size}) << "]\n"; return false; } bool SHA1_NGCFT1::onEvent(const Events::NGCFT1_recv_init& e) { // only interested in sha1 if (e.file_kind != NGCFT1_file_kind::HASH_SHA1_INFO && e.file_kind != NGCFT1_file_kind::HASH_SHA1_CHUNK) { return false; } return false; } bool SHA1_NGCFT1::onEvent(const Events::NGCFT1_recv_data& e) { return false; } bool SHA1_NGCFT1::onEvent(const Events::NGCFT1_send_data& e) { return false; }