Re: Feature request: Add a method to NetworkManagerSettings interface to create a new auto connection for a specified device.



On Wed, 2008-10-29 at 22:30 +0800, Zhe Su wrote:
> Hi,
>   Currently, NetworkManagerSettings interface has method
> ListConnections() to list all existing connections.
> NetworkManagerSettings.Connection interface has method Update() to
> update properties of a connection, and Delete() to delete the
> connection. But there is no method to create a new auto connection for
> a specified device. Thus, it's impossible to fully control network
> manager and its applet from another application without implementing
> its own settings service.
>   My suggestion is to add a new method to NetworkManagerSettings
> interface, say NewAutoConnection (or similar), to create a new auto
> connection for a specified device. Input parameter would be the device
> path and returns the path to newly created connection.

You'd need to take into account different device types, because for some
devices (wifi) you also need to specify some AP characteristics (at
minimum, the SSID).  Just NewAutoConnection() would be too simple.

It also shouldn't take a device path, because connections aren't tied to
a particular device at all; they can apply to any device of the same
class.  The way you tie a particular device to a connection is by
locking the connection to the MAC address of that device.  That's a
property of the connection, and something that the caller of
NewConnection would pass in the connection settings.

>   With this new method, the API would be self-contained. 3rd
> applications would gain full connection manipulation ability solely
> via dbus, without linking to libnm-glib and libnm-utils.

To be fair, libnm-glib and libnm-util have never been requirements, they
are simply convenience libraries.  Its quite possible to do everything
the applet does in Python using plain D-Bus.

Basically, you can do all of this today using the system settings
service if you like, with the keyfile plugin, authenticated by
PolicyKit.  This is how the connection editor already works when
creating new system connections, or when moving a connection from user
to system scope.  I'd suggest using the system settings service instead
of the applet, since that also allows the connection to be used before
login and across fast user switches.

Dan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]