Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions include/dfm-io/dfm-io/dfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,18 @@ class DFile
};
Q_DECLARE_FLAGS(Permissions, Permission)

enum class FileCopyType : uint8_t {
kCopyTypeByGioStream = 0, // using gio stream copy
kCopyTypeBySys = 1, // using system open read write

};

enum class FileCopySyncType : uint8_t {
kSyncByGioStream = 0, // using gio stream copy
kSyncBySys = 1, // using system open read write

};

// callback, use function pointer
using ReadCallbackFunc = void (*)(qint64, void *);
using ReadQCallbackFunc = void (*)(QByteArray, void *);
Expand All @@ -97,8 +109,13 @@ class DFile
qint64 pos() const;
Permissions permissions() const;
DFMIOError lastError() const;
void setCopyType(const FileCopyType type);
void setSyncType(const FileCopySyncType type);
FileCopyType copyFileType() const;
FileCopySyncType syncType() const;

bool open(OpenFlags mode);
bool open(const int mode, const int permissions);
bool close();
bool cancel();
bool seek(qint64 pos, SeekType type = SeekType::kBegin) const;
Expand Down
Loading
Loading