diff options
author | Tobias Markmann <tm@ayena.de> | 2012-03-14 21:36:10 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2012-03-20 18:15:37 (GMT) |
commit | 3d27d98ccc232ae7bfacfd5a3f85f44b6c2e9cc9 (patch) | |
tree | cae0589a1826560668683d2129fe024148d4e43d /Swift/Controllers/ContactEditController.h | |
parent | 138223ab9ca917420d107d95a113e7628c27bac5 (diff) | |
download | swift-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/ContactEditController.h')
-rw-r--r-- | Swift/Controllers/ContactEditController.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Swift/Controllers/ContactEditController.h b/Swift/Controllers/ContactEditController.h index 1947944..5f64a6a 100644 --- a/Swift/Controllers/ContactEditController.h +++ b/Swift/Controllers/ContactEditController.h @@ -6,41 +6,49 @@ #pragma once #include <vector> #include <set> #include <boost/optional.hpp> #include <Swiften/JID/JID.h> #include <string> +#include <Swiften/Elements/VCard.h> #include <Swift/Controllers/UIEvents/UIEvent.h> #include <Swiften/Roster/XMPPRosterItem.h> namespace Swift { class UIEventStream; class ContactEditWindowFactory; class ContactEditWindow; class RosterController; + class VCardManager; class ContactEditController { public: - ContactEditController(RosterController* rosterController, ContactEditWindowFactory* contactEditWindowFactory, UIEventStream* uiEventStream); + ContactEditController(RosterController* rosterController, VCardManager* vcardManager, ContactEditWindowFactory* contactEditWindowFactory, UIEventStream* uiEventStream); ~ContactEditController(); void setAvailable(bool b); + public: + static std::vector<std::string> nameSuggestionsFromVCard(VCard::ref vcard); + private: void handleRemoveContactRequest(); void handleChangeContactRequest(const std::string& name, const std::set<std::string>& groups); private: void handleUIEvent(UIEvent::ref event); + void handleVCardChanged(const JID& jid, VCard::ref vcard); private: boost::optional<XMPPRosterItem> currentContact; RosterController* rosterController; + VCardManager* vcardManager; ContactEditWindowFactory* contactEditWindowFactory; UIEventStream* uiEventStream; + JID jid; ContactEditWindow* contactEditWindow; }; } |