Commit c050fb7c authored by Dan Winship's avatar Dan Winship

devices, active-connection: port to gdbus

parent df670681
......@@ -12,6 +12,10 @@
<tp:docstring>Flags describing the access point's capabilities according to the RSN (Robust Secure Network) protocol.</tp:docstring>
</property>
<property name="Ssid" type="ay" access="read">
<!-- gdbus-codegen assumes that "ay" means "non-UTF-8 string" and
won't deal with '\0' bytes correctly.
-->
<annotation name="org.gtk.GDBus.C.ForceGVariant" value="1"/>
<tp:docstring>The Service Set Identifier identifying the access point.</tp:docstring>
</property>
<property name="Frequency" type="u" access="read">
......
......@@ -5,7 +5,6 @@
<annotation name="org.gtk.GDBus.C.Name" value="DeviceWifi"/>
<method name="GetAccessPoints">
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_device_get_access_points"/>
<arg name="access_points" type="ao" direction="out">
<tp:docstring>
List of access point object paths.
......@@ -20,7 +19,6 @@
</method>
<method name="GetAllAccessPoints">
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_device_get_all_access_points"/>
<arg name="access_points" type="ao" direction="out">
<tp:docstring>
List of access point object paths.
......@@ -33,8 +31,6 @@
</method>
<method name="RequestScan">
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_device_request_scan"/>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<arg name="options" type="a{sv}" direction="in">
<tp:docstring>
Options of scan (currently unused argument).
......
......@@ -3,7 +3,6 @@
<node name="/" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<interface name="org.freedesktop.NetworkManager.Device.WiMax">
<method name="GetNspList">
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_device_get_nsp_list"/>
<arg name="nsps" type="ao" direction="out">
<tp:docstring>
List of NSP object paths
......
......@@ -153,16 +153,12 @@
</property>
<method name="Disconnect">
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_device_disconnect"/>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<tp:docstring>
Disconnects a device and prevents the device from automatically activating further connections without user intervention.
</tp:docstring>
</method>
<method name="Delete">
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_device_delete"/>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<tp:docstring>
Deletes a software device from NetworkManager and removes the interface from the system.
The method returns an error when called for a hardware device.
......
......@@ -7,13 +7,13 @@ AM_CPPFLAGS = \
-I${top_builddir}/src \
-I${top_srcdir}/src/devices \
-I${top_srcdir}/src/platform \
-I${top_builddir}/introspection \
-I${top_srcdir}/include \
-I${top_builddir}/libnm-core \
-I${top_srcdir}/libnm-core \
-DG_LOG_DOMAIN=\""NetworkManager-adsl"\" \
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(DBUS_CFLAGS) \
$(GUDEV_CFLAGS)
GLIB_GENERATED = nm-adsl-enum-types.h nm-adsl-enum-types.c
......@@ -21,10 +21,7 @@ GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM
GLIB_MKENUMS_C_FLAGS = --identifier-prefix NM
nm_adsl_enum_types_sources = $(srcdir)/nm-device-adsl.h
nm-device-adsl-glue.h: $(top_srcdir)/introspection/nm-device-adsl.xml
dbus-binding-tool --prefix=nm_device_adsl --mode=glib-server --output=$@ $<
BUILT_SOURCES = $(GLIB_GENERATED) nm-device-adsl-glue.h
BUILT_SOURCES = $(GLIB_GENERATED)
pkglib_LTLIBRARIES = libnm-device-plugin-adsl.la
......@@ -43,7 +40,7 @@ libnm_device_plugin_adsl_la_LDFLAGS = \
-Wl,--version-script=$(SYMBOL_VIS_FILE)
libnm_device_plugin_adsl_la_LIBADD = \
$(DBUS_LIBS) \
$(top_builddir)/introspection/libnmdbus.la \
$(GUDEV_LIBS)
CLEANFILES = $(BUILT_SOURCES)
......
......@@ -43,7 +43,7 @@
#include "nm-setting-adsl.h"
#include "nm-utils.h"
#include "nm-device-adsl-glue.h"
#include "nmdbus-device-adsl.h"
#include "nm-device-logging.h"
_LOG_DECLARE_SELF (NMDeviceAdsl);
......@@ -613,5 +613,6 @@ nm_device_adsl_class_init (NMDeviceAdslClass *klass)
parent_class->deactivate = deactivate;
nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass),
&dbus_glib_nm_device_adsl_object_info);
NMDBUS_TYPE_DEVICE_ADSL_SKELETON,
NULL);
}
......@@ -9,23 +9,21 @@ AM_CPPFLAGS = \
-I${top_srcdir}/src/settings \
-I${top_srcdir}/src/platform \
-I${top_srcdir}/src/devices/wwan \
-I${top_builddir}/introspection \
-I${top_srcdir}/include \
-I${top_builddir}/libnm-core \
-I${top_srcdir}/libnm-core \
-DG_LOG_DOMAIN=\""NetworkManager-bluetooth"\" \
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(DBUS_CFLAGS)
$(GLIB_CFLAGS)
GLIB_GENERATED = nm-bt-enum-types.h nm-bt-enum-types.c
GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM
GLIB_MKENUMS_C_FLAGS = --identifier-prefix NM
nm_bt_enum_types_sources = $(srcdir)/nm-bt-error.h
nm-device-bt-glue.h: $(top_srcdir)/introspection/nm-device-bt.xml
dbus-binding-tool --prefix=nm_device_bt --mode=glib-server --output=$@ $<
BUILT_SOURCES = $(GLIB_GENERATED) nm-device-bt-glue.h
BUILT_SOURCES = $(GLIB_GENERATED)
pkglib_LTLIBRARIES = libnm-device-plugin-bluetooth.la
......@@ -56,8 +54,9 @@ libnm_device_plugin_bluetooth_la_LDFLAGS = \
-Wl,--version-script=$(SYMBOL_VIS_FILE)
libnm_device_plugin_bluetooth_la_LIBADD = \
$(top_builddir)/introspection/libnmdbus.la \
$(top_builddir)/src/devices/wwan/libnm-wwan.la \
$(DBUS_LIBS) \
$(GLIB_LIBS) \
$(GUDEV_LIBS)
if WITH_BLUEZ5_DUN
......
......@@ -37,6 +37,7 @@
#include "nm-device-bt.h"
#include "nm-core-internal.h"
#include "nm-platform.h"
#include "nm-dbus-compat.h"
typedef struct {
int bluez_version;
......
......@@ -35,13 +35,14 @@
#include "nm-setting-gsm.h"
#include "nm-setting-serial.h"
#include "nm-setting-ppp.h"
#include "nm-device-bt-glue.h"
#include "NetworkManagerUtils.h"
#include "nm-bt-enum-types.h"
#include "nm-utils.h"
#include "nm-bt-error.h"
#include "nm-bt-enum-types.h"
#include "nmdbus-device-bt.h"
#define MM_DBUS_SERVICE "org.freedesktop.ModemManager1"
#define MM_DBUS_PATH "/org/freedesktop/ModemManager1"
#define MM_DBUS_INTERFACE "org.freedesktop.ModemManager1"
......@@ -1194,5 +1195,6 @@ nm_device_bt_class_init (NMDeviceBtClass *klass)
G_TYPE_UINT, G_TYPE_UINT);
nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass),
&dbus_glib_nm_device_bt_object_info);
NMDBUS_TYPE_DEVICE_BLUETOOTH_SKELETON,
NULL);
}
......@@ -28,13 +28,12 @@
#include "NetworkManagerUtils.h"
#include "nm-device-private.h"
#include "nm-platform.h"
#include "nm-dbus-glib-types.h"
#include "nm-enum-types.h"
#include "nm-device-factory.h"
#include "nm-core-internal.h"
#include "nm-ip4-config.h"
#include "nm-device-bond-glue.h"
#include "nmdbus-device-bond.h"
#include "nm-device-logging.h"
_LOG_DECLARE_SELF(NMDeviceBond);
......@@ -556,12 +555,13 @@ nm_device_bond_class_init (NMDeviceBondClass *klass)
g_object_class_install_property
(object_class, PROP_SLAVES,
g_param_spec_boxed (NM_DEVICE_BOND_SLAVES, "", "",
DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH,
G_TYPE_STRV,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass),
&dbus_glib_nm_device_bond_object_info);
NMDBUS_TYPE_DEVICE_BOND_SKELETON,
NULL);
}
/*************************************************************/
......
......@@ -26,13 +26,12 @@
#include "nm-device-bridge.h"
#include "NetworkManagerUtils.h"
#include "nm-device-private.h"
#include "nm-dbus-glib-types.h"
#include "nm-enum-types.h"
#include "nm-platform.h"
#include "nm-device-factory.h"
#include "nm-core-internal.h"
#include "nm-device-bridge-glue.h"
#include "nmdbus-device-bridge.h"
#include "nm-device-logging.h"
_LOG_DECLARE_SELF(NMDeviceBridge);
......@@ -501,12 +500,13 @@ nm_device_bridge_class_init (NMDeviceBridgeClass *klass)
g_object_class_install_property
(object_class, PROP_SLAVES,
g_param_spec_boxed (NM_DEVICE_BRIDGE_SLAVES, "", "",
DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH,
G_TYPE_STRV,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass),
&dbus_glib_nm_device_bridge_object_info);
NMDBUS_TYPE_DEVICE_BRIDGE_SKELETON,
NULL);
}
/*************************************************************/
......
......@@ -50,7 +50,7 @@
#include "nm-core-internal.h"
#include "NetworkManagerUtils.h"
#include "nm-device-ethernet-glue.h"
#include "nmdbus-device-ethernet.h"
#include "nm-device-logging.h"
_LOG_DECLARE_SELF(NMDeviceEthernet);
......@@ -1712,7 +1712,8 @@ nm_device_ethernet_class_init (NMDeviceEthernetClass *klass)
G_PARAM_STATIC_STRINGS));
nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass),
&dbus_glib_nm_device_ethernet_object_info);
NMDBUS_TYPE_DEVICE_ETHERNET_SKELETON,
NULL);
}
/*************************************************************/
......
......@@ -26,7 +26,7 @@
#include "nm-platform.h"
#include "nm-core-internal.h"
#include "nm-device-generic-glue.h"
#include "nmdbus-device-generic.h"
G_DEFINE_TYPE (NMDeviceGeneric, nm_device_generic, NM_TYPE_DEVICE)
......@@ -202,5 +202,6 @@ nm_device_generic_class_init (NMDeviceGenericClass *klass)
G_PARAM_STATIC_STRINGS));
nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass),
&dbus_glib_nm_device_generic_object_info);
NMDBUS_TYPE_DEVICE_GENERIC_SKELETON,
NULL);
}
......@@ -31,7 +31,7 @@
#include "nm-device-factory.h"
#include "nm-core-internal.h"
#include "nm-device-gre-glue.h"
#include "nmdbus-device-gre.h"
#include "nm-device-logging.h"
_LOG_DECLARE_SELF(NMDeviceGre);
......@@ -187,10 +187,10 @@ nm_device_gre_class_init (NMDeviceGreClass *klass)
/* properties */
g_object_class_install_property
(object_class, PROP_PARENT,
g_param_spec_boxed (NM_DEVICE_GRE_PARENT, "", "",
DBUS_TYPE_G_OBJECT_PATH,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
g_param_spec_string (NM_DEVICE_GRE_PARENT, "", "",
NULL,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
g_object_class_install_property
(object_class, PROP_INPUT_FLAGS,
......@@ -256,7 +256,8 @@ nm_device_gre_class_init (NMDeviceGreClass *klass)
G_PARAM_STATIC_STRINGS));
nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass),
&dbus_glib_nm_device_gre_object_info);
NMDBUS_TYPE_DEVICE_GRE_SKELETON,
NULL);
}
/*************************************************************/
......
......@@ -33,7 +33,7 @@
#include "nm-device-factory.h"
#include "nm-core-internal.h"
#include "nm-device-infiniband-glue.h"
#include "nmdbus-device-infiniband.h"
G_DEFINE_TYPE (NMDeviceInfiniband, nm_device_infiniband, NM_TYPE_DEVICE)
......@@ -350,7 +350,8 @@ nm_device_infiniband_class_init (NMDeviceInfinibandClass *klass)
G_PARAM_STATIC_STRINGS));
nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass),
&dbus_glib_nm_device_infiniband_object_info);
NMDBUS_TYPE_DEVICE_INFINIBAND_SKELETON,
NULL);
}
/*************************************************************/
......
......@@ -29,7 +29,7 @@
#include "nm-platform.h"
#include "nm-device-factory.h"
#include "nm-device-macvlan-glue.h"
#include "nmdbus-device-macvlan.h"
#include "nm-device-logging.h"
_LOG_DECLARE_SELF(NMDeviceMacvlan);
......@@ -144,10 +144,10 @@ nm_device_macvlan_class_init (NMDeviceMacvlanClass *klass)
/* properties */
g_object_class_install_property
(object_class, PROP_PARENT,
g_param_spec_boxed (NM_DEVICE_MACVLAN_PARENT, "", "",
DBUS_TYPE_G_OBJECT_PATH,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
g_param_spec_string (NM_DEVICE_MACVLAN_PARENT, "", "",
NULL,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
g_object_class_install_property
(object_class, PROP_MODE,
......@@ -164,7 +164,8 @@ nm_device_macvlan_class_init (NMDeviceMacvlanClass *klass)
G_PARAM_STATIC_STRINGS));
nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass),
&dbus_glib_nm_device_macvlan_object_info);
NMDBUS_TYPE_DEVICE_MACVLAN_SKELETON,
NULL);
}
/*************************************************************/
......
......@@ -29,7 +29,7 @@
#include "nm-platform.h"
#include "nm-device-factory.h"
#include "nm-device-tun-glue.h"
#include "nmdbus-device-tun.h"
#include "nm-device-logging.h"
_LOG_DECLARE_SELF(NMDeviceTun);
......@@ -232,7 +232,8 @@ nm_device_tun_class_init (NMDeviceTunClass *klass)
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass),
&dbus_glib_nm_device_tun_object_info);
NMDBUS_TYPE_DEVICE_TUN_SKELETON,
NULL);
}
......
......@@ -34,7 +34,7 @@
#include "nm-platform.h"
#include "nm-device-factory.h"
#include "nm-device-veth-glue.h"
#include "nmdbus-device-veth.h"
#include "nm-device-logging.h"
_LOG_DECLARE_SELF(NMDeviceVeth);
......@@ -160,13 +160,14 @@ nm_device_veth_class_init (NMDeviceVethClass *klass)
/* properties */
g_object_class_install_property
(object_class, PROP_PEER,
g_param_spec_boxed (NM_DEVICE_VETH_PEER, "", "",
DBUS_TYPE_G_OBJECT_PATH,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
g_param_spec_string (NM_DEVICE_VETH_PEER, "", "",
NULL,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass),
&dbus_glib_nm_device_veth_object_info);
NMDBUS_TYPE_DEVICE_VETH_SKELETON,
NULL);
}
/*************************************************************/
......
......@@ -37,7 +37,7 @@
#include "nm-manager.h"
#include "nm-core-internal.h"
#include "nm-device-vlan-glue.h"
#include "nmdbus-device-vlan.h"
#include "nm-device-logging.h"
_LOG_DECLARE_SELF(NMDeviceVlan);
......@@ -617,10 +617,10 @@ nm_device_vlan_class_init (NMDeviceVlanClass *klass)
/* properties */
g_object_class_install_property
(object_class, PROP_PARENT,
g_param_spec_boxed (NM_DEVICE_VLAN_PARENT, "", "",
DBUS_TYPE_G_OBJECT_PATH,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
g_param_spec_string (NM_DEVICE_VLAN_PARENT, "", "",
NULL,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
g_object_class_install_property
(object_class, PROP_VLAN_ID,
g_param_spec_uint (NM_DEVICE_VLAN_ID, "", "",
......@@ -628,7 +628,8 @@ nm_device_vlan_class_init (NMDeviceVlanClass *klass)
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass),
&dbus_glib_nm_device_vlan_object_info);
NMDBUS_TYPE_DEVICE_VLAN_SKELETON,
NULL);
}
/*************************************************************/
......
......@@ -30,7 +30,7 @@
#include "nm-utils.h"
#include "nm-device-factory.h"
#include "nm-device-vxlan-glue.h"
#include "nmdbus-device-vxlan.h"
#include "nm-device-logging.h"
_LOG_DECLARE_SELF(NMDeviceVxlan);
......@@ -234,10 +234,10 @@ nm_device_vxlan_class_init (NMDeviceVxlanClass *klass)
/* properties */
g_object_class_install_property
(object_class, PROP_PARENT,
g_param_spec_boxed (NM_DEVICE_VXLAN_PARENT, "", "",
DBUS_TYPE_G_OBJECT_PATH,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
g_param_spec_string (NM_DEVICE_VXLAN_PARENT, "", "",
NULL,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
g_object_class_install_property
(object_class, PROP_ID,
......@@ -345,7 +345,8 @@ nm_device_vxlan_class_init (NMDeviceVxlanClass *klass)
G_PARAM_STATIC_STRINGS));
nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass),
&dbus_glib_nm_device_vxlan_object_info);
NMDBUS_TYPE_DEVICE_VXLAN_SKELETON,
NULL);
}
/*************************************************************/
......
This diff is collapsed.
......@@ -22,7 +22,6 @@
#ifndef __NETWORKMANAGER_DEVICE_H__
#define __NETWORKMANAGER_DEVICE_H__
#include <dbus/dbus-glib.h>
#include <netinet/in.h>
#include "nm-exported-object.h"
......@@ -310,7 +309,7 @@ typedef struct {
} NMDeviceClass;
typedef void (*NMDeviceAuthRequestFunc) (NMDevice *device,
DBusGMethodInvocation *context,
GDBusMethodInvocation *context,
NMAuthSubject *subject,
GError *error,
gpointer user_data);
......
......@@ -7,13 +7,14 @@ AM_CPPFLAGS = \
-I${top_builddir}/src \
-I${top_srcdir}/src/devices \
-I${top_srcdir}/src/platform \
-I${top_builddir}/introspection \
-I${top_srcdir}/include \
-I${top_builddir}/libnm-core \
-I${top_srcdir}/libnm-core \
-DG_LOG_DOMAIN=\""NetworkManager-team"\" \
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(DBUS_CFLAGS)
$(GLIB_CFLAGS)
if WITH_TEAMDCTL
AM_CPPFLAGS += ${LIBTEAMDCTL_CFLAGS}
......@@ -24,13 +25,7 @@ GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM
GLIB_MKENUMS_C_FLAGS = --identifier-prefix NM
nm_team_enum_types_sources = $(srcdir)/nm-device-team.h
glue_sources = \
nm-device-team-glue.h
%-glue.h: $(top_srcdir)/introspection/%.xml
$(AM_V_GEN) dbus-binding-tool --prefix=$(subst -,_,$(subst -glue.h,,$@)) --mode=glib-server --output=$@ $<
BUILT_SOURCES = $(GLIB_GENERATED) $(glue_sources)
BUILT_SOURCES = $(GLIB_GENERATED)
pkglib_LTLIBRARIES = libnm-device-plugin-team.la
......@@ -49,7 +44,8 @@ libnm_device_plugin_team_la_LDFLAGS = \
-Wl,--version-script=$(SYMBOL_VIS_FILE)
libnm_device_plugin_team_la_LIBADD = \
$(DBUS_LIBS) \
$(top_builddir)/introspection/libnmdbus.la \
$(GLIB_LIBS) \
$(GUDEV_LIBS)
if WITH_TEAMDCTL
......
......@@ -32,12 +32,12 @@
#include "NetworkManagerUtils.h"
#include "nm-device-private.h"
#include "nm-platform.h"
#include "nm-dbus-glib-types.h"
#include "nm-enum-types.h"
#include "nm-team-enum-types.h"
#include "nm-core-internal.h"
#include "nm-dbus-compat.h"
#include "nm-device-team-glue.h"
#include "nmdbus-device-team.h"
#include "nm-device-logging.h"
_LOG_DECLARE_SELF(NMDeviceTeam);
......@@ -809,11 +809,12 @@ nm_device_team_class_init (NMDeviceTeamClass *klass)
g_object_class_install_property
(object_class, PROP_SLAVES,
g_param_spec_boxed (NM_DEVICE_TEAM_SLAVES, "", "",
DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH,
G_TYPE_STRV,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass),
&dbus_glib_nm_device_team_object_info);
NMDBUS_TYPE_DEVICE_TEAM_SKELETON,
NULL);
}
......@@ -13,13 +13,14 @@ AM_CPPFLAGS = \
-I${top_srcdir}/src/settings \
-I${top_srcdir}/src/platform \
-I${top_srcdir}/src/supplicant-manager \
-I${top_builddir}/introspection \
-I${top_srcdir}/include \
-I${top_builddir}/libnm-core \
-I${top_srcdir}/libnm-core \
-DG_LOG_DOMAIN=\""NetworkManager-wifi"\" \
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(DBUS_CFLAGS)
$(GLIB_CFLAGS)
GLIB_GENERATED = nm-wifi-enum-types.h nm-wifi-enum-types.c
GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM
......@@ -29,14 +30,7 @@ nm_wifi_enum_types_sources = \
$(srcdir)/nm-wifi-ap.h \
$(srcdir)/nm-device-olpc-mesh.h
glue_sources = \
nm-device-wifi-glue.h \
nm-device-olpc-mesh-glue.h
%-glue.h: $(top_srcdir)/introspection/%.xml
$(AM_V_GEN) dbus-binding-tool --prefix=$(subst -,_,$(subst -glue.h,,$@)) --mode=glib-server --output=$@ $<
BUILT_SOURCES = $(GLIB_GENERATED) $(glue_sources)
BUILT_SOURCES = $(GLIB_GENERATED)
pkglib_LTLIBRARIES = libnm-device-plugin-wifi.la
......@@ -60,7 +54,8 @@ libnm_device_plugin_wifi_la_LDFLAGS = \
-Wl,--version-script=$(SYMBOL_VIS_FILE)
libnm_device_plugin_wifi_la_LIBADD = \
$(DBUS_LIBS) \
$(top_builddir)/introspection/libnmdbus.la \
$(GLIB_LIBS) \
$(GUDEV_LIBS)
CLEANFILES = $(BUILT_SOURCES)
......
......@@ -26,7 +26,6 @@
#include "config.h"
#include <dbus/dbus.h>
#include <netinet/in.h>
#include <string.h>
#include <sys/stat.h>
......@@ -54,7 +53,7 @@
/* This is a bug; but we can't really change API now... */
#include "nm-vpn-dbus-interface.h"
#include "nm-device-olpc-mesh-glue.h"
#include "nmdbus-device-olpc-mesh.h"
#include "nm-device-logging.h"
_LOG_DECLARE_SELF(NMDeviceOlpcMesh);
......@@ -531,10 +530,10 @@ nm_device_olpc_mesh_class_init (NMDeviceOlpcMeshClass *klass)
/* Properties */
g_object_class_install_property
(object_class, PROP_COMPANION,
g_param_spec_boxed (NM_DEVICE_OLPC_MESH_COMPANION, "", "",
DBUS_TYPE_G_OBJECT_PATH,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
g_param_spec_string (NM_DEVICE_OLPC_MESH_COMPANION, "", "",
NULL,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
g_object_class_install_property
(object_class, PROP_ACTIVE_CHANNEL,
......@@ -544,6 +543,7 @@ nm_device_olpc_mesh_class_init (NMDeviceOlpcMeshClass *klass)
G_PARAM_STATIC_STRINGS));
nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass),
&dbus_glib_nm_device_olpc_mesh_object_info);
NMDBUS_TYPE_DEVICE_OLPC_MESH_SKELETON,
NULL);
}
......@@ -21,7 +21,6 @@
#include "config.h"
#include <dbus/dbus.h>
#include <netinet/in.h>
#include <string.h>
#include <unistd.h>
......@@ -48,23 +47,10 @@
#include "nm-auth-utils.h"
#include "nm-settings-connection.h"
#include "nm-enum-types.h"
#include "nm-dbus-glib-types.h"
#include "nm-wifi-enum-types.h"
#include "nm-connection-provider.h"
static gboolean impl_device_get_access_points (NMDeviceWifi *device,
GPtrArray **aps,
GError **err);
static gboolean impl_device_get_all_access_points (NMDeviceWifi *device,
GPtrArray **aps,
GError **err);
static void impl_device_request_scan (NMDeviceWifi *device,
GHashTable *options,
DBusGMethodInvocation *context);
#include "nm-device-wifi-glue.h"
#include "nmdbus-device-wifi.h"
#include "nm-device-logging.h"
_LOG_DECLARE_SELF(NMDeviceWifi);
......@@ -1017,102 +1003,108 @@ get_sorted_ap_list (NMDeviceWifi *self)
return g_slist_sort (sorted, (GCompareFunc) ap_id_compare);
}
static gboolean
impl_device_get_access_points (NMDeviceWifi *self,
GPtrArray **aps,
GError **err)
static void
impl_device_wifi_get_access_points (NMDeviceWifi *self,
GDBusMethodInvocation *context)
{
GSList *sorted, *iter;
GPtrArray *paths;
*aps = g_ptr_array_new ();
paths = g_ptr_array_new ();
sorted = get_sorted_ap_list (self);
for (iter = sorted; iter; iter = iter->next) {
NMAccessPoint *ap = NM_AP (iter->data);
if (nm_ap_get_ssid (ap))
g_ptr_array_add (*aps, g_strdup (nm_exported_object_get_path (NM_EXPORTED_OBJECT (ap))));
g_ptr_array_add (paths, g_strdup (nm_exported_object_get_path (NM_EXPORTED_OBJECT (ap))));
}
g_ptr_array_add (paths, NULL);
g_slist_free (sorted);
return TRUE;
g_dbus_method_invocation_return_value (context, g_variant_new ("(^ao)", (char **) paths->pdata));
g_ptr_array_unref (paths);
}
static gboolean
impl_device_get_all_access_points (NMDeviceWifi *self,
GPtrArray **aps,
GError **err)
static void
impl_device_wifi_get_all_access_points (NMDeviceWifi *self,
GDBusMethodInvocation *context)
{
GSList *sorted, *iter;
GPtrArray *paths;
*aps = g_ptr_array_new ();
paths = g_ptr_array_new ();
sorted = get_sorted_ap_list (self);
for (iter = sorted; iter; iter = iter->next)
g_ptr_array_add (*aps, g_strdup (nm_exported_object_get_path (NM_EXPORTED_OBJECT (iter->data))));
g_ptr_array_add (paths, g_strdup (nm_exported_object_get_path (NM_EXPORTED_OBJECT (iter->data))));
g_ptr_array_add (paths, NULL);
g_slist_free (sorted);
return TRUE;
g_dbus_method_invocation_return_value (context, g_variant_new ("(^ao)", (char **) paths->pdata));