Tizen 2.0 Release
[framework/system/oma-dm-agent.git] / include / dm-engine / cp / dm_cp_processor.h
1 /*
2  * oma-dm-agent
3  * Copyright (c) 2012 Samsung Electronics Co., Ltd.
4  *
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
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
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.
16  */
17
18 #ifndef DM_CP_PROCESSOR_H_
19 #define DM_CP_PROCESSOR_H_
20
21 /*dm-agent*/
22 #include "dm_cp_error.h"
23 #include "dm-engine/cp/dm_cp_struct.h"
24
25 typedef enum {
26         ADD_MESSAGE,
27         REMOVE_MESSAGE,
28 } SENDMSG_TYPE;
29
30 /**
31  * @par Description: API to recieve cp wbxml
32  *
33  *
34  * @par Purpose:
35  * @par Typical use case:
36  * @par par Method of function operation:
37  * @par Important notes:
38  * @param[in]           msg body
39  * @param[in]           msg size
40  * @param[in]           ext id
41  *
42  * @return              CP_ERROR 1 on success
43  *                                                              2 on error
44  *
45  * @par Errors:
46  *
47  * @pre None.
48  * @post
49  * @see
50  * @remarks None.
51  *
52  * @par Sample Code:
53  * @code
54  * @endcode
55  */
56 CP_ERROR process_Recieved_CP_WBXML(const char *msgBody, unsigned int msgSize, int ext_id);
57
58 /**
59  * @par Description: API to recieve cp xml
60  *
61  *
62  * @par Purpose:
63  * @par Typical use case:
64  * @par par Method of function operation:
65  * @par Important notes:
66  * @param[in]           msg body
67  * @param[in]           msg size
68  * @param[in]           ext id
69  *
70  * @return              CP_ERROR 1 on success
71  *                                                              2 on error
72  *
73  * @par Errors:
74  *
75  * @pre None.
76  * @post
77  * @see
78  * @remarks None.
79  *
80  * @par Sample Code:
81  * @code
82  * @endcode
83  */
84 CP_ERROR process_Recieved_CP_XML(const char *msgBody, unsigned int msgSize, int ext_id);
85
86 /**
87  * @par Description: API to check pincode
88  *
89  *
90  * @par Purpose:
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)
97  * @param[in]           ext id
98  *
99  * @return              CP_ERROR 1 on success
100  *                                                              2 on error
101  *
102  * @par Errors:
103  *
104  * @pre None.
105  * @post
106  * @see
107  * @remarks None.
108  *
109  * @par Sample Code:
110  * @code
111  * @endcode
112  */
113 CP_ERROR process_Check_Pincode(int is_initial, char *user_data, int *is_correct, int ext_id);
114
115 /**
116  * @par Description: API to invalid pincode
117  *
118  *
119  * @par Purpose:
120  * @par Typical use case:
121  * @par par Method of function operation:
122  * @par Important notes:
123  * @param[in]           ext id
124  *
125  * @return              CP_ERROR 1 on success
126  *                                                              2 on error
127  *
128  * @par Errors:
129  *
130  * @pre None.
131  * @post
132  * @see
133  * @remarks None.
134  *
135  * @par Sample Code:
136  * @code
137  * @endcode
138  */
139 CP_ERROR process_Invalid_Pincode(int ext_id);   /* invalid PIN code ==> send delete message to MF and delete CP data */
140
141 /**
142  * @par Description: API to setting cp
143  *
144  *
145  * @par Purpose:
146  * @par Typical use case:
147  * @par par Method of function operation:
148  * @par Important notes:
149  * @param[in]           ext id
150  *
151  * @return              CP_ERROR 1 on success
152  *                                                              2 on error
153  *
154  * @par Errors:
155  *
156  * @pre None.
157  * @post
158  * @see
159  * @remarks None.
160  *
161  * @par Sample Code:
162  * @code
163  * @endcode
164  */
165 CP_ERROR process_Setting_CP(int ext_id);
166
167 /**
168  * @par Description: API to delete all cp
169  *
170  *
171  * @par Purpose:
172  * @par Typical use case:
173  * @par par Method of function operation:
174  * @par Important notes:
175  *
176  * @return              CP_ERROR 1 on success
177  *                                                              2 on error
178  *
179  * @par Errors:
180  *
181  * @pre None.
182  * @post
183  * @see
184  * @remarks None.
185  *
186  * @par Sample Code:
187  * @code
188  * @endcode
189  */
190 CP_ERROR process_Delete_All_CP_Data();  /* delete all CP data */
191
192 /**
193  * @par Description: API to delete cp data
194  *
195  *
196  * @par Purpose:
197  * @par Typical use case:
198  * @par par Method of function operation:
199  * @par Important notes:
200  * @param[in]           ext id
201  *
202  * @return              CP_ERROR 1 on success
203  *                                                              2 on error
204  *
205  * @par Errors:
206  *
207  * @pre None.
208  * @post
209  * @see
210  * @remarks None.
211  *
212  * @par Sample Code:
213  * @code
214  * @endcode
215  */
216 CP_ERROR process_Delete_CP_Data(int ext_id);    /* delete 1 CP data about specific extId */
217
218 /**
219  * @par Description: API to set msgid
220  *
221  *
222  * @par Purpose:
223  * @par Typical use case:
224  * @par par Method of function operation:
225  * @par Important notes:
226  * @param[in]           msg id
227  *
228  * @return
229  *
230  * @par Errors:
231  *
232  * @pre None.
233  * @post
234  * @see
235  * @remarks None.
236  *
237  * @par Sample Code:
238  * @code
239  * @endcode
240  */
241 void process_Set_msgId(int msgId);
242
243 /**
244  * @par Description: API to free application struct
245  *
246  *
247  * @par Purpose:
248  * @par Typical use case:
249  * @par par Method of function operation:
250  * @par Important notes:
251  * @param[in]           app
252  *
253  * @return
254  *
255  * @par Errors:
256  *
257  * @pre None.
258  * @post
259  * @see
260  * @remarks None.
261  *
262  * @par Sample Code:
263  * @code
264  * @endcode
265  */
266 void free_cp_application(DM_CP_Application * app);
267 /**
268  * @par Description: API to free application addr struct
269  *
270  *
271  * @par Purpose:
272  * @par Typical use case:
273  * @par par Method of function operation:
274  * @par Important notes:
275  * @param[in]           app_addr appaddr
276  *
277  * @return
278  *
279  * @par Errors:
280  *
281  * @pre None.
282  * @post
283  * @see
284  * @remarks None.
285  *
286  * @par Sample Code:
287  * @code
288  * @endcode
289  */
290 void free_cp_application_app_addr(DM_CP_Application_AppAddr * app_addr);
291
292 /**
293  * @par Description: API to free application resource struct
294  *
295  *
296  * @par Purpose:
297  * @par Typical use case:
298  * @par par Method of function operation:
299  * @par Important notes:
300  * @param[in]           resource
301  *
302  * @return
303  *
304  * @par Errors:
305  *
306  * @pre None.
307  * @post
308  * @see
309  * @remarks None.
310  *
311  * @par Sample Code:
312  * @code
313  * @endcode
314  */
315 void free_cp_application_resource(DM_CP_Application_Resource * resource);
316
317 /**
318  * @par Description: API to free application auth struct
319  *
320  *
321  * @par Purpose:
322  * @par Typical use case:
323  * @par par Method of function operation:
324  * @par Important notes:
325  * @param[in]           appauth
326  *
327  * @return
328  *
329  * @par Errors:
330  *
331  * @pre None.
332  * @post
333  * @see
334  * @remarks None.
335  *
336  * @par Sample Code:
337  * @code
338  * @endcode
339  */
340 void free_cp_application_app_auth(DM_CP_Application_AppAuth * appAuth);
341
342 /**
343  * @par Description: API to free port struct
344  *
345  *
346  * @par Purpose:
347  * @par Typical use case:
348  * @par par Method of function operation:
349  * @par Important notes:
350  * @param[in]           port
351  *
352  * @return
353  *
354  * @par Errors:
355  *
356  * @pre None.
357  * @post
358  * @see
359  * @remarks None.
360  *
361  * @par Sample Code:
362  * @code
363  * @endcode
364  */
365 void free_cp_port(DM_CP_Port * port);
366
367 /**
368  * @par Description: API to free string struct
369  *
370  *
371  * @par Purpose:
372  * @par Typical use case:
373  * @par par Method of function operation:
374  * @par Important notes:
375  * @param[in]           service
376  *
377  * @return
378  *
379  * @par Errors:
380  *
381  * @pre None.
382  * @post
383  * @see
384  * @remarks None.
385  *
386  * @par Sample Code:
387  * @code
388  * @endcode
389  */
390 void free_string_node(String_Node * service);
391
392 /**
393  * @par Description: API to free napdef struct
394  *
395  *
396  * @par Purpose:
397  * @par Typical use case:
398  * @par par Method of function operation:
399  * @par Important notes:
400  * @param[in]           napdef
401  *
402  * @return
403  *
404  * @par Errors:
405  *
406  * @pre None.
407  * @post
408  * @see
409  * @remarks None.
410  *
411  * @par Sample Code:
412  * @code
413  * @endcode
414  */
415 void free_cp_napdef(DM_CP_Napdef * napdef);
416
417 /**
418  * @par Description: API to free auth info struct
419  *
420  *
421  * @par Purpose:
422  * @par Typical use case:
423  * @par par Method of function operation:
424  * @par Important notes:
425  * @param[in]           auth_info
426  *
427  * @return
428  *
429  * @par Errors:
430  *
431  * @pre None.
432  * @post
433  * @see
434  * @remarks None.
435  *
436  * @par Sample Code:
437  * @code
438  * @endcode
439  */
440 void free_cp_napdef_authinfo(DM_CP_Napdef_AuthInfo * auth_info);
441
442 /**
443  * @par Description: API to free validity struct
444  *
445  *
446  * @par Purpose:
447  * @par Typical use case:
448  * @par par Method of function operation:
449  * @par Important notes:
450  * @param[in]           validity
451  *
452  * @return
453  *
454  * @par Errors:
455  *
456  * @pre None.
457  * @post
458  * @see
459  * @remarks None.
460  *
461  * @par Sample Code:
462  * @code
463  * @endcode
464  */
465 void free_cp_napdef_validity(DM_CP_Napdef_validity * validity);
466
467 /**
468  * @par Description: API to free bootstraps struct
469  *
470  *
471  * @par Purpose:
472  * @par Typical use case:
473  * @par par Method of function operation:
474  * @par Important notes:
475  * @param[in]           bootstraps
476  *
477  * @return
478  *
479  * @par Errors:
480  *
481  * @pre None.
482  * @post
483  * @see
484  * @remarks None.
485  *
486  * @par Sample Code:
487  * @code
488  * @endcode
489  */
490 void free_cp_bootstrap(DM_CP_Bootstrap * bootstraps);
491
492 /**
493  * @par Description: API to free pxLogical struct
494  *
495  *
496  * @par Purpose:
497  * @par Typical use case:
498  * @par par Method of function operation:
499  * @par Important notes:
500  * @param[in]           pxLogical
501  *
502  * @return
503  *
504  * @par Errors:
505  *
506  * @pre None.
507  * @post
508  * @see
509  * @remarks None.
510  *
511  * @par Sample Code:
512  * @code
513  * @endcode
514  */
515 void free_cp_pxlogical(DM_CP_PxLogical * pxLogical);
516
517 /**
518  * @par Description: API to free pxAuthInfo struct
519  *
520  *
521  * @par Purpose:
522  * @par Typical use case:
523  * @par par Method of function operation:
524  * @par Important notes:
525  * @param[in]           pxAuthInfo
526  *
527  * @return
528  *
529  * @par Errors:
530  *
531  * @pre None.
532  * @post
533  * @see
534  * @remarks None.
535  *
536  * @par Sample Code:
537  * @code
538  * @endcode
539  */
540 void free_cp_pxlogical_pxauthinfo(DM_CP_PxLogical_PxAuthInfo * pxAuthInfo);
541
542 /**
543  * @par Description: API to free pxPhysical struct
544  *
545  *
546  * @par Purpose:
547  * @par Typical use case:
548  * @par par Method of function operation:
549  * @par Important notes:
550  * @param[in]           pxPhysical
551  *
552  * @return
553  *
554  * @par Errors:
555  *
556  * @pre None.
557  * @post
558  * @see
559  * @remarks None.
560  *
561  * @par Sample Code:
562  * @code
563  * @endcode
564  */
565 void free_cp_pxLogical_pxphsical(DM_CP_PxLogical_PxPhysical * pxPhysical);
566
567 #endif                          /* DM_CP_PROCESSOR_H_ */