summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-07-26 22:11:38 (GMT)
committerKevin Smith <kevin.smith@isode.com>2015-07-27 16:59:36 (GMT)
commit32dffa31b92ad29cc15cd6e6fe3cc4ef1b4ef23a (patch)
tree83e444921b84fa86094553dfa256fa6f63038a0b /Swift/Controllers/Chat/UserSearchController.h
parent744884d4ed76658880a3d25f6e6551ef92700a8f (diff)
downloadswift-32dffa31b92ad29cc15cd6e6fe3cc4ef1b4ef23a.zip
swift-32dffa31b92ad29cc15cd6e6fe3cc4ef1b4ef23a.tar.bz2
Remember directory services used when searching for users
Test-Information: Tested by searching at some services and checked that they are present in the combo box after a Swift restart. Change-Id: Ia30d932f20447f44e458af3b32a38665872da025
Diffstat (limited to 'Swift/Controllers/Chat/UserSearchController.h')
-rw-r--r--Swift/Controllers/Chat/UserSearchController.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/Swift/Controllers/Chat/UserSearchController.h b/Swift/Controllers/Chat/UserSearchController.h
index 3c45c04..0423a65 100644
--- a/Swift/Controllers/Chat/UserSearchController.h
+++ b/Swift/Controllers/Chat/UserSearchController.h
@@ -1,42 +1,44 @@
/*
- * Copyright (c) 2010-2014 Isode Limited.
+ * Copyright (c) 2010-2015 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <boost/shared_ptr.hpp>
-
#include <map>
-#include <vector>
#include <string>
+#include <vector>
+
+#include <boost/shared_ptr.hpp>
-#include <Swift/Controllers/Contact.h>
#include <Swiften/Base/boost_bsignals.h>
#include <Swiften/Elements/DiscoInfo.h>
#include <Swiften/Elements/DiscoItems.h>
#include <Swiften/Elements/ErrorPayload.h>
#include <Swiften/Elements/Presence.h>
#include <Swiften/Elements/SearchPayload.h>
#include <Swiften/Elements/VCard.h>
#include <Swiften/JID/JID.h>
+#include <Swift/Controllers/Contact.h>
+
namespace Swift {
class UIEventStream;
class UIEvent;
class UserSearchWindow;
class UserSearchWindowFactory;
class IQRouter;
class DiscoServiceWalker;
class RosterController;
class VCardManager;
class ContactSuggester;
class AvatarManager;
class PresenceOracle;
+ class ProfileSettingsProvider;
class UserSearchResult {
public:
UserSearchResult(const JID& jid, const std::map<std::string, std::string>& fields) : jid_(jid), fields_(fields) {}
const JID& getJID() const {return jid_;}
const std::map<std::string, std::string>& getFields() const {return fields_;}
@@ -45,13 +47,13 @@ namespace Swift {
std::map<std::string, std::string> fields_;
};
class UserSearchController {
public:
enum Type {AddContact, StartChat, InviteToChat};
- UserSearchController(Type type, const JID& jid, UIEventStream* uiEventStream, VCardManager* vcardManager, UserSearchWindowFactory* userSearchWindowFactory, IQRouter* iqRouter, RosterController* rosterController, ContactSuggester* contactSuggester, AvatarManager* avatarManager, PresenceOracle* presenceOracle);
+ UserSearchController(Type type, const JID& jid, UIEventStream* uiEventStream, VCardManager* vcardManager, UserSearchWindowFactory* userSearchWindowFactory, IQRouter* iqRouter, RosterController* rosterController, ContactSuggester* contactSuggester, AvatarManager* avatarManager, PresenceOracle* presenceOracle, ProfileSettingsProvider* settings);
~UserSearchController();
UserSearchWindow* getUserSearchWindow();
void setCanInitiateImpromptuMUC(bool supportsImpromptu);
private:
@@ -71,12 +73,15 @@ namespace Swift {
void handleJIDAddRequested(const std::vector<JID>& jids);
void handleJIDEditingFinished(const JID& jid);
Contact::ref convertJIDtoContact(const JID& jid);
void endDiscoWalker();
void initializeUserWindow();
+ void loadSavedDirectories();
+ void addToSavedDirectories(const JID& jid);
+
private:
Type type_;
JID jid_;
JID suggestionsJID_;
UIEventStream* uiEventStream_;
VCardManager* vcardManager_;
@@ -85,8 +90,10 @@ namespace Swift {
RosterController* rosterController_;
UserSearchWindow* window_;
DiscoServiceWalker* discoWalker_;
ContactSuggester* contactSuggester_;
AvatarManager* avatarManager_;
PresenceOracle* presenceOracle_;
+ std::vector<JID> savedDirectories_;
+ ProfileSettingsProvider* settings_;
};
}