Renamed 'vmime::platformDependant' to 'vmime::platform'.
This commit is contained in:
parent
b2d67de8a9
commit
0894c98959
@ -2,6 +2,11 @@
|
|||||||
VERSION 0.8.1cvs
|
VERSION 0.8.1cvs
|
||||||
================
|
================
|
||||||
|
|
||||||
|
2006-10-11 Vincent Richard <vincent@vincent-richard.net>
|
||||||
|
|
||||||
|
* Renamed 'vmime::platformDependant' to 'vmime::platform'. The old
|
||||||
|
name has been kept for compatibility with previous versions.
|
||||||
|
|
||||||
2006-10-02 Vincent Richard <vincent@vincent-richard.net>
|
2006-10-02 Vincent Richard <vincent@vincent-richard.net>
|
||||||
|
|
||||||
* SMTPTransport.cpp: reissue EHLO command after a successful STARTTLS
|
* SMTPTransport.cpp: reissue EHLO command after a successful STARTTLS
|
||||||
|
@ -34,7 +34,7 @@ packageVersionMicro = 1
|
|||||||
# API version number (libtool)
|
# API version number (libtool)
|
||||||
#
|
#
|
||||||
# Increment this number only immediately before a public release.
|
# 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
|
# See: http://www.gnu.org/software/libtool/manual.html#Libtool-versioning
|
||||||
#
|
#
|
||||||
@ -130,7 +130,7 @@ libvmime_sources = [
|
|||||||
'parsedMessageAttachment.cpp', 'parsedMessageAttachment.hpp',
|
'parsedMessageAttachment.cpp', 'parsedMessageAttachment.hpp',
|
||||||
'parserHelpers.hpp',
|
'parserHelpers.hpp',
|
||||||
'plainTextPart.cpp', 'plainTextPart.hpp',
|
'plainTextPart.cpp', 'plainTextPart.hpp',
|
||||||
'platformDependant.cpp', 'platformDependant.hpp',
|
'platform.cpp', 'platform.hpp',
|
||||||
'propertySet.cpp', 'propertySet.hpp',
|
'propertySet.cpp', 'propertySet.hpp',
|
||||||
'relay.cpp', 'relay.hpp',
|
'relay.cpp', 'relay.hpp',
|
||||||
'stringContentHandler.cpp', 'stringContentHandler.hpp',
|
'stringContentHandler.cpp', 'stringContentHandler.hpp',
|
||||||
@ -2006,6 +2006,7 @@ EndGlobal
|
|||||||
# vmime.vcproj
|
# vmime.vcproj
|
||||||
vmime_vcproj = open("vmime.vcproj", 'w')
|
vmime_vcproj = open("vmime.vcproj", 'w')
|
||||||
vmime_vcproj.write("""<?xml version="1.0" encoding="Windows-1252"?>
|
vmime_vcproj.write("""<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<!-- This file has been automatically generated from SConstruct -->
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="7.10"
|
Version="7.10"
|
||||||
|
@ -719,7 +719,7 @@ private:
|
|||||||
|
|
||||||
const unsigned int getTime() const
|
const unsigned int getTime() const
|
||||||
{
|
{
|
||||||
return vmime::platformDependant::getHandler()->getUnixTime();
|
return vmime::platform::getHandler()->getUnixTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int m_last;
|
unsigned int m_last;
|
||||||
|
@ -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
|
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),
|
that are platform-specific: file management (opening/reading/writing files),
|
||||||
network code (socket, DNS resolution) and time management. All the
|
network code (socket, DNS resolution) and time management. All the
|
||||||
non-portable stuff is done by a bridge object called a platform handler (see
|
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,
|
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,
|
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()
|
int main()
|
||||||
{
|
{
|
||||||
vmime::platformDependant::
|
vmime::platform::
|
||||||
setHandler <vmime::platforms::posix::posixHandler>();
|
setHandler <vmime::platforms::posix::posixHandler>();
|
||||||
|
|
||||||
// Now, you can use VMime
|
// Now, you can use VMime
|
||||||
@ -98,7 +98,11 @@ $<$vmime/platforms/windows/windowsHandler.hpp$>$ and use the following line
|
|||||||
to initialize the platform handler:
|
to initialize the platform handler:
|
||||||
|
|
||||||
\begin{lstlisting}
|
\begin{lstlisting}
|
||||||
vmime::platformDependant::
|
vmime::platform::
|
||||||
setHandler <vmime::platforms::windows::windowsHandler>();
|
setHandler <vmime::platforms::windows::windowsHandler>();
|
||||||
\end{lstlisting}
|
\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.}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ int main()
|
|||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
|
|
||||||
// VMime initialization
|
// VMime initialization
|
||||||
vmime::platformDependant::setHandler<vmime::platforms::posix::posixHandler>();
|
vmime::platform::setHandler<vmime::platforms::posix::posixHandler>();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -42,7 +42,7 @@ int main()
|
|||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
|
|
||||||
// VMime initialization
|
// VMime initialization
|
||||||
vmime::platformDependant::setHandler<vmime::platforms::posix::posixHandler>();
|
vmime::platform::setHandler<vmime::platforms::posix::posixHandler>();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -42,7 +42,7 @@ int main()
|
|||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
|
|
||||||
// VMime initialization
|
// VMime initialization
|
||||||
vmime::platformDependant::setHandler<vmime::platforms::posix::posixHandler>();
|
vmime::platform::setHandler<vmime::platforms::posix::posixHandler>();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -42,7 +42,7 @@ int main()
|
|||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
|
|
||||||
// VMime initialization
|
// VMime initialization
|
||||||
vmime::platformDependant::setHandler<vmime::platforms::posix::posixHandler>();
|
vmime::platform::setHandler<vmime::platforms::posix::posixHandler>();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -42,7 +42,7 @@ int main()
|
|||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
|
|
||||||
// VMime initialization
|
// VMime initialization
|
||||||
vmime::platformDependant::setHandler<vmime::platforms::posix::posixHandler>();
|
vmime::platform::setHandler<vmime::platforms::posix::posixHandler>();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -273,7 +273,7 @@ static std::ostream& operator<<(std::ostream& os, const vmime::exception& e)
|
|||||||
const vmime::exceptions::filesystem_exception& fse =
|
const vmime::exceptions::filesystem_exception& fse =
|
||||||
dynamic_cast <const vmime::exceptions::filesystem_exception&>(e);
|
dynamic_cast <const vmime::exceptions::filesystem_exception&>(e);
|
||||||
|
|
||||||
os << " path = " << vmime::platformDependant::getHandler()->
|
os << " path = " << vmime::platform::getHandler()->
|
||||||
getFileSystemFactory()->pathToString(fse.path()) << std::endl;
|
getFileSystemFactory()->pathToString(fse.path()) << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -818,7 +818,7 @@ static const bool menu()
|
|||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
// VMime initialization
|
// VMime initialization
|
||||||
vmime::platformDependant::setHandler<vmime::platforms::posix::posixHandler>();
|
vmime::platform::setHandler<vmime::platforms::posix::posixHandler>();
|
||||||
|
|
||||||
for (bool quit = false ; !quit ; )
|
for (bool quit = false ; !quit ; )
|
||||||
{
|
{
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
// VMime initialization
|
// VMime initialization
|
||||||
vmime::platformDependant::setHandler<vmime::platforms::posix::posixHandler>();
|
vmime::platform::setHandler<vmime::platforms::posix::posixHandler>();
|
||||||
|
|
||||||
// Enumerate encoders
|
// Enumerate encoders
|
||||||
vmime::encoderFactory* ef = vmime::encoderFactory::getInstance();
|
vmime::encoderFactory* ef = vmime::encoderFactory::getInstance();
|
||||||
|
@ -207,7 +207,7 @@ static const char* uiDefinition =
|
|||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
// VMime initialization
|
// VMime initialization
|
||||||
vmime::platformDependant::setHandler<vmime::platforms::posix::posixHandler>();
|
vmime::platform::setHandler<vmime::platforms::posix::posixHandler>();
|
||||||
|
|
||||||
// GTK+ initialization
|
// GTK+ initialization
|
||||||
gtk_init(&argc, &argv);
|
gtk_init(&argc, &argv);
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include "vmime/charset.hpp"
|
#include "vmime/charset.hpp"
|
||||||
#include "vmime/exception.hpp"
|
#include "vmime/exception.hpp"
|
||||||
#include "vmime/platformDependant.hpp"
|
#include "vmime/platform.hpp"
|
||||||
|
|
||||||
#include "vmime/utility/stringUtils.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()
|
const charset charset::getLocaleCharset()
|
||||||
{
|
{
|
||||||
return (platformDependant::getHandler()->getLocaleCharset());
|
return (platform::getHandler()->getLocaleCharset());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
|
||||||
#include "vmime/dateTime.hpp"
|
#include "vmime/dateTime.hpp"
|
||||||
#include "vmime/platformDependant.hpp"
|
#include "vmime/platform.hpp"
|
||||||
#include "vmime/parserHelpers.hpp"
|
#include "vmime/parserHelpers.hpp"
|
||||||
|
|
||||||
#include "vmime/utility/datetimeUtils.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()
|
const datetime datetime::now()
|
||||||
{
|
{
|
||||||
return (platformDependant::getHandler()->getCurrentLocalTime());
|
return (platform::getHandler()->getCurrentLocalTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -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_handler::~no_platform_handler() throw() {}
|
||||||
no_platform_dependant_handler::no_platform_dependant_handler(const exception& other)
|
no_platform_handler::no_platform_handler(const exception& other)
|
||||||
: exception("No platform-dependant handler installed.", other) {}
|
: exception("No platform handler installed.", other) {}
|
||||||
|
|
||||||
exception* no_platform_dependant_handler::clone() const { return new no_platform_dependant_handler(*this); }
|
exception* no_platform_handler::clone() const { return new no_platform_handler(*this); }
|
||||||
const char* no_platform_dependant_handler::name() const throw() { return "no_platform_dependant_handler"; }
|
const char* no_platform_handler::name() const throw() { return "no_platform_handler"; }
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include "vmime/messageId.hpp"
|
#include "vmime/messageId.hpp"
|
||||||
#include "vmime/utility/random.hpp"
|
#include "vmime/utility/random.hpp"
|
||||||
#include "vmime/platformDependant.hpp"
|
#include "vmime/platform.hpp"
|
||||||
#include "vmime/parserHelpers.hpp"
|
#include "vmime/parserHelpers.hpp"
|
||||||
|
|
||||||
|
|
||||||
@ -220,7 +220,7 @@ messageId messageId::generateId()
|
|||||||
left << std::hex << utility::random::getNext();
|
left << std::hex << utility::random::getNext();
|
||||||
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()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include "vmime/net/imap/IMAPStore.hpp"
|
#include "vmime/net/imap/IMAPStore.hpp"
|
||||||
|
|
||||||
#include "vmime/exception.hpp"
|
#include "vmime/exception.hpp"
|
||||||
#include "vmime/platformDependant.hpp"
|
#include "vmime/platform.hpp"
|
||||||
|
|
||||||
#include "vmime/net/defaultConnectionInfos.hpp"
|
#include "vmime/net/defaultConnectionInfos.hpp"
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#include "vmime/net/imap/IMAPConnection.hpp"
|
#include "vmime/net/imap/IMAPConnection.hpp"
|
||||||
|
|
||||||
#include "vmime/exception.hpp"
|
#include "vmime/exception.hpp"
|
||||||
#include "vmime/platformDependant.hpp"
|
#include "vmime/platform.hpp"
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include "vmime/message.hpp"
|
#include "vmime/message.hpp"
|
||||||
|
|
||||||
#include "vmime/exception.hpp"
|
#include "vmime/exception.hpp"
|
||||||
#include "vmime/platformDependant.hpp"
|
#include "vmime/platform.hpp"
|
||||||
|
|
||||||
|
|
||||||
namespace vmime {
|
namespace vmime {
|
||||||
@ -91,7 +91,7 @@ const int maildirFolder::getFlags()
|
|||||||
{
|
{
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
|
|
||||||
utility::fileSystemFactory* fsf = platformDependant::getHandler()->getFileSystemFactory();
|
utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
|
||||||
|
|
||||||
ref <utility::file> rootDir = fsf->create
|
ref <utility::file> rootDir = fsf->create
|
||||||
(maildirUtils::getFolderFSPath(m_store.acquire(), m_path, maildirUtils::FOLDER_PATH_CONTAINER));
|
(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
|
// Create directory on file system
|
||||||
try
|
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)))
|
if (!fsf->isValidPath(maildirUtils::getFolderFSPath(store, m_path, maildirUtils::FOLDER_PATH_ROOT)))
|
||||||
throw exceptions::invalid_folder_name();
|
throw exceptions::invalid_folder_name();
|
||||||
@ -252,7 +252,7 @@ void maildirFolder::destroy()
|
|||||||
throw exceptions::illegal_state("Folder is open");
|
throw exceptions::illegal_state("Folder is open");
|
||||||
|
|
||||||
// Delete 'folder' and '.folder.directory' directories
|
// Delete 'folder' and '.folder.directory' directories
|
||||||
utility::fileSystemFactory* fsf = platformDependant::getHandler()->getFileSystemFactory();
|
utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
|
||||||
|
|
||||||
ref <utility::file> rootDir = fsf->create
|
ref <utility::file> rootDir = fsf->create
|
||||||
(maildirUtils::getFolderFSPath(store, m_path, maildirUtils::FOLDER_PATH_ROOT));
|
(maildirUtils::getFolderFSPath(store, m_path, maildirUtils::FOLDER_PATH_ROOT));
|
||||||
@ -282,7 +282,7 @@ const bool maildirFolder::exists()
|
|||||||
{
|
{
|
||||||
ref <maildirStore> store = m_store.acquire();
|
ref <maildirStore> store = m_store.acquire();
|
||||||
|
|
||||||
utility::fileSystemFactory* fsf = platformDependant::getHandler()->getFileSystemFactory();
|
utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
|
||||||
|
|
||||||
ref <utility::file> rootDir = fsf->create
|
ref <utility::file> rootDir = fsf->create
|
||||||
(maildirUtils::getFolderFSPath(store, m_path, maildirUtils::FOLDER_PATH_ROOT));
|
(maildirUtils::getFolderFSPath(store, m_path, maildirUtils::FOLDER_PATH_ROOT));
|
||||||
@ -316,7 +316,7 @@ void maildirFolder::scanFolder()
|
|||||||
m_messageCount = 0;
|
m_messageCount = 0;
|
||||||
m_unreadMessageCount = 0;
|
m_unreadMessageCount = 0;
|
||||||
|
|
||||||
utility::fileSystemFactory* fsf = platformDependant::getHandler()->getFileSystemFactory();
|
utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
|
||||||
|
|
||||||
utility::file::path newDirPath = maildirUtils::getFolderFSPath
|
utility::file::path newDirPath = maildirUtils::getFolderFSPath
|
||||||
(store, m_path, maildirUtils::FOLDER_PATH_NEW);
|
(store, m_path, maildirUtils::FOLDER_PATH_NEW);
|
||||||
@ -531,7 +531,7 @@ void maildirFolder::listFolders(std::vector <ref <folder> >& list, const bool re
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
utility::fileSystemFactory* fsf = platformDependant::getHandler()->getFileSystemFactory();
|
utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
|
||||||
|
|
||||||
ref <utility::file> rootDir = fsf->create
|
ref <utility::file> rootDir = fsf->create
|
||||||
(maildirUtils::getFolderFSPath(store, m_path,
|
(maildirUtils::getFolderFSPath(store, m_path,
|
||||||
@ -585,7 +585,7 @@ void maildirFolder::rename(const folder::path& newPath)
|
|||||||
throw exceptions::invalid_folder_name();
|
throw exceptions::invalid_folder_name();
|
||||||
|
|
||||||
// Rename the directory on the file system
|
// 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
|
ref <utility::file> rootDir = fsf->create
|
||||||
(maildirUtils::getFolderFSPath(store, m_path, maildirUtils::FOLDER_PATH_ROOT));
|
(maildirUtils::getFolderFSPath(store, m_path, maildirUtils::FOLDER_PATH_ROOT));
|
||||||
@ -872,7 +872,7 @@ void maildirFolder::setMessageFlagsImpl
|
|||||||
{
|
{
|
||||||
ref <maildirStore> store = m_store.acquire();
|
ref <maildirStore> store = m_store.acquire();
|
||||||
|
|
||||||
utility::fileSystemFactory* fsf = platformDependant::getHandler()->getFileSystemFactory();
|
utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
|
||||||
|
|
||||||
utility::file::path curDirPath = maildirUtils::getFolderFSPath
|
utility::file::path curDirPath = maildirUtils::getFolderFSPath
|
||||||
(store, m_path, maildirUtils::FOLDER_PATH_CUR);
|
(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)
|
else if (m_mode == MODE_READ_ONLY)
|
||||||
throw exceptions::illegal_state("Folder is 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
|
utility::file::path tmpDirPath = maildirUtils::getFolderFSPath
|
||||||
(store, m_path, maildirUtils::FOLDER_PATH_TMP);
|
(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::inputStream& is, const utility::stream::size_type size,
|
||||||
utility::progressListener* progress)
|
utility::progressListener* progress)
|
||||||
{
|
{
|
||||||
utility::fileSystemFactory* fsf = platformDependant::getHandler()->getFileSystemFactory();
|
utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
|
||||||
|
|
||||||
ref <utility::file> file = fsf->create(tmpDirPath / filename);
|
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();
|
ref <maildirStore> store = m_store.acquire();
|
||||||
|
|
||||||
utility::fileSystemFactory* fsf = platformDependant::getHandler()->getFileSystemFactory();
|
utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
|
||||||
|
|
||||||
utility::file::path curDirPath = maildirUtils::getFolderFSPath
|
utility::file::path curDirPath = maildirUtils::getFolderFSPath
|
||||||
(store, m_path, maildirUtils::FOLDER_PATH_CUR);
|
(store, m_path, maildirUtils::FOLDER_PATH_CUR);
|
||||||
@ -1305,7 +1305,7 @@ void maildirFolder::expunge()
|
|||||||
else if (m_mode == MODE_READ_ONLY)
|
else if (m_mode == MODE_READ_ONLY)
|
||||||
throw exceptions::illegal_state("Folder is 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
|
utility::file::path curDirPath = maildirUtils::getFolderFSPath
|
||||||
(store, m_path, maildirUtils::FOLDER_PATH_CUR);
|
(store, m_path, maildirUtils::FOLDER_PATH_CUR);
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
#include "vmime/message.hpp"
|
#include "vmime/message.hpp"
|
||||||
|
|
||||||
#include "vmime/exception.hpp"
|
#include "vmime/exception.hpp"
|
||||||
#include "vmime/platformDependant.hpp"
|
#include "vmime/platform.hpp"
|
||||||
|
|
||||||
|
|
||||||
namespace vmime {
|
namespace vmime {
|
||||||
@ -342,7 +342,7 @@ void maildirMessage::extractImpl(utility::outputStream& os, utility::progressLis
|
|||||||
{
|
{
|
||||||
ref <const maildirFolder> folder = m_folder.acquire();
|
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);
|
const utility::file::path path = folder->getMessageFSPath(m_num);
|
||||||
ref <utility::file> file = fsf->create(path);
|
ref <utility::file> file = fsf->create(path);
|
||||||
@ -389,7 +389,7 @@ void maildirMessage::fetchPartHeader(ref <part> p)
|
|||||||
|
|
||||||
ref <maildirPart> mp = p.dynamicCast <maildirPart>();
|
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);
|
const utility::file::path path = folder->getMessageFSPath(m_num);
|
||||||
ref <utility::file> file = fsf->create(path);
|
ref <utility::file> file = fsf->create(path);
|
||||||
@ -426,7 +426,7 @@ void maildirMessage::fetch(ref <maildirFolder> msgFolder, const int options)
|
|||||||
if (folder != msgFolder)
|
if (folder != msgFolder)
|
||||||
throw exceptions::folder_not_found();
|
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);
|
const utility::file::path path = folder->getMessageFSPath(m_num);
|
||||||
ref <utility::file> file = fsf->create(path);
|
ref <utility::file> file = fsf->create(path);
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include "vmime/utility/smartPtr.hpp"
|
#include "vmime/utility/smartPtr.hpp"
|
||||||
|
|
||||||
#include "vmime/exception.hpp"
|
#include "vmime/exception.hpp"
|
||||||
#include "vmime/platformDependant.hpp"
|
#include "vmime/platform.hpp"
|
||||||
|
|
||||||
#include "vmime/net/defaultConnectionInfos.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
|
const bool maildirStore::isValidFolderName(const folder::path::component& name) const
|
||||||
{
|
{
|
||||||
if (!platformDependant::getHandler()->getFileSystemFactory()->isValidPathComponent(name))
|
if (!platform::getHandler()->getFileSystemFactory()->isValidPathComponent(name))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
const string& buf = name.getBuffer();
|
const string& buf = name.getBuffer();
|
||||||
@ -127,7 +127,7 @@ void maildirStore::connect()
|
|||||||
throw exceptions::already_connected();
|
throw exceptions::already_connected();
|
||||||
|
|
||||||
// Get root directory
|
// 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));
|
m_fsPath = fsf->stringToPath(GET_PROPERTY(string, PROPERTY_SERVER_ROOTPATH));
|
||||||
|
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
#include "vmime/utility/random.hpp"
|
#include "vmime/utility/random.hpp"
|
||||||
|
|
||||||
#include "vmime/exception.hpp"
|
#include "vmime/exception.hpp"
|
||||||
#include "vmime/platformDependant.hpp"
|
|
||||||
|
|
||||||
|
|
||||||
namespace vmime {
|
namespace vmime {
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include "vmime/net/pop3/POP3Folder.hpp"
|
#include "vmime/net/pop3/POP3Folder.hpp"
|
||||||
|
|
||||||
#include "vmime/exception.hpp"
|
#include "vmime/exception.hpp"
|
||||||
#include "vmime/platformDependant.hpp"
|
#include "vmime/platform.hpp"
|
||||||
#include "vmime/messageId.hpp"
|
#include "vmime/messageId.hpp"
|
||||||
#include "vmime/security/digest/messageDigestFactory.hpp"
|
#include "vmime/security/digest/messageDigestFactory.hpp"
|
||||||
#include "vmime/utility/filteredStream.hpp"
|
#include "vmime/utility/filteredStream.hpp"
|
||||||
@ -773,7 +773,7 @@ void POP3Store::readResponse(string& buffer, const bool multiLine,
|
|||||||
|
|
||||||
if (receiveBuffer.empty()) // buffer is empty
|
if (receiveBuffer.empty()) // buffer is empty
|
||||||
{
|
{
|
||||||
platformDependant::getHandler()->wait();
|
platform::getHandler()->wait();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -874,7 +874,7 @@ void POP3Store::readResponse(utility::outputStream& os,
|
|||||||
|
|
||||||
if (read == 0) // buffer is empty
|
if (read == 0) // buffer is empty
|
||||||
{
|
{
|
||||||
platformDependant::getHandler()->wait();
|
platform::getHandler()->wait();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include "vmime/net/sendmail/sendmailTransport.hpp"
|
#include "vmime/net/sendmail/sendmailTransport.hpp"
|
||||||
|
|
||||||
#include "vmime/exception.hpp"
|
#include "vmime/exception.hpp"
|
||||||
#include "vmime/platformDependant.hpp"
|
#include "vmime/platform.hpp"
|
||||||
#include "vmime/message.hpp"
|
#include "vmime/message.hpp"
|
||||||
#include "vmime/mailboxList.hpp"
|
#include "vmime/mailboxList.hpp"
|
||||||
|
|
||||||
@ -165,11 +165,11 @@ void sendmailTransport::internalSend
|
|||||||
(const std::vector <string> args, utility::inputStream& is,
|
(const std::vector <string> args, utility::inputStream& is,
|
||||||
const utility::stream::size_type size, utility::progressListener* progress)
|
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);
|
getFileSystemFactory()->stringToPath(m_sendmailPath);
|
||||||
|
|
||||||
ref <utility::childProcess> proc =
|
ref <utility::childProcess> proc =
|
||||||
vmime::platformDependant::getHandler()->
|
vmime::platform::getHandler()->
|
||||||
getChildProcessFactory()->create(path);
|
getChildProcessFactory()->create(path);
|
||||||
|
|
||||||
proc->start(args, utility::childProcess::FLAG_REDIRECT_STDIN);
|
proc->start(args, utility::childProcess::FLAG_REDIRECT_STDIN);
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include "vmime/config.hpp"
|
#include "vmime/config.hpp"
|
||||||
#include "vmime/net/service.hpp"
|
#include "vmime/net/service.hpp"
|
||||||
|
|
||||||
#include "vmime/platformDependant.hpp"
|
#include "vmime/platform.hpp"
|
||||||
|
|
||||||
#if VMIME_HAVE_SASL_SUPPORT
|
#if VMIME_HAVE_SASL_SUPPORT
|
||||||
#include "vmime/security/sasl/defaultSASLAuthenticator.hpp"
|
#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>();
|
m_certVerifier = vmime::create <security::cert::defaultCertificateVerifier>();
|
||||||
#endif // VMIME_HAVE_TLS_SUPPORT
|
#endif // VMIME_HAVE_TLS_SUPPORT
|
||||||
|
|
||||||
m_socketFactory = platformDependant::getHandler()->getSocketFactory();
|
m_socketFactory = platform::getHandler()->getSocketFactory();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include "vmime/net/smtp/SMTPResponse.hpp"
|
#include "vmime/net/smtp/SMTPResponse.hpp"
|
||||||
|
|
||||||
#include "vmime/platformDependant.hpp"
|
#include "vmime/platform.hpp"
|
||||||
#include "vmime/utility/stringUtils.hpp"
|
#include "vmime/utility/stringUtils.hpp"
|
||||||
|
|
||||||
#include "vmime/net/socket.hpp"
|
#include "vmime/net/socket.hpp"
|
||||||
@ -146,7 +146,7 @@ const string SMTPResponse::readResponseLine()
|
|||||||
|
|
||||||
if (receiveBuffer.empty()) // buffer is empty
|
if (receiveBuffer.empty()) // buffer is empty
|
||||||
{
|
{
|
||||||
platformDependant::getHandler()->wait();
|
platform::getHandler()->wait();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include "vmime/net/smtp/SMTPResponse.hpp"
|
#include "vmime/net/smtp/SMTPResponse.hpp"
|
||||||
|
|
||||||
#include "vmime/exception.hpp"
|
#include "vmime/exception.hpp"
|
||||||
#include "vmime/platformDependant.hpp"
|
#include "vmime/platform.hpp"
|
||||||
#include "vmime/encoderB64.hpp"
|
#include "vmime/encoderB64.hpp"
|
||||||
#include "vmime/mailboxList.hpp"
|
#include "vmime/mailboxList.hpp"
|
||||||
|
|
||||||
@ -189,7 +189,7 @@ void SMTPTransport::helo()
|
|||||||
// S: 250-smtp.theserver.com
|
// S: 250-smtp.theserver.com
|
||||||
// S: 250 AUTH CRAM-MD5 DIGEST-MD5
|
// S: 250 AUTH CRAM-MD5 DIGEST-MD5
|
||||||
|
|
||||||
sendRequest("EHLO " + platformDependant::getHandler()->getHostName());
|
sendRequest("EHLO " + platform::getHandler()->getHostName());
|
||||||
|
|
||||||
ref <SMTPResponse> resp;
|
ref <SMTPResponse> resp;
|
||||||
|
|
||||||
@ -200,7 +200,7 @@ void SMTPTransport::helo()
|
|||||||
// eg: C: HELO thismachine.ourdomain.com
|
// eg: C: HELO thismachine.ourdomain.com
|
||||||
// S: 250 OK
|
// S: 250 OK
|
||||||
|
|
||||||
sendRequest("HELO " + platformDependant::getHandler()->getHostName());
|
sendRequest("HELO " + platform::getHandler()->getHostName());
|
||||||
|
|
||||||
if ((resp = readResponse())->getCode() != 250)
|
if ((resp = readResponse())->getCode() != 250)
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include "vmime/net/tls/TLSSocket.hpp"
|
#include "vmime/net/tls/TLSSocket.hpp"
|
||||||
#include "vmime/net/tls/TLSSession.hpp"
|
#include "vmime/net/tls/TLSSession.hpp"
|
||||||
|
|
||||||
#include "vmime/platformDependant.hpp"
|
#include "vmime/platform.hpp"
|
||||||
|
|
||||||
#include "vmime/security/cert/X509Certificate.hpp"
|
#include "vmime/security/cert/X509Certificate.hpp"
|
||||||
|
|
||||||
@ -159,7 +159,7 @@ void TLSSocket::handshake(ref <timeoutHandler> toHandler)
|
|||||||
ret == GNUTLS_E_INTERRUPTED)
|
ret == GNUTLS_E_INTERRUPTED)
|
||||||
{
|
{
|
||||||
// Non-fatal error
|
// Non-fatal error
|
||||||
platformDependant::getHandler()->wait();
|
platform::getHandler()->wait();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -240,7 +240,7 @@ ssize_t TLSSocket::gnutlsPullFunc
|
|||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
{
|
{
|
||||||
// No data available yet
|
// No data available yet
|
||||||
platformDependant::getHandler()->wait();
|
platform::getHandler()->wait();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -21,17 +21,17 @@
|
|||||||
// the GNU General Public License cover the whole combination.
|
// the GNU General Public License cover the whole combination.
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "vmime/platformDependant.hpp"
|
#include "vmime/platform.hpp"
|
||||||
|
|
||||||
|
|
||||||
namespace vmime
|
namespace vmime
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
ref <platformDependant::handler> platformDependant::sm_handler = NULL;
|
ref <platform::handler> platform::sm_handler = NULL;
|
||||||
|
|
||||||
|
|
||||||
platformDependant::handler::~handler()
|
platform::handler::~handler()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
@ -259,7 +259,7 @@ void posixSocket::sendRaw(const char* buffer, const int count)
|
|||||||
if (errno != EAGAIN)
|
if (errno != EAGAIN)
|
||||||
throwSocketError(errno);
|
throwSocketError(errno);
|
||||||
|
|
||||||
platformDependant::getHandler()->wait();
|
platform::getHandler()->wait();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include "vmime/net/service.hpp"
|
#include "vmime/net/service.hpp"
|
||||||
|
|
||||||
#include "vmime/platformDependant.hpp"
|
#include "vmime/platform.hpp"
|
||||||
|
|
||||||
|
|
||||||
namespace vmime {
|
namespace vmime {
|
||||||
@ -72,13 +72,13 @@ const string defaultAuthenticator::getPassword() const
|
|||||||
|
|
||||||
const string defaultAuthenticator::getHostname() const
|
const string defaultAuthenticator::getHostname() const
|
||||||
{
|
{
|
||||||
return platformDependant::getHandler()->getHostName();
|
return platform::getHandler()->getHostName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const string defaultAuthenticator::getAnonymousToken() const
|
const string defaultAuthenticator::getAnonymousToken() const
|
||||||
{
|
{
|
||||||
return "anonymous@" + platformDependant::getHandler()->getHostName();
|
return "anonymous@" + platform::getHandler()->getHostName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#include "vmime/utility/random.hpp"
|
#include "vmime/utility/random.hpp"
|
||||||
#include "vmime/platformDependant.hpp"
|
#include "vmime/platform.hpp"
|
||||||
|
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
|
|
||||||
@ -45,13 +45,13 @@ const unsigned int random::getNext()
|
|||||||
|
|
||||||
const unsigned int random::getTime()
|
const unsigned int random::getTime()
|
||||||
{
|
{
|
||||||
return (platformDependant::getHandler()->getUnixTime());
|
return (platform::getHandler()->getUnixTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const unsigned int random::getProcess()
|
const unsigned int random::getProcess()
|
||||||
{
|
{
|
||||||
return (platformDependant::getHandler()->getProcessId());
|
return (platform::getHandler()->getProcessId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
// VMime initialization
|
// VMime initialization
|
||||||
vmime::platformDependant::setHandler<vmime::platforms::posix::posixHandler>();
|
vmime::platform::setHandler<vmime::platforms::posix::posixHandler>();
|
||||||
|
|
||||||
|
|
||||||
const vmime::string from(argv[1]);
|
const vmime::string from(argv[1]);
|
||||||
|
@ -194,7 +194,7 @@ void registerTestModule(const char* name_)
|
|||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
// VMime initialization
|
// VMime initialization
|
||||||
vmime::platformDependant::setHandler<vmime::platforms::posix::posixHandler>();
|
vmime::platform::setHandler<vmime::platforms::posix::posixHandler>();
|
||||||
|
|
||||||
// Parse arguments
|
// Parse arguments
|
||||||
bool xmlOutput = false;
|
bool xmlOutput = false;
|
||||||
|
@ -158,13 +158,13 @@ testTimeoutHandler::testTimeoutHandler(const unsigned int delay)
|
|||||||
|
|
||||||
const bool testTimeoutHandler::isTimeOut()
|
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()
|
void testTimeoutHandler::resetTimeOut()
|
||||||
{
|
{
|
||||||
m_start = vmime::platformDependant::getHandler()->getUnixTime();
|
m_start = vmime::platform::getHandler()->getUnixTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ public:
|
|||||||
|
|
||||||
/** Returns the default charset used on the system.
|
/** 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.
|
* and is provided for convenience.
|
||||||
*
|
*
|
||||||
* @return system default charset
|
* @return system default charset
|
||||||
|
@ -248,12 +248,12 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class no_platform_dependant_handler : public vmime::exception
|
class no_platform_handler : public vmime::exception
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
no_platform_dependant_handler(const exception& other = NO_EXCEPTION);
|
no_platform_handler(const exception& other = NO_EXCEPTION);
|
||||||
~no_platform_dependant_handler() throw();
|
~no_platform_handler() throw();
|
||||||
|
|
||||||
exception* clone() const;
|
exception* clone() const;
|
||||||
const char* name() const throw();
|
const char* name() const throw();
|
||||||
@ -655,16 +655,16 @@ public:
|
|||||||
~command_error() throw();
|
~command_error() throw();
|
||||||
|
|
||||||
/** Return the name of the command which have thrown the exception.
|
/** 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;
|
const string& command() const;
|
||||||
|
|
||||||
/** Return the invalid response line.
|
/** 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;
|
const string& response() const;
|
||||||
|
|
||||||
@ -689,16 +689,16 @@ public:
|
|||||||
~invalid_response() throw();
|
~invalid_response() throw();
|
||||||
|
|
||||||
/** Return the name of the command which have thrown the exception.
|
/** 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;
|
const string& command() const;
|
||||||
|
|
||||||
/** Return the invalid response line.
|
/** 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;
|
const string& response() const;
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
#include "vmime/encoderB64.hpp"
|
#include "vmime/encoderB64.hpp"
|
||||||
#include "vmime/encoderQP.hpp"
|
#include "vmime/encoderQP.hpp"
|
||||||
|
|
||||||
#include "vmime/platformDependant.hpp"
|
#include "vmime/platform.hpp"
|
||||||
|
|
||||||
#include "vmime/net/timeoutHandler.hpp"
|
#include "vmime/net/timeoutHandler.hpp"
|
||||||
#include "vmime/net/socket.hpp"
|
#include "vmime/net/socket.hpp"
|
||||||
@ -5092,7 +5092,7 @@ public:
|
|||||||
|
|
||||||
if (receiveBuffer.empty()) // buffer is empty
|
if (receiveBuffer.empty()) // buffer is empty
|
||||||
{
|
{
|
||||||
platformDependant::getHandler()->wait();
|
platform::getHandler()->wait();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5151,7 +5151,7 @@ public:
|
|||||||
|
|
||||||
if (receiveBuffer.empty()) // buffer is empty
|
if (receiveBuffer.empty()) // buffer is empty
|
||||||
{
|
{
|
||||||
platformDependant::getHandler()->wait();
|
platform::getHandler()->wait();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,14 +46,14 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/** Return the default folder. This is protocol dependant
|
/** Return the default folder. This is protocol dependent
|
||||||
* and usually is the INBOX folder.
|
* and usually is the INBOX folder.
|
||||||
*
|
*
|
||||||
* @return default folder
|
* @return default folder
|
||||||
*/
|
*/
|
||||||
virtual ref <folder> getDefaultFolder() = 0;
|
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.
|
* and usually is the user's mail drop root folder.
|
||||||
*
|
*
|
||||||
* @return root folder
|
* @return root folder
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
// the GNU General Public License cover the whole combination.
|
// the GNU General Public License cover the whole combination.
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifndef VMIME_PLATFORMDEPENDANT_HPP_INCLUDED
|
#ifndef VMIME_PLATFORM_HPP_INCLUDED
|
||||||
#define VMIME_PLATFORMDEPENDANT_HPP_INCLUDED
|
#define VMIME_PLATFORM_HPP_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#include "vmime/config.hpp"
|
#include "vmime/config.hpp"
|
||||||
@ -48,12 +48,12 @@ namespace vmime
|
|||||||
/** Allow setting or getting the current platform handler.
|
/** Allow setting or getting the current platform handler.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class platformDependant
|
class platform
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/** Handles all platform-dependant operations. It offers an interface to
|
/** Handles all platform-dependent operations. It offers an interface to
|
||||||
* access platform-dependant objects: sockets, date/time, file system, etc.
|
* access platform-dependent objects: sockets, date/time, file system, etc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class handler : public object
|
class handler : public object
|
||||||
@ -138,7 +138,7 @@ public:
|
|||||||
static ref <const handler> getHandler()
|
static ref <const handler> getHandler()
|
||||||
{
|
{
|
||||||
if (!sm_handler)
|
if (!sm_handler)
|
||||||
throw exceptions::no_platform_dependant_handler();
|
throw exceptions::no_platform_handler();
|
||||||
|
|
||||||
return (sm_handler);
|
return (sm_handler);
|
||||||
}
|
}
|
||||||
@ -149,7 +149,12 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/** Compatibility with older versions of VMime (before 0.8.1). */
|
||||||
|
typedef platform platformDependant;
|
||||||
|
|
||||||
|
|
||||||
} // vmime
|
} // vmime
|
||||||
|
|
||||||
|
|
||||||
#endif // VMIME_PLATFORMDEPENDANT_HPP_INCLUDED
|
#endif // VMIME_PLATFORM_HPP_INCLUDED
|
||||||
|
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "vmime/config.hpp"
|
#include "vmime/config.hpp"
|
||||||
#include "vmime/platformDependant.hpp"
|
#include "vmime/platform.hpp"
|
||||||
|
|
||||||
#if VMIME_HAVE_MESSAGING_FEATURES
|
#if VMIME_HAVE_MESSAGING_FEATURES
|
||||||
#include "vmime/platforms/posix/posixSocket.hpp"
|
#include "vmime/platforms/posix/posixSocket.hpp"
|
||||||
@ -43,7 +43,7 @@ namespace platforms {
|
|||||||
namespace posix {
|
namespace posix {
|
||||||
|
|
||||||
|
|
||||||
class posixHandler : public vmime::platformDependant::handler
|
class posixHandler : public vmime::platform::handler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "vmime/config.hpp"
|
#include "vmime/config.hpp"
|
||||||
#include "vmime/platformDependant.hpp"
|
#include "vmime/platform.hpp"
|
||||||
|
|
||||||
#if VMIME_HAVE_MESSAGING_FEATURES
|
#if VMIME_HAVE_MESSAGING_FEATURES
|
||||||
#include "vmime/platforms/windows/windowsSocket.hpp"
|
#include "vmime/platforms/windows/windowsSocket.hpp"
|
||||||
@ -42,7 +42,7 @@ namespace platforms {
|
|||||||
namespace windows {
|
namespace windows {
|
||||||
|
|
||||||
|
|
||||||
class windowsHandler : public vmime::platformDependant::handler
|
class windowsHandler : public vmime::platform::handler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -229,12 +229,12 @@ public:
|
|||||||
|
|
||||||
/** Parse a path contained in a string.
|
/** 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)
|
* @return path object (abstract representation)
|
||||||
*/
|
*/
|
||||||
virtual const file::path stringToPath(const string& str) const = 0;
|
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
|
* @param path abstract representation of the path
|
||||||
* @return string representation of the path
|
* @return string representation of the path
|
||||||
|
@ -43,7 +43,7 @@ public:
|
|||||||
|
|
||||||
/** Allow the caller object to cancel the current operation.
|
/** 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.
|
* may not be supported by the notifier object.
|
||||||
*
|
*
|
||||||
* @return true to cancel the operation, false otherwise
|
* @return true to cancel the operation, false otherwise
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
#include "vmime/base.hpp"
|
#include "vmime/base.hpp"
|
||||||
#include "vmime/exception.hpp"
|
#include "vmime/exception.hpp"
|
||||||
#include "vmime/options.hpp"
|
#include "vmime/options.hpp"
|
||||||
#include "vmime/platformDependant.hpp"
|
#include "vmime/platform.hpp"
|
||||||
|
|
||||||
// Base components
|
// Base components
|
||||||
#include "vmime/dateTime.hpp"
|
#include "vmime/dateTime.hpp"
|
||||||
|
Loading…
Reference in New Issue
Block a user