initial import
[libicd-wpa] / dbus-helper.h
diff --git a/dbus-helper.h b/dbus-helper.h
new file mode 100644 (file)
index 0000000..094ce0c
--- /dev/null
@@ -0,0 +1,65 @@
+/**
+  @file dbus-helper.h
+
+  Copyright (C) 2004 Nokia Corporation. All rights reserved.
+
+  @author Janne Ylälehto <janne.ylalehto@nokia.com>
+  @author Jouni Malinen <j@w1.fi> and contributors
+  @author Javier S. Pedro <javispedro@javispedro.com>
+
+  This program is free software; you can redistribute it and/or modify it
+  under the terms of the GNU General Public License as published by the
+  Free Software Foundation; either version 2 of the License, or (at your
+  option) any later version.
+
+  This program is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+  General Public License for more details.
+
+  You should have received a copy of the GNU General Public License along
+  with this program; if not, write to the Free Software Foundation, Inc.,
+  59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+*/
+#ifndef _DBUS_HELPER_H_
+#define _DBUS_HELPER_H_
+
+#ifndef DBUS_API_SUBJECT_TO_CHANGE
+# define DBUS_API_SUBJECT_TO_CHANGE
+# include <dbus/dbus.h>
+#endif
+
+void append_dbus_args(DBusMessage *message, int first_arg_type, ...);
+
+int send_and_unref(DBusConnection *connection, DBusMessage *message);
+
+int send_invalid_args(DBusConnection *connection, DBusMessage *message);
+
+DBusMessage *new_dbus_signal(const char *path,
+                             const char *interface,
+                             const char *name,
+                             const char *destination);
+
+DBusMessage *new_dbus_method_call(const char *service,
+                                  const char *path,
+                                  const char *interface,
+                                  const char *method);
+
+DBusMessage *new_dbus_method_return(DBusMessage *message);
+
+DBusMessage *new_dbus_error(DBusMessage *message, const char *name);
+
+int dbus_dict_open_write(DBusMessageIter *iter,
+                                    DBusMessageIter *iter_dict);
+int dbus_dict_close_write(DBusMessageIter *iter,
+                                     DBusMessageIter *iter_dict);
+
+int dbus_dict_append_string(DBusMessageIter *iter_dict,
+                                       const char *key, const char *value);
+                                     
+int dbus_dict_append_int32(DBusMessageIter *iter_dict,
+                                      const char *key,
+                                      const dbus_int32_t value);
+
+#endif /* _DBUD_HELPER_H_ */