use sr
This commit is contained in:
parent
3869731e0d
commit
6c782a6568
@ -259,10 +259,12 @@ ToxP2PRNG::ToxP2PRNG(
|
|||||||
ToxI& t,
|
ToxI& t,
|
||||||
ToxEventProviderI& tep,
|
ToxEventProviderI& tep,
|
||||||
ToxContactModel2& tcm
|
ToxContactModel2& tcm
|
||||||
) : _t(t), _tep(tep), _tcm(tcm) {
|
) : _t(t), _tep_sr(tep.newSubRef(this)), _tcm(tcm) {
|
||||||
_tep.subscribe(this, Tox_Event_Type::TOX_EVENT_FRIEND_LOSSLESS_PACKET);
|
_tep_sr
|
||||||
_tep.subscribe(this, Tox_Event_Type::TOX_EVENT_GROUP_CUSTOM_PACKET);
|
.subscribe(Tox_Event_Type::TOX_EVENT_FRIEND_LOSSLESS_PACKET)
|
||||||
_tep.subscribe(this, Tox_Event_Type::TOX_EVENT_GROUP_CUSTOM_PRIVATE_PACKET);
|
.subscribe(Tox_Event_Type::TOX_EVENT_GROUP_CUSTOM_PACKET)
|
||||||
|
.subscribe(Tox_Event_Type::TOX_EVENT_GROUP_CUSTOM_PRIVATE_PACKET)
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
ToxP2PRNG::~ToxP2PRNG(void) {
|
ToxP2PRNG::~ToxP2PRNG(void) {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
// TODO: use generic packet handling service (eg ngc_ext) instead
|
// TODO: use generic packet handling service (eg ngc_ext) instead
|
||||||
class ToxP2PRNG : public P2PRNGI, public ToxEventI {
|
class ToxP2PRNG : public P2PRNGI, public ToxEventI {
|
||||||
ToxI& _t;
|
ToxI& _t;
|
||||||
ToxEventProviderI& _tep;
|
ToxEventProviderI::SubscriptionReference _tep_sr;
|
||||||
ToxContactModel2& _tcm;
|
ToxContactModel2& _tcm;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user