4 * Copyright (c) 2012 - 2015 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.0 (the License);
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
20 #include <device/display.h>
24 #define ARRAY_SIZE(name) (sizeof(name)/sizeof(name[0]))
25 #define POPUP_METHOD_LAUNCH "PopupLaunch"
27 static const struct app_dbus_match {
34 { POPUP_DEFAULT, POPUP_BUS_NAME, POPUP_PATH_SYSTEM, POPUP_INTERFACE_SYSTEM, POPUP_METHOD_LAUNCH },
37 int launch_system_app(char *type, int num, ...)
46 app_type = POPUP_DEFAULT;
49 for (i = 0 ; i < ARRAY_SIZE(app_match) ; i++) {
50 if (strncmp(app_type, app_match[i].type, strlen(app_type)))
56 _E("Failed to find app matched (%s)", app_type);
62 ret = dbus_handle_method_async_pairs(app_match[match].bus,
63 app_match[match].path,
64 app_match[match].iface,
65 app_match[match].method,
70 ret = device_display_change_state(DISPLAY_STATE_NORMAL);
71 if (ret != DEVICE_ERROR_NONE)
72 _E("Failed to change display state");