c95841631eb950db1ea9205da0f5b31f84698d44
[apps/native/starter.git] / include / dbus_util.h
1 /*
2  * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef __DBUS_UTIL_H__
18 #define __DBUS_UTIL_H__
19
20 #include <E_DBus.h>
21
22 #define OOM_ADJ_VALUE_HOMESCREEN 0
23
24 #ifdef TIZEN_PROFILE_MOBILE
25 #define OOM_ADJ_VALUE_DEFAULT   200
26 #else
27 #define OOM_ADJ_VALUE_DEFAULT   0
28 #endif
29
30 #define DEVICED_BUS_NAME       "org.tizen.system.deviced"
31 #define DEVICED_OBJECT_PATH    "/Org/Tizen/System/DeviceD"
32 #define DEVICED_INTERFACE_NAME DEVICED_BUS_NAME
33 #define DEVICED_PATH            DEVICED_OBJECT_PATH"/Process"
34 #define DEVICED_INTERFACE       DEVICED_INTERFACE_NAME".Process"
35 #define DEVICED_SET_METHOD      "oomadj_set"
36
37 #define DISPLAY_OBJECT_PATH     DEVICED_OBJECT_PATH"/Display"
38 #define DEVICED_INTERFACE_DISPLAY  DEVICED_INTERFACE_NAME".display"
39 #define MEMBER_LCD_ON                   "LCDOn"
40 #define MEMBER_LCD_OFF                  "LCDOff"
41
42 extern void dbus_util_send_home_raise_signal(void);
43 extern int dbus_util_send_oomadj(int pid, int oom_adj_value);
44 extern void dbus_util_send_cpu_booster_signal(void);
45 extern void dbus_util_send_poweroff_signal(void);
46 extern void dbus_util_send_lock_PmQos_signal(void);
47
48 extern int dbus_util_receive_lcd_status(void (*changed_cb)(void *data, DBusMessage *msg), void *data);
49 extern char *dbus_util_msg_arg_get_str(DBusMessage *msg);
50
51 #endif //__DBUS_UTIL_H__