diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-06-10 17:23:57 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-06-10 17:38:05 (GMT) |
commit | e2f5588d089e4d2148762ea092e032976254a467 (patch) | |
tree | 851946c7a36ffa96e0f3ab54bc72f233f8b2c746 /Swift/Controllers/RosterController.h | |
parent | 7214d768dca85a6d43892169d5008898249dce73 (diff) | |
download | swift-e2f5588d089e4d2148762ea092e032976254a467.zip swift-e2f5588d089e4d2148762ea092e032976254a467.tar.bz2 |
Moved Swiften/Controllers to Swift/Controllers.
Diffstat (limited to 'Swift/Controllers/RosterController.h')
-rw-r--r-- | Swift/Controllers/RosterController.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/Swift/Controllers/RosterController.h b/Swift/Controllers/RosterController.h new file mode 100644 index 0000000..945b068 --- /dev/null +++ b/Swift/Controllers/RosterController.h @@ -0,0 +1,48 @@ +#ifndef SWIFTEN_RosterController_H +#define SWIFTEN_RosterController_H + +#include "Swiften/JID/JID.h" +#include "Swiften/Base/String.h" +#include "Swiften/Elements/Presence.h" +#include "Swiften/Roster/UserRosterAction.h" + +#include <boost/signals.hpp> +#include <boost/shared_ptr.hpp> + +namespace Swift { + class IQRouter; + class Roster; + class XMPPRoster; + class MainWindow; + class MainWindowFactory; + class TreeWidgetFactory; + class OfflineRosterFilter; + + class RosterController { + public: + RosterController(boost::shared_ptr<XMPPRoster> xmppRoster, MainWindowFactory *mainWindowFactory, TreeWidgetFactory *treeWidgetFactory); + ~RosterController(); + void showRosterWindow(); + MainWindow* getWindow() {return mainWindow_;}; + boost::signal<void (const JID&)> onStartChatRequest; + boost::signal<void (const JID&, const String&)> onJoinMUCRequest; + boost::signal<void (StatusShow::Type, const String&)> onChangeStatusRequest; + void handleIncomingPresence(boost::shared_ptr<Presence> presence); + + private: + void handleOnJIDAdded(const JID &jid); + void handleStartChatRequest(const JID& contact); + void handleJoinMUCRequest(const JID &muc, const String &nick); + void handleUserAction(boost::shared_ptr<UserRosterAction> action); + void handleChangeStatusRequest(StatusShow::Type show, const String &statusText); + void handleShowOfflineToggled(bool state); + boost::shared_ptr<XMPPRoster> xmppRoster_; + MainWindowFactory* mainWindowFactory_; + TreeWidgetFactory* treeWidgetFactory_; + MainWindow* mainWindow_; + Roster* roster_; + OfflineRosterFilter* offlineFilter_; + }; +} +#endif + |