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

35 lines
589 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 <QUrl>
struct afc_client_private;
typedef afc_client_private* afc_client_t;
class AFCFile : public QIODevice {
Q_OBJECT
public:
AFCFile(afc_client_t client, const QUrl& url, QObject* parent = 0);
~AFCFile();
// QIODevice
void close();
bool open(OpenMode mode);
bool seek(qint64 pos);
private:
// QIODevice
qint64 readData(char* data, qint64 max_size);
qint64 writeData(const char* data, qint64 max_size);
afc_client_t client_;
uint64_t handle_;
QUrl url_;
};
#endif