4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: JuHak Park <juhaki.park@samsung.com>,
7 * JuneHyuk Lee <junhyuk7.lee@samsung.com>,
8 * SunBong Ha <sunbong.ha@samsung.com>
10 * Licensed under the Apache License, Version 2.0 (the "License");
11 * you may not use this file except in compliance with the License.
12 * You may obtain a copy of the License at
14 * http://www.apache.org/licenses/LICENSE-2.0
16 * Unless required by applicable law or agreed to in writing, software
17 * distributed under the License is distributed on an "AS IS" BASIS,
18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 * See the License for the specific language governing permissions and
20 * limitations under the License.
29 * For any sort of issue you concern as to this software,
\r
30 * you may use following point of contact.
\r
31 * All resources contributed on this software
\r
32 * are orinigally written by S-Core Inc., a member of Samsung Group.
\r
34 * SeongWon Shim <seongwon.shim@samsung.com>
\r
40 * @brief This file is the header file of interface and defined structure for San Parser
\r
43 #ifndef PM_SANPARSER_H_
\r
44 #define PM_SANPARSER_H_
\r
46 /* FIXME : When initialize, set "Server_id" at config_tbl..
\r
47 #define SMLDS_MOBILEDIT_SERVER (char *)"mobiledit"
\r
48 #define SMLDS_FUNAMBOL_SERVER (char *)"funambol"
\r
49 #define SMLDS_O3SIS_SERVER_SAN_IDENTIFIER (char *)"O3SIS SyncML Server"
\r
53 SAN_UIMODE_UNSPECIFIED = 0,
\r
54 SAN_UIMODE_BACKGROUND = 1,
\r
55 SAN_UIMODE_INFORMATIVE = 2,
\r
60 SAN_INITIATOR_USER = 0,
\r
61 SAN_INITIATOR_SERVER = 1
\r
65 SAN_SYNC_TYPE_TWO_WAY_BY_SERVER = 206,
\r
66 SAN_SYNC_TYPE_ONE_WAY_FROM_CLIENT_BY_SERVER = 207,
\r
67 SAN_SYNC_TYPE_REFRESH_FROM_CLIENT_BY_SERVER = 208,
\r
68 SAN_SYNC_TYPE_ONE_WAY_FROM_SERVER_BY_SERVER = 209,
\r
69 SAN_SYNC_TYPE_REFRESH_FROM_SERVER_BY_SERVER = 210,
\r
72 typedef struct SanCred SanCred;
\r
79 typedef struct SanContentType SanContentType;
\r
80 struct SanContentType {
\r
85 typedef struct SanSyncAlert SanSyncAlert;
\r
86 struct SanSyncAlert {
\r
87 SanSyncType syncType;
\r
92 typedef struct SanPackage SanPackage;
\r
94 char *msgBodyWithoutDigest;
\r
95 unsigned int msgBodyWithoutDigestLength;
\r
97 unsigned int version;
\r
99 SanInitiator initiator;
\r
100 unsigned int sessionID;
\r
103 unsigned int cntSyncAlerts;
\r
104 SanSyncAlert *syncAlerts;
\r
108 * @par Description: API to parse for SAN version 1.2
\r
112 * @par Typical use case:
\r
113 * @par Method of function operation:
\r
114 * @par Important notes:
\r
115 * @param[in] string type, msg body
\r
116 * @param[in] unsigned int type, size of msg
\r
119 * @return SanPackage structure on success
\r
129 * @par Sample Code:
\r
133 SanPackage *sanPackage12Parser(const char *msgBody, unsigned int msgSize);
\r
136 * @par Description: API to parse for SAN version 1.1
\r
140 * @par Typical use case:
\r
141 * @par Method of function operation:
\r
142 * @par Important notes:
\r
143 * @param[in] string type, msg body
\r
144 * @param[in] unsigned int type, size of msg
\r
147 * @return SanPackage structure on success
\r
157 * @par Sample Code:
\r
161 SanPackage *sanPackage11Parser(const char *msgBody, unsigned int msgSize);
\r
164 * @par Description: API to free SanPackage structure
\r
168 * @par Typical use case:
\r
169 * @par Method of function operation:
\r
170 * @par Important notes:
\r
171 * @param[in] SanPackage structure
\r
183 * @par Sample Code:
\r
187 void sanPackageParserFree(void *point);
\r
190 * @par Description: API to print SAN msg for debugging
\r
194 * @par Typical use case:
\r
195 * @par Method of function operation:
\r
196 * @par Important notes:
\r
197 * @param[in] SanPackage structure
\r
209 * @par Sample Code:
\r
213 void sanPrintMsg(SanPackage *san);
\r
215 #endif /* PM_SANPARSER_H_ */
\r