summaryrefslogtreecommitdiff
path: root/introspection
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2014-09-10 13:51:53 -0400
committerDan Winship <danw@gnome.org>2014-09-18 11:51:09 -0400
commit6793a32a8c5445103ba3680bb5e4c31727096099 (patch)
treefe9026f44669b6e523459c39cf991ad7c318395f /introspection
parent16871ebc388f81fd811e9f7d85965ba86236005c (diff)
downloadNetworkManager-6793a32a8c5445103ba3680bb5e4c31727096099.tar.gz
libnm: port to GDBus
Port libnm-core/libnm to GDBus. The NetworkManager daemon continues to use dbus-glib; the previously-added connection hash/variant conversion methods are now moved to NetworkManagerUtils (along with a few other utilities that are now only needed by the daemon code).
Diffstat (limited to 'introspection')
-rw-r--r--introspection/Makefile.am88
-rw-r--r--introspection/nm-device-ethernet.xml1
-rw-r--r--introspection/nm-device-wifi.xml2
-rw-r--r--introspection/nm-manager.xml2
-rw-r--r--introspection/nm-ppp-manager.xml2
-rw-r--r--introspection/nm-vpn-connection.xml2
-rw-r--r--introspection/nm-vpn-plugin.xml2
7 files changed, 99 insertions, 0 deletions
diff --git a/introspection/Makefile.am b/introspection/Makefile.am
index 4d742dfac4..3cf0873396 100644
--- a/introspection/Makefile.am
+++ b/introspection/Makefile.am
@@ -1,3 +1,91 @@
+noinst_LTLIBRARIES = \
+ libnmdbus.la
+
+# gdbus-codegen 2.38 will emit code that requires glib 2.38, which
+# will then cause availability warnings if we define
+# GLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32.
+#
+# This is fixed in GLib 2.40 (it emits code that takes
+# GLIB_VERSION_MAX_ALLOWED into account), so this workaround can go
+# away when we depend on that.
+AM_CPPFLAGS = $(filter-out -DGLIB_VERSION_MAX_ALLOWED%,$(GLIB_CFLAGS))
+
+nodist_libnmdbus_la_SOURCES = \
+ nmdbus-access-point.c \
+ nmdbus-access-point.h \
+ nmdbus-active-connection.c \
+ nmdbus-active-connection.h \
+ nmdbus-agent-manager.c \
+ nmdbus-agent-manager.h \
+ nmdbus-device-bond.c \
+ nmdbus-device-bond.h \
+ nmdbus-device-bridge.c \
+ nmdbus-device-bridge.h \
+ nmdbus-device-bt.c \
+ nmdbus-device-bt.h \
+ nmdbus-device-ethernet.c \
+ nmdbus-device-ethernet.h \
+ nmdbus-device.c \
+ nmdbus-device.h \
+ nmdbus-device-generic.c \
+ nmdbus-device-generic.h \
+ nmdbus-device-gre.c \
+ nmdbus-device-gre.h \
+ nmdbus-device-infiniband.c \
+ nmdbus-device-infiniband.h \
+ nmdbus-device-macvlan.c \
+ nmdbus-device-macvlan.h \
+ nmdbus-device-tun.c \
+ nmdbus-device-tun.h \
+ nmdbus-device-veth.c \
+ nmdbus-device-veth.h \
+ nmdbus-device-vlan.c \
+ nmdbus-device-vlan.h \
+ nmdbus-device-vxlan.c \
+ nmdbus-device-vxlan.h \
+ nmdbus-device-wifi.c \
+ nmdbus-device-wifi.h \
+ nmdbus-device-wimax.c \
+ nmdbus-device-wimax.h \
+ nmdbus-dhcp4-config.c \
+ nmdbus-dhcp4-config.h \
+ nmdbus-dhcp6-config.c \
+ nmdbus-dhcp6-config.h \
+ nmdbus-ip4-config.c \
+ nmdbus-ip4-config.h \
+ nmdbus-ip6-config.c \
+ nmdbus-ip6-config.h \
+ nmdbus-manager.c \
+ nmdbus-manager.h \
+ nmdbus-ppp-manager.c \
+ nmdbus-ppp-manager.h \
+ nmdbus-secret-agent.c \
+ nmdbus-secret-agent.h \
+ nmdbus-settings-connection.c \
+ nmdbus-settings-connection.h \
+ nmdbus-settings.c \
+ nmdbus-settings.h \
+ nmdbus-vpn-connection.c \
+ nmdbus-vpn-connection.h \
+ nmdbus-vpn-plugin.c \
+ nmdbus-vpn-plugin.h
+
+define _make_nmdbus_rule
+$(1): $(patsubst nmdbus-%.c,nm-%.xml,$(1))
+ $$(AM_V_GEN) gdbus-codegen \
+ --generate-c-code $$(basename $$@) \
+ --c-namespace NMDBus \
+ --interface-prefix org.freedesktop.NetworkManager \
+ $$<
+
+$(basename $(1)).h: $(1)
+ @true
+endef
+
+$(foreach f,$(filter %.c,$(nodist_libnmdbus_la_SOURCES)),$(eval $(call _make_nmdbus_rule,$f)))
+
+CLEANFILES = $(nodist_libnmdbus_la_SOURCES)
+
EXTRA_DIST = \
all.xml.in \
generic-types.xml \
diff --git a/introspection/nm-device-ethernet.xml b/introspection/nm-device-ethernet.xml
index 000caf752f..2554bda17f 100644
--- a/introspection/nm-device-ethernet.xml
+++ b/introspection/nm-device-ethernet.xml
@@ -2,6 +2,7 @@
<node name="/" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<interface name="org.freedesktop.NetworkManager.Device.Wired">
+ <annotation name="org.gtk.GDBus.C.Name" value="DeviceEthernet"/>
<property name="HwAddress" type="s" access="read">
<tp:docstring>
diff --git a/introspection/nm-device-wifi.xml b/introspection/nm-device-wifi.xml
index 65c7b71dce..2476fd7dd9 100644
--- a/introspection/nm-device-wifi.xml
+++ b/introspection/nm-device-wifi.xml
@@ -2,6 +2,8 @@
<node name="/" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<interface name="org.freedesktop.NetworkManager.Device.Wireless">
+ <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">
diff --git a/introspection/nm-manager.xml b/introspection/nm-manager.xml
index 6af2be3032..78021f73da 100644
--- a/introspection/nm-manager.xml
+++ b/introspection/nm-manager.xml
@@ -2,6 +2,8 @@
<node name="/org/freedesktop/NetworkManager" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<interface name="org.freedesktop.NetworkManager">
+ <annotation name="org.gtk.GDBus.C.Name" value="Manager"/>
+
<method name="GetDevices">
<tp:docstring>
Get the list of network devices.
diff --git a/introspection/nm-ppp-manager.xml b/introspection/nm-ppp-manager.xml
index 2867daf979..5ea1e8b16b 100644
--- a/introspection/nm-ppp-manager.xml
+++ b/introspection/nm-ppp-manager.xml
@@ -2,6 +2,8 @@
<node name="/">
<interface name="org.freedesktop.NetworkManager.PPP">
+ <annotation name="org.gtk.GDBus.C.Name" value="PPP_Manager"/>
+
<method name="NeedSecrets">
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_ppp_manager_need_secrets"/>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
diff --git a/introspection/nm-vpn-connection.xml b/introspection/nm-vpn-connection.xml
index 65b9178543..03bbbe980f 100644
--- a/introspection/nm-vpn-connection.xml
+++ b/introspection/nm-vpn-connection.xml
@@ -2,6 +2,8 @@
<node name="/" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<interface name="org.freedesktop.NetworkManager.VPN.Connection">
+ <annotation name="org.gtk.GDBus.C.Name" value="VpnConnection"/>
+
<tp:docstring>
Represents an active connection to a Virtual Private Network.
</tp:docstring>
diff --git a/introspection/nm-vpn-plugin.xml b/introspection/nm-vpn-plugin.xml
index a72fa93c2c..adb6a08526 100644
--- a/introspection/nm-vpn-plugin.xml
+++ b/introspection/nm-vpn-plugin.xml
@@ -2,6 +2,8 @@
<node name="/" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<interface name="org.freedesktop.NetworkManager.VPN.Plugin">
+ <annotation name="org.gtk.GDBus.C.Name" value="VpnPlugin"/>
+
<tp:docstring>
This interface is provided by plugins providing VPN services to the NetworkManager daemon.
</tp:docstring>