Tizen 2.4 migration and fix compile warning
[platform/core/system/system-popup.git] / src / launcher / launcher.h
1 /*
2  * popup-launcher
3  *
4  * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
5  *
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
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
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.
17  *
18 */
19
20 #ifndef __LAUNCHER_H__
21 #define __LAUNCHER_H__
22
23 #include <stdio.h>
24 #include <bundle_internal.h>
25 #include <E_DBus.h>
26 #include <Ecore.h>
27 #include <Elementary.h>
28 #include <appcore-common.h>
29 #include <aul.h>
30 #include "macro.h"
31
32 /* Popup names */
33 #define POWEROFF_SYSPOPUP  "poweroff-syspopup"
34 #define SYSTEM_SYSPOPUP    "system-syspopup"
35 #define CRASH_SYSPOPUP     "crash-syspopup"
36
37 /* Setting ugs */
38 #define SETTING_ENCRYPTING_APP    "org.tizen.setting.encrypting"
39 #define SETTING_LIGHTOFF_APP      "org.tizen.setting.turnofflight"
40 #define SETTING_DATAUSAGE_UG      "setting-datausage-efl"
41
42 /* App to show Host devices list */
43 #define HOST_DEVICES              "org.tizen.host-devices"
44 #define APPOPER_TYPE              "_TYPE_"
45 #define APPOPER_TYPE_DEVICE_LIST  "DEVICE_LIST"
46
47 /* Notification icons */
48 #define DATAUSAGE_ICON   SYSTEM_ICONDIR"/datausage_warning.png"
49 #define LED_TORCH_ICON   SYSTEM_ICONDIR"/led_torch.png"
50 #define ODE_ENCRYPT_ICON SYSTEM_ICONDIR"/sdcard_encryption.png"
51 #define ODE_DECRYPT_ICON SYSTEM_ICONDIR"/sdcard_decryption.png"
52 #define ODE_ENCRYPT_ERROR_ICON SYSTEM_ICONDIR"/sdcard_encryption_error.png"
53 #define ODE_DECRYPT_ERROR_ICON SYSTEM_ICONDIR"/sdcard_decryption_error.png"
54 #define TIMA_ICON        SYSTEM_ICONDIR"/tima.png"
55 #define USB_ICON         SYSTEM_ICONDIR"/usb.png"
56 #define BATT_INDI_ICON   SYSTEM_ICONDIR"/batt_full_indicator.png"
57 #define BATT_NOTI_ICON   SYSTEM_ICONDIR"/batt_full_icon.png"
58
59 /* App launching */
60 #define CRADLE_APP_NAME  "org.tizen.desk-dock"
61 #define PWLOCK_APP_NAME  "org.tizen.pwlock"
62 #define SERVANT_APP_NAME "/usr/bin/system-servant"
63
64 enum noti_type {
65         NOTI_NONE = 0,
66         DATAUSAGE_WARNING,
67         DATAUSAGE_DISABLED,
68         LED_TORCH,
69         ODE_COMPLETE,
70         ODE_PROGRESS,
71         ODE_ERROR,
72         TIMA_LKM_PREVENTION,
73         TIMA_PKM_DETECTION,
74         TICKER,
75         USB_STORAGE,
76         USB_STORAGE_RO,
77         USB_DEVICE,
78         BATTERY_FULL,
79         /* Add here additional notificatoins */
80         NOTI_TYPE_MAX
81 };
82
83 enum service_type {
84         TTS_SCREENOFF,
85         TTS_ENABLED,
86         TTS_DISABLED,
87         CHARGER_CONNECTION,
88         SERVICE_MAX,
89 };
90
91 struct edbus_method {
92         const char *member;
93         const char *signature;
94         const char *reply_signature;
95         E_DBus_Method_Cb func;
96         int type;
97 };
98
99 struct edbus_object {
100         const char *path;
101         const char *interface;
102         E_DBus_Object *obj;
103         E_DBus_Interface *iface;
104         const struct edbus_method *methods;
105         const int methods_len;
106 };
107
108 /* launch popup */
109 DBusMessage *launch_popup(E_DBus_Object *obj,
110                                 DBusMessage *msg, char *name);
111 DBusMessage *launch_poweroff_popup(E_DBus_Object *obj,
112                                 DBusMessage *msg, char *name);
113
114 #endif /* __LAUNCHER_H__ */
115