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.
50 #define VMSG_TYPE_NUM 12 /**< number of vcard type */
54 * This enumeration defines the name of vcard parameter.
58 VMSG_PARAM_CHARSET, /**<This is charset parameter. */
59 VMSG_PARAM_CONTEXT, /**<This is context parameter. */
60 VMSG_PARAM_ENCODING, /**<This is encoding parameter. */
61 VMSG_PARAM_LANGUAGE, /**<This is language parameter. */
62 VMSG_PARAM_TYPE, /**<This is type parameter. */
63 VMSG_PARAM_VALUE /**<This is value parameter. */
66 #define VMSG_PARAM_NUM 6 /**< number of vcard parameter */
70 * This enumeration defines the value of encoding parameter.
74 VMSG_ENC_PARAM_B, /**<This is b encoding parameter. */
75 VMSG_ENC_PARAM_BASE64, /**<This isbase64 encoding parameter. */
76 VMSG_ENC_PARAM_QUOTED_PRINTABLE, /**<This is quoted printable encoding parameter. */
77 VMSG_ENC_PARAM_7BIT, /**<This is 7 bit encoding parameter. */
78 VMSG_ENC_PARAM_8BIT /**<This is 8 bit encoding parameter. */
81 #define VMSG_ENCODE_PARAM_NUM 5 /**< number of vcard encoding parameter */
84 * @enum vMsgCharsetVal
85 * This enumeration defines the value of charset parameter.
89 VMSG_CHARSET_PARAM_UTF_8, /**<This is utf-8 charset parameter. */
90 VMSG_CHARSET_PARAM_UTF_16, /**<This is utf-16 charset parameter. */
91 VMSG_CHARSET_PARAM_SHIFT_JIS, /**<This is shift-jis charset parameter. */
92 VMSG_CHARSET_PARAM_ISO_8859_1 /**<This is iso-8859-1 charset parameter. */
95 #define VMSG_CHARSET_PARAM_NUM 4 /**< number of vcard charset parameter */
99 * This enumeration defines the value of value parameter.
103 VMSG_VALUE_PARAM_BINARY, /**<This is binary value parameter. */
104 VMSG_VALUE_PARAM_BOOLEAN, /**<This is boolean value parameter. */
105 VMSG_VALUE_PARAM_DATE, /**<This is date value parameter. */
106 VMSG_VALUE_PARAM_DATE_TIME, /**<This is date time value parameter. */
107 VMSG_VALUE_PARAM_FLOAT, /**<This is float value parameter. */
108 VMSG_VALUE_PARAM_INTEGER, /**<This is integer value parameter. */
109 VMSG_VALUE_PARAM_PHONE_NUMBER, /**<This is phone number value parameter. */
110 VMSG_VALUE_PARAM_TEXT, /**<This is text value parameter. */
111 VMSG_VALUE_PARAM_TIME, /**<This is time value parameter. */
112 VMSG_VALUE_PARAM_URI, /**<This is uri value parameter. */
113 VMSG_VALUE_PARAM_URL, /**<This is url value parameter. */
114 VMSG_VALUE_PARAM_UTC_OFFSET, /**<This is utc offset value parameter. */
115 VMSG_VALUE_PARAM_VMSG /**<This is vcard value parameter. */
118 #define VMSG_VALUE_PARAM_NUM 13 /**< number of vcard value parameter */
122 * This enumeration defines the value of type parameter.
126 VMSG_TYPE_PARAM_AIFF, /**<This is aiff type parameter. */
127 VMSG_TYPE_PARAM_BBS, /**<This is bbs type parameter. */
128 VMSG_TYPE_PARAM_CAR, /**<This is car type parameter. */
129 VMSG_TYPE_PARAM_CELL, /**<This is cell type parameter. */
130 VMSG_TYPE_PARAM_DOM, /**<This is dom type parameter. */
131 VMSG_TYPE_PARAM_WORK, /**<This is work type parameter. */
132 VMSG_TYPE_PARAM_FAX, /**<This is fax type parameter. */
133 VMSG_TYPE_PARAM_GIF, /**<This is gif type parameter. */
134 VMSG_TYPE_PARAM_HOME, /**<This is home type parameter. */
135 VMSG_TYPE_PARAM_INTL, /**<This is intl type parameter. */
136 VMSG_TYPE_PARAM_INTERNET, /**<This is internet type parameter. */
137 VMSG_TYPE_PARAM_ISDN, /**<This is ISDN type parameter. */
138 VMSG_TYPE_PARAM_JPEG, /**<This is jpeg type parameter. */
139 VMSG_TYPE_PARAM_MOBILE, /**<This is mobile type parameter. */
140 VMSG_TYPE_PARAM_MODEM, /**<This is mpdem type parameter. */
141 VMSG_TYPE_PARAM_MSG, /**<This is msg type parameter. */
142 VMSG_TYPE_PARAM_PAGER, /**<This is pager type parameter. */
143 VMSG_TYPE_PARAM_PARCEL, /**<This is parcel type parameter. */
144 VMSG_TYPE_PARAM_PCM, /**<This is PCM type parameter. */
145 VMSG_TYPE_PARAM_PCS, /**<This is PCS type parameter. */
146 VMSG_TYPE_PARAM_PNG, /**<This is png type parameter. */
147 VMSG_TYPE_PARAM_POSTAL, /**<This is potsal type parameter. */
148 VMSG_TYPE_PARAM_PREF, /**<This is pref type parameter. */
149 VMSG_TYPE_PARAM_VIDEO, /**<This is video type parameter. */
150 VMSG_TYPE_PARAM_VOICE, /**<This is voice type parameter. */
151 VMSG_TYPE_PARAM_WAVE, /**<This is wave type parameter. */
152 VMSG_TYPE_PARAM_WBMP, /**<This is wbmp type parameter. */
153 VMSG_TYPE_PARAM_ETC, /**<This is etc type parameter. */
154 VMSG_TYPE_PARAM_X400, /**<This is X400 type parameter. */
155 VMSG_TYPE_PARAM_X_IRMC_N /**<This is X-IRMC-N type parameter. */
158 #define VMSG_TYPE_PARAM_NUM 30 /**< number of vcard type parameter */
160 /* VCard Encoder/Decoder status. */
161 #define VMSG_TYPE_NAME_STATUS 1 /**< vcard type name status */
162 #define VMSG_PARAM_NAME_STATUS 2 /**< vcard parameter name status */
163 #define VMSG_TYPE_VALUE_STATUS 3 /**< vcard type value status */
164 #define VMSG_PARAM_VALUE_STATUS 4 /**< vcard parameter value status */
168 * Public Function Prototypes
173 * @fn VTree* vcard_decode(char* pVCardRaw);
174 * This function decodes a vcard string to a vTree.
176 * @return This function returns a pointer to VTree.
177 * @param[in] pVCardRaw Points to the vcard string.
180 SLPAPI VTree* vmsg_decode(char* pVMsgRaw);
183 * @fn char* vcard_encode(VTree* pVTree);
184 * This function encodes a vTree to a string.
186 * @return This function returns a pointer to a vcard string.
187 * @param[in] pVTree Points to a VTree.
190 SLPAPI char* vmsg_encode(VTree* pVTree);
193 * @fn char* vcard_free_vtree_memory(VTree* pTree);
194 * This function free a pTree allocated memory
196 * @return This function returns value of success or fail
197 * @param[in] pVTree Points to a VTree.
199 SLPAPI bool vmsg_free_vtree_memory(VTree * pTree);
203 #endif /* __cplusplus */
205 #endif /* _VMSG_H_ */