|
VMime
|
#include <courierMaildirFormat.hpp>


Public Member Functions | |
| courierMaildirFormat (shared_ptr< context > ctx) | |
| const string | getName () const |
| void | createFolder (const folder::path &path) |
| void | destroyFolder (const folder::path &path) |
| void | renameFolder (const folder::path &oldPath, const folder::path &newPath) |
| bool | folderExists (const folder::path &path) const |
| bool | folderHasSubfolders (const folder::path &path) const |
| const utility::file::path | folderPathToFileSystemPath (const folder::path &path, const DirectoryType type) const |
| const std::vector< folder::path > | listFolders (const folder::path &root, const bool recursive) const |
Protected Member Functions | |
| bool | supports () const |
| void | renameFolderImpl (const folder::path &oldPath, const folder::path &newPath) |
| bool | listDirectories (const folder::path &root, std::vector< string > &dirs, const bool onlyTestForExistence) const |
Protected Member Functions inherited from maildirFormat | |
| maildirFormat (shared_ptr< context > ctx) | |
| shared_ptr< context > | getContext () |
| shared_ptr< const context > | getContext () const |
Protected Member Functions inherited from object | |
| object () | |
| object (const object &) | |
| object & | operator= (const object &) |
| virtual | ~object () |
Static Protected Member Functions | |
| static const string | toModifiedUTF7 (const folder::path::component &text) |
| static const folder::path::component | fromModifiedUTF7 (const string &text) |
| static bool | isSubfolderDirectory (const utility::file &file) |
Additional Inherited Members | |
Public Types inherited from maildirFormat | |
| enum | DirectoryType { ROOT_DIRECTORY , NEW_DIRECTORY , CUR_DIRECTORY , TMP_DIRECTORY , CONTAINER_DIRECTORY } |
Static Public Member Functions inherited from maildirFormat | |
| static shared_ptr< maildirFormat > | detect (shared_ptr< maildirStore > store) |
Static Protected Attributes inherited from maildirFormat | |
| static const utility::file::path::component | TMP_DIR |
| static const utility::file::path::component | CUR_DIR |
| static const utility::file::path::component | NEW_DIR |
Reads Courier/QMail Maildir format.
| courierMaildirFormat | ( | shared_ptr< context > | ctx | ) |
|
virtual |
Create the specified folder.
| path | virtual path of the folder |
| exceptions::filesystem_exception,invalid_folder_name |
Implements maildirFormat.
References maildirFormat::CUR_DIRECTORY, vmime::dynamicCast(), courierMaildirFormat::folderPathToFileSystemPath(), platform::getHandler(), maildirFormat::NEW_DIRECTORY, maildirFormat::ROOT_DIRECTORY, and maildirFormat::TMP_DIRECTORY.
|
virtual |
Destroy the specified folder.
| path | virtual path of the folder |
| exceptions::filesystem_exception |
Implements maildirFormat.
References vmime::dynamicCast(), courierMaildirFormat::folderPathToFileSystemPath(), platform::getHandler(), courierMaildirFormat::listFolders(), and maildirFormat::ROOT_DIRECTORY.
|
virtual |
Test whether the specified folder exists.
| path | virtual path of the folder |
Implements maildirFormat.
References maildirFormat::CUR_DIRECTORY, vmime::dynamicCast(), courierMaildirFormat::folderPathToFileSystemPath(), platform::getHandler(), maildirFormat::NEW_DIRECTORY, maildirFormat::ROOT_DIRECTORY, and maildirFormat::TMP_DIRECTORY.
|
virtual |
Test whether the specified folder has subfolders.
| path | virtual path of the folder |
Implements maildirFormat.
References vmime::dynamicCast(), and courierMaildirFormat::listDirectories().
|
virtual |
Returns the directory which represents the specified folder on the file system.
| path | virtual path of the folder |
| type | type of directory to return |
Implements maildirFormat.
References maildirFormat::CONTAINER_DIRECTORY, maildirFormat::CUR_DIR, maildirFormat::CUR_DIRECTORY, vmime::dynamicCast(), maildirFormat::getContext(), maildirFormat::NEW_DIR, maildirFormat::NEW_DIRECTORY, maildirFormat::ROOT_DIRECTORY, maildirFormat::TMP_DIR, maildirFormat::TMP_DIRECTORY, and courierMaildirFormat::toModifiedUTF7().
Referenced by courierMaildirFormat::createFolder(), courierMaildirFormat::destroyFolder(), courierMaildirFormat::folderExists(), and courierMaildirFormat::renameFolderImpl().
|
staticprotected |
References charset::convert(), vmime::dynamicCast(), vmime::charsets::UTF_7, and vmime::charsets::UTF_8.
Referenced by courierMaildirFormat::listFolders().
|
staticprotected |
Test whether the specified file system directory corresponds to a maildir subfolder.
The name of the directory should start with a '.' to be listed as a subfolder.
| file | reference to a file system directory |
References word::getBuffer(), file::getFullPath(), path::getLastComponent(), and file::isDirectory().
Referenced by courierMaildirFormat::listDirectories(), and courierMaildirFormat::supports().
|
protected |
List directories corresponding to folders which are (direct or indirect) children of specified folder.
| root | root folder |
| dirs | list in which found directories will be added |
| onlyTestForExistence | if true, the function returns as soon as the first directory is found |
References vmime::dynamicCast(), maildirFormat::getContext(), platform::getHandler(), courierMaildirFormat::isSubfolderDirectory(), and courierMaildirFormat::toModifiedUTF7().
Referenced by courierMaildirFormat::folderHasSubfolders(), and courierMaildirFormat::listFolders().
|
virtual |
List subfolders in the specified folder.
| root | root folder in which to start the search |
| recursive | if set to true, all the descendant are returned; if set to false, only direct children are returned. |
Implements maildirFormat.
References vmime::dynamicCast(), courierMaildirFormat::fromModifiedUTF7(), and courierMaildirFormat::listDirectories().
Referenced by courierMaildirFormat::destroyFolder(), and courierMaildirFormat::renameFolder().
|
virtual |
Rename the specified folder.
| oldPath | old virtual path of the folder |
| newPath | new virtual path of the folder |
| exceptions::filesystem_exception |
Implements maildirFormat.
References vmime::dynamicCast(), courierMaildirFormat::listFolders(), courierMaildirFormat::renameFolderImpl(), and path::renameParent().
|
protected |
|
protectedvirtual |
Quick checks whether this implementation can read the Maildir format in the specified directory.
Implements maildirFormat.
References vmime::dynamicCast(), maildirFormat::getContext(), platform::getHandler(), and courierMaildirFormat::isSubfolderDirectory().
|
staticprotected |
References vmime::dynamicCast(), text::getConvertedText(), and vmime::charsets::UTF_7.
Referenced by courierMaildirFormat::folderPathToFileSystemPath(), and courierMaildirFormat::listDirectories().