diff options
Diffstat (limited to 'Sluift/SluiftClient.h')
-rw-r--r-- | Sluift/SluiftClient.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Sluift/SluiftClient.h b/Sluift/SluiftClient.h index a48c681..ac4c582 100644 --- a/Sluift/SluiftClient.h +++ b/Sluift/SluiftClient.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2017 Isode Limited. + * Copyright (c) 2013-2018 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ @@ -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; }; @@ -81,7 +84,6 @@ namespace Swift { } void connect(); - void connect(const std::string& host, int port); void waitConnected(int timeout); bool isConnected() const; void setTraceEnabled(bool b); @@ -110,7 +112,7 @@ namespace Swift { void disconnect(); void setSoftwareVersion(const std::string& name, const std::string& version, const std::string& os); boost::optional<SluiftClient::Event> getNextEvent(int timeout, - boost::function<bool (const Event&)> condition = 0); + boost::function<bool (const Event&)> condition = boost::function<bool (const Event&)>()); std::vector<XMPPRosterItem> getRoster(int timeout); std::vector<JID> getBlockList(int timeout); @@ -123,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); |