mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-06 16:21:50 +00:00
2007-08-14 Tambet Ingo <tambet@gmail.com>
* libnm-glib/Makefile.am: Use nm-manager-client.xml to produce * nm-client-bindings. * introspection/nm-manager-client.xml: Add a horrible horrbile * hack to work around an issue with dbus-glib bindings generator. The issue is, the generated C caller functions for dbus methods "Sleep(bool)" and "sleep()" both have the same function name and different arguments and it won't compile anymore. To fix this, we now have two copies of nm-manager.xml file. nm-manager.xml contains the actual interface, that is new API + compatibility API and used by the daemon. The other, nm-manager-client.xml is only the new API without compatibility bits and is used by libnm-glib to make it compile. * introspection/nm-manager.xml: Define compatibility methods * (sleep, wake, state). * src/nm-manager.c (impl_manager_legacy_sleep) (impl_manager_legacy_wake, impl_manager_legacy_state): Implement the compatibility interface functions for 0.6 branch. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2688 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
30a4e7e602
commit
8bed6ff2de
19
ChangeLog
19
ChangeLog
|
@ -1,3 +1,22 @@
|
|||
2007-08-14 Tambet Ingo <tambet@gmail.com>
|
||||
|
||||
* libnm-glib/Makefile.am: Use nm-manager-client.xml to produce nm-client-bindings.
|
||||
|
||||
* introspection/nm-manager-client.xml: Add a horrible horrbile hack to work around
|
||||
an issue with dbus-glib bindings generator. The issue is, the generated C caller
|
||||
functions for dbus methods "Sleep(bool)" and "sleep()" both have the same function
|
||||
name and different arguments and it won't compile anymore. To fix this, we now have
|
||||
two copies of nm-manager.xml file. nm-manager.xml contains the actual interface,
|
||||
that is new API + compatibility API and used by the daemon. The other,
|
||||
nm-manager-client.xml is only the new API without compatibility bits and is used
|
||||
by libnm-glib to make it compile.
|
||||
|
||||
* introspection/nm-manager.xml: Define compatibility methods (sleep, wake, state).
|
||||
|
||||
* src/nm-manager.c (impl_manager_legacy_sleep)
|
||||
(impl_manager_legacy_wake, impl_manager_legacy_state): Implement the compatibility
|
||||
interface functions for 0.6 branch.
|
||||
|
||||
2007-08-14 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* src/NetworkManagerAP.c
|
||||
|
|
38
introspection/nm-manager-client.xml
Normal file
38
introspection/nm-manager-client.xml
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<!--
|
||||
READ ME! READ ME! READ ME! READ ME! READ ME!
|
||||
|
||||
This file needs to be kept in sync with nm-manager.xml with the exception of
|
||||
the legacy methods at the end of nm-manager.xml.
|
||||
-->
|
||||
|
||||
<node name="/">
|
||||
<interface name="org.freedesktop.NetworkManager">
|
||||
<method name="GetDevices">
|
||||
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_manager_get_devices"/>
|
||||
<arg name="devices" type="ao" direction="out"/>
|
||||
</method>
|
||||
|
||||
<method name="Sleep">
|
||||
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_manager_sleep"/>
|
||||
<arg name="sleep" type="b" direction="in"/>
|
||||
</method>
|
||||
|
||||
<property name="WirelessEnabled" type="b" access="readwrite"/>
|
||||
<property name="State" type="u" access="read"/>
|
||||
|
||||
<signal name="StateChange">
|
||||
<arg name="state" type="u"/>
|
||||
</signal>
|
||||
|
||||
<signal name="DeviceAdded">
|
||||
<arg name="state" type="o"/>
|
||||
</signal>
|
||||
|
||||
<signal name="DeviceRemoved">
|
||||
<arg name="state" type="o"/>
|
||||
</signal>
|
||||
|
||||
</interface>
|
||||
</node>
|
|
@ -1,5 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<!--
|
||||
READ ME! READ ME! READ ME! READ ME! READ ME!
|
||||
|
||||
This file needs to be kept in sync with nm-manager-client.xml with the exception of
|
||||
the legacy methods at the end of this file.
|
||||
-->
|
||||
|
||||
<node name="/">
|
||||
<interface name="org.freedesktop.NetworkManager">
|
||||
<method name="GetDevices">
|
||||
|
@ -27,5 +34,19 @@
|
|||
<arg name="state" type="o"/>
|
||||
</signal>
|
||||
|
||||
<!-- Legacy methods to maintain backwards compatibility for 0.6 branch. -->
|
||||
|
||||
<method name="sleep">
|
||||
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_manager_legacy_sleep"/>
|
||||
</method>
|
||||
|
||||
<method name="wake">
|
||||
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_manager_legacy_wake"/>
|
||||
</method>
|
||||
|
||||
<method name="state">
|
||||
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_manager_legacy_state"/>
|
||||
</method>
|
||||
|
||||
</interface>
|
||||
</node>
|
||||
|
|
|
@ -77,8 +77,8 @@ nm-marshal.c: Makefile.am nm-marshal.list
|
|||
|
||||
nm-marshal-main.c: nm-marshal.c nm-marshal.h
|
||||
|
||||
nm-client-bindings.h: $(top_srcdir)/introspection/nm-manager.xml
|
||||
dbus-binding-tool --prefix=nm_client --mode=glib-client --output=nm-client-bindings.h $(top_srcdir)/introspection/nm-manager.xml
|
||||
nm-client-bindings.h: $(top_srcdir)/introspection/nm-manager-client.xml
|
||||
dbus-binding-tool --prefix=nm_client --mode=glib-client --output=nm-client-bindings.h $(top_srcdir)/introspection/nm-manager-client.xml
|
||||
|
||||
nm-device-bindings.h: $(top_srcdir)/introspection/nm-device.xml
|
||||
dbus-binding-tool --prefix=nm_device --mode=glib-client --output=nm-device-bindings.h $(top_srcdir)/introspection/nm-device.xml
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "nm-manager.h"
|
||||
|
@ -11,6 +13,12 @@
|
|||
static gboolean impl_manager_get_devices (NMManager *manager, GPtrArray **devices, GError **err);
|
||||
static gboolean impl_manager_sleep (NMManager *manager, gboolean sleep, GError **err);
|
||||
|
||||
/* Legacy 0.6 compatibility interface */
|
||||
|
||||
static gboolean impl_manager_legacy_sleep (NMManager *manager, GError **err);
|
||||
static gboolean impl_manager_legacy_wake (NMManager *manager, GError **err);
|
||||
static gboolean impl_manager_legacy_state (NMManager *manager, GError **err);
|
||||
|
||||
#include "nm-manager-glue.h"
|
||||
|
||||
static void nm_manager_connections_destroy (NMManager *manager);
|
||||
|
@ -473,6 +481,27 @@ nm_manager_get_active_device (NMManager *manager)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/* Legacy 0.6 compatibility interface */
|
||||
|
||||
static gboolean
|
||||
impl_manager_legacy_sleep (NMManager *manager, GError **err)
|
||||
{
|
||||
return impl_manager_sleep (manager, TRUE, err);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
impl_manager_legacy_wake (NMManager *manager, GError **err)
|
||||
{
|
||||
return impl_manager_sleep (manager, FALSE, err);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
impl_manager_legacy_state (NMManager *manager, GError **err)
|
||||
{
|
||||
return nm_manager_get_state (manager);
|
||||
}
|
||||
|
||||
|
||||
/* Connections */
|
||||
|
||||
GSList *
|
||||
|
|
Loading…
Reference in a new issue