aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/messaging/IMAPStore.cpp6
-rw-r--r--src/messaging/IMAPStore.hpp2
-rw-r--r--src/messaging/POP3Store.cpp6
-rw-r--r--src/messaging/POP3Store.hpp2
-rw-r--r--src/messaging/maildirStore.cpp7
-rw-r--r--src/messaging/maildirStore.hpp2
-rw-r--r--src/messaging/store.hpp7
7 files changed, 32 insertions, 0 deletions
diff --git a/src/messaging/IMAPStore.cpp b/src/messaging/IMAPStore.cpp
index bf15b705..5e208db4 100644
--- a/src/messaging/IMAPStore.cpp
+++ b/src/messaging/IMAPStore.cpp
@@ -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())
diff --git a/src/messaging/IMAPStore.hpp b/src/messaging/IMAPStore.hpp
index 67145896..b79967f9 100644
--- a/src/messaging/IMAPStore.hpp
+++ b/src/messaging/IMAPStore.hpp
@@ -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;
diff --git a/src/messaging/POP3Store.cpp b/src/messaging/POP3Store.cpp
index 6d762997..0bc3b6a5 100644
--- a/src/messaging/POP3Store.cpp
+++ b/src/messaging/POP3Store.cpp
@@ -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())
diff --git a/src/messaging/POP3Store.hpp b/src/messaging/POP3Store.hpp
index ae0f9fd4..d91f0d69 100644
--- a/src/messaging/POP3Store.hpp
+++ b/src/messaging/POP3Store.hpp
@@ -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;
diff --git a/src/messaging/maildirStore.cpp b/src/messaging/maildirStore.cpp
index e4df0e68..60cac982 100644
--- a/src/messaging/maildirStore.cpp
+++ b/src/messaging/maildirStore.cpp
@@ -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())
diff --git a/src/messaging/maildirStore.hpp b/src/messaging/maildirStore.hpp
index b1a56329..4c7db7dc 100644
--- a/src/messaging/maildirStore.hpp
+++ b/src/messaging/maildirStore.hpp
@@ -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;
diff --git a/src/messaging/store.hpp b/src/messaging/store.hpp
index 43890977..c692ba19 100644
--- a/src/messaging/store.hpp
+++ b/src/messaging/store.hpp
@@ -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); }
};