NM dialup API
- From: Will Stephenson <wstephenson kde org>
- To: networkmanager-list gnome org
- Subject: NM dialup API
- Date: Wed, 18 Apr 2007 23:18:45 +0200
I'm working on the Solid API for network management for KDE 4 and am designing
the dialup part now. Since NM is the main backend on KDE's major
platform, it influences our API design. There don't seem to be any
significant changes regarding dialup in SVN trunk yet, so here's my proposal
for an NM dialup API.
I've tried to make it more object oriented than the existing interface. The
design owes a debt to the Telepathy spec.
NetworkManager Dialup spec v.0.0.1
o.f.NetworkManager.DialupManager
Enums: DeviceType { Analog, DSL, ISDN, GSM, EDGE, ... } (I need to check if
the cellular dialup types really are different to analogue modems).
- ListTypes() -> au
returns an array of dialup device type enums, eg
- ListDevices() -> a(su)
returns an array of (device name, DeviceType)
- ListConnections() -> ao
returns an array of dbus object paths to configured DialupConnections
- GetParameters() -> a(susv)
An array of structs containing:
a string parameter name
a bitwise OR of parameter flags (defining if a parameter is required, and
if it has a default value)
a string D-Bus type signature
a variant default value or undefined if none supplied/appropriate
- RequestConnection( a{sv} ) -> o
request a connection with a valid set of parameters - this must include
DeviceType. returns a dbus object path representing the connection, or
error: InvalidParameters
! signal NewConnection( o )
signals that a new connection was created.
o.f.NetworkManager.DialupConnection
enum: ConnectionStatus { Disconnected, Connecting, Connecting,
Disconnecting } - could be finer grained, I need to look at what some dialup
devices actually do.
enum: StatusReason { BadPassword, NoCarrier, etc }
- Connect ( s: device ) -> nothing
make the connection to a named device. Progress is reported via
StatusChanged
error: InvalidDeviceType
- Disconnect() -> nothing
- GetSupportedType() -> u:type
- GetCurrentDevice() -> s:currently connected device name, or empty
- GetStatus() -> u:status
! signal StatusChanged( u:ConnectionStatus, u:StatusReason )
signals a status change on this connection, giving reason.
An extension to NMInfo for dialup connections is forthcoming.
Also, what's the plan regarding the VPN API? Trunk seems mostly the same as
0.6.x. I see parallels between dialup and vpn connections that could be
merged, using distinct dbus interfaces for each but with a
shared 'ConnectionManager'.
Will
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]