summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Roster/XMPPRoster.h')
-rw-r--r--Swiften/Roster/XMPPRoster.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/Swiften/Roster/XMPPRoster.h b/Swiften/Roster/XMPPRoster.h
index 7a72e00..47326c3 100644
--- a/Swiften/Roster/XMPPRoster.h
+++ b/Swiften/Roster/XMPPRoster.h
@@ -3,6 +3,7 @@
#include "Swiften/Base/String.h"
#include "Swiften/JID/JID.h"
+#include "Swiften/Elements/RosterItemPayload.h"
#include <map>
#include <vector>
@@ -10,14 +11,22 @@
namespace Swift {
+struct XMPPRosterItem {
+ JID jid;
+ String name;
+ std::vector<String> groups;
+ RosterItemPayload::Subscription subscription;
+};
+
class XMPPRoster {
public:
XMPPRoster() {};
~XMPPRoster() {};
- void addContact(const JID& jid, const String& name, const std::vector<String>& groups);
+ void addContact(const JID& jid, const String& name, const std::vector<String>& groups, const RosterItemPayload::Subscription subscription);
bool containsJID(const JID& jid);
void removeContact(const JID& jid);
+ RosterItemPayload::Subscription getSubscriptionStateForJID(const JID& jid);
const String& getNameForJID(const JID& jid);
const std::vector<String>& getGroupsForJID(const JID& jid);
@@ -26,7 +35,8 @@ class XMPPRoster {
boost::signal<void (const JID&, const String&, const std::vector<String>&)> onJIDUpdated;
private:
- std::map<JID, std::pair<String, std::vector<String> > > entries_;
+ //std::map<JID, std::pair<String, std::vector<String> > > entries_;
+ std::map<JID, XMPPRosterItem> entries_;
};
}