Added store::isValidFolderName().

This commit is contained in:
Vincent Richard 2004-12-16 21:38:47 +00:00
parent 34871eb231
commit a623155270
7 changed files with 32 additions and 0 deletions

View File

@ -125,6 +125,12 @@ folder* IMAPStore::getFolder(const folder::path& path)
}
const bool IMAPStore::isValidFolderName(const folder::path::component& /* name */)
{
return true;
}
void IMAPStore::connect()
{
if (isConnected())

View File

@ -57,6 +57,8 @@ public:
folder* getRootFolder();
folder* getFolder(const folder::path& path);
const bool isValidFolderName(const folder::path::component& name);
static const serviceInfos& getInfosInstance();
const serviceInfos& getInfos() const;

View File

@ -82,6 +82,12 @@ folder* POP3Store::getFolder(const folder::path& path)
}
const bool POP3Store::isValidFolderName(const folder::path::component& /* name */)
{
return true;
}
void POP3Store::connect()
{
if (isConnected())

View File

@ -51,6 +51,8 @@ public:
folder* getRootFolder();
folder* getFolder(const folder::path& path);
const bool isValidFolderName(const folder::path::component& name);
static const serviceInfos& getInfosInstance();
const serviceInfos& getInfos() const;

View File

@ -75,6 +75,13 @@ folder* maildirStore::getFolder(const folder::path& path)
}
const bool maildirStore::isValidFolderName(const folder::path::component& name)
{
return (platformDependant::getHandler()->
getFileSystemFactory()->isValidPathComponent(name));
}
void maildirStore::connect()
{
if (isConnected())

View File

@ -56,6 +56,8 @@ public:
folder* getRootFolder();
folder* getFolder(const folder::path& path);
const bool isValidFolderName(const folder::path::component& name);
static const serviceInfos& getInfosInstance();
const serviceInfos& getInfos() const;

View File

@ -63,6 +63,13 @@ public:
*/
virtual folder* getFolder(const folder::path& path) = 0;
/** Test whether the specified folder name is a syntactically
* a valid name.
*
* @return true if the specified folder name is valid, false otherwise
*/
virtual const bool isValidFolderName(const folder::path::component& name) = 0;
const Type getType() const { return (TYPE_STORE); }
};