diff options
Diffstat (limited to 'Swift/Controllers')
| -rw-r--r-- | Swift/Controllers/FileTransfer/FileTransferController.cpp | 2 | ||||
| -rw-r--r-- | Swift/Controllers/FileTransfer/FileTransferController.h | 19 | ||||
| -rw-r--r-- | Swift/Controllers/FileTransfer/FileTransferOverview.cpp | 58 | ||||
| -rw-r--r-- | Swift/Controllers/FileTransfer/FileTransferOverview.h | 15 | ||||
| -rw-r--r-- | Swift/Controllers/MainController.cpp | 107 |
5 files changed, 134 insertions, 67 deletions
diff --git a/Swift/Controllers/FileTransfer/FileTransferController.cpp b/Swift/Controllers/FileTransfer/FileTransferController.cpp index f7ce8e6..c21c364 100644 --- a/Swift/Controllers/FileTransfer/FileTransferController.cpp +++ b/Swift/Controllers/FileTransfer/FileTransferController.cpp | |||
| @@ -119,11 +119,11 @@ void FileTransferController::cancel() { | |||
| 119 | } | 119 | } |
| 120 | } | 120 | } |
| 121 | 121 | ||
| 122 | void FileTransferController::handleFileTransferStateChange(FileTransfer::State state) { | 122 | void FileTransferController::handleFileTransferStateChange(FileTransfer::State state) { |
| 123 | currentState = state; | 123 | currentState = state; |
| 124 | onStateChage(); | 124 | onStateChanged(); |
| 125 | switch(state.type) { | 125 | switch(state.type) { |
| 126 | case FileTransfer::State::Initial: | 126 | case FileTransfer::State::Initial: |
| 127 | assert(false); | 127 | assert(false); |
| 128 | return; | 128 | return; |
| 129 | case FileTransfer::State::Negotiating: | 129 | case FileTransfer::State::Negotiating: |
diff --git a/Swift/Controllers/FileTransfer/FileTransferController.h b/Swift/Controllers/FileTransfer/FileTransferController.h index 3d6f7d5..490773d 100644 --- a/Swift/Controllers/FileTransfer/FileTransferController.h +++ b/Swift/Controllers/FileTransfer/FileTransferController.h | |||
| @@ -2,22 +2,29 @@ | |||
| 2 | * Copyright (c) 2011 Tobias Markmann | 2 | * Copyright (c) 2011 Tobias Markmann |
| 3 | * Licensed under the simplified BSD license. | 3 | * Licensed under the simplified BSD license. |
| 4 | * See Documentation/Licenses/BSD-simplified.txt for more information. | 4 | * See Documentation/Licenses/BSD-simplified.txt for more information. |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | /* | ||
| 8 | * Copyright (c) 2015 Isode Limited. | ||
| 9 | * All rights reserved. | ||
| 10 | * See the COPYING file for more information. | ||
| 11 | */ | ||
| 12 | |||
| 7 | #pragma once | 13 | #pragma once |
| 8 | 14 | ||
| 9 | #include <string> | 15 | #include <string> |
| 10 | 16 | ||
| 11 | #include <boost/shared_ptr.hpp> | ||
| 12 | #include <boost/cstdint.hpp> | 17 | #include <boost/cstdint.hpp> |
| 18 | #include <boost/shared_ptr.hpp> | ||
| 13 | 19 | ||
| 14 | #include <Swiften/JID/JID.h> | ||
| 15 | #include <Swiften/FileTransfer/FileTransfer.h> | ||
| 16 | #include <Swiften/FileTransfer/IncomingFileTransfer.h> | ||
| 17 | #include <Swiften/FileTransfer/FileReadBytestream.h> | 20 | #include <Swiften/FileTransfer/FileReadBytestream.h> |
| 21 | #include <Swiften/FileTransfer/FileTransfer.h> | ||
| 18 | #include <Swiften/FileTransfer/FileWriteBytestream.h> | 22 | #include <Swiften/FileTransfer/FileWriteBytestream.h> |
| 23 | #include <Swiften/FileTransfer/IncomingFileTransfer.h> | ||
| 24 | #include <Swiften/JID/JID.h> | ||
| 25 | |||
| 19 | #include <Swift/Controllers/FileTransfer/FileTransferProgressInfo.h> | 26 | #include <Swift/Controllers/FileTransfer/FileTransferProgressInfo.h> |
| 20 | 27 | ||
| 21 | namespace Swift { | 28 | namespace Swift { |
| 22 | 29 | ||
| 23 | class FileTransferManager; | 30 | class FileTransferManager; |
| @@ -47,18 +54,18 @@ public: | |||
| 47 | bool isIncoming() const; | 54 | bool isIncoming() const; |
| 48 | FileTransfer::State getState() const; | 55 | FileTransfer::State getState() const; |
| 49 | int getProgress() const; | 56 | int getProgress() const; |
| 50 | boost::uintmax_t getSize() const; | 57 | boost::uintmax_t getSize() const; |
| 51 | 58 | ||
| 52 | boost::signal<void ()> onStateChage; | 59 | boost::signal<void ()> onStateChanged; |
| 53 | boost::signal<void ()> onProgressChange; | 60 | boost::signal<void ()> onProgressChange; |
| 54 | 61 | ||
| 55 | private: | 62 | private: |
| 56 | void handleFileTransferStateChange(FileTransfer::State); | 63 | void handleFileTransferStateChange(FileTransfer::State); |
| 57 | void handleProgressPercentageChange(int percentage); | 64 | void handleProgressPercentageChange(int percentage); |
| 58 | 65 | ||
| 59 | private: | 66 | private: |
| 60 | bool sending; | 67 | bool sending; |
| 61 | JID otherParty; | 68 | JID otherParty; |
| 62 | std::string filename; | 69 | std::string filename; |
| 63 | FileTransfer::ref transfer; | 70 | FileTransfer::ref transfer; |
| 64 | boost::shared_ptr<FileReadBytestream> fileReadStream; | 71 | boost::shared_ptr<FileReadBytestream> fileReadStream; |
diff --git a/Swift/Controllers/FileTransfer/FileTransferOverview.cpp b/Swift/Controllers/FileTransfer/FileTransferOverview.cpp index 2a8c319..b2afea9 100644 --- a/Swift/Controllers/FileTransfer/FileTransferOverview.cpp +++ b/Swift/Controllers/FileTransfer/FileTransferOverview.cpp | |||
| @@ -2,43 +2,91 @@ | |||
| 2 | * Copyright (c) 2011 Tobias Markmann | 2 | * Copyright (c) 2011 Tobias Markmann |
| 3 | * Licensed under the simplified BSD license. | 3 | * Licensed under the simplified BSD license. |
| 4 | * See Documentation/Licenses/BSD-simplified.txt for more information. | 4 | * See Documentation/Licenses/BSD-simplified.txt for more information. |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | /* | ||
| 8 | * Copyright (c) 2015 Isode Limited. | ||
| 9 | * All rights reserved. | ||
| 10 | * See the COPYING file for more information. | ||
| 11 | */ | ||
| 12 | |||
| 7 | #include "FileTransferOverview.h" | 13 | #include "FileTransferOverview.h" |
| 8 | 14 | ||
| 9 | #include <boost/bind.hpp> | 15 | #include <boost/bind.hpp> |
| 10 | #include <boost/filesystem.hpp> | 16 | #include <boost/filesystem.hpp> |
| 11 | #include <Swiften/Base/boost_bsignals.h> | ||
| 12 | 17 | ||
| 18 | #include <Swiften/Base/Log.h> | ||
| 19 | #include <Swiften/Base/boost_bsignals.h> | ||
| 20 | #include <Swiften/Base/foreach.h> | ||
| 13 | #include <Swiften/FileTransfer/FileTransferManager.h> | 21 | #include <Swiften/FileTransfer/FileTransferManager.h> |
| 14 | 22 | ||
| 15 | namespace Swift { | 23 | namespace Swift { |
| 16 | 24 | ||
| 17 | FileTransferOverview::FileTransferOverview(FileTransferManager* ftm) : fileTransferManager(ftm) { | 25 | FileTransferOverview::FileTransferOverview(FileTransferManager* ftm) : fileTransferManager(ftm) { |
| 18 | fileTransferManager->onIncomingFileTransfer.connect(boost::bind(&FileTransferOverview::handleIncomingFileTransfer, this, _1)); | 26 | fileTransferManager->onIncomingFileTransfer.connect(boost::bind(&FileTransferOverview::handleIncomingFileTransfer, this, _1)); |
| 27 | onNewFileTransferController.connect(boost::bind(&FileTransferOverview::handleNewFileTransferController, this, _1)); | ||
| 19 | } | 28 | } |
| 20 | 29 | ||
| 21 | FileTransferOverview::~FileTransferOverview() { | 30 | FileTransferOverview::~FileTransferOverview() { |
| 22 | 31 | onNewFileTransferController.disconnect(boost::bind(&FileTransferOverview::handleNewFileTransferController, this, _1)); | |
| 32 | fileTransferManager->onIncomingFileTransfer.disconnect(boost::bind(&FileTransferOverview::handleIncomingFileTransfer, this, _1)); | ||
| 33 | foreach(FileTransferController* controller, fileTransfers) { | ||
| 34 | controller->onStateChanged.disconnect(boost::bind(&FileTransferOverview::handleFileTransferStateChanged, this)); | ||
| 35 | } | ||
| 23 | } | 36 | } |
| 24 | 37 | ||
| 25 | void FileTransferOverview::sendFile(const JID& jid, const std::string& filename) { | 38 | void FileTransferOverview::sendFile(const JID& jid, const std::string& filename) { |
| 26 | if (boost::filesystem::exists(filename) && boost::filesystem::file_size(filename) > 0) { | 39 | if (boost::filesystem::exists(filename) && boost::filesystem::file_size(filename) > 0) { |
| 27 | FileTransferController* controller = new FileTransferController(jid, filename, fileTransferManager); | 40 | FileTransferController* controller = new FileTransferController(jid, filename, fileTransferManager); |
| 28 | fileTransfers.push_back(controller); | ||
| 29 | |||
| 30 | onNewFileTransferController(controller); | 41 | onNewFileTransferController(controller); |
| 31 | } | 42 | } |
| 32 | } | 43 | } |
| 33 | 44 | ||
| 34 | void FileTransferOverview::handleIncomingFileTransfer(IncomingFileTransfer::ref transfer) { | 45 | void FileTransferOverview::handleIncomingFileTransfer(IncomingFileTransfer::ref transfer) { |
| 35 | FileTransferController* controller = new FileTransferController(transfer); | 46 | FileTransferController* controller = new FileTransferController(transfer); |
| 36 | fileTransfers.push_back(controller); | ||
| 37 | onNewFileTransferController(controller); | 47 | onNewFileTransferController(controller); |
| 38 | } | 48 | } |
| 39 | 49 | ||
| 50 | void FileTransferOverview::handleNewFileTransferController(FileTransferController* controller) { | ||
| 51 | fileTransfers.push_back(controller); | ||
| 52 | controller->onStateChanged.connect(boost::bind(&FileTransferOverview::handleFileTransferStateChanged, this)); | ||
| 53 | } | ||
| 54 | |||
| 55 | void FileTransferOverview::handleFileTransferStateChanged() { | ||
| 56 | onFileTransferListChanged(); | ||
| 57 | } | ||
| 58 | |||
| 40 | const std::vector<FileTransferController*>& FileTransferOverview::getFileTransfers() const { | 59 | const std::vector<FileTransferController*>& FileTransferOverview::getFileTransfers() const { |
| 41 | return fileTransfers; | 60 | return fileTransfers; |
| 42 | } | 61 | } |
| 43 | 62 | ||
| 63 | void FileTransferOverview::clearFinished() { | ||
| 64 | for (std::vector<FileTransferController*>::iterator it = fileTransfers.begin(); it != fileTransfers.end(); ) { | ||
| 65 | if((*it)->getState().type == FileTransfer::State::Finished | ||
| 66 | || (*it)->getState().type == FileTransfer::State::Failed | ||
| 67 | || (*it)->getState().type == FileTransfer::State::Canceled) { | ||
| 68 | FileTransferController* controller = *it; | ||
| 69 | it = fileTransfers.erase(it); | ||
| 70 | controller->onStateChanged.disconnect(boost::bind(&FileTransferOverview::handleFileTransferStateChanged, this)); | ||
| 71 | delete controller; | ||
| 72 | } else { | ||
| 73 | ++it; | ||
| 74 | } | ||
| 75 | } | ||
| 76 | onFileTransferListChanged(); | ||
| 77 | } | ||
| 78 | |||
| 79 | bool FileTransferOverview::isClearable() const { | ||
| 80 | bool isClearable = false; | ||
| 81 | foreach (FileTransferController* controller, fileTransfers) { | ||
| 82 | if(controller->getState().type == FileTransfer::State::Finished | ||
| 83 | || controller->getState().type == FileTransfer::State::Failed | ||
| 84 | || controller->getState().type == FileTransfer::State::Canceled) { | ||
| 85 | isClearable = true; | ||
| 86 | break; | ||
| 87 | } | ||
| 88 | } | ||
| 89 | return isClearable; | ||
| 90 | } | ||
| 91 | |||
| 44 | } | 92 | } |
diff --git a/Swift/Controllers/FileTransfer/FileTransferOverview.h b/Swift/Controllers/FileTransfer/FileTransferOverview.h index 716666a..e3cbf81 100644 --- a/Swift/Controllers/FileTransfer/FileTransferOverview.h +++ b/Swift/Controllers/FileTransfer/FileTransferOverview.h | |||
| @@ -2,18 +2,24 @@ | |||
| 2 | * Copyright (c) 2011 Tobias Markmann | 2 | * Copyright (c) 2011 Tobias Markmann |
| 3 | * Licensed under the simplified BSD license. | 3 | * Licensed under the simplified BSD license. |
| 4 | * See Documentation/Licenses/BSD-simplified.txt for more information. | 4 | * See Documentation/Licenses/BSD-simplified.txt for more information. |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | /* | ||
| 8 | * Copyright (c) 2015 Isode Limited. | ||
| 9 | * All rights reserved. | ||
| 10 | * See the COPYING file for more information. | ||
| 11 | */ | ||
| 12 | |||
| 7 | #pragma once | 13 | #pragma once |
| 8 | 14 | ||
| 9 | #include <vector> | 15 | #include <vector> |
| 10 | 16 | ||
| 11 | #include "Swift/Controllers/FileTransfer/FileTransferController.h" | ||
| 12 | |||
| 13 | #include <Swiften/Base/boost_bsignals.h> | 17 | #include <Swiften/Base/boost_bsignals.h> |
| 14 | 18 | ||
| 19 | #include <Swift/Controllers/FileTransfer/FileTransferController.h> | ||
| 20 | |||
| 15 | namespace Swift { | 21 | namespace Swift { |
| 16 | 22 | ||
| 17 | class ChatsManager; | 23 | class ChatsManager; |
| 18 | class FileTransferManager; | 24 | class FileTransferManager; |
| 19 | 25 | ||
| @@ -22,15 +28,20 @@ public: | |||
| 22 | FileTransferOverview(FileTransferManager*); | 28 | FileTransferOverview(FileTransferManager*); |
| 23 | ~FileTransferOverview(); | 29 | ~FileTransferOverview(); |
| 24 | 30 | ||
| 25 | void sendFile(const JID&, const std::string&); | 31 | void sendFile(const JID&, const std::string&); |
| 26 | const std::vector<FileTransferController*>& getFileTransfers() const; | 32 | const std::vector<FileTransferController*>& getFileTransfers() const; |
| 33 | void clearFinished(); | ||
| 34 | bool isClearable() const; | ||
| 27 | 35 | ||
| 28 | boost::signal<void (FileTransferController*)> onNewFileTransferController; | 36 | boost::signal<void (FileTransferController*)> onNewFileTransferController; |
| 37 | boost::signal<void ()> onFileTransferListChanged; | ||
| 29 | 38 | ||
| 30 | private: | 39 | private: |
| 31 | void handleIncomingFileTransfer(IncomingFileTransfer::ref transfer); | 40 | void handleIncomingFileTransfer(IncomingFileTransfer::ref transfer); |
| 41 | void handleNewFileTransferController(FileTransferController* controller); | ||
| 42 | void handleFileTransferStateChanged(); | ||
| 32 | 43 | ||
| 33 | private: | 44 | private: |
| 34 | std::vector<FileTransferController*> fileTransfers; | 45 | std::vector<FileTransferController*> fileTransfers; |
| 35 | FileTransferManager *fileTransferManager; | 46 | FileTransferManager *fileTransferManager; |
| 36 | }; | 47 | }; |
diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp index a65a18a..cdaa207 100644 --- a/Swift/Controllers/MainController.cpp +++ b/Swift/Controllers/MainController.cpp | |||
| @@ -11,88 +11,88 @@ | |||
| 11 | #include <boost/bind.hpp> | 11 | #include <boost/bind.hpp> |
| 12 | #include <boost/lexical_cast.hpp> | 12 | #include <boost/lexical_cast.hpp> |
| 13 | #include <boost/shared_ptr.hpp> | 13 | #include <boost/shared_ptr.hpp> |
| 14 | #include <boost/smart_ptr/make_shared.hpp> | 14 | #include <boost/smart_ptr/make_shared.hpp> |
| 15 | 15 | ||
| 16 | #include <Swiften/Base/format.h> | ||
| 17 | #include <Swiften/Base/Algorithm.h> | 16 | #include <Swiften/Base/Algorithm.h> |
| 18 | #include <Swiften/Base/String.h> | 17 | #include <Swiften/Base/String.h> |
| 19 | #include <Swiften/StringCodecs/Base64.h> | ||
| 20 | #include <Swiften/Network/TimerFactory.h> | ||
| 21 | #include <Swiften/Client/Storages.h> | ||
| 22 | #include <Swiften/VCards/VCardManager.h> | ||
| 23 | #include <Swiften/Client/NickResolver.h> | ||
| 24 | #include <Swiften/Base/foreach.h> | 18 | #include <Swiften/Base/foreach.h> |
| 19 | #include <Swiften/Base/format.h> | ||
| 25 | #include <Swiften/Client/Client.h> | 20 | #include <Swiften/Client/Client.h> |
| 26 | #include <Swiften/Presence/PresenceSender.h> | 21 | #include <Swiften/Client/ClientBlockListManager.h> |
| 22 | #include <Swiften/Client/ClientXMLTracer.h> | ||
| 23 | #include <Swiften/Client/NickResolver.h> | ||
| 24 | #include <Swiften/Client/StanzaChannel.h> | ||
| 25 | #include <Swiften/Client/Storages.h> | ||
| 26 | #include <Swiften/Crypto/CryptoProvider.h> | ||
| 27 | #include <Swiften/Disco/CapsInfoGenerator.h> | ||
| 28 | #include <Swiften/Disco/ClientDiscoManager.h> | ||
| 29 | #include <Swiften/Disco/GetDiscoInfoRequest.h> | ||
| 27 | #include <Swiften/Elements/ChatState.h> | 30 | #include <Swiften/Elements/ChatState.h> |
| 31 | #include <Swiften/Elements/DiscoInfo.h> | ||
| 28 | #include <Swiften/Elements/Presence.h> | 32 | #include <Swiften/Elements/Presence.h> |
| 29 | #include <Swiften/Elements/VCardUpdate.h> | 33 | #include <Swiften/Elements/VCardUpdate.h> |
| 30 | #include <Swiften/Elements/DiscoInfo.h> | ||
| 31 | #include <Swiften/Disco/CapsInfoGenerator.h> | ||
| 32 | #include <Swiften/Disco/GetDiscoInfoRequest.h> | ||
| 33 | #include <Swiften/Disco/ClientDiscoManager.h> | ||
| 34 | #include <Swiften/VCards/GetVCardRequest.h> | ||
| 35 | #include <Swiften/StringCodecs/Hexify.h> | ||
| 36 | #include <Swiften/Network/NetworkFactories.h> | ||
| 37 | #include <Swiften/FileTransfer/FileTransferManager.h> | 34 | #include <Swiften/FileTransfer/FileTransferManager.h> |
| 38 | #include <Swiften/Client/ClientXMLTracer.h> | 35 | #include <Swiften/Network/NetworkFactories.h> |
| 39 | #include <Swiften/Client/StanzaChannel.h> | 36 | #include <Swiften/Network/TimerFactory.h> |
| 40 | #include <Swiften/Client/ClientBlockListManager.h> | 37 | #include <Swiften/Presence/PresenceSender.h> |
| 41 | #include <Swiften/Crypto/CryptoProvider.h> | 38 | #include <Swiften/StringCodecs/Base64.h> |
| 39 | #include <Swiften/StringCodecs/Hexify.h> | ||
| 40 | #include <Swiften/VCards/GetVCardRequest.h> | ||
| 41 | #include <Swiften/VCards/VCardManager.h> | ||
| 42 | 42 | ||
| 43 | #ifdef SWIFTEN_PLATFORM_WIN32 | 43 | #ifdef SWIFTEN_PLATFORM_WIN32 |
| 44 | #include <Swiften/SASL/WindowsAuthentication.h> | 44 | #include <Swiften/SASL/WindowsAuthentication.h> |
| 45 | #endif | 45 | #endif |
| 46 | 46 | ||
| 47 | #include <SwifTools/Dock/Dock.h> | 47 | #include <Swift/Controllers/AdHocManager.h> |
| 48 | #include <SwifTools/Notifier/TogglableNotifier.h> | 48 | #include <Swift/Controllers/BlockListController.h> |
| 49 | #include <SwifTools/Idle/IdleDetector.h> | ||
| 50 | |||
| 51 | #include <Swift/Controllers/Intl.h> | ||
| 52 | #include <Swift/Controllers/UIInterfaces/UIFactory.h> | ||
| 53 | #include <Swift/Controllers/BuildVersion.h> | 49 | #include <Swift/Controllers/BuildVersion.h> |
| 54 | #include <Swift/Controllers/Chat/UserSearchController.h> | ||
| 55 | #include <Swift/Controllers/Chat/ChatsManager.h> | 50 | #include <Swift/Controllers/Chat/ChatsManager.h> |
| 56 | #include <Swift/Controllers/XMPPEvents/EventController.h> | ||
| 57 | #include <Swift/Controllers/EventWindowController.h> | ||
| 58 | #include <Swift/Controllers/UIInterfaces/LoginWindow.h> | ||
| 59 | #include <Swift/Controllers/UIInterfaces/LoginWindowFactory.h> | ||
| 60 | #include <Swift/Controllers/UIInterfaces/MainWindow.h> | ||
| 61 | #include <Swift/Controllers/Chat/MUCController.h> | 51 | #include <Swift/Controllers/Chat/MUCController.h> |
| 52 | #include <Swift/Controllers/Chat/UserSearchController.h> | ||
| 53 | #include <Swift/Controllers/ContactEditController.h> | ||
| 54 | #include <Swift/Controllers/ContactSuggester.h> | ||
| 55 | #include <Swift/Controllers/ContactsFromXMPPRoster.h> | ||
| 56 | #include <Swift/Controllers/EventNotifier.h> | ||
| 57 | #include <Swift/Controllers/EventWindowController.h> | ||
| 58 | #include <Swift/Controllers/FileTransfer/FileTransferOverview.h> | ||
| 59 | #include <Swift/Controllers/FileTransferListController.h> | ||
| 60 | #include <Swift/Controllers/HighlightEditorController.h> | ||
| 61 | #include <Swift/Controllers/HighlightManager.h> | ||
| 62 | #include <Swift/Controllers/HistoryController.h> | ||
| 63 | #include <Swift/Controllers/HistoryViewController.h> | ||
| 64 | #include <Swift/Controllers/Intl.h> | ||
| 65 | #include <Swift/Controllers/PresenceNotifier.h> | ||
| 66 | #include <Swift/Controllers/ProfileController.h> | ||
| 62 | #include <Swift/Controllers/Roster/RosterController.h> | 67 | #include <Swift/Controllers/Roster/RosterController.h> |
| 68 | #include <Swift/Controllers/SettingConstants.h> | ||
| 69 | #include <Swift/Controllers/Settings/SettingsProvider.h> | ||
| 70 | #include <Swift/Controllers/ShowProfileController.h> | ||
| 63 | #include <Swift/Controllers/SoundEventController.h> | 71 | #include <Swift/Controllers/SoundEventController.h> |
| 64 | #include <Swift/Controllers/SoundPlayer.h> | 72 | #include <Swift/Controllers/SoundPlayer.h> |
| 65 | #include <Swift/Controllers/StatusTracker.h> | 73 | #include <Swift/Controllers/StatusTracker.h> |
| 74 | #include <Swift/Controllers/Storages/CertificateStorageFactory.h> | ||
| 75 | #include <Swift/Controllers/Storages/CertificateStorageTrustChecker.h> | ||
| 76 | #include <Swift/Controllers/Storages/StoragesFactory.h> | ||
| 66 | #include <Swift/Controllers/SystemTray.h> | 77 | #include <Swift/Controllers/SystemTray.h> |
| 67 | #include <Swift/Controllers/SystemTrayController.h> | 78 | #include <Swift/Controllers/SystemTrayController.h> |
| 68 | #include <Swift/Controllers/XMLConsoleController.h> | 79 | #include <Swift/Controllers/UIEvents/JoinMUCUIEvent.h> |
| 69 | #include <Swift/Controllers/HistoryController.h> | 80 | #include <Swift/Controllers/UIEvents/RequestChatUIEvent.h> |
| 70 | #include <Swift/Controllers/HistoryViewController.h> | ||
| 71 | #include <Swift/Controllers/FileTransferListController.h> | ||
| 72 | #include <Swift/Controllers/UIEvents/UIEventStream.h> | 81 | #include <Swift/Controllers/UIEvents/UIEventStream.h> |
| 73 | #include <Swift/Controllers/PresenceNotifier.h> | 82 | #include <Swift/Controllers/UIInterfaces/LoginWindow.h> |
| 74 | #include <Swift/Controllers/EventNotifier.h> | 83 | #include <Swift/Controllers/UIInterfaces/LoginWindowFactory.h> |
| 75 | #include <Swift/Controllers/Storages/StoragesFactory.h> | 84 | #include <Swift/Controllers/UIInterfaces/MainWindow.h> |
| 85 | #include <Swift/Controllers/UIInterfaces/UIFactory.h> | ||
| 76 | #include <Swift/Controllers/WhiteboardManager.h> | 86 | #include <Swift/Controllers/WhiteboardManager.h> |
| 77 | #include <Swift/Controllers/Settings/SettingsProvider.h> | 87 | #include <Swift/Controllers/XMLConsoleController.h> |
| 78 | #include <Swift/Controllers/UIEvents/RequestChatUIEvent.h> | 88 | #include <Swift/Controllers/XMPPEvents/EventController.h> |
| 79 | #include <Swift/Controllers/UIEvents/JoinMUCUIEvent.h> | ||
| 80 | #include <Swift/Controllers/Storages/CertificateStorageFactory.h> | ||
| 81 | #include <Swift/Controllers/Storages/CertificateStorageTrustChecker.h> | ||
| 82 | #include <Swift/Controllers/ProfileController.h> | ||
| 83 | #include <Swift/Controllers/ShowProfileController.h> | ||
| 84 | #include <Swift/Controllers/ContactEditController.h> | ||
| 85 | #include <Swift/Controllers/XMPPURIController.h> | 89 | #include <Swift/Controllers/XMPPURIController.h> |
| 86 | #include <Swift/Controllers/AdHocManager.h> | 90 | |
| 87 | #include <Swift/Controllers/FileTransfer/FileTransferOverview.h> | 91 | #include <SwifTools/Dock/Dock.h> |
| 88 | #include <Swift/Controllers/SettingConstants.h> | 92 | #include <SwifTools/Idle/IdleDetector.h> |
| 89 | #include <Swift/Controllers/HighlightManager.h> | 93 | #include <SwifTools/Notifier/TogglableNotifier.h> |
| 90 | #include <Swift/Controllers/HighlightEditorController.h> | ||
| 91 | #include <Swift/Controllers/BlockListController.h> | ||
| 92 | #include <Swift/Controllers/ContactSuggester.h> | ||
| 93 | #include <Swift/Controllers/ContactsFromXMPPRoster.h> | ||
| 94 | 94 | ||
| 95 | namespace Swift { | 95 | namespace Swift { |
| 96 | 96 | ||
| 97 | static const std::string CLIENT_NAME = "Swift"; | 97 | static const std::string CLIENT_NAME = "Swift"; |
| 98 | static const std::string CLIENT_NODE = "http://swift.im"; | 98 | static const std::string CLIENT_NODE = "http://swift.im"; |
| @@ -268,10 +268,11 @@ void MainController::resetClient() { | |||
| 268 | delete historyViewController_; | 268 | delete historyViewController_; |
| 269 | historyViewController_ = NULL; | 269 | historyViewController_ = NULL; |
| 270 | delete historyController_; | 270 | delete historyController_; |
| 271 | historyController_ = NULL; | 271 | historyController_ = NULL; |
| 272 | #endif | 272 | #endif |
| 273 | fileTransferListController_->setFileTransferOverview(NULL); | ||
| 273 | delete ftOverview_; | 274 | delete ftOverview_; |
| 274 | ftOverview_ = NULL; | 275 | ftOverview_ = NULL; |
| 275 | delete blockListController_; | 276 | delete blockListController_; |
| 276 | blockListController_ = NULL; | 277 | blockListController_ = NULL; |
| 277 | delete rosterController_; | 278 | delete rosterController_; |
Swift