aboutsummaryrefslogtreecommitdiffstats
path: root/src/platforms
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/platforms/posix/posixChildProcess.cpp6
-rw-r--r--src/platforms/posix/posixFile.cpp24
-rw-r--r--src/platforms/posix/posixHandler.cpp4
-rw-r--r--src/platforms/posix/posixSocket.cpp4
-rw-r--r--src/platforms/windows/windowsFile.cpp20
-rw-r--r--src/platforms/windows/windowsHandler.cpp4
-rw-r--r--src/platforms/windows/windowsSocket.cpp4
7 files changed, 33 insertions, 33 deletions
diff --git a/src/platforms/posix/posixChildProcess.cpp b/src/platforms/posix/posixChildProcess.cpp
index 6765c705..d1a0d910 100644
--- a/src/platforms/posix/posixChildProcess.cpp
+++ b/src/platforms/posix/posixChildProcess.cpp
@@ -145,7 +145,7 @@ public:
{
}
- const bool eof() const
+ bool eof() const
{
return (m_eof);
}
@@ -155,7 +155,7 @@ public:
// Do nothing: unsupported
}
- const size_type skip(const size_type count)
+ size_type skip(const size_type count)
{
// TODO: not tested
value_type buffer[4096];
@@ -178,7 +178,7 @@ public:
return static_cast <size_type>(bytesSkipped);
}
- const size_type read(value_type* const data, const size_type count)
+ size_type read(value_type* const data, const size_type count)
{
int bytesRead = 0;
diff --git a/src/platforms/posix/posixFile.cpp b/src/platforms/posix/posixFile.cpp
index 1056155e..4d063d4e 100644
--- a/src/platforms/posix/posixFile.cpp
+++ b/src/platforms/posix/posixFile.cpp
@@ -66,7 +66,7 @@ posixFileIterator::~posixFileIterator()
}
-const bool posixFileIterator::hasMoreElements() const
+bool posixFileIterator::hasMoreElements() const
{
return (m_dirEntry != NULL);
}
@@ -146,7 +146,7 @@ posixFileReaderInputStream::~posixFileReaderInputStream()
}
-const bool posixFileReaderInputStream::eof() const
+bool posixFileReaderInputStream::eof() const
{
return (m_eof);
}
@@ -158,7 +158,7 @@ void posixFileReaderInputStream::reset()
}
-const vmime::utility::stream::size_type posixFileReaderInputStream::read
+vmime::utility::stream::size_type posixFileReaderInputStream::read
(value_type* const data, const size_type count)
{
ssize_t c = 0;
@@ -173,7 +173,7 @@ const vmime::utility::stream::size_type posixFileReaderInputStream::read
}
-const vmime::utility::stream::size_type posixFileReaderInputStream::skip(const size_type count)
+vmime::utility::stream::size_type posixFileReaderInputStream::skip(const size_type count)
{
const off_t curPos = ::lseek(m_fd, 0, SEEK_CUR);
const off_t newPos = ::lseek(m_fd, count, SEEK_CUR);
@@ -254,21 +254,21 @@ void posixFile::createDirectory(const bool createAll)
}
-const bool posixFile::isFile() const
+bool posixFile::isFile() const
{
struct stat buf;
return (::stat(m_nativePath.c_str(), &buf) == 0 && S_ISREG(buf.st_mode));
}
-const bool posixFile::isDirectory() const
+bool posixFile::isDirectory() const
{
struct stat buf;
return (::stat(m_nativePath.c_str(), &buf) == 0 && S_ISDIR(buf.st_mode));
}
-const bool posixFile::canRead() const
+bool posixFile::canRead() const
{
struct stat buf;
return (::stat(m_nativePath.c_str(), &buf) == 0 &&
@@ -277,7 +277,7 @@ const bool posixFile::canRead() const
}
-const bool posixFile::canWrite() const
+bool posixFile::canWrite() const
{
struct stat buf;
return (::stat(m_nativePath.c_str(), &buf) == 0 &&
@@ -286,7 +286,7 @@ const bool posixFile::canWrite() const
}
-const posixFile::length_type posixFile::getLength()
+posixFile::length_type posixFile::getLength()
{
struct stat buf;
@@ -303,7 +303,7 @@ const posixFile::path& posixFile::getFullPath() const
}
-const bool posixFile::exists() const
+bool posixFile::exists() const
{
struct stat buf;
return (::stat(m_nativePath.c_str(), &buf) == 0);
@@ -451,13 +451,13 @@ const vmime::string posixFileSystemFactory::pathToStringImpl(const vmime::utilit
}
-const bool posixFileSystemFactory::isValidPathComponent(const vmime::utility::file::path::component& comp) const
+bool posixFileSystemFactory::isValidPathComponent(const vmime::utility::file::path::component& comp) const
{
return (comp.getBuffer().find_first_of("/*") == vmime::string::npos);
}
-const bool posixFileSystemFactory::isValidPath(const vmime::utility::file::path& path) const
+bool posixFileSystemFactory::isValidPath(const vmime::utility::file::path& path) const
{
for (int i = 0 ; i < path.getSize() ; ++i)
{
diff --git a/src/platforms/posix/posixHandler.cpp b/src/platforms/posix/posixHandler.cpp
index d1b782f7..94a5072f 100644
--- a/src/platforms/posix/posixHandler.cpp
+++ b/src/platforms/posix/posixHandler.cpp
@@ -70,7 +70,7 @@ posixHandler::~posixHandler()
}
-const unsigned int posixHandler::getUnixTime() const
+unsigned int posixHandler::getUnixTime() const
{
return ::time(NULL);
}
@@ -165,7 +165,7 @@ const vmime::string posixHandler::getHostName() const
}
-const unsigned int posixHandler::getProcessId() const
+unsigned int posixHandler::getProcessId() const
{
return (::getpid());
}
diff --git a/src/platforms/posix/posixSocket.cpp b/src/platforms/posix/posixSocket.cpp
index fe650803..4c2375c6 100644
--- a/src/platforms/posix/posixSocket.cpp
+++ b/src/platforms/posix/posixSocket.cpp
@@ -194,7 +194,7 @@ void posixSocket::connect(const vmime::string& address, const vmime::port_t port
}
-const bool posixSocket::isConnected() const
+bool posixSocket::isConnected() const
{
if (m_desc == -1)
return false;
@@ -224,7 +224,7 @@ void posixSocket::receive(vmime::string& buffer)
}
-const int posixSocket::receiveRaw(char* buffer, const int count)
+int posixSocket::receiveRaw(char* buffer, const int count)
{
const int ret = ::recv(m_desc, buffer, count, 0);
diff --git a/src/platforms/windows/windowsFile.cpp b/src/platforms/windows/windowsFile.cpp
index 56cd842e..c94076c5 100644
--- a/src/platforms/windows/windowsFile.cpp
+++ b/src/platforms/windows/windowsFile.cpp
@@ -94,12 +94,12 @@ const vmime::string windowsFileSystemFactory::pathToStringImpl(const vmime::util
return (native);
}
-const bool windowsFileSystemFactory::isValidPathComponent(const vmime::utility::file::path::component& comp) const
+bool windowsFileSystemFactory::isValidPathComponent(const vmime::utility::file::path::component& comp) const
{
return isValidPathComponent(comp, false);
}
-const bool windowsFileSystemFactory::isValidPathComponent(
+bool windowsFileSystemFactory::isValidPathComponent(
const vmime::utility::file::path::component& comp,
bool firstComponent) const
{
@@ -159,7 +159,7 @@ const bool windowsFileSystemFactory::isValidPathComponent(
}
-const bool windowsFileSystemFactory::isValidPath(const vmime::utility::file::path& path) const
+bool windowsFileSystemFactory::isValidPath(const vmime::utility::file::path& path) const
{
for (int i = 0 ; i < path.getSize() ; ++i)
{
@@ -220,7 +220,7 @@ void windowsFile::createDirectory(const bool createAll)
createDirectoryImpl(m_path, m_path, createAll);
}
-const bool windowsFile::isFile() const
+bool windowsFile::isFile() const
{
DWORD dwFileAttribute = GetFileAttributes(m_nativePath.c_str());
if (dwFileAttribute == INVALID_FILE_ATTRIBUTES)
@@ -228,7 +228,7 @@ const bool windowsFile::isFile() const
return (dwFileAttribute & FILE_ATTRIBUTE_DIRECTORY) == 0;
}
-const bool windowsFile::isDirectory() const
+bool windowsFile::isDirectory() const
{
DWORD dwFileAttribute = GetFileAttributes(m_nativePath.c_str());
if (dwFileAttribute == INVALID_FILE_ATTRIBUTES)
@@ -236,7 +236,7 @@ const bool windowsFile::isDirectory() const
return (dwFileAttribute & FILE_ATTRIBUTE_DIRECTORY) == FILE_ATTRIBUTE_DIRECTORY;
}
-const bool windowsFile::canRead() const
+bool windowsFile::canRead() const
{
HANDLE hFile = CreateFile(
m_nativePath.c_str(),
@@ -252,7 +252,7 @@ const bool windowsFile::canRead() const
return true;
}
-const bool windowsFile::canWrite() const
+bool windowsFile::canWrite() const
{
HANDLE hFile = CreateFile(
m_nativePath.c_str(),
@@ -292,7 +292,7 @@ const vmime::utility::path& windowsFile::getFullPath() const
return m_path;
}
-const bool windowsFile::exists() const
+bool windowsFile::exists() const
{
WIN32_FIND_DATA findData;
HANDLE hFind = FindFirstFile(m_nativePath.c_str(), &findData);
@@ -372,7 +372,7 @@ windowsFileIterator::~windowsFileIterator()
FindClose(m_hFind);
}
-const bool windowsFileIterator::hasMoreElements() const
+bool windowsFileIterator::hasMoreElements() const
{
return m_moreElements;
}
@@ -452,7 +452,7 @@ windowsFileReaderInputStream::~windowsFileReaderInputStream()
CloseHandle(m_hFile);
}
-const bool windowsFileReaderInputStream::eof() const
+bool windowsFileReaderInputStream::eof() const
{
DWORD dwSize = GetFileSize(m_hFile, NULL);
DWORD dwPosition = SetFilePointer(m_hFile, 0, NULL, FILE_CURRENT);
diff --git a/src/platforms/windows/windowsHandler.cpp b/src/platforms/windows/windowsHandler.cpp
index 0aeb9c91..58b1ae9c 100644
--- a/src/platforms/windows/windowsHandler.cpp
+++ b/src/platforms/windows/windowsHandler.cpp
@@ -64,7 +64,7 @@ windowsHandler::~windowsHandler()
}
-const unsigned int windowsHandler::getUnixTime() const
+unsigned int windowsHandler::getUnixTime() const
{
return static_cast <unsigned int>(::time(NULL));
}
@@ -232,7 +232,7 @@ const vmime::string windowsHandler::getHostName() const
}
-const unsigned int windowsHandler::getProcessId() const
+unsigned int windowsHandler::getProcessId() const
{
return (static_cast <unsigned int>(::GetCurrentProcessId()));
}
diff --git a/src/platforms/windows/windowsSocket.cpp b/src/platforms/windows/windowsSocket.cpp
index feb4dda4..9450efc6 100644
--- a/src/platforms/windows/windowsSocket.cpp
+++ b/src/platforms/windows/windowsSocket.cpp
@@ -103,7 +103,7 @@ void windowsSocket::connect(const vmime::string& address, const vmime::port_t po
}
-const bool windowsSocket::isConnected() const
+bool windowsSocket::isConnected() const
{
return (m_desc != -1);
}
@@ -137,7 +137,7 @@ void windowsSocket::receive(vmime::string& buffer)
}
-const int windowsSocket::receiveRaw(char* buffer, const int count)
+int windowsSocket::receiveRaw(char* buffer, const int count)
{
int ret = ::recv(m_desc, buffer, count, 0);