tizen 2.3 release
[framework/base/syspopup.git] / include / syspopup_caller.h
1 /*
2  * syspopup
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
7  * Jaeho Lee <jaeho81.lee@samsung.com>
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  */
22
23
24 #ifndef __SYSPOPUP_CALLER_H__
25 #define __SYSPOPUP_CALLER_H__
26
27 #include <bundle.h>
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 /**
34  * @file        syspopup_caller.h 
35  * @brief       Library to launch/destroy System Popup Application
36  *
37  * Patched by   Knhoon Baik <knhoon.baik@samsung.com>
38  * Patched by   Noha Park <noha.park@samsung.com> 
39  */
40
41 /**
42  * @defgroup syspopup_caller    Helper Library to launch/destroy system popup application
43  * @ingroup syspopup 
44  * @brief                       Helper Library to launch/destroy system popup application
45  */
46
47 /**
48  * @addtogroup syspopup_caller
49  * @{
50  */
51
52 /**
53  * @brief       This API launch the system popup application with given popup name.
54  *
55  *              This API launch the system popup application.
56  *              This API find system popup application package name with given popup name from system popup infomation DB.\n
57  *              And then, launch found application package
58  *
59  * @param[in]   popup_name      system popup application name to launch (not package name)
60  * @param[in]   b               extra bundle(arguement) to toss the popup application 
61  * @return      0 if success, negative value(<0) if fail
62  * @retval      0               - success
63  * @retval      -1              - generic error
64  *
65  * @sample code
66  * @code
67  *
68  * ...
69  *      bundle *b = NULL;
70  *
71  *      b = bundle_create();
72  *      bundle_add(b, "_SYSPOPUP_TITLE_", "System Popup Title");
73  *      bundle_add(b, "_SYSPOPUP_CONTENT_", "System Popup Content");
74  *
75  *      ret = syspopup_launch("syspopup-app", b);
76  *
77  *      bundle_free(b);
78  * ...
79  *
80  * @endcode
81  */
82 int syspopup_launch(char *popup_name, bundle *b);
83
84 /**
85  * @brief       This API generate destroy event to all system popup application.
86  *              This API can call with proper permission (root or inhouse)
87  *
88  * @return      0 if success, negative value(<0) if fail
89  * @retval      0               - success
90  * @retval      -1              - generic error
91  */
92 int syspopup_destroy_all();
93
94 /** @} */
95
96 #ifdef __cplusplus
97 }
98 #endif
99
100 #endif
101