Upload Tizen2.0 source
[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 #include <aul.h>
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 /**
35  * @file        syspopup_caller.h 
36  * @brief       Library to launch/destroy System Popup Application
37  *
38  * Patched by   Knhoon Baik <knhoon.baik@samsung.com>
39  * Patched by   Noha Park <noha.park@samsung.com> 
40  */
41
42 /**
43  * @defgroup syspopup_caller    Helper Library to launch/destroy system popup application
44  * @ingroup syspopup 
45  * @brief                       Helper Library to launch/destroy system popup application
46  */
47
48 /**
49  * @addtogroup syspopup_caller
50  * @{
51  */
52
53 /**
54  * @brief       This API launch the system popup application with given popup name.
55  *
56  *              This API launch the system popup application.
57  *              This API find system popup application package name with given popup name from system popup infomation DB.\n
58  *              And then, launch found application package
59  *
60  * @param[in]   popup_name      system popup application name to launch (not package name)
61  * @param[in]   b               extra bundle(arguement) to toss the popup application 
62  * @return      0 if success, negative value(<0) if fail
63  * @retval      0               - success
64  * @retval      -1              - generic error
65  *
66  * @sample code
67  * @code
68  *
69  * ...
70  *      bundle *b = NULL;
71  *
72  *      b = bundle_create();
73  *      bundle_add(b, "_SYSPOPUP_TITLE_", "System Popup Title");
74  *      bundle_add(b, "_SYSPOPUP_CONTENT_", "System Popup Content");
75  *
76  *      ret = syspopup_launch("syspopup-app", b);
77  *
78  *      bundle_free(b);
79  * ...
80  *
81  * @endcode
82  */
83 int syspopup_launch(char *popup_name, bundle *b);
84
85 /**
86  * @brief       This API generate destroy event to all system popup application.
87  *              This API can call with proper permission (root or inhouse)
88  *
89  * @return      0 if success, negative value(<0) if fail
90  * @retval      0               - success
91  * @retval      -1              - generic error
92  */
93 int syspopup_destroy_all();
94
95 /** @} */
96
97 #ifdef __cplusplus
98 }
99 #endif
100
101 #endif
102