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>
28 #define XXX_BUS_NAME "org.tizen.system.XXX"
29 #define XXX_OBJECT_PATH "/Org/Tizen/System/XXX"
30 #define XXX_INTERFACE_NAME XXX_BUS_NAME
31 #define XXX_PATH_YYY XXX_OBJECT_PATH"/YYY"
32 #define XXX_INTERFACE_YYY XXX_INTERFACE_NAME".YYY"
33 #define XXX_SIGNAL_ZZZ "ZZZ"
34 #define XXX_METHOD_ZZZ "ZZZ"
40 #define COORD_BUS_NAME "org.tizen.system.coord"
41 #define COORD_OBJECT_PATH "/Org/Tizen/System/Coord"
42 #define COORD_INTERFACE_NAME COORD_BUS_NAME
43 /* Rotation service: operations about rotation */
44 #define COORD_PATH_ROTATION COORD_OBJECT_PATH"/Rotation"
45 #define COORD_INTERFACE_ROTATION COORD_INTERFACE_NAME".rotation"
46 #define COORD_SIGNAL_ROTATION_CHANGED "Changed"
47 #define COORD_METHOD_ROTATION_DEGREE "Degree"
52 #define CONTEXTD_BUS_NAME "org.tizen.sensor.context"
53 #define CONTEXTD_OBJECT_PATH "/org/tizen/sensor/context"
54 #define CONTEXTD_INTERFACE_NAME CONTEXTD_BUS_NAME
56 #define CONTEXTD_PATH_ROTATION CONTEXTD_OBJECT_PATH"/rotation"
57 #define CONTEXTD_INTERFACE_ROTATION CONTEXTD_INTERFACE_NAME".rotation"
58 #define CONTEXTD_SIGNAL_CHANGED "Changed"
59 #define CONTEXTD_METHOD_SET "Set"
66 int append_variant(DBusMessageIter *iter, const char *sig, char *param[]);
68 DBusMessage *dbus_method_sync_with_reply(const char *dest, const char *path,
69 const char *interface, const char *method,
70 const char *sig, char *param[]);
72 int dbus_method_sync(const char *dest, const char *path,
73 const char *interface, const char *method,
74 const char *sig, char *param[]);
76 int dbus_method_async(const char *dest, const char *path,
77 const char *interface, const char *method,
78 const char *sig, char *param[]);
80 typedef void (*dbus_pending_cb)(void *data, DBusMessage *msg, DBusError *err);
82 int dbus_method_async_with_reply(const char *dest, const char *path,
83 const char *interface, const char *method,
84 const char *sig, char *param[], dbus_pending_cb cb, int timeout, void *data);