2 * Copyright 2012 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.0 (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
8 * http://www.tizenopensource.org/license
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.
22 #endif /* __cplusplus */
26 /****************************************************************************************************/
27 /* ENUMERATION DECLARATION */
28 /****************************************************************************************************/
32 * This enumeration defines the property of vcard.
36 VCARD_TYPE_ADR, /**<This is address of vcard. */
37 VCARD_TYPE_AGENT, /**<This is agent of vcard. */
38 VCARD_TYPE_BDAY, /**<This is bday of vcard. */
39 VCARD_TYPE_BEGIN, /**<This is begin of vcard. */
40 VCARD_TYPE_CATEGORIES, /**<This is categories of vcard. */
41 VCARD_TYPE_CLASS, /**<This is class of vcard. */
42 VCARD_TYPE_EMAIL, /**<This is email of vcard. */
43 VCARD_TYPE_END, /**<This is end of vcard. */
44 VCARD_TYPE_FN, /**<This is FN of vcard. */
45 VCARD_TYPE_GEO, /**<This is GEO of vcard. */
46 VCARD_TYPE_KEY, /**<This is key of vcard. */
47 VCARD_TYPE_LABEL, /**<This is label of vcard. */
48 VCARD_TYPE_LOGO, /**<This is logo of vcard. */
49 VCARD_TYPE_MAILER, /**<This is mailer of vcar. */
50 VCARD_TYPE_N, /**<This is N of vcard. */
51 VCARD_TYPE_NAME, /**<This is name of vcard. */
52 VCARD_TYPE_NICKNAME, /**<This is nick name of vcard. */
53 VCARD_TYPE_NOTE, /**<This is note of vcard. */
54 VCARD_TYPE_ORG, /**<This is ORG of vcard. */
55 VCARD_TYPE_PHOTO, /**<This is photo of vcard. */
56 VCARD_TYPE_PRODID, /**<This is PRODID of vcard. */
57 VCARD_TYPE_PROFILE, /**<This is profile of vcard. */
58 VCARD_TYPE_REV, /**<This is REV of vcard. */
59 VCARD_TYPE_ROLE, /**<This is ROLE of vcard. */
60 VCARD_TYPE_SORT_STRING, /**<This is sort string of vcard. */
61 VCARD_TYPE_SOUND, /**<This is sound of vcard. */
62 VCARD_TYPE_SOURCE, /**<This is source of vcard. */
63 VCARD_TYPE_TEL, /**<This is tel of vcard. */
64 VCARD_TYPE_TITLE, /**<This is title of vcard. */
65 VCARD_TYPE_TZ, /**<This is TZ of vcard. */
66 VCARD_TYPE_UID, /**<This is uid of vcard. */
67 VCARD_TYPE_URL, /**<This is url of vcard. */
68 VCARD_TYPE_VERSION, /**<This is version of vcard. */
69 VCARD_TYPE_XIRMCLUID /**<This is xirmcl uid of vcard. */
72 #define VCARD_TYPE_NUM 34 /**< number of vcard type */
75 * @enum vCardParamName
76 * This enumeration defines the name of vcard parameter.
80 VCARD_PARAM_CHARSET, /**<This is charset parameter. */
81 VCARD_PARAM_CONTEXT, /**<This is context parameter. */
82 VCARD_PARAM_ENCODING, /**<This is encoding parameter. */
83 VCARD_PARAM_LANGUAGE, /**<This is language parameter. */
84 VCARD_PARAM_TYPE, /**<This is type parameter. */
85 VCARD_PARAM_VALUE /**<This is value parameter. */
88 #define VCARD_PARAM_NUM 6 /**< number of vcard parameter */
91 * @enum vCardParamName
92 * This enumeration defines the value of encoding parameter.
96 VCARD_ENC_PARAM_B, /**<This is b encoding parameter. */
97 VCARD_ENC_PARAM_BASE64, /**<This isbase64 encoding parameter. */
98 VCARD_ENC_PARAM_QUOTED_PRINTABLE, /**<This is quoted printable encoding parameter. */
99 VCARD_ENC_PARAM_7BIT, /**<This is 7 bit encoding parameter. */
100 VCARD_ENC_PARAM_8BIT /**<This is 8 bit encoding parameter. */
103 #define VCARD_ENCODE_PARAM_NUM 5 /**< number of vcard encoding parameter */
106 * @enum vCardCharsetVal
107 * This enumeration defines the value of charset parameter.
111 VCARD_CHARSET_PARAM_UTF_8, /**<This is utf-8 charset parameter. */
112 VCARD_CHARSET_PARAM_UTF_16, /**<This is utf-16 charset parameter. */
113 VCARD_CHARSET_PARAM_SHIFT_JIS, /**<This is shift-jis charset parameter. */
114 VCARD_CHARSET_PARAM_ISO_8859_1 /**<This is iso-8859-1 charset parameter. */
117 #define VCARD_CHARSET_PARAM_NUM 4 /**< number of vcard charset parameter */
121 * This enumeration defines the value of value parameter.
125 VCARD_VALUE_PARAM_BINARY, /**<This is binary value parameter. */
126 VCARD_VALUE_PARAM_BOOLEAN, /**<This is boolean value parameter. */
127 VCARD_VALUE_PARAM_DATE, /**<This is date value parameter. */
128 VCARD_VALUE_PARAM_DATE_TIME, /**<This is date time value parameter. */
129 VCARD_VALUE_PARAM_FLOAT, /**<This is float value parameter. */
130 VCARD_VALUE_PARAM_INTEGER, /**<This is integer value parameter. */
131 VCARD_VALUE_PARAM_PHONE_NUMBER, /**<This is phone number value parameter. */
132 VCARD_VALUE_PARAM_TEXT, /**<This is text value parameter. */
133 VCARD_VALUE_PARAM_TIME, /**<This is time value parameter. */
134 VCARD_VALUE_PARAM_URI, /**<This is uri value parameter. */
135 VCARD_VALUE_PARAM_URL, /**<This is url value parameter. */
136 VCARD_VALUE_PARAM_UTC_OFFSET, /**<This is utc offset value parameter. */
137 VCARD_VALUE_PARAM_VCARD /**<This is vcard value parameter. */
140 #define VCARD_VALUE_PARAM_NUM 13 /**< number of vcard value parameter */
144 * This enumeration defines the value of type parameter.
148 VCARD_TYPE_PARAM_AIFF, /**<This is aiff type parameter. */
149 VCARD_TYPE_PARAM_BBS, /**<This is bbs type parameter. */
150 VCARD_TYPE_PARAM_CAR, /**<This is car type parameter. */
151 VCARD_TYPE_PARAM_CELL, /**<This is cell type parameter. */
152 VCARD_TYPE_PARAM_DOM, /**<This is dom type parameter. */
153 VCARD_TYPE_PARAM_WORK, /**<This is work type parameter. */
154 VCARD_TYPE_PARAM_FAX, /**<This is fax type parameter. */
155 VCARD_TYPE_PARAM_GIF, /**<This is gif type parameter. */
156 VCARD_TYPE_PARAM_HOME, /**<This is home type parameter. */
157 VCARD_TYPE_PARAM_INTL, /**<This is intl type parameter. */
158 VCARD_TYPE_PARAM_INTERNET, /**<This is internet type parameter. */
159 VCARD_TYPE_PARAM_ISDN, /**<This is ISDN type parameter. */
160 VCARD_TYPE_PARAM_JPEG, /**<This is jpeg type parameter. */
161 VCARD_TYPE_PARAM_MOBILE, /**<This is mobile type parameter. */
162 VCARD_TYPE_PARAM_MODEM, /**<This is mpdem type parameter. */
163 VCARD_TYPE_PARAM_MSG, /**<This is msg type parameter. */
164 VCARD_TYPE_PARAM_PAGER, /**<This is pager type parameter. */
165 VCARD_TYPE_PARAM_PARCEL, /**<This is parcel type parameter. */
166 VCARD_TYPE_PARAM_PCM, /**<This is PCM type parameter. */
167 VCARD_TYPE_PARAM_PCS, /**<This is PCS type parameter. */
168 VCARD_TYPE_PARAM_PNG, /**<This is png type parameter. */
169 VCARD_TYPE_PARAM_POSTAL, /**<This is potsal type parameter. */
170 VCARD_TYPE_PARAM_PREF, /**<This is pref type parameter. */
171 VCARD_TYPE_PARAM_VIDEO, /**<This is video type parameter. */
172 VCARD_TYPE_PARAM_VOICE, /**<This is voice type parameter. */
173 VCARD_TYPE_PARAM_WAVE, /**<This is wave type parameter. */
174 VCARD_TYPE_PARAM_WBMP, /**<This is wbmp type parameter. */
175 VCARD_TYPE_PARAM_ETC, /**<This is etc type parameter. */
176 VCARD_TYPE_PARAM_X400, /**<This is X400 type parameter. */
177 VCARD_TYPE_PARAM_X_IRMC_N /**<This is X-IRMC-N type parameter. */
180 #define VCARD_TYPE_PARAM_NUM 30 /**< number of vcard type parameter */
182 /* VCard Encoder/Decoder status. */
183 #define VCARD_TYPE_NAME_STATUS 1 /**< vcard type name status */
184 #define VCARD_PARAM_NAME_STATUS 2 /**< vcard parameter name status */
185 #define VCARD_TYPE_VALUE_STATUS 3 /**< vcard type value status */
186 #define VCARD_PARAM_VALUE_STATUS 4 /**< vcard parameter value status */
190 * Public Function Prototypes
195 * @fn VTree* vcard_decode(char* pVCardRaw);
196 * This function decodes a vcard string to a vTree.
198 * @return This function returns a pointer to VTree.
199 * @param[in] pVCardRaw Points to the vcard string.
202 SLPAPI VTree* vcard_decode(char* pVCardRaw);
205 * @fn char* vcard_encode(VTree* pVTree);
206 * This function encodes a vTree to a string.
208 * @return This function returns a pointer to a vcard string.
209 * @param[in] pVTree Points to a VTree.
212 SLPAPI char* vcard_encode(VTree* pVTree);
215 * @fn char* vcard_free_vtree_memory(VTree* pTree);
216 * This function free a pTree allocated memory
218 * @return This function returns value of success or fail
219 * @param[in] pVTree Points to a VTree.
221 SLPAPI bool vcard_free_vtree_memory(VTree * pTree);
225 #endif /* __cplusplus */
227 #endif /* _VCARD_H_ */