summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <mollekopf@kolabsys.com>2013-10-29 11:29:43 (GMT)
committerChristian Mollekopf <mollekopf@kolabsys.com>2013-10-29 11:29:43 (GMT)
commit8633cb924911d78649048b7744d8e0ba69f3caf7 (patch)
treed02285893af5b704b3e39f4af1be4e88d70f427d
parent5562d0deff67330dc3c1e3d4b549c9f325784893 (diff)
downloadlibkolab-8633cb924911d78649048b7744d8e0ba69f3caf7.tar.gz
Added definitions for files and ensured that the files folder is recognized as kolab folder.
-rw-r--r--kolabformat/formathelpers.cpp8
-rw-r--r--kolabformat/formathelpers.h1
-rw-r--r--kolabformat/kolabdefinitions.h2
3 files changed, 10 insertions, 1 deletions
diff --git a/kolabformat/formathelpers.cpp b/kolabformat/formathelpers.cpp
index 4984365..bb7f633 100644
--- a/kolabformat/formathelpers.cpp
+++ b/kolabformat/formathelpers.cpp
@@ -15,7 +15,8 @@ static const struct {
{ KOLAB_FOLDER_TYPE_JOURNAL, I18N_NOOP( "Journal" ) },
{ KOLAB_FOLDER_TYPE_NOTE, I18N_NOOP( "Notes" ) },
{ KOLAB_FOLDER_TYPE_CONFIGURATION, I18N_NOOP( "Configuration" ) },
- { KOLAB_FOLDER_TYPE_FREEBUSY, I18N_NOOP( "Freebusy" ) }
+ { KOLAB_FOLDER_TYPE_FREEBUSY, I18N_NOOP( "Freebusy" ) },
+ { KOLAB_FOLDER_TYPE_FILE, I18N_NOOP( "File" ) }
};
static const int numFolderTypeData = sizeof folderTypeData / sizeof *folderTypeData;
@@ -66,6 +67,11 @@ FolderType folderTypeFromString(const std::string& folderTypeName)
return FreebusyType;
}
+ if ( folderTypeName == KOLAB_FOLDER_TYPE_FILE ||
+ folderTypeName == KOLAB_FOLDER_TYPE_FILE KOLAB_FOLDER_TYPE_DEFAULT_SUFFIX ) {
+ return FileType;
+ }
+
return MailType;
}
diff --git a/kolabformat/formathelpers.h b/kolabformat/formathelpers.h
index 9334927..08a1fd4 100644
--- a/kolabformat/formathelpers.h
+++ b/kolabformat/formathelpers.h
@@ -16,6 +16,7 @@ enum FolderType {
NoteType,
ConfigurationType,
FreebusyType,
+ FileType,
LastType
};
diff --git a/kolabformat/kolabdefinitions.h b/kolabformat/kolabdefinitions.h
index 0fc8307..4169aa1 100644
--- a/kolabformat/kolabdefinitions.h
+++ b/kolabformat/kolabdefinitions.h
@@ -28,6 +28,7 @@ namespace Kolab {
#define KOLAB_FOLDER_TYPE_NOTE "note"
#define KOLAB_FOLDER_TYPE_CONFIGURATION "configuration"
#define KOLAB_FOLDER_TYPE_FREEBUSY "freebusy"
+#define KOLAB_FOLDER_TYPE_FILE "file"
#define KOLAB_FOLDER_TYPE_DEFAULT_SUFFIX ".default"
#define KOLAB_FOLDER_TYPE_DRAFT_SUFFIX ".drafts"
@@ -60,6 +61,7 @@ namespace Kolab {
#define KOLAB_TYPE_CONFIGURATION "application/x-vnd.kolab.configuration"
#define KOLAB_TYPE_DICT "application/x-vnd.kolab.configuration.dictionary"
#define KOLAB_TYPE_FREEBUSY "application/x-vnd.kolab.freebusy"
+#define KOLAB_TYPE_FILE "application/x-vnd.kolab.file"
enum Version {
KolabV2,