upgrade obexd to 0.47
[profile/ivi/obexd.git] / client / dbus.h
1 /*
2  *
3  *  OBEX Client
4  *
5  *  Copyright (C) 2008-2011  Intel Corporation. All rights reserved.
6  *
7  *  This program is free software; you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License version 2 as
9  *  published by the Free Software Foundation.
10  *
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program; if not, write to the Free Software
18  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19  *
20  */
21
22 #ifndef __OBEX_DBUS_H
23 #define __OBEX_DBUS_H
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 #include <dbus/dbus.h>
30
31 /* Essentially a{sv} */
32 #define OBC_PROPERTIES_ARRAY_SIGNATURE DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING \
33                                         DBUS_TYPE_STRING_AS_STRING \
34                                         DBUS_TYPE_VARIANT_AS_STRING \
35                                         DBUS_DICT_ENTRY_END_CHAR_AS_STRING
36
37 void obex_dbus_dict_append(DBusMessageIter *dict, const char *key, int type,
38                                 void *value);
39
40 void obex_dbus_dict_append_array(DBusMessageIter *dict, const char *key,
41                                         int type, void *val);
42
43 void obex_dbus_dict_append_dict(DBusMessageIter *dict, const char *key,
44                                         int type, void *val);
45
46 int obex_dbus_signal_property_changed(DBusConnection *conn, const char *path,
47                                         const char *interface, const char *name,
48                                         int type, void *value);
49
50 int obex_dbus_signal_array_property_changed(DBusConnection *conn,
51                                                 const char *path,
52                                                 const char *interface,
53                                                 const char *name, int type,
54                                                 void *value);
55
56 int obex_dbus_signal_dict_property_changed(DBusConnection *conn,
57                                                 const char *path,
58                                                 const char *interface,
59                                                 const char *name, int type,
60                                                 void *value);
61
62 #ifdef __cplusplus
63 }
64 #endif
65
66 #endif /* __OBEX_DBUS_H */