diff options
Diffstat (limited to 'Swift/Controllers/Chat/UserSearchController.h')
-rw-r--r-- | Swift/Controllers/Chat/UserSearchController.h | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/Swift/Controllers/Chat/UserSearchController.h b/Swift/Controllers/Chat/UserSearchController.h index ce0754c..d630580 100644 --- a/Swift/Controllers/Chat/UserSearchController.h +++ b/Swift/Controllers/Chat/UserSearchController.h @@ -1,4 +1,4 @@ /* - * Copyright (c) 2010 Kevin Smith + * Copyright (c) 2010-2014 Kevin Smith * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. @@ -8,15 +8,18 @@ #include <boost/shared_ptr.hpp> + #include <map> #include <vector> -#include <Swiften/Base/boost_bsignals.h> - -#include <Swiften/Elements/SearchPayload.h> #include <string> -#include <Swiften/JID/JID.h> + +#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> namespace Swift { @@ -29,4 +32,7 @@ namespace Swift { class RosterController; class VCardManager; + class ContactSuggester; + class AvatarManager; + class PresenceOracle; class UserSearchResult { @@ -42,8 +48,11 @@ namespace Swift { class UserSearchController { public: - enum Type {AddContact, StartChat}; - UserSearchController(Type type, const JID& jid, UIEventStream* uiEventStream, VCardManager* vcardManager, UserSearchWindowFactory* userSearchWindowFactory, IQRouter* iqRouter, RosterController* rosterController); + 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(); + UserSearchWindow* getUserSearchWindow(); + void setCanInitiateImpromptuMUC(bool supportsImpromptu); + private: void handleUIEvent(boost::shared_ptr<UIEvent> event); @@ -55,6 +64,13 @@ namespace Swift { void handleSearchResponse(boost::shared_ptr<SearchPayload> results, ErrorPayload::ref error); void handleNameSuggestionRequest(const JID& jid); + void handleContactSuggestionsRequested(std::string text); void handleVCardChanged(const JID& jid, VCard::ref vcard); + void handleAvatarChanged(const JID& jid); + void handlePresenceChanged(Presence::ref presence); + void handleJIDUpdateRequested(const std::vector<JID>& jids); + void handleJIDAddRequested(const std::vector<JID>& jids); + Contact::ref convertJIDtoContact(const JID& jid); void endDiscoWalker(); + void initializeUserWindow(); private: @@ -69,4 +85,7 @@ namespace Swift { UserSearchWindow* window_; DiscoServiceWalker* discoWalker_; + ContactSuggester* contactSuggester_; + AvatarManager* avatarManager_; + PresenceOracle* presenceOracle_; }; } |