Index: sources/applicationcontroller.cpp =================================================================== diff -u -r4b9619614f0a9deb0438a803c057918b94aacbec -rfbeafa0714f065bce0403e2e8ce68f6d8fbea6bd --- sources/applicationcontroller.cpp (.../applicationcontroller.cpp) (revision 4b9619614f0a9deb0438a803c057918b94aacbec) +++ sources/applicationcontroller.cpp (.../applicationcontroller.cpp) (revision fbeafa0714f065bce0403e2e8ce68f6d8fbea6bd) @@ -30,17 +30,14 @@ */ ApplicationController::ApplicationController(QObject *parent) : QObject(parent) { - _fileHandler = new Storage::FileHandler (this); _applicationPost = new ApplicationPost(this); - } /*! * \brief ApplicationController initializer */ bool ApplicationController::init() { - if (!_fileHandler ->init()) return false; if (!_applicationPost->init()) return false; initConnections(); return true; @@ -58,9 +55,19 @@ // From GUI connect(_GuiController , SIGNAL(didActionTransmit(GuiActionType, const QVariantList &)), this , SLOT( onActionTransmit(GuiActionType, const QVariantList &))); + // From HD/DG connect(_MessageDispatcher, SIGNAL(didActionReceive(GuiActionType, const QVariantList &)), this , SLOT( onActionReceive(GuiActionType, const QVariantList &))); + + connect(_GuiController , SIGNAL(didUSBDriveUmount()), + this , SLOT( onUSBDriveUmount())); + connect(_FileHandler , SIGNAL(didUSBDriveMount ()), + this , SLOT( onUSBDriveMount ())); + connect(_FileHandler , SIGNAL(didUSBDriveRemove()), + this , SLOT( onUSBDriveRemove())); + + } /*! @@ -95,6 +102,21 @@ keepAlive(); } +void ApplicationController::onUSBDriveMount () +{ + emit didUSBDriveMount(); +} + +void ApplicationController::onUSBDriveUmount() +{ + _FileHandler->umounted(true); +} + +void ApplicationController::onUSBDriveRemove() +{ + emit didUSBDriveRemove(); +} + /*! * \brief ApplicationController::keepAlive * \details This is the message which has to be send over the CANBUS