summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoger Planas <roger.planas@isode.com>2018-11-16 11:04:27 (GMT)
committerRoger Planas <roger.planas@isode.com>2018-11-27 14:31:21 (GMT)
commit24ddcdb0a82cbd33deb5b72ad9f86f1c46fc9d13 (patch)
tree50dd6f7d520100e576b8824e137bf3246affd990 /Sluift/SluiftClient.h
parent560b5642eeeee9135e8995c04f99613387a7bfa8 (diff)
downloadswift-24ddcdb0a82cbd33deb5b72ad9f86f1c46fc9d13.zip
swift-24ddcdb0a82cbd33deb5b72ad9f86f1c46fc9d13.tar.bz2
Sluift: Added handling of roster push event
Swiften handles roster push event notifications, but those were not passed to Sluift, so a Sluift client, when querying events, would not be aware if an XMPP server roster pushes. This patch adds extra events types to Sluift so that method for_each_event reports roster pushes notifications. Test-information: Used sluift client to retrieve all items after adding, removing and updating roster items, and now Sluift clients can see these events. Change-Id: Ide5597bf2b39e3cc20014c66ba9153c551eec670
Diffstat (limited to 'Sluift/SluiftClient.h')
-rw-r--r--Sluift/SluiftClient.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/Sluift/SluiftClient.h b/Sluift/SluiftClient.h
index 39ff0a8..ac4c582 100644
--- a/Sluift/SluiftClient.h
+++ b/Sluift/SluiftClient.h
@@ -45,7 +45,10 @@ namespace Swift {
PresenceType,
PubSubEventType,
BlockEventType,
- UnblockEventType
+ UnblockEventType,
+ RosterAddType,
+ RosterRemoveType,
+ RosterUpdateType
};
Event(std::shared_ptr<Message> stanza) : type(MessageType), stanza(stanza) {}
@@ -61,7 +64,7 @@ namespace Swift {
JID from;
std::shared_ptr<PubSubEventPayload> pubsubEvent;
- // Blocklist
+ // Blocklist & Roster Push
JID item;
};
@@ -122,6 +125,9 @@ namespace Swift {
void handleIncomingBlockEvent(const JID& item);
void handleIncomingUnblockEvent(const JID& item);
void handleInitialRosterPopulated();
+ void handleIncomingRosterAdd(const JID& item);
+ void handleIncomingRosterRemove(const JID& item);
+ void handleIncomingRosterUpdate(const JID& item);
void handleRequestResponse(std::shared_ptr<Payload> response, std::shared_ptr<ErrorPayload> error);
void handleDisconnected(const boost::optional<ClientError>& error);