3 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * Licensed under the Apache License, Version 2.0 (the License);
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
18 #ifndef DM_CP_PROCESSOR_H_
19 #define DM_CP_PROCESSOR_H_
22 #include "dm_cp_error.h"
23 #include "dm-engine/cp/dm_cp_struct.h"
31 * @par Description: API to recieve cp wbxml
35 * @par Typical use case:
36 * @par par Method of function operation:
37 * @par Important notes:
42 * @return CP_ERROR 1 on success
56 CP_ERROR process_Recieved_CP_WBXML(const char *msgBody, unsigned int msgSize, int ext_id);
59 * @par Description: API to recieve cp xml
63 * @par Typical use case:
64 * @par par Method of function operation:
65 * @par Important notes:
70 * @return CP_ERROR 1 on success
84 CP_ERROR process_Recieved_CP_XML(const char *msgBody, unsigned int msgSize, int ext_id);
87 * @par Description: API to check pincode
91 * @par Typical use case:
92 * @par par Method of function operation:
93 * @par Important notes:
94 * @param[in] initial or not (0,1)
95 * @param[in] user data
96 * @param[out] correct (0,1)
99 * @return CP_ERROR 1 on success
113 CP_ERROR process_Check_Pincode(int is_initial, char *user_data, int *is_correct, int ext_id);
116 * @par Description: API to invalid pincode
120 * @par Typical use case:
121 * @par par Method of function operation:
122 * @par Important notes:
125 * @return CP_ERROR 1 on success
139 CP_ERROR process_Invalid_Pincode(int ext_id); /* invalid PIN code ==> send delete message to MF and delete CP data */
142 * @par Description: API to setting cp
146 * @par Typical use case:
147 * @par par Method of function operation:
148 * @par Important notes:
151 * @return CP_ERROR 1 on success
165 CP_ERROR process_Setting_CP(int ext_id);
168 * @par Description: API to delete all cp
172 * @par Typical use case:
173 * @par par Method of function operation:
174 * @par Important notes:
176 * @return CP_ERROR 1 on success
190 CP_ERROR process_Delete_All_CP_Data(); /* delete all CP data */
193 * @par Description: API to delete cp data
197 * @par Typical use case:
198 * @par par Method of function operation:
199 * @par Important notes:
202 * @return CP_ERROR 1 on success
216 CP_ERROR process_Delete_CP_Data(int ext_id); /* delete 1 CP data about specific extId */
219 * @par Description: API to set msgid
223 * @par Typical use case:
224 * @par par Method of function operation:
225 * @par Important notes:
241 void process_Set_msgId(int msgId);
244 * @par Description: API to free application struct
248 * @par Typical use case:
249 * @par par Method of function operation:
250 * @par Important notes:
266 void free_cp_application(DM_CP_Application * app);
268 * @par Description: API to free application addr struct
272 * @par Typical use case:
273 * @par par Method of function operation:
274 * @par Important notes:
275 * @param[in] app_addr appaddr
290 void free_cp_application_app_addr(DM_CP_Application_AppAddr * app_addr);
293 * @par Description: API to free application resource struct
297 * @par Typical use case:
298 * @par par Method of function operation:
299 * @par Important notes:
300 * @param[in] resource
315 void free_cp_application_resource(DM_CP_Application_Resource * resource);
318 * @par Description: API to free application auth struct
322 * @par Typical use case:
323 * @par par Method of function operation:
324 * @par Important notes:
340 void free_cp_application_app_auth(DM_CP_Application_AppAuth * appAuth);
343 * @par Description: API to free port struct
347 * @par Typical use case:
348 * @par par Method of function operation:
349 * @par Important notes:
365 void free_cp_port(DM_CP_Port * port);
368 * @par Description: API to free string struct
372 * @par Typical use case:
373 * @par par Method of function operation:
374 * @par Important notes:
390 void free_string_node(String_Node * service);
393 * @par Description: API to free napdef struct
397 * @par Typical use case:
398 * @par par Method of function operation:
399 * @par Important notes:
415 void free_cp_napdef(DM_CP_Napdef * napdef);
418 * @par Description: API to free auth info struct
422 * @par Typical use case:
423 * @par par Method of function operation:
424 * @par Important notes:
425 * @param[in] auth_info
440 void free_cp_napdef_authinfo(DM_CP_Napdef_AuthInfo * auth_info);
443 * @par Description: API to free validity struct
447 * @par Typical use case:
448 * @par par Method of function operation:
449 * @par Important notes:
450 * @param[in] validity
465 void free_cp_napdef_validity(DM_CP_Napdef_validity * validity);
468 * @par Description: API to free bootstraps struct
472 * @par Typical use case:
473 * @par par Method of function operation:
474 * @par Important notes:
475 * @param[in] bootstraps
490 void free_cp_bootstrap(DM_CP_Bootstrap * bootstraps);
493 * @par Description: API to free pxLogical struct
497 * @par Typical use case:
498 * @par par Method of function operation:
499 * @par Important notes:
500 * @param[in] pxLogical
515 void free_cp_pxlogical(DM_CP_PxLogical * pxLogical);
518 * @par Description: API to free pxAuthInfo struct
522 * @par Typical use case:
523 * @par par Method of function operation:
524 * @par Important notes:
525 * @param[in] pxAuthInfo
540 void free_cp_pxlogical_pxauthinfo(DM_CP_PxLogical_PxAuthInfo * pxAuthInfo);
543 * @par Description: API to free pxPhysical struct
547 * @par Typical use case:
548 * @par par Method of function operation:
549 * @par Important notes:
550 * @param[in] pxPhysical
565 void free_cp_pxLogical_pxphsical(DM_CP_PxLogical_PxPhysical * pxPhysical);
567 #endif /* DM_CP_PROCESSOR_H_ */