aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--SConstruct5
-rw-r--r--doc/book/net.tex2
-rw-r--r--doc/book/start.tex12
-rw-r--r--examples/example1.cpp2
-rw-r--r--examples/example2.cpp2
-rw-r--r--examples/example3.cpp2
-rw-r--r--examples/example4.cpp2
-rw-r--r--examples/example5.cpp2
-rw-r--r--examples/example6.cpp4
-rw-r--r--examples/example7.cpp2
-rw-r--r--examples/viewer/viewer.cpp2
-rw-r--r--src/charset.cpp4
-rw-r--r--src/dateTime.cpp4
-rw-r--r--src/exception.cpp12
-rw-r--r--src/messageId.cpp4
-rw-r--r--src/net/imap/IMAPConnection.cpp2
-rw-r--r--src/net/imap/IMAPStore.cpp2
-rw-r--r--src/net/maildir/maildirFolder.cpp26
-rw-r--r--src/net/maildir/maildirMessage.cpp8
-rw-r--r--src/net/maildir/maildirStore.cpp6
-rw-r--r--src/net/maildir/maildirUtils.cpp1
-rw-r--r--src/net/pop3/POP3Store.cpp6
-rw-r--r--src/net/sendmail/sendmailTransport.cpp6
-rw-r--r--src/net/service.cpp4
-rw-r--r--src/net/smtp/SMTPResponse.cpp4
-rw-r--r--src/net/smtp/SMTPTransport.cpp6
-rw-r--r--src/net/tls/TLSSocket.cpp6
-rw-r--r--src/platform.cpp (renamed from src/platformDependant.cpp)6
-rw-r--r--src/platforms/posix/posixSocket.cpp2
-rw-r--r--src/security/defaultAuthenticator.cpp6
-rw-r--r--src/utility/random.cpp6
-rw-r--r--tests/charset/main.cpp2
-rw-r--r--tests/testRunner.cpp4
-rw-r--r--tests/testUtils.cpp4
-rw-r--r--vmime/charset.hpp2
-rw-r--r--vmime/exception.hpp22
-rw-r--r--vmime/net/imap/IMAPParser.hpp6
-rw-r--r--vmime/net/store.hpp4
-rw-r--r--vmime/platform.hpp (renamed from vmime/platformDependant.hpp)19
-rw-r--r--vmime/platforms/posix/posixHandler.hpp4
-rw-r--r--vmime/platforms/windows/windowsHandler.hpp4
-rw-r--r--vmime/utility/file.hpp4
-rw-r--r--vmime/utility/progressListener.hpp2
-rw-r--r--vmime/vmime.hpp2
45 files changed, 128 insertions, 114 deletions
diff --git a/ChangeLog b/ChangeLog
index e1f40eb9..1f849fb1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,11 @@
VERSION 0.8.1cvs
================
+2006-10-11 Vincent Richard <[email protected]>
+
+ * Renamed 'vmime::platformDependant' to 'vmime::platform'. The old
+ name has been kept for compatibility with previous versions.
+
2006-10-02 Vincent Richard <[email protected]>
* SMTPTransport.cpp: reissue EHLO command after a successful STARTTLS
diff --git a/SConstruct b/SConstruct
index ed5a1b2e..c4b5371b 100644
--- a/SConstruct
+++ b/SConstruct
@@ -34,7 +34,7 @@ packageVersionMicro = 1
# API version number (libtool)
#
# Increment this number only immediately before a public release.
-# This is independant from package version number.
+# This is independent from package version number.
#
# See: http://www.gnu.org/software/libtool/manual.html#Libtool-versioning
#
@@ -130,7 +130,7 @@ libvmime_sources = [
'parsedMessageAttachment.cpp', 'parsedMessageAttachment.hpp',
'parserHelpers.hpp',
'plainTextPart.cpp', 'plainTextPart.hpp',
- 'platformDependant.cpp', 'platformDependant.hpp',
+ 'platform.cpp', 'platform.hpp',
'propertySet.cpp', 'propertySet.hpp',
'relay.cpp', 'relay.hpp',
'stringContentHandler.cpp', 'stringContentHandler.hpp',
@@ -2006,6 +2006,7 @@ EndGlobal
# vmime.vcproj
vmime_vcproj = open("vmime.vcproj", 'w')
vmime_vcproj.write("""<?xml version="1.0" encoding="Windows-1252"?>
+<!-- This file has been automatically generated from SConstruct -->
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
diff --git a/doc/book/net.tex b/doc/book/net.tex
index 84f48c05..08b7df56 100644
--- a/doc/book/net.tex
+++ b/doc/book/net.tex
@@ -719,7 +719,7 @@ private:
const unsigned int getTime() const
{
- return vmime::platformDependant::getHandler()->getUnixTime();
+ return vmime::platform::getHandler()->getUnixTime();
}
unsigned int m_last;
diff --git a/doc/book/start.tex b/doc/book/start.tex
index 26a9ed79..b37bdaad 100644
--- a/doc/book/start.tex
+++ b/doc/book/start.tex
@@ -60,13 +60,13 @@ version of the library.
% ============================================================================
-\section{Platform-dependant code}
+\section{Platform-dependent code}
While the most part of VMime code is pure ANSI C++, there are some features
that are platform-specific: file management (opening/reading/writing files),
network code (socket, DNS resolution) and time management. All the
non-portable stuff is done by a bridge object called a platform handler (see
-{\vcode vmime::platformDependant}).
+{\vcode vmime::platform}).
If your platform is POSIX-compatible (eg. GNU/Linux, *BSD) or is Windows,
then you are lucky: VMime has built-in support for these platforms. If not,
@@ -85,7 +85,7 @@ So, if your platform is POSIX, your program should look like this:
int main()
{
- vmime::platformDependant::
+ vmime::platform::
setHandler <vmime::platforms::posix::posixHandler>();
// Now, you can use VMime
@@ -98,7 +98,11 @@ $<$vmime/platforms/windows/windowsHandler.hpp$>$ and use the following line
to initialize the platform handler:
\begin{lstlisting}
-vmime::platformDependant::
+vmime::platform::
setHandler <vmime::platforms::windows::windowsHandler>();
\end{lstlisting}
+\vnote{since version 0.8.1, {\vcode vmime::platformDependant} was renamed
+to {\vcode vmime::platform}. The old name has been kept for compatibility
+but it is recommended that you update your code, if needed.}
+
diff --git a/examples/example1.cpp b/examples/example1.cpp
index 4035acdc..dfc68930 100644
--- a/examples/example1.cpp
+++ b/examples/example1.cpp
@@ -42,7 +42,7 @@ int main()
std::cout << std::endl;
// VMime initialization
- vmime::platformDependant::setHandler<vmime::platforms::posix::posixHandler>();
+ vmime::platform::setHandler<vmime::platforms::posix::posixHandler>();
try
{
diff --git a/examples/example2.cpp b/examples/example2.cpp
index 7d28fd08..d256cee0 100644
--- a/examples/example2.cpp
+++ b/examples/example2.cpp
@@ -42,7 +42,7 @@ int main()
std::cout << std::endl;
// VMime initialization
- vmime::platformDependant::setHandler<vmime::platforms::posix::posixHandler>();
+ vmime::platform::setHandler<vmime::platforms::posix::posixHandler>();
try
{
diff --git a/examples/example3.cpp b/examples/example3.cpp
index 2ca5bc90..3b9d2d26 100644
--- a/examples/example3.cpp
+++ b/examples/example3.cpp
@@ -42,7 +42,7 @@ int main()
std::cout << std::endl;
// VMime initialization
- vmime::platformDependant::setHandler<vmime::platforms::posix::posixHandler>();
+ vmime::platform::setHandler<vmime::platforms::posix::posixHandler>();
try
{
diff --git a/examples/example4.cpp b/examples/example4.cpp
index 5ef0dd5d..9d3b18b7 100644
--- a/examples/example4.cpp
+++ b/examples/example4.cpp
@@ -42,7 +42,7 @@ int main()
std::cout << std::endl;
// VMime initialization
- vmime::platformDependant::setHandler<vmime::platforms::posix::posixHandler>();
+ vmime::platform::setHandler<vmime::platforms::posix::posixHandler>();
try
{
diff --git a/examples/example5.cpp b/examples/example5.cpp
index 8d86630b..78b4d841 100644
--- a/examples/example5.cpp
+++ b/examples/example5.cpp
@@ -42,7 +42,7 @@ int main()
std::cout << std::endl;
// VMime initialization
- vmime::platformDependant::setHandler<vmime::platforms::posix::posixHandler>();
+ vmime::platform::setHandler<vmime::platforms::posix::posixHandler>();
try
{
diff --git a/examples/example6.cpp b/examples/example6.cpp
index 2783996a..984d14e0 100644
--- a/examples/example6.cpp
+++ b/examples/example6.cpp
@@ -273,7 +273,7 @@ static std::ostream& operator<<(std::ostream& os, const vmime::exception& e)
const vmime::exceptions::filesystem_exception& fse =
dynamic_cast <const vmime::exceptions::filesystem_exception&>(e);
- os << " path = " << vmime::platformDependant::getHandler()->
+ os << " path = " << vmime::platform::getHandler()->
getFileSystemFactory()->pathToString(fse.path()) << std::endl;
}
@@ -818,7 +818,7 @@ static const bool menu()
int main()
{
// VMime initialization
- vmime::platformDependant::setHandler<vmime::platforms::posix::posixHandler>();
+ vmime::platform::setHandler<vmime::platforms::posix::posixHandler>();
for (bool quit = false ; !quit ; )
{
diff --git a/examples/example7.cpp b/examples/example7.cpp
index b277401f..738e4d6a 100644
--- a/examples/example7.cpp
+++ b/examples/example7.cpp
@@ -40,7 +40,7 @@
int main()
{
// VMime initialization
- vmime::platformDependant::setHandler<vmime::platforms::posix::posixHandler>();
+ vmime::platform::setHandler<vmime::platforms::posix::posixHandler>();
// Enumerate encoders
vmime::encoderFactory* ef = vmime::encoderFactory::getInstance();
diff --git a/examples/viewer/viewer.cpp b/examples/viewer/viewer.cpp
index c94fb323..704809fc 100644
--- a/examples/viewer/viewer.cpp
+++ b/examples/viewer/viewer.cpp
@@ -207,7 +207,7 @@ static const char* uiDefinition =
int main(int argc, char* argv[])
{
// VMime initialization
- vmime::platformDependant::setHandler<vmime::platforms::posix::posixHandler>();
+ vmime::platform::setHandler<vmime::platforms::posix::posixHandler>();
// GTK+ initialization
gtk_init(&argc, &argv);
diff --git a/src/charset.cpp b/src/charset.cpp
index 21e6005e..fb9cb6cc 100644
--- a/src/charset.cpp
+++ b/src/charset.cpp
@@ -23,7 +23,7 @@
#include "vmime/charset.hpp"
#include "vmime/exception.hpp"
-#include "vmime/platformDependant.hpp"
+#include "vmime/platform.hpp"
#include "vmime/utility/stringUtils.hpp"
@@ -93,7 +93,7 @@ void charset::convert(const string& in, string& out, const charset& source, cons
const charset charset::getLocaleCharset()
{
- return (platformDependant::getHandler()->getLocaleCharset());
+ return (platform::getHandler()->getLocaleCharset());
}
diff --git a/src/dateTime.cpp b/src/dateTime.cpp
index f3ba2396..09202bdb 100644
--- a/src/dateTime.cpp
+++ b/src/dateTime.cpp
@@ -24,7 +24,7 @@
#include <iomanip>
#include "vmime/dateTime.hpp"
-#include "vmime/platformDependant.hpp"
+#include "vmime/platform.hpp"
#include "vmime/parserHelpers.hpp"
#include "vmime/utility/datetimeUtils.hpp"
@@ -770,7 +770,7 @@ void datetime::setDate(const int year, const int month, const int day)
const datetime datetime::now()
{
- return (platformDependant::getHandler()->getCurrentLocalTime());
+ return (platform::getHandler()->getCurrentLocalTime());
}
diff --git a/src/exception.cpp b/src/exception.cpp
index 88b985e5..227fe7fd 100644
--- a/src/exception.cpp
+++ b/src/exception.cpp
@@ -239,15 +239,15 @@ const char* no_factory_available::name() const throw() { return "no_factory_avai
//
-// no_platform_dependant_handler
+// no_platform_handler
//
-no_platform_dependant_handler::~no_platform_dependant_handler() throw() {}
-no_platform_dependant_handler::no_platform_dependant_handler(const exception& other)
- : exception("No platform-dependant handler installed.", other) {}
+no_platform_handler::~no_platform_handler() throw() {}
+no_platform_handler::no_platform_handler(const exception& other)
+ : exception("No platform handler installed.", other) {}
-exception* no_platform_dependant_handler::clone() const { return new no_platform_dependant_handler(*this); }
-const char* no_platform_dependant_handler::name() const throw() { return "no_platform_dependant_handler"; }
+exception* no_platform_handler::clone() const { return new no_platform_handler(*this); }
+const char* no_platform_handler::name() const throw() { return "no_platform_handler"; }
//
diff --git a/src/messageId.cpp b/src/messageId.cpp
index f749148c..bfa5cd05 100644
--- a/src/messageId.cpp
+++ b/src/messageId.cpp
@@ -23,7 +23,7 @@
#include "vmime/messageId.hpp"
#include "vmime/utility/random.hpp"
-#include "vmime/platformDependant.hpp"
+#include "vmime/platform.hpp"
#include "vmime/parserHelpers.hpp"
@@ -220,7 +220,7 @@ messageId messageId::generateId()
left << std::hex << utility::random::getNext();
left << std::hex << utility::random::getNext();
- return (messageId(left.str(), platformDependant::getHandler()->getHostName()));
+ return (messageId(left.str(), platform::getHandler()->getHostName()));
}
diff --git a/src/net/imap/IMAPConnection.cpp b/src/net/imap/IMAPConnection.cpp
index 7f13cf48..5e995aac 100644
--- a/src/net/imap/IMAPConnection.cpp
+++ b/src/net/imap/IMAPConnection.cpp
@@ -23,7 +23,7 @@
#include "vmime/net/imap/IMAPStore.hpp"
#include "vmime/exception.hpp"
-#include "vmime/platformDependant.hpp"
+#include "vmime/platform.hpp"
#include "vmime/net/defaultConnectionInfos.hpp"
diff --git a/src/net/imap/IMAPStore.cpp b/src/net/imap/IMAPStore.cpp
index e6f82c70..aba3e8c2 100644
--- a/src/net/imap/IMAPStore.cpp
+++ b/src/net/imap/IMAPStore.cpp
@@ -22,7 +22,7 @@
#include "vmime/net/imap/IMAPConnection.hpp"
#include "vmime/exception.hpp"
-#include "vmime/platformDependant.hpp"
+#include "vmime/platform.hpp"
#include <map>
diff --git a/src/net/maildir/maildirFolder.cpp b/src/net/maildir/maildirFolder.cpp
index dc89f131..cbacff02 100644
--- a/src/net/maildir/maildirFolder.cpp
+++ b/src/net/maildir/maildirFolder.cpp
@@ -28,7 +28,7 @@
#include "vmime/message.hpp"
#include "vmime/exception.hpp"
-#include "vmime/platformDependant.hpp"
+#include "vmime/platform.hpp"
namespace vmime {
@@ -91,7 +91,7 @@ const int maildirFolder::getFlags()
{
int flags = 0;
- utility::fileSystemFactory* fsf = platformDependant::getHandler()->getFileSystemFactory();
+ utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
ref <utility::file> rootDir = fsf->create
(maildirUtils::getFolderFSPath(m_store.acquire(), m_path, maildirUtils::FOLDER_PATH_CONTAINER));
@@ -207,7 +207,7 @@ void maildirFolder::create(const int /* type */)
// Create directory on file system
try
{
- utility::fileSystemFactory* fsf = platformDependant::getHandler()->getFileSystemFactory();
+ utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
if (!fsf->isValidPath(maildirUtils::getFolderFSPath(store, m_path, maildirUtils::FOLDER_PATH_ROOT)))
throw exceptions::invalid_folder_name();
@@ -252,7 +252,7 @@ void maildirFolder::destroy()
throw exceptions::illegal_state("Folder is open");
// Delete 'folder' and '.folder.directory' directories
- utility::fileSystemFactory* fsf = platformDependant::getHandler()->getFileSystemFactory();
+ utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
ref <utility::file> rootDir = fsf->create
(maildirUtils::getFolderFSPath(store, m_path, maildirUtils::FOLDER_PATH_ROOT));
@@ -282,7 +282,7 @@ const bool maildirFolder::exists()
{
ref <maildirStore> store = m_store.acquire();
- utility::fileSystemFactory* fsf = platformDependant::getHandler()->getFileSystemFactory();
+ utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
ref <utility::file> rootDir = fsf->create
(maildirUtils::getFolderFSPath(store, m_path, maildirUtils::FOLDER_PATH_ROOT));
@@ -316,7 +316,7 @@ void maildirFolder::scanFolder()
m_messageCount = 0;
m_unreadMessageCount = 0;
- utility::fileSystemFactory* fsf = platformDependant::getHandler()->getFileSystemFactory();
+ utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
utility::file::path newDirPath = maildirUtils::getFolderFSPath
(store, m_path, maildirUtils::FOLDER_PATH_NEW);
@@ -531,7 +531,7 @@ void maildirFolder::listFolders(std::vector <ref <folder> >& list, const bool re
try
{
- utility::fileSystemFactory* fsf = platformDependant::getHandler()->getFileSystemFactory();
+ utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
ref <utility::file> rootDir = fsf->create
(maildirUtils::getFolderFSPath(store, m_path,
@@ -585,7 +585,7 @@ void maildirFolder::rename(const folder::path& newPath)
throw exceptions::invalid_folder_name();
// Rename the directory on the file system
- utility::fileSystemFactory* fsf = platformDependant::getHandler()->getFileSystemFactory();
+ utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
ref <utility::file> rootDir = fsf->create
(maildirUtils::getFolderFSPath(store, m_path, maildirUtils::FOLDER_PATH_ROOT));
@@ -872,7 +872,7 @@ void maildirFolder::setMessageFlagsImpl
{
ref <maildirStore> store = m_store.acquire();
- utility::fileSystemFactory* fsf = platformDependant::getHandler()->getFileSystemFactory();
+ utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
utility::file::path curDirPath = maildirUtils::getFolderFSPath
(store, m_path, maildirUtils::FOLDER_PATH_CUR);
@@ -944,7 +944,7 @@ void maildirFolder::addMessage(utility::inputStream& is, const int size,
else if (m_mode == MODE_READ_ONLY)
throw exceptions::illegal_state("Folder is read-only");
- utility::fileSystemFactory* fsf = platformDependant::getHandler()->getFileSystemFactory();
+ utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
utility::file::path tmpDirPath = maildirUtils::getFolderFSPath
(store, m_path, maildirUtils::FOLDER_PATH_TMP);
@@ -1026,7 +1026,7 @@ void maildirFolder::copyMessageImpl(const utility::file::path& tmpDirPath,
utility::inputStream& is, const utility::stream::size_type size,
utility::progressListener* progress)
{
- utility::fileSystemFactory* fsf = platformDependant::getHandler()->getFileSystemFactory();
+ utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
ref <utility::file> file = fsf->create(tmpDirPath / filename);
@@ -1163,7 +1163,7 @@ void maildirFolder::copyMessagesImpl(const folder::path& dest, const std::vector
{
ref <maildirStore> store = m_store.acquire();
- utility::fileSystemFactory* fsf = platformDependant::getHandler()->getFileSystemFactory();
+ utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
utility::file::path curDirPath = maildirUtils::getFolderFSPath
(store, m_path, maildirUtils::FOLDER_PATH_CUR);
@@ -1305,7 +1305,7 @@ void maildirFolder::expunge()
else if (m_mode == MODE_READ_ONLY)
throw exceptions::illegal_state("Folder is read-only");
- utility::fileSystemFactory* fsf = platformDependant::getHandler()->getFileSystemFactory();
+ utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
utility::file::path curDirPath = maildirUtils::getFolderFSPath
(store, m_path, maildirUtils::FOLDER_PATH_CUR);
diff --git a/src/net/maildir/maildirMessage.cpp b/src/net/maildir/maildirMessage.cpp
index 6c621f21..aaf258a8 100644
--- a/src/net/maildir/maildirMessage.cpp
+++ b/src/net/maildir/maildirMessage.cpp
@@ -25,7 +25,7 @@
#include "vmime/message.hpp"
#include "vmime/exception.hpp"
-#include "vmime/platformDependant.hpp"
+#include "vmime/platform.hpp"
namespace vmime {
@@ -342,7 +342,7 @@ void maildirMessage::extractImpl(utility::outputStream& os, utility::progressLis
{
ref <const maildirFolder> folder = m_folder.acquire();
- utility::fileSystemFactory* fsf = platformDependant::getHandler()->getFileSystemFactory();
+ utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
const utility::file::path path = folder->getMessageFSPath(m_num);
ref <utility::file> file = fsf->create(path);
@@ -389,7 +389,7 @@ void maildirMessage::fetchPartHeader(ref <part> p)
ref <maildirPart> mp = p.dynamicCast <maildirPart>();
- utility::fileSystemFactory* fsf = platformDependant::getHandler()->getFileSystemFactory();
+ utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
const utility::file::path path = folder->getMessageFSPath(m_num);
ref <utility::file> file = fsf->create(path);
@@ -426,7 +426,7 @@ void maildirMessage::fetch(ref <maildirFolder> msgFolder, const int options)
if (folder != msgFolder)
throw exceptions::folder_not_found();
- utility::fileSystemFactory* fsf = platformDependant::getHandler()->getFileSystemFactory();
+ utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
const utility::file::path path = folder->getMessageFSPath(m_num);
ref <utility::file> file = fsf->create(path);
diff --git a/src/net/maildir/maildirStore.cpp b/src/net/maildir/maildirStore.cpp
index 4cea5ec3..836a639f 100644
--- a/src/net/maildir/maildirStore.cpp
+++ b/src/net/maildir/maildirStore.cpp
@@ -24,7 +24,7 @@
#include "vmime/utility/smartPtr.hpp"
#include "vmime/exception.hpp"
-#include "vmime/platformDependant.hpp"
+#include "vmime/platform.hpp"
#include "vmime/net/defaultConnectionInfos.hpp"
@@ -101,7 +101,7 @@ ref <folder> maildirStore::getFolder(const folder::path& path)
const bool maildirStore::isValidFolderName(const folder::path::component& name) const
{
- if (!platformDependant::getHandler()->getFileSystemFactory()->isValidPathComponent(name))
+ if (!platform::getHandler()->getFileSystemFactory()->isValidPathComponent(name))
return false;
const string& buf = name.getBuffer();
@@ -127,7 +127,7 @@ void maildirStore::connect()
throw exceptions::already_connected();
// Get root directory
- utility::fileSystemFactory* fsf = platformDependant::getHandler()->getFileSystemFactory();
+ utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
m_fsPath = fsf->stringToPath(GET_PROPERTY(string, PROPERTY_SERVER_ROOTPATH));
diff --git a/src/net/maildir/maildirUtils.cpp b/src/net/maildir/maildirUtils.cpp
index 00a9a7b1..004c2553 100644
--- a/src/net/maildir/maildirUtils.cpp
+++ b/src/net/maildir/maildirUtils.cpp
@@ -23,7 +23,6 @@
#include "vmime/utility/random.hpp"
#include "vmime/exception.hpp"
-#include "vmime/platformDependant.hpp"
namespace vmime {
diff --git a/src/net/pop3/POP3Store.cpp b/src/net/pop3/POP3Store.cpp
index ba4a5254..10a67c4a 100644
--- a/src/net/pop3/POP3Store.cpp
+++ b/src/net/pop3/POP3Store.cpp
@@ -21,7 +21,7 @@
#include "vmime/net/pop3/POP3Folder.hpp"
#include "vmime/exception.hpp"
-#include "vmime/platformDependant.hpp"
+#include "vmime/platform.hpp"
#include "vmime/messageId.hpp"
#include "vmime/security/digest/messageDigestFactory.hpp"
#include "vmime/utility/filteredStream.hpp"
@@ -773,7 +773,7 @@ void POP3Store::readResponse(string& buffer, const bool multiLine,
if (receiveBuffer.empty()) // buffer is empty
{
- platformDependant::getHandler()->wait();
+ platform::getHandler()->wait();
continue;
}
@@ -874,7 +874,7 @@ void POP3Store::readResponse(utility::outputStream& os,
if (read == 0) // buffer is empty
{
- platformDependant::getHandler()->wait();
+ platform::getHandler()->wait();
continue;
}
diff --git a/src/net/sendmail/sendmailTransport.cpp b/src/net/sendmail/sendmailTransport.cpp
index efdd57aa..54fe90ae 100644
--- a/src/net/sendmail/sendmailTransport.cpp
+++ b/src/net/sendmail/sendmailTransport.cpp
@@ -20,7 +20,7 @@
#include "vmime/net/sendmail/sendmailTransport.hpp"
#include "vmime/exception.hpp"
-#include "vmime/platformDependant.hpp"
+#include "vmime/platform.hpp"
#include "vmime/message.hpp"
#include "vmime/mailboxList.hpp"
@@ -165,11 +165,11 @@ void sendmailTransport::internalSend
(const std::vector <string> args, utility::inputStream& is,
const utility::stream::size_type size, utility::progressListener* progress)
{
- const utility::file::path path = vmime::platformDependant::getHandler()->
+ const utility::file::path path = vmime::platform::getHandler()->
getFileSystemFactory()->stringToPath(m_sendmailPath);
ref <utility::childProcess> proc =
- vmime::platformDependant::getHandler()->
+ vmime::platform::getHandler()->
getChildProcessFactory()->create(path);
proc->start(args, utility::childProcess::FLAG_REDIRECT_STDIN);
diff --git a/src/net/service.cpp b/src/net/service.cpp
index 456af895..f603f30f 100644
--- a/src/net/service.cpp
+++ b/src/net/service.cpp
@@ -20,7 +20,7 @@
#include "vmime/config.hpp"
#include "vmime/net/service.hpp"
-#include "vmime/platformDependant.hpp"
+#include "vmime/platform.hpp"
#if VMIME_HAVE_SASL_SUPPORT
#include "vmime/security/sasl/defaultSASLAuthenticator.hpp"
@@ -56,7 +56,7 @@ service::service(ref <session> sess, const serviceInfos& /* infos */,
m_certVerifier = vmime::create <security::cert::defaultCertificateVerifier>();
#endif // VMIME_HAVE_TLS_SUPPORT
- m_socketFactory = platformDependant::getHandler()->getSocketFactory();
+ m_socketFactory = platform::getHandler()->getSocketFactory();
}
diff --git a/src/net/smtp/SMTPResponse.cpp b/src/net/smtp/SMTPResponse.cpp
index b27876f6..9be76d1d 100644
--- a/src/net/smtp/SMTPResponse.cpp
+++ b/src/net/smtp/SMTPResponse.cpp
@@ -23,7 +23,7 @@
#include "vmime/net/smtp/SMTPResponse.hpp"
-#include "vmime/platformDependant.hpp"
+#include "vmime/platform.hpp"
#include "vmime/utility/stringUtils.hpp"
#include "vmime/net/socket.hpp"
@@ -146,7 +146,7 @@ const string SMTPResponse::readResponseLine()
if (receiveBuffer.empty()) // buffer is empty
{
- platformDependant::getHandler()->wait();
+ platform::getHandler()->wait();
continue;
}
diff --git a/src/net/smtp/SMTPTransport.cpp b/src/net/smtp/SMTPTransport.cpp
index 07da0e4c..1e873613 100644
--- a/src/net/smtp/SMTPTransport.cpp
+++ b/src/net/smtp/SMTPTransport.cpp
@@ -21,7 +21,7 @@
#include "vmime/net/smtp/SMTPResponse.hpp"
#include "vmime/exception.hpp"
-#include "vmime/platformDependant.hpp"
+#include "vmime/platform.hpp"
#include "vmime/encoderB64.hpp"
#include "vmime/mailboxList.hpp"
@@ -189,7 +189,7 @@ void SMTPTransport::helo()
// S: 250-smtp.theserver.com
// S: 250 AUTH CRAM-MD5 DIGEST-MD5
- sendRequest("EHLO " + platformDependant::getHandler()->getHostName());
+ sendRequest("EHLO " + platform::getHandler()->getHostName());
ref <SMTPResponse> resp;
@@ -200,7 +200,7 @@ void SMTPTransport::helo()
// eg: C: HELO thismachine.ourdomain.com
// S: 250 OK
- sendRequest("HELO " + platformDependant::getHandler()->getHostName());
+ sendRequest("HELO " + platform::getHandler()->getHostName());
if ((resp = readResponse())->getCode() != 250)
{
diff --git a/src/net/tls/TLSSocket.cpp b/src/net/tls/TLSSocket.cpp
index b1896844..e36df7b7 100644
--- a/src/net/tls/TLSSocket.cpp
+++ b/src/net/tls/TLSSocket.cpp
@@ -27,7 +27,7 @@
#include "vmime/net/tls/TLSSocket.hpp"
#include "vmime/net/tls/TLSSession.hpp"
-#include "vmime/platformDependant.hpp"
+#include "vmime/platform.hpp"
#include "vmime/security/cert/X509Certificate.hpp"
@@ -159,7 +159,7 @@ void TLSSocket::handshake(ref <timeoutHandler> toHandler)
ret == GNUTLS_E_INTERRUPTED)
{
// Non-fatal error
- platformDependant::getHandler()->wait();
+ platform::getHandler()->wait();
}
else
{
@@ -240,7 +240,7 @@ ssize_t TLSSocket::gnutlsPullFunc
if (ret == 0)
{
// No data available yet
- platformDependant::getHandler()->wait();
+ platform::getHandler()->wait();
}
else
{
diff --git a/src/platformDependant.cpp b/src/platform.cpp
index c377b716..b4b28622 100644
--- a/src/platformDependant.cpp
+++ b/src/platform.cpp
@@ -21,17 +21,17 @@
// the GNU General Public License cover the whole combination.
//
-#include "vmime/platformDependant.hpp"
+#include "vmime/platform.hpp"
namespace vmime
{
-ref <platformDependant::handler> platformDependant::sm_handler = NULL;
+ref <platform::handler> platform::sm_handler = NULL;
-platformDependant::handler::~handler()
+platform::handler::~handler()
{
}
diff --git a/src/platforms/posix/posixSocket.cpp b/src/platforms/posix/posixSocket.cpp
index a67d238d..e63e4674 100644
--- a/src/platforms/posix/posixSocket.cpp
+++ b/src/platforms/posix/posixSocket.cpp
@@ -259,7 +259,7 @@ void posixSocket::sendRaw(const char* buffer, const int count)
if (errno != EAGAIN)
throwSocketError(errno);
- platformDependant::getHandler()->wait();
+ platform::getHandler()->wait();
}
else
{
diff --git a/src/security/defaultAuthenticator.cpp b/src/security/defaultAuthenticator.cpp
index 7c3402da..9dc45164 100644
--- a/src/security/defaultAuthenticator.cpp
+++ b/src/security/defaultAuthenticator.cpp
@@ -25,7 +25,7 @@
#include "vmime/net/service.hpp"
-#include "vmime/platformDependant.hpp"
+#include "vmime/platform.hpp"
namespace vmime {
@@ -72,13 +72,13 @@ const string defaultAuthenticator::getPassword() const
const string defaultAuthenticator::getHostname() const
{
- return platformDependant::getHandler()->getHostName();
+ return platform::getHandler()->getHostName();
}
const string defaultAuthenticator::getAnonymousToken() const
{
- return "anonymous@" + platformDependant::getHandler()->getHostName();
+ return "anonymous@" + platform::getHandler()->getHostName();
}
diff --git a/src/utility/random.cpp b/src/utility/random.cpp
index 156796a4..fa95e406 100644
--- a/src/utility/random.cpp
+++ b/src/utility/random.cpp
@@ -18,7 +18,7 @@
//
#include "vmime/utility/random.hpp"
-#include "vmime/platformDependant.hpp"
+#include "vmime/platform.hpp"
#include <ctime>
@@ -45,13 +45,13 @@ const unsigned int random::getNext()
const unsigned int random::getTime()
{
- return (platformDependant::getHandler()->getUnixTime());
+ return (platform::getHandler()->getUnixTime());
}
const unsigned int random::getProcess()
{
- return (platformDependant::getHandler()->getProcessId());
+ return (platform::getHandler()->getProcessId());
}
diff --git a/tests/charset/main.cpp b/tests/charset/main.cpp
index 6e8d3815..9d08e85d 100644
--- a/tests/charset/main.cpp
+++ b/tests/charset/main.cpp
@@ -31,7 +31,7 @@
int main(int argc, char* argv[])
{
// VMime initialization
- vmime::platformDependant::setHandler<vmime::platforms::posix::posixHandler>();
+ vmime::platform::setHandler<vmime::platforms::posix::posixHandler>();
const vmime::string from(argv[1]);
diff --git a/tests/testRunner.cpp b/tests/testRunner.cpp
index 8700ea16..155b00ee 100644
--- a/tests/testRunner.cpp
+++ b/tests/testRunner.cpp
@@ -193,8 +193,8 @@ void registerTestModule(const char* name_)
int main(int argc, char* argv[])
{
- // VMime initialization
- vmime::platformDependant::setHandler<vmime::platforms::posix::posixHandler>();
+ // VMime initialization
+ vmime::platform::setHandler<vmime::platforms::posix::posixHandler>();
// Parse arguments
bool xmlOutput = false;
diff --git a/tests/testUtils.cpp b/tests/testUtils.cpp
index 34d945c9..a774068d 100644
--- a/tests/testUtils.cpp
+++ b/tests/testUtils.cpp
@@ -158,13 +158,13 @@ testTimeoutHandler::testTimeoutHandler(const unsigned int delay)
const bool testTimeoutHandler::isTimeOut()
{
- return (vmime::platformDependant::getHandler()->getUnixTime() - m_start) >= m_delay;
+ return (vmime::platform::getHandler()->getUnixTime() - m_start) >= m_delay;
}
void testTimeoutHandler::resetTimeOut()
{
- m_start = vmime::platformDependant::getHandler()->getUnixTime();
+ m_start = vmime::platform::getHandler()->getUnixTime();
}
diff --git a/vmime/charset.hpp b/vmime/charset.hpp
index 84c40fb6..0dad075b 100644
--- a/vmime/charset.hpp
+++ b/vmime/charset.hpp
@@ -61,7 +61,7 @@ public:
/** Returns the default charset used on the system.
*
- * This function simply calls <code>platformDependantHandler::getLocaleCharset()</code>
+ * This function simply calls <code>platformHandler::getLocaleCharset()</code>
* and is provided for convenience.
*
* @return system default charset
diff --git a/vmime/exception.hpp b/vmime/exception.hpp
index 02980088..07caa8df 100644
--- a/vmime/exception.hpp
+++ b/vmime/exception.hpp
@@ -248,12 +248,12 @@ public:
};
-class no_platform_dependant_handler : public vmime::exception
+class no_platform_handler : public vmime::exception
{
public:
- no_platform_dependant_handler(const exception& other = NO_EXCEPTION);
- ~no_platform_dependant_handler() throw();
+ no_platform_handler(const exception& other = NO_EXCEPTION);
+ ~no_platform_handler() throw();
exception* clone() const;
const char* name() const throw();
@@ -655,16 +655,16 @@ public:
~command_error() throw();
/** Return the name of the command which have thrown the exception.
- * This is protocol-dependant.
+ * This is protocol-dependent.
*
- * @return command name (protocol-dependant)
+ * @return command name (protocol-dependent)
*/
const string& command() const;
/** Return the invalid response line.
- * The meaning is protocol-dependant.
+ * The meaning is protocol-dependent.
*
- * @return response line (protocol-dependant)
+ * @return response line (protocol-dependent)
*/
const string& response() const;
@@ -689,16 +689,16 @@ public:
~invalid_response() throw();
/** Return the name of the command which have thrown the exception.
- * This is protocol-dependant.
+ * This is protocol-dependent.
*
- * @return command name (protocol-dependant)
+ * @return command name (protocol-dependent)
*/
const string& command() const;
/** Return the invalid response line.
- * The meaning is protocol-dependant.
+ * The meaning is protocol-dependent.
*
- * @return response line (protocol-dependant)
+ * @return response line (protocol-dependent)
*/
const string& response() const;
diff --git a/vmime/net/imap/IMAPParser.hpp b/vmime/net/imap/IMAPParser.hpp
index da812952..0b11f948 100644
--- a/vmime/net/imap/IMAPParser.hpp
+++ b/vmime/net/imap/IMAPParser.hpp
@@ -37,7 +37,7 @@
#include "vmime/encoderB64.hpp"
#include "vmime/encoderQP.hpp"
-#include "vmime/platformDependant.hpp"
+#include "vmime/platform.hpp"
#include "vmime/net/timeoutHandler.hpp"
#include "vmime/net/socket.hpp"
@@ -5092,7 +5092,7 @@ public:
if (receiveBuffer.empty()) // buffer is empty
{
- platformDependant::getHandler()->wait();
+ platform::getHandler()->wait();
continue;
}
@@ -5151,7 +5151,7 @@ public:
if (receiveBuffer.empty()) // buffer is empty
{
- platformDependant::getHandler()->wait();
+ platform::getHandler()->wait();
continue;
}
diff --git a/vmime/net/store.hpp b/vmime/net/store.hpp
index b140c822..b2321e39 100644
--- a/vmime/net/store.hpp
+++ b/vmime/net/store.hpp
@@ -46,14 +46,14 @@ protected:
public:
- /** Return the default folder. This is protocol dependant
+ /** Return the default folder. This is protocol dependent
* and usually is the INBOX folder.
*
* @return default folder
*/
virtual ref <folder> getDefaultFolder() = 0;
- /** Return the root folder. This is protocol dependant
+ /** Return the root folder. This is protocol dependent
* and usually is the user's mail drop root folder.
*
* @return root folder
diff --git a/vmime/platformDependant.hpp b/vmime/platform.hpp
index cd8a7ce2..a1ca60f8 100644
--- a/vmime/platformDependant.hpp
+++ b/vmime/platform.hpp
@@ -21,8 +21,8 @@
// the GNU General Public License cover the whole combination.
//
-#ifndef VMIME_PLATFORMDEPENDANT_HPP_INCLUDED
-#define VMIME_PLATFORMDEPENDANT_HPP_INCLUDED
+#ifndef VMIME_PLATFORM_HPP_INCLUDED
+#define VMIME_PLATFORM_HPP_INCLUDED
#include "vmime/config.hpp"
@@ -48,12 +48,12 @@ namespace vmime
/** Allow setting or getting the current platform handler.
*/
-class platformDependant
+class platform
{
public:
- /** Handles all platform-dependant operations. It offers an interface to
- * access platform-dependant objects: sockets, date/time, file system, etc.
+ /** Handles all platform-dependent operations. It offers an interface to
+ * access platform-dependent objects: sockets, date/time, file system, etc.
*/
class handler : public object
@@ -138,7 +138,7 @@ public:
static ref <const handler> getHandler()
{
if (!sm_handler)
- throw exceptions::no_platform_dependant_handler();
+ throw exceptions::no_platform_handler();
return (sm_handler);
}
@@ -149,7 +149,12 @@ private:
};
+/** Compatibility with older versions of VMime (before 0.8.1). */
+typedef platform platformDependant;
+
+
} // vmime
-#endif // VMIME_PLATFORMDEPENDANT_HPP_INCLUDED
+#endif // VMIME_PLATFORM_HPP_INCLUDED
+
diff --git a/vmime/platforms/posix/posixHandler.hpp b/vmime/platforms/posix/posixHandler.hpp
index 0f9969d7..0a5ad843 100644
--- a/vmime/platforms/posix/posixHandler.hpp
+++ b/vmime/platforms/posix/posixHandler.hpp
@@ -26,7 +26,7 @@
#include "vmime/config.hpp"
-#include "vmime/platformDependant.hpp"
+#include "vmime/platform.hpp"
#if VMIME_HAVE_MESSAGING_FEATURES
#include "vmime/platforms/posix/posixSocket.hpp"
@@ -43,7 +43,7 @@ namespace platforms {
namespace posix {
-class posixHandler : public vmime::platformDependant::handler
+class posixHandler : public vmime::platform::handler
{
public:
diff --git a/vmime/platforms/windows/windowsHandler.hpp b/vmime/platforms/windows/windowsHandler.hpp
index 741f0a9d..170325a2 100644
--- a/vmime/platforms/windows/windowsHandler.hpp
+++ b/vmime/platforms/windows/windowsHandler.hpp
@@ -26,7 +26,7 @@
#include "vmime/config.hpp"
-#include "vmime/platformDependant.hpp"
+#include "vmime/platform.hpp"
#if VMIME_HAVE_MESSAGING_FEATURES
#include "vmime/platforms/windows/windowsSocket.hpp"
@@ -42,7 +42,7 @@ namespace platforms {
namespace windows {
-class windowsHandler : public vmime::platformDependant::handler
+class windowsHandler : public vmime::platform::handler
{
public:
diff --git a/vmime/utility/file.hpp b/vmime/utility/file.hpp
index f68fc8ae..142827b2 100644
--- a/vmime/utility/file.hpp
+++ b/vmime/utility/file.hpp
@@ -229,12 +229,12 @@ public:
/** Parse a path contained in a string.
*
- * @param str string containing a path in a system-dependant representation
+ * @param str string containing a path in a system-dependent representation
* @return path object (abstract representation)
*/
virtual const file::path stringToPath(const string& str) const = 0;
- /** Return the system-dependant string representation for the specified path.
+ /** Return the system-dependent string representation for the specified path.
*
* @param path abstract representation of the path
* @return string representation of the path
diff --git a/vmime/utility/progressListener.hpp b/vmime/utility/progressListener.hpp
index cd4e36e6..168b5663 100644
--- a/vmime/utility/progressListener.hpp
+++ b/vmime/utility/progressListener.hpp
@@ -43,7 +43,7 @@ public:
/** Allow the caller object to cancel the current operation.
*
- * @warning WARNING: this is implementation-dependant: cancelling
+ * @warning WARNING: this is implementation-dependent: cancelling
* may not be supported by the notifier object.
*
* @return true to cancel the operation, false otherwise
diff --git a/vmime/vmime.hpp b/vmime/vmime.hpp
index a31ba428..2c0d2546 100644
--- a/vmime/vmime.hpp
+++ b/vmime/vmime.hpp
@@ -32,7 +32,7 @@
#include "vmime/base.hpp"
#include "vmime/exception.hpp"
#include "vmime/options.hpp"
-#include "vmime/platformDependant.hpp"
+#include "vmime/platform.hpp"
// Base components
#include "vmime/dateTime.hpp"