use sr
This commit is contained in:
parent
6bc67efdc5
commit
f2030667bd
@ -43,15 +43,17 @@ CRDTNotesToxSync::CRDTNotesToxSync(
|
|||||||
ToxI& t,
|
ToxI& t,
|
||||||
ToxEventProviderI& tep,
|
ToxEventProviderI& tep,
|
||||||
ToxContactModel2& tcm
|
ToxContactModel2& tcm
|
||||||
) : _notes_sync(notes_sync), _cr(cr), _t(t), _tep(tep), _tcm(tcm) {
|
) : _notes_sync(notes_sync), _cr(cr), _t(t), _tep_sr(tep.newSubRef(this)), _tcm(tcm) {
|
||||||
// TODO: non groups
|
// TODO: non groups
|
||||||
|
|
||||||
// should be called for every peer (except self)
|
// should be called for every peer (except self)
|
||||||
// we hook here to inject ourself as contact sync model
|
// we hook here to inject ourself as contact sync model
|
||||||
_tep.subscribe(this, Tox_Event_Type::TOX_EVENT_GROUP_PEER_JOIN);
|
_tep_sr
|
||||||
|
.subscribe(Tox_Event_Type::TOX_EVENT_GROUP_PEER_JOIN)
|
||||||
|
|
||||||
_tep.subscribe(this, Tox_Event_Type::TOX_EVENT_GROUP_CUSTOM_PACKET);
|
.subscribe(Tox_Event_Type::TOX_EVENT_GROUP_CUSTOM_PACKET)
|
||||||
_tep.subscribe(this, Tox_Event_Type::TOX_EVENT_GROUP_CUSTOM_PRIVATE_PACKET);
|
.subscribe(Tox_Event_Type::TOX_EVENT_GROUP_CUSTOM_PRIVATE_PACKET)
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
CRDTNotesToxSync::~CRDTNotesToxSync(void) {
|
CRDTNotesToxSync::~CRDTNotesToxSync(void) {
|
||||||
|
@ -16,7 +16,7 @@ class CRDTNotesToxSync : public CRDTNotesContactSyncModelI, public ToxEventI {
|
|||||||
CRDTNotesEventI& _notes_sync;
|
CRDTNotesEventI& _notes_sync;
|
||||||
Contact3Registry& _cr;
|
Contact3Registry& _cr;
|
||||||
ToxI& _t;
|
ToxI& _t;
|
||||||
ToxEventProviderI& _tep;
|
ToxEventProviderI::SubscriptionReference _tep_sr;
|
||||||
ToxContactModel2& _tcm;
|
ToxContactModel2& _tcm;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user