4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
7 * Jaeho Lee <jaeho81.lee@samsung.com>
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
13 * http://www.apache.org/licenses/LICENSE-2.0
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.
24 #include <sys/types.h>
29 #include "syspopup_core.h"
30 #include "syspopup_db.h"
31 #include "syspopup_api.h"
32 #include "simple_util.h"
34 API int syspopup_launch(char *popup_name, bundle *b)
36 syspopup_info_t *info = NULL;
40 if (popup_name == NULL) {
41 _E("popup_name is NULL");
45 info = _syspopup_info_get(popup_name);
46 if (info == NULL || info->pkgname == NULL) {
47 _E("info or info->pkgname is NULL");
49 _syspopup_info_free(info);
58 if (_syspopup_set_name_to_bundle(b, popup_name) < 0) {
59 _E("bundle set error\n");
60 _syspopup_info_free(info);
68 ret = aul_launch_app(info->pkgname, b);
70 _E("aul launch error - %d", ret);
77 _syspopup_info_free(info);
82 API int syspopup_destroy_all()
85 fd = open(SYSPOPUP_TERM_NOTI_PATH, O_CREAT | O_TRUNC | O_RDWR, 0644);