Add error handling for mtp and gpod device

This commit is contained in:
Jonas Kvinge
2019-01-21 18:58:54 +01:00
parent ad5e366aad
commit 41e2a75675
12 changed files with 93 additions and 45 deletions

View File

@@ -50,6 +50,7 @@ class ConnectedDevice : public QObject,
~ConnectedDevice();
virtual bool Init() = 0;
virtual void ConnectAsync();
// For some devices (e.g. CD devices) we don't have callbacks to be notified when something change:
// we can call this method to refresh device's state
virtual void Refresh() {}
@@ -71,6 +72,7 @@ class ConnectedDevice : public QObject,
signals:
void TaskStarted(int id);
void SongCountUpdated(int count);
void ConnectFinished(const QString& id, bool success);
protected:
void InitBackendDirectory(const QString &mount_point, bool first_time, bool rewrite_path = true);