summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfsfileengine_p.h
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@accenture.com>2010-09-08 15:15:45 +0100
committerShane Kearns <shane.kearns@accenture.com>2010-09-08 15:42:21 +0100
commite4de050cc8e819a2751f94ac0429a0d7fe64e64a (patch)
treefb5f5d12c8e880668776c28ae3b8a87b99113254 /src/corelib/io/qfsfileengine_p.h
parentf906303e7aa9a7b68f469d81e6bdac8499120338 (diff)
Enable symbian IO code in the build
This patch contains several changes that needed to be done atomically. The native file path im QFileSystemEntry is changed from 8 bit to 16 bit character set. QFsFileEngine has some new symbian specific code (as the unix code does not compile with the above change), and forwards more calls to the new QFileSystemEngine. Unix implementations of link, rename and remove are moved to the unix version of this class, so less ifdef'ing is needed. Finally, io.pri now selects the _symbian.cpp source files instead of the _unix.cpp equivalents when building for symbian.
Diffstat (limited to 'src/corelib/io/qfsfileengine_p.h')
-rw-r--r--src/corelib/io/qfsfileengine_p.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/corelib/io/qfsfileengine_p.h b/src/corelib/io/qfsfileengine_p.h
index 6e5f30e6c2..a3733d8b4d 100644
--- a/src/corelib/io/qfsfileengine_p.h
+++ b/src/corelib/io/qfsfileengine_p.h
@@ -60,6 +60,10 @@
#include <QtCore/private/qfilesystemmetadata_p.h>
#include <qhash.h>
+#ifdef Q_OS_SYMBIAN
+#include <f32file.h>
+#endif
+
#ifndef QT_NO_FSFILEENGINE
QT_BEGIN_NAMESPACE
@@ -115,6 +119,30 @@ public:
#endif
FILE *fh;
+#ifdef Q_OS_SYMBIAN
+#ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
+ RFile64 symbianFile;
+ TInt64 symbianFilePos;
+#else
+ RFile symbianFile;
+
+ /**
+ * The cursor position in the underlying file. This differs
+ * from devicePos because the latter is updated on calls to
+ * writeData, even if no data was physically transferred to
+ * the file, but instead stored in the write buffer.
+ *
+ * iFilePos is updated on calls to RFile::Read and
+ * RFile::Write. It is also updated on calls to seek() but
+ * RFile::Seek is not called when that happens because
+ * Symbian supports positioned reads and writes, saving a file
+ * server call, and because Symbian does not support seeking
+ * past the end of a file.
+ */
+ TInt symbianFilePos;
+#endif
+#endif
+
#ifdef Q_WS_WIN
HANDLE fileHandle;
HANDLE mapHandle;