aboutsummaryrefslogtreecommitdiffstats
path: root/src/platforms
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2005-10-20 18:56:04 +0200
committerVincent Richard <[email protected]>2005-10-20 18:56:04 +0200
commitc241f071d26823ce2b6140c2687dcb750f6dfc29 (patch)
tree7bd0762a15665a1500cfe6ee63901e92972b9a66 /src/platforms
parentAdded 'charsetFilteredOutputStream'. (diff)
downloadvmime-c241f071d26823ce2b6140c2687dcb750f6dfc29.tar.gz
vmime-c241f071d26823ce2b6140c2687dcb750f6dfc29.zip
Added flush() on 'outputStream' + added unit tests for 'charsetFilteredOutputStream' when input contains invalid sequences.
Diffstat (limited to 'src/platforms')
-rw-r--r--src/platforms/posix/posixChildProcess.cpp5
-rw-r--r--src/platforms/posix/posixFile.cpp6
-rw-r--r--src/platforms/windows/windowsFile.cpp7
3 files changed, 18 insertions, 0 deletions
diff --git a/src/platforms/posix/posixChildProcess.cpp b/src/platforms/posix/posixChildProcess.cpp
index 514f5b65..05681bb5 100644
--- a/src/platforms/posix/posixChildProcess.cpp
+++ b/src/platforms/posix/posixChildProcess.cpp
@@ -119,6 +119,11 @@ public:
}
}
+ void flush()
+ {
+ ::fsync(m_desc);
+ }
+
private:
const int m_desc;
diff --git a/src/platforms/posix/posixFile.cpp b/src/platforms/posix/posixFile.cpp
index e914520d..eca90d20 100644
--- a/src/platforms/posix/posixFile.cpp
+++ b/src/platforms/posix/posixFile.cpp
@@ -119,6 +119,12 @@ void posixFileWriterOutputStream::write(const value_type* const data, const size
}
+void posixFileWriterOutputStream::flush()
+{
+ ::fsync(m_fd);
+}
+
+
//
// posixFileReaderInputStream
diff --git a/src/platforms/windows/windowsFile.cpp b/src/platforms/windows/windowsFile.cpp
index 9ecfd1d4..d00be306 100644
--- a/src/platforms/windows/windowsFile.cpp
+++ b/src/platforms/windows/windowsFile.cpp
@@ -516,6 +516,13 @@ void windowsFileWriterOutputStream::write(const value_type* const data, const si
windowsFileSystemFactory::reportError(m_path, GetLastError());
}
+
+void windowsFileWriterOutputStream::flush()
+{
+ // TODO
+}
+
+
} // windows
} // platforms
} // vmime