diff options
Diffstat (limited to 'Swift/Controllers/ContactEditController.h')
-rw-r--r-- | Swift/Controllers/ContactEditController.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/Swift/Controllers/ContactEditController.h b/Swift/Controllers/ContactEditController.h new file mode 100644 index 0000000..31917b1 --- /dev/null +++ b/Swift/Controllers/ContactEditController.h @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2010 Remko Tronçon + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + +#pragma once + +#include <vector> +#include <boost/optional.hpp> + +#include <Swiften/JID/JID.h> +#include <Swiften/Base/String.h> +#include <Swift/Controllers/UIEvents/UIEvent.h> +#include <Swiften/Roster/XMPPRosterItem.h> + +namespace Swift { + class UIEventStream; + class ContactEditWindowFactory; + class ContactEditWindow; + class RosterController; + + class ContactEditController { + public: + ContactEditController(RosterController* rosterController, ContactEditWindowFactory* contactEditWindowFactory, UIEventStream* uiEventStream); + ~ContactEditController(); + + void setAvailable(bool b); + + private: + void handleRemoveContactRequest(); + void handleChangeContactRequest(const String& name, const std::vector<String>& groups); + + private: + void handleUIEvent(UIEvent::ref event); + + private: + boost::optional<XMPPRosterItem> currentContact; + RosterController* rosterController; + ContactEditWindowFactory* contactEditWindowFactory; + UIEventStream* uiEventStream; + ContactEditWindow* contactEditWindow; + }; +} + |