Clementine-audio-player-Mac.../src/devices/afcfile.h

37 lines
632 B
C
Raw Normal View History

2010-08-01 14:19:21 +02:00
#ifndef AFCFILE_H
#define AFCFILE_H
#include <stdint.h>
#include <QIODevice>
#include <libimobiledevice/afc.h>
2010-08-01 14:19:21 +02:00
class iMobileDeviceConnection;
class AfcFile : public QIODevice {
2010-08-01 14:19:21 +02:00
Q_OBJECT
public:
AfcFile(iMobileDeviceConnection* connection, const QString& path, QObject* parent = 0);
~AfcFile();
2010-08-01 14:19:21 +02:00
// QIODevice
void close();
bool open(OpenMode mode);
bool seek(qint64 pos);
qint64 size() const;
2010-08-01 14:19:21 +02:00
private:
2010-08-01 14:19:21 +02:00
// QIODevice
qint64 readData(char* data, qint64 max_size);
qint64 writeData(const char* data, qint64 max_size);
iMobileDeviceConnection* connection_;
2010-08-01 14:19:21 +02:00
uint64_t handle_;
QString path_;
2010-08-01 14:19:21 +02:00
};
#endif