Fix mtp device support
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
* Strawberry Music Player
|
||||
* This file was part of Clementine.
|
||||
* Copyright 2010, David Sansome <me@davidsansome.com>
|
||||
* Copyright 2019, Jonas Kvinge <jonas@jkvinge.net>
|
||||
*
|
||||
* Strawberry is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -24,18 +25,23 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <memory>
|
||||
#include <libmtp.h>
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QList>
|
||||
#include <QUrl>
|
||||
|
||||
class MtpConnection {
|
||||
#include "core/song.h"
|
||||
|
||||
class MtpConnection : public QObject, public std::enable_shared_from_this<MtpConnection> {
|
||||
public:
|
||||
MtpConnection(const QUrl &url);
|
||||
~MtpConnection();
|
||||
|
||||
bool is_valid() const { return device_; }
|
||||
LIBMTP_mtpdevice_t *device() const { return device_; }
|
||||
bool GetSupportedFiletypes(QList<Song::FileType> *ret);
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY(MtpConnection);
|
||||
@@ -43,4 +49,4 @@ private:
|
||||
LIBMTP_mtpdevice_t *device_;
|
||||
};
|
||||
|
||||
#endif // MTPCONNECTION_H
|
||||
#endif // MTPCONNECTION_H
|
||||
|
||||
Reference in New Issue
Block a user