summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2012-03-14 21:36:10 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-03-20 18:15:37 (GMT)
commit3d27d98ccc232ae7bfacfd5a3f85f44b6c2e9cc9 (patch)
treecae0589a1826560668683d2129fe024148d4e43d /Swift/Controllers/Chat/UserSearchController.h
parent138223ab9ca917420d107d95a113e7628c27bac5 (diff)
downloadswift-contrib-3d27d98ccc232ae7bfacfd5a3f85f44b6c2e9cc9.zip
swift-contrib-3d27d98ccc232ae7bfacfd5a3f85f44b6c2e9cc9.tar.bz2
Naming suggestion for 'Add Contact'-dialog and "Edit Contact"-dialog based on vCards.
License: This patch is BSD-licensed, see http://www.opensource.org/licenses/bsd-license.php
Diffstat (limited to 'Swift/Controllers/Chat/UserSearchController.h')
-rw-r--r--Swift/Controllers/Chat/UserSearchController.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/Swift/Controllers/Chat/UserSearchController.h b/Swift/Controllers/Chat/UserSearchController.h
index 071ec33..ce0754c 100644
--- a/Swift/Controllers/Chat/UserSearchController.h
+++ b/Swift/Controllers/Chat/UserSearchController.h
@@ -11,56 +11,62 @@
#include <vector>
#include <Swiften/Base/boost_bsignals.h>
#include <Swiften/Elements/SearchPayload.h>
#include <string>
#include <Swiften/JID/JID.h>
#include <Swiften/Elements/DiscoInfo.h>
#include <Swiften/Elements/DiscoItems.h>
#include <Swiften/Elements/ErrorPayload.h>
+#include <Swiften/Elements/VCard.h>
namespace Swift {
class UIEventStream;
class UIEvent;
class UserSearchWindow;
class UserSearchWindowFactory;
class IQRouter;
class DiscoServiceWalker;
class RosterController;
+ class VCardManager;
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_;}
private:
JID jid_;
std::map<std::string, std::string> fields_;
};
class UserSearchController {
public:
enum Type {AddContact, StartChat};
- UserSearchController(Type type, const JID& jid, UIEventStream* uiEventStream, UserSearchWindowFactory* userSearchWindowFactory, IQRouter* iqRouter, RosterController* rosterController);
+ UserSearchController(Type type, const JID& jid, UIEventStream* uiEventStream, VCardManager* vcardManager, UserSearchWindowFactory* userSearchWindowFactory, IQRouter* iqRouter, RosterController* rosterController);
~UserSearchController();
private:
void handleUIEvent(boost::shared_ptr<UIEvent> event);
void handleFormRequested(const JID& service);
void handleDiscoServiceFound(const JID& jid, boost::shared_ptr<DiscoInfo> info);
void handleDiscoWalkFinished();
void handleFormResponse(boost::shared_ptr<SearchPayload> items, ErrorPayload::ref error);
void handleSearch(boost::shared_ptr<SearchPayload> fields, const JID& jid);
void handleSearchResponse(boost::shared_ptr<SearchPayload> results, ErrorPayload::ref error);
+ void handleNameSuggestionRequest(const JID& jid);
+ void handleVCardChanged(const JID& jid, VCard::ref vcard);
void endDiscoWalker();
private:
Type type_;
JID jid_;
+ JID suggestionsJID_;
UIEventStream* uiEventStream_;
+ VCardManager* vcardManager_;
UserSearchWindowFactory* factory_;
IQRouter* iqRouter_;
RosterController* rosterController_;
UserSearchWindow* window_;
DiscoServiceWalker* discoWalker_;
};
}