path: root/wpa_supplicant/dbus/dbus_common.h
diff options
authorJouni Malinen <j@w1.fi>2009-12-30 22:15:56 (GMT)
committerJouni Malinen <j@w1.fi>2009-12-30 22:15:56 (GMT)
commit8ddef94bd41747ba658ed4ed5dfa9e62b4b84cfa (patch)
treee47378c8bc1702199eb3200a701fe291b8336f10 /wpa_supplicant/dbus/dbus_common.h
parent0474686514ac2ba80b352792b034eec63ca6886e (diff)
dbus: Share common initialization code for both old and new interface
This was mostly identical code that had been copied for the new D-Bus API implementation and as such, should really have been shared from the beginning. In addition, the copied code ended up generating interesting stack traces since the actual D-Bus connection was being shared even though the pointer to it was stored in two distinct data structures. The old D-Bus code ended up dispatching some D-Bus callbacks which ended up running the new D-Bus code. Since the private context pointers were mostly identical, everything seemed to more or less work, but this design was just making things more complex and potentially very easy to break.
Diffstat (limited to 'wpa_supplicant/dbus/dbus_common.h')
1 files changed, 26 insertions, 0 deletions
diff --git a/wpa_supplicant/dbus/dbus_common.h b/wpa_supplicant/dbus/dbus_common.h
new file mode 100644
index 0000000..50da09b
--- /dev/null
+++ b/wpa_supplicant/dbus/dbus_common.h
@@ -0,0 +1,26 @@
+ * wpa_supplicant D-Bus control interface - common definitions
+ * Copyright (c) 2006, Dan Williams <dcbw@redhat.com> and Red Hat, Inc.
+ * Copyright (c) 2009, Witold Sowa <witold.sowa@gmail.com>
+ * Copyright (c) 2009, Jouni Malinen <j@w1.fi>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Alternatively, this software may be distributed under the terms of BSD
+ * license.
+ *
+ * See README and COPYING for more details.
+ */
+#ifndef DBUS_COMMON_H
+#define DBUS_COMMON_H
+struct wpas_dbus_priv;
+struct wpa_global;
+struct wpas_dbus_priv * wpas_dbus_init(struct wpa_global *global);
+void wpas_dbus_deinit(struct wpas_dbus_priv *priv);
+#endif /* DBUS_COMMON_H */