diff options
Diffstat (limited to 'Swift/Controllers/ContactEditController.h')
-rw-r--r-- | Swift/Controllers/ContactEditController.h | 82 |
1 files changed, 42 insertions, 40 deletions
diff --git a/Swift/Controllers/ContactEditController.h b/Swift/Controllers/ContactEditController.h index 5f64a6a..ab2b52e 100644 --- a/Swift/Controllers/ContactEditController.h +++ b/Swift/Controllers/ContactEditController.h @@ -1,54 +1,56 @@ /* - * Copyright (c) 2010 Remko Tronçon - * Licensed under the GNU General Public License v3. - * See Documentation/Licenses/GPLv3.txt for more information. + * Copyright (c) 2010-2016 Isode Limited. + * All rights reserved. + * See the COPYING file for more information. */ #pragma once -#include <vector> #include <set> +#include <string> +#include <vector> + #include <boost/optional.hpp> -#include <Swiften/JID/JID.h> -#include <string> #include <Swiften/Elements/VCard.h> -#include <Swift/Controllers/UIEvents/UIEvent.h> +#include <Swiften/JID/JID.h> #include <Swiften/Roster/XMPPRosterItem.h> +#include <Swift/Controllers/UIEvents/UIEvent.h> + namespace Swift { - class UIEventStream; - class ContactEditWindowFactory; - class ContactEditWindow; - class RosterController; - class VCardManager; - - class ContactEditController { - public: - 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; - }; + class UIEventStream; + class ContactEditWindowFactory; + class ContactEditWindow; + class RosterController; + class VCardManager; + + class ContactEditController { + public: + 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; + }; } |