4 Copyright (C) 2004 Nokia Corporation. All rights reserved.
6 @author Janne Ylälehto <janne.ylalehto@nokia.com>
7 @author Jouni Malinen <j@w1.fi> and contributors
8 @author Javier S. Pedro <javispedro@javispedro.com>
10 This program is free software; you can redistribute it and/or modify it
11 under the terms of the GNU General Public License as published by the
12 Free Software Foundation; either version 2 of the License, or (at your
13 option) any later version.
15 This program is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 General Public License for more details.
20 You should have received a copy of the GNU General Public License along
21 with this program; if not, write to the Free Software Foundation, Inc.,
22 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 #ifndef _DBUS_HELPER_H_
26 #define _DBUS_HELPER_H_
28 #ifndef DBUS_API_SUBJECT_TO_CHANGE
29 # define DBUS_API_SUBJECT_TO_CHANGE
30 # include <dbus/dbus.h>
33 void append_dbus_args(DBusMessage *message, int first_arg_type, ...);
35 int send_and_unref(DBusConnection *connection, DBusMessage *message);
37 int send_invalid_args(DBusConnection *connection, DBusMessage *message);
39 DBusMessage *new_dbus_signal(const char *path,
40 const char *interface,
42 const char *destination);
44 DBusMessage *new_dbus_method_call(const char *service,
46 const char *interface,
49 DBusMessage *new_dbus_method_return(DBusMessage *message);
51 DBusMessage *new_dbus_error(DBusMessage *message, const char *name);
53 int dbus_dict_open_write(DBusMessageIter *iter,
54 DBusMessageIter *iter_dict);
55 int dbus_dict_close_write(DBusMessageIter *iter,
56 DBusMessageIter *iter_dict);
58 int dbus_dict_append_string(DBusMessageIter *iter_dict,
59 const char *key, const char *value);
61 int dbus_dict_append_int32(DBusMessageIter *iter_dict,
63 const dbus_int32_t value);
65 #endif /* _DBUD_HELPER_H_ */