Index: sources/device/DeviceView.cpp =================================================================== diff -u -r9ebd78edd3127e38ee92b2e870430f12731244bc -r3b402a2cfb9e673bf0bac3fcc8eeee75a0adc475 --- sources/device/DeviceView.cpp (.../DeviceView.cpp) (revision 9ebd78edd3127e38ee92b2e870430f12731244bc) +++ sources/device/DeviceView.cpp (.../DeviceView.cpp) (revision 3b402a2cfb9e673bf0bac3fcc8eeee75a0adc475) @@ -251,3 +251,37 @@ // has to be the last one response(true); } + +// ================================================= USBMount +// TODO - VY might be removed since we don't need the ATTRIBUTE to expose to QML... +void VDevice::doInitUSBMount() { + // Nothing for now. +} + +void VDevice::usbMountRequest(const QString &vCommand) { + + bool isMountCmd = vCommand == "mount"; + bool isUnmountCmd = vCommand == "unmount"; + DeviceUSBMountRequestData data; + bool ok = isMountCmd || isUnmountCmd; + if ( ! ok ) { + status(tr("Invalid USB mount request")); + } + else { + data.isUnmountRequest = isUnmountCmd; + emit didAttributeRequest(data); + } + emit didAttributeRequest(data); +} + +void VDevice::onAttributeResponse(const DeviceUSBMountResponseData &vData) { + //QDEBUG : qDebug() << "HERE Response " << Q_FUNC_INFO << " accepted: "<< vData.mAccepted << vData.mReason; + // this has to be called to let Gui to set to old value that device controller provided. + status(vData.mMessage); + + accepted(vData.mAccepted); + reason (vData.mReason ); + + // has to be the last one + response(true); +}