summaryrefslogtreecommitdiff
path: root/kolabformat/formathelpers.h
blob: 08a1fd4181a5239b24c912565bfb8cf5f51c780e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

#ifndef FORMATHELPERS_H
#define FORMATHELPERS_H

#include <kolab_export.h>
#include <string>

namespace Kolab {
    
enum FolderType {
    MailType = 0,
    ContactType,
    EventType,
    TaskType,
    JournalType,
    NoteType,
    ConfigurationType,
    FreebusyType,
    FileType,
    LastType
};

/**
 * Returns the FolderType from a KOLAB_FOLDER_TYPE_* folder type string
 */
KOLAB_EXPORT FolderType folderTypeFromString( const std::string &folderTypeName );
/**
 * Returns the annotation string for a folder
 */
KOLAB_EXPORT std::string folderAnnotation( FolderType type, bool isDefault = false );
/**
 * Guesses the folder type from a user visible string
 */
KOLAB_EXPORT FolderType guessFolderTypeFromName( const std::string &name );

/**
 * Returns a folder name for a type
 */
KOLAB_EXPORT std::string nameForFolderType( FolderType type );

}

#endif