File indexing completed on 2024-11-24 04:44:12
0001 /* 0002 * SPDX-FileCopyrightText: 2012 Christian Mollekopf <mollekopf@kolabsys.com> 0003 * 0004 * SPDX-License-Identifier: LGPL-3.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "kolab_export.h" 0010 #include <string> 0011 0012 namespace Kolab 0013 { 0014 enum FolderType { 0015 MailType = 0, 0016 ContactType, 0017 EventType, 0018 TaskType, 0019 JournalType, 0020 NoteType, 0021 ConfigurationType, 0022 FreebusyType, 0023 FileType, 0024 LastType, 0025 }; 0026 0027 /** 0028 * Returns the FolderType from a KOLAB_FOLDER_TYPE_* folder type string 0029 */ 0030 KOLAB_EXPORT FolderType folderTypeFromString(const std::string &folderTypeName); 0031 /** 0032 * Returns the annotation string for a folder 0033 */ 0034 KOLAB_EXPORT std::string folderAnnotation(FolderType type, bool isDefault = false); 0035 /** 0036 * Guesses the folder type from a user visible string 0037 */ 0038 KOLAB_EXPORT FolderType guessFolderTypeFromName(const std::string &name); 0039 0040 /** 0041 * Returns a folder name for a type 0042 */ 0043 KOLAB_EXPORT std::string nameForFolderType(FolderType type); 0044 }