4 * Copyright (c) 2012 - 2013 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.
23 #include <dbus/dbus.h>
25 #define DEVICED_BUS_NAME "org.tizen.system.deviced"
26 #define DEVICED_OBJECT_PATH "/Org/Tizen/System/DeviceD"
27 #define DEVICED_INTERFACE_NAME DEVICED_BUS_NAME
29 /* Display service: start/stop display(pm), get/set brightness operations about display */
30 #define DEVICED_PATH_DISPLAY DEVICED_OBJECT_PATH"/Display"
31 #define DEVICED_INTERFACE_DISPLAY DEVICED_INTERFACE_NAME".display"
34 #define DEVICED_PATH_BATTERY DEVICED_OBJECT_PATH"/Battery"
35 #define DEVICED_INTERFACE_BATTERY DEVICED_INTERFACE_NAME".Battery"
37 /* Haptic service: operatioins about haptic */
38 #define DEVICED_PATH_HAPTIC DEVICED_OBJECT_PATH"/Haptic"
39 #define DEVICED_INTERFACE_HAPTIC DEVICED_INTERFACE_NAME".haptic"
41 /* Led service: play/stop led operations about led */
42 #define DEVICED_PATH_LED DEVICED_OBJECT_PATH"/Led"
43 #define DEVICED_INTERFACE_LED DEVICED_INTERFACE_NAME".Led"
45 int dbus_method_sync(const char *dest, const char *path,
46 const char *interface, const char *method,
47 const char *sig, char *param[]);
49 typedef void (*dbus_pending_cb)(void *data, DBusMessage *msg, DBusError *err);
51 int dbus_method_async_with_reply(const char *dest, const char *path,
52 const char *interface, const char *method,
53 const char *sig, char *param[], dbus_pending_cb cb, int timeout, void *data);