Modify flora license version.
[platform/core/messaging/msg-service.git] / vobject-engine / include / VTypes.h
1 /*
2 * Copyright 2012-2013  Samsung Electronics Co., Ltd
3 *
4 * Licensed under the Flora License, Version 1.1 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *    http://floralicense.org/license/
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #ifndef _VTYPES_H
18 #define _VTYPES_H
19
20 #include "stdio.h"
21 #include "stdbool.h"
22 #include "stdlib.h"
23 #include "string.h"
24 #include "ctype.h"
25
26 #ifndef SLPAPI
27 #define SLPAPI __attribute__ ((visibility("default")))
28 #endif
29
30 #define CR                              0x0d
31 #define LF                              0x0a
32 #define TAB                             0x09
33 #define WSP                             0x20
34 #define UNKNOWN_NAME    0x80000000
35
36 #define VCARD                   0x01
37 #define VCALENDAR               0x02
38 #define VNOTE 0x0b
39
40 #define VEVENT                  0x03
41 #define VTODO                   0x04
42 #define VJOURNAL                0x05
43 #define VFREEBUSY               0x06
44 #define VTIMEZONE               0x07
45 #define VALARM                  0x08
46 #define VMESSAGE                0x0c
47 #define VBODY                   0X0d
48 #define STANDARD                0x09
49 #define DAYLIGHT                0x0a
50
51 #define VTYPE_TOKEN_SEMICOLON           ';'
52 #define VTYPE_TOKEN_COLON                       ':'
53 #define VTYPE_TOKEN_EQUAL                       '='
54 #define VTYPE_TOKEN_COMMA                       ','
55 #define VTYPE_TOKEN_DOT                         '.'
56 #define VTYPE_TOKEN_QUOTE                       '\''
57 #define VTYPE_TOKEN_DBLQUOTE            '"'
58
59 #define VDATA_VALUE_COUNT_MAX   2000
60
61 #ifdef __cplusplus
62 extern "C" {
63 #endif /* __cplusplus */
64
65
66 /****************************************************************************************************/
67 /*                                                                       GLOBAL STRUCTURE DECLARATION                                                                   */
68 /****************************************************************************************************/
69
70 typedef struct _VParam VParam;
71 typedef struct _VObject VObject;
72 typedef struct _ValueObj ValueObj;
73 typedef struct _VTree VTree;
74
75 struct _VTree
76 {
77         int                     treeType;
78         VObject*        pTop;
79         VObject*        pCur;
80         VTree*          pNext;
81 };
82
83 struct _VParam
84 {
85         int                     parameter;
86         int                     paramValue;
87         VParam*         pNext;
88 };
89
90 struct _VObject
91 {
92         int                     property;
93         VParam*         pParam;
94         int                     valueCount;
95         int                     numOfBiData;
96         char*           pszValue[VDATA_VALUE_COUNT_MAX];
97         VObject*        pSibling;
98         VObject*        pParent;
99         VObject*        pChild;
100
101         char*           pszGroupName; //VDATA_GROUPNAME_SUPPORTED
102 };
103
104 struct _ValueObj
105 {
106         char*           szName;
107         int                     flag;
108 };
109
110 #ifdef __cplusplus
111 }
112 #endif /* __cplusplus */
113
114
115 #endif // _VTYPES_H