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,
30 * you may use following point of contact.
31 * All resources contributed on this software
32 * are orinigally written by S-Core Inc., a member of Samsung Group.
34 * SeongWon Shim <seongwon.shim@samsung.com>
38 * @SA_Common_Interface.h
40 * @brief This file is the header file of interface of SA
44 #ifndef SA_COMMON_INTERFACE_H_
45 #define SA_COMMON_INTERFACE_H_
49 * @par Description: API to process pre-action that has to be befor sync service
51 * Exchage Pkg1 and Pkg2 with server
52 * Get Device Information
55 * @par Typical use case:
56 * @par Method of function operation:
57 * @par Important notes:
58 * @param[in] string type, transport Type(obex, FW_HTTP ...)
59 * @param[in] int type, account id
60 * @param[in] string type, session id
61 * @param[out] PreSyncReturnObj structure(result from pkg2)
63 * @return Common_ErrorType enum value
76 int pre_sync(int transportType, int accountId, char *sessionId, void **preSyncReturnObj);
79 * @par Description: API to generate protocol specific msg
81 * Generate MSg which be considered maxMsgSize and maxObjSize
84 * @par Typical use case:
85 * @par Method of function operation:
86 * @par Important notes:
87 * @param[in] SyncObj structure
89 * @param[out] msg size
91 * @return Common_ErrorType enum value
104 int generate_msg(void **syncObj, char **msg, unsigned int *msg_size);
107 * @par Description: API to exchange protocol specific msg with server
109 * Exchange protocol specific msg(request and response) using header binding information with server
112 * @par Typical use case:
113 * @par Method of function operation:
114 * @par Important notes:
115 * @param[in] string type, transport protocol type(http, obex etc)
116 * @param[in] string type, msg to send
117 * @param[in] unsigned int type, msg size
118 * @param[out] string type, receive msg
119 * @param[out] unsigned int type, receive msg size
121 * @return Common_ErrorType enum value
134 int exchange_msg(int transportType, char *sendMsg, unsigned int sendMsg_length, char **recvMsg, unsigned int *recvMsg_length);
137 * @par Description: API to process response msg from server
139 * Process response msg from server and convert to obj that return to Service Engine
142 * @par Typical use case:
143 * @par Method of function operation:
144 * @par Important notes:
145 * @param[in] string type, recive msg from server
146 * @param[in] unsigned int type, receive msg size
147 * @param[out] SyncReturnObj structure
148 * @param[out] int type, flag for finsih sync session
150 * @return Common_ErrorType enum value
163 int process_recv_msg(char *recvMsg, unsigned int recvMsg_length, void **syncReturnObj, int *isFinish);
167 * @par Description: API to free session structure and close connection
169 * This API for case that error or cancel occur in ServiceEngine so need to clean up resource which using in ServiceAdapter
172 * @par Typical use case:
173 * @par Method of function operation:
174 * @par Important notes:
194 * @par Description: API to process auto configure function
198 * @par Typical use case:
199 * @par Method of function operation:
200 * @par Important notes:
201 * @param[in] string type, id
202 * @param[in] string type, password
203 * @param[in] string type, target uri
204 * @param[in] string type, profile path for getting value from vconf
205 * @param[out] GList type, list of auto configure results
207 * @return Common_ErrorType enum value
220 int auto_configure_from_vconf(char *id, char *pwd, char *targetUrl, char *profilePath, GList **congifure);
223 * @par Description: API to process auto configure function
227 * @par Typical use case:
228 * @par Method of function operation:
229 * @par Important notes:
230 * @param[in] string type, server ip
231 * @param[in] string type, id
232 * @param[in] string type, password
233 * @param[out] GList type, list of auto configure results
235 * @return Common_ErrorType enum value
248 int auto_configure(char *addr, char *id, char *password, GList **congifure);
251 /*FIXME cancel request to NA */
252 /*int cancel_connection_sync_request(int transportType);*/
254 #endif /* SA_COMMON_INTERFACE_H_ */