diff options
Diffstat (limited to 'Sluift/SluiftClient.cpp')
| -rw-r--r-- | Sluift/SluiftClient.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Sluift/SluiftClient.cpp b/Sluift/SluiftClient.cpp index 5243ed0..99892a9 100644 --- a/Sluift/SluiftClient.cpp +++ b/Sluift/SluiftClient.cpp | |||
| @@ -38,6 +38,9 @@ SluiftClient::SluiftClient( | |||
| 38 | client->onPresenceReceived.connect(boost::bind(&SluiftClient::handleIncomingPresence, this, _1)); | 38 | client->onPresenceReceived.connect(boost::bind(&SluiftClient::handleIncomingPresence, this, _1)); |
| 39 | client->getPubSubManager()->onEvent.connect(boost::bind(&SluiftClient::handleIncomingPubSubEvent, this, _1, _2)); | 39 | client->getPubSubManager()->onEvent.connect(boost::bind(&SluiftClient::handleIncomingPubSubEvent, this, _1, _2)); |
| 40 | client->getRoster()->onInitialRosterPopulated.connect(boost::bind(&SluiftClient::handleInitialRosterPopulated, this)); | 40 | client->getRoster()->onInitialRosterPopulated.connect(boost::bind(&SluiftClient::handleInitialRosterPopulated, this)); |
| 41 | client->getRoster()->onJIDAdded.connect(boost::bind(&SluiftClient::handleIncomingRosterAdd, this, _1)); | ||
| 42 | client->getRoster()->onJIDRemoved.connect(boost::bind(&SluiftClient::handleIncomingRosterRemove, this, _1)); | ||
| 43 | client->getRoster()->onJIDUpdated.connect(boost::bind(&SluiftClient::handleIncomingRosterUpdate, this, _1)); | ||
| 41 | client->getClientBlockListManager()->getBlockList()->onItemAdded.connect(boost::bind(&SluiftClient::handleIncomingBlockEvent, this, _1)); | 44 | client->getClientBlockListManager()->getBlockList()->onItemAdded.connect(boost::bind(&SluiftClient::handleIncomingBlockEvent, this, _1)); |
| 42 | client->getClientBlockListManager()->getBlockList()->onItemRemoved.connect(boost::bind(&SluiftClient::handleIncomingUnblockEvent, this, _1)); | 45 | client->getClientBlockListManager()->getBlockList()->onItemRemoved.connect(boost::bind(&SluiftClient::handleIncomingUnblockEvent, this, _1)); |
| 43 | } | 46 | } |
| @@ -192,6 +195,18 @@ void SluiftClient::handleInitialRosterPopulated() { | |||
| 192 | rosterReceived = true; | 195 | rosterReceived = true; |
| 193 | } | 196 | } |
| 194 | 197 | ||
| 198 | void SluiftClient::handleIncomingRosterAdd(const JID& item) { | ||
| 199 | pendingEvents.push_back(Event(item, Event::RosterAddType)); | ||
| 200 | } | ||
| 201 | |||
| 202 | void SluiftClient::handleIncomingRosterRemove(const JID& item) { | ||
| 203 | pendingEvents.push_back(Event(item, Event::RosterRemoveType)); | ||
| 204 | } | ||
| 205 | |||
| 206 | void SluiftClient::handleIncomingRosterUpdate(const JID& item) { | ||
| 207 | pendingEvents.push_back(Event(item, Event::RosterUpdateType)); | ||
| 208 | } | ||
| 209 | |||
| 195 | void SluiftClient::handleRequestResponse(std::shared_ptr<Payload> response, std::shared_ptr<ErrorPayload> error) { | 210 | void SluiftClient::handleRequestResponse(std::shared_ptr<Payload> response, std::shared_ptr<ErrorPayload> error) { |
| 196 | requestResponse = response; | 211 | requestResponse = response; |
| 197 | requestError = error; | 212 | requestError = error; |
Swift