api,dbus: rewrite Methods, Properties and Signals for gdbus-codegen

This commit is contained in:
Aleksander Morgado
2012-03-15 14:14:17 +01:00
parent 793c65705f
commit 8763576a34
13 changed files with 1749 additions and 1231 deletions
+348 -263
View File
@@ -1,334 +1,419 @@
<?xml version="1.0" encoding="UTF-8" ?>
<node name="/" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<!--
ModemManager 0.6 Interface Specification
Copyright (C) 2008 Novell, Inc.
Copyright (C) 2008-2011 Red Hat, Inc.
Copyright (C) 2011 The Chromium OS Authors
Copyright (C) 2011 Google, Inc.
-->
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<!--
org.freedesktop.ModemManager1.Modem:
@short_description: The ModemManager Modem interface.
The Modem interface controls the status and actions in a given modem
object.
-->
<interface name="org.freedesktop.ModemManager1.Modem">
<!-- METHODS -->
<!--
Enable:
@enable: %TRUE to enable the modem and %FALSE to disable it.
Enable or disable the modem.
When enabled, the modem's radio is powered on and data sessions, voice
calls, location services, and Short Message Service may be available.
When disabled, the modem enters low-power state and no network-related
operations are available.
-->
<method name="Enable">
<tp:docstring>
Enable or disables the modem. When enabled, the modem's radio is powered
on and data sessions, voice calls, location services, and Short Message
Service may be available. When disabled, the modem enters low-power
state and no network-related operations are available.
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_modem_enable"/>
<arg name="enable" type="b" direction="in">
<tp:docstring>
Pass True to enable the modem, or False to disable it.
</tp:docstring>
</arg>
<arg name="enable" type="b" direction="in" />
</method>
<!--
ListBearers:
@bearers: The list of bearer object paths.
List configured packet data bearers (EPS Bearers, PDP Contexts, or
CDMA2000 Packet Data Sessions).
-->
<method name="ListBearers">
<tp:docstring>
List configured packet data bearers (EPS Bearers, PDP Contexts, or
CDMA2000 Packet Data Sessions).
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_modem_list_bearers"/>
<arg name="bearers" type="ao" direction="out">
<tp:docstring>
The list of bearer object paths.
</tp:docstring>
</arg>
<arg name="bearers" type="ao" direction="out" />
</method>
<!--
CreateBearer:
@properties: List of properties to assign to the bearer after creating it.
@path: On success, the object path of the newly created bearer.
Create a new packet data bearer using the given characteristics.
This request may fail if the modem does not support additional bearers,
if too many bearers are already defined, or if properties are invalid.
Allowed properties are:
<variablelist>
<varlistentry><term><literal>"apn"</literal></term>
<listitem><para>Access Point Name. Required in 3GPP.</para></listitem></varlistentry>
<varlistentry><term><literal>"ip-type"</literal></term>
<listitem><para>Addressing type, one of <literal>"IPV4"</literal>, <literal>"IPV4V6"</literal>, or <literal>"IPV6"</literal>. Optional in 3GPP and CDMA.</para></listitem></varlistentry>
<varlistentry><term><literal>"user"</literal></term>
<listitem><para>User name (if any) required by the network. Optional in 3GPP.</para></listitem></varlistentry>
<varlistentry><term><literal>"password"</literal></term>
<listitem><para>Password (if any) required by the network. Optional in 3GPP.</para></listitem></varlistentry>
<varlistentry><term><literal>"number"</literal></term>
<listitem><para>Telephone number to dial. Required in POTS.</para></listitem></varlistentry>
</variablelist>
Some properties are only applicable to a bearer of certain access
technologies, for example the <literal>"apn"</literal> property is not
applicable to CDMA2000 Packet Data Session bearers.
-->
<method name="CreateBearer">
<tp:docstring>
Create a new packet data bearer using the given characteristics. This
request may fail if the modem does not support additional bearers, if
too many bearers are already defined, or if properties are invalid.
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_modem_create_bearer"/>
<arg name="properties" type="a{sv}" direction="in">
<tp:docstring>
List of properties to assign to the bearer after creating it. Some
properties are only applicable to a bearer of certain access
technologies, for example the "apn" property is not applicable to
CDMA2000 Packet Data Session bearers. Allowed properties are:
apn : (3GPP, required) Access Point Name
ip-type : (3GPP and CMDA, optional) Addressing type, one of
"IPV4", "IPV4V6", or "IPV6"
user : (3GPP, optional) user name (if any) required by the network
password : (3GPP, optional) password (if any) required by the network
number : (POTS, required) telphone number to dial
** FIXME: how about QoS?
</tp:docstring>
</arg>
<arg name="path" type="o" direction="out">
<tp:docstring>
On success, the object path of the newly created bearer.
</tp:docstring>
</arg>
<arg name="properties" type="a{sv}" direction="in" />
<arg name="path" type="o" direction="out" />
</method>
<!--
DeleteBearer:
@bearer: Object path of the bearer to delete.
Delete an existing packet data bearer.
If the bearer is currently active and providing packet data server, it
will be disconnected and that packet data service will terminate.
-->
<method name="DeleteBearer">
<tp:docstring>
Delete an existing packet data bearer.
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_modem_delete_bearer"/>
<arg name="bearer" type="o" direction="in">
<tp:docstring>
Object path of the bearer to delete. If the bearer is currently
active and providing packet data server, it will be disconnected
and that packet data service will terminate.
</tp:docstring>
</arg>
<arg name="bearer" type="o" direction="in" />
</method>
<method name="Reset">
<tp:docstring>
<!--
Reset:
Clear non-persistent configuration and state, and return the device to
a newly-powered-on state. This command may power-cycle the device.
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_modem_reset"/>
</method>
a newly-powered-on state.
This command may power-cycle the device.
-->
<method name="Reset" />
<!--
FactoryReset:
@code: Carrier-supplied code required to reset the modem.
<method name="FactoryReset">
<tp:docstring>
Clear the modem's configuration (including persistent configuration and
state), and return the device to a factory-default state. This command
may or may not power-cycle the device.
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_modem_factory_reset"/>
<arg name="code" type="s" direction="in">
Carrier-supplied code required to reset the modem. Ignored if not required.
</arg>
state), and return the device to a factory-default state.
If not required by the modem, @code may be ignored.
This command may or may not power-cycle the device.
-->
<method name="FactoryReset">
<arg name="code" type="s" direction="in" />
</method>
<method name="SetAllowedModes">
<tp:docstring>
<!--
SetAllowedModes:
@modes: Bitmask of <link linkend="MMModemMode">MMModemMode</link> values, to specify all the modes allowed in the modem.
@preferred: Specific <link linkend="MMModemMode">MMModemMode</link> preferred among the ones allowed, if any.
Set the access technologies (eg 2G/3G/4G preference) the device is
currently allowed to use when connecting to a network.
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_modem_set_allowed_mode"/>
<arg name="allowed" type="u" tp:type="MM_MODEM_MODE">
<tp:docstring>
Bitmask of all the modes allowed in the modem.
</tp:docstring>
</arg>
<arg name="preferred" type="u" tp:type="MM_MODEM_MODE">
<tp:docstring>
Specific mode preferred among the ones allowed, if any.
</tp:docstring>
</arg>
-->
<method name="SetAllowedModes">
<arg name="modes" type="u" direction="in" />
<arg name="preferred" type="u" direction="in" />
</method>
<method name="SetAllowedBands">
<tp:docstring>
<!--
SetAllowedBands:
@bands: Bitmask of <link linkend="MMModemBand">MMModemBand</link> values, to specify all the bands allowed in the modem.
Set the radio frequency and technology bands the device is currently
allowed to use when connecting to a network.
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_modem_set_allowed_band"/>
<arg name="mode" type="u" tp:type="MM_MODEM_BAND">
<tp:docstring>
Bitmask of all the bands allowed in the modem.
</tp:docstring>
</arg>
-->
<method name="SetAllowedBands">
<arg name="bands" type="t" direction="in" />
</method>
<!-- SIGNALS -->
<!--
StateChanged:
@old: A <link linkend="MMModemState">MMModemState</link> value, specifying the new state.
@new: A <link linkend="MMModemState">MMModemState</link> value, specifying the new state.
@reason: A <link linkend="MMModemStateChangeReason">MMModemStateChangeReason</link> value, specifying the reason for this state change.
The modem's state (see #org.freedesktop.ModemManager1.Modem:State) changed.
-->
<signal name="StateChanged">
<tp:docstring>
The modem's state (see the State property) changed.
</tp:docstring>
<arg name="old" type="u">
<tp:docstring>Old state</tp:docstring>
</arg>
<arg name="new" type="u">
<tp:docstring>New state</tp:docstring>
</arg>
<arg name="reason" type="u" tp:type="MM_MODEM_STATE_CHANGED_REASON">
<tp:docstring>Reason for this state change</tp:docstring>
</arg>
<arg name="old" type="u" />
<arg name="new" type="u" />
<arg name="reason" type="u" />
</signal>
<!-- PROPERTIES -->
<!--
Sim:
<property name="Sim" type="o" access="read">
<tp:docstring>
The path of the SIM object available in this device, if any.
</tp:docstring>
</property>
The path of the SIM object available in this device, if any.
-->
<property name="Sim" type="o" access="read" />
<property name="ModemCapabilities" type="u" access="read" tp:type="MM_MODEM_CAPABILITIES">
<tp:docstring>
The generic family of access technologies the modem supports. Not all
capabilities are available at the same time however; some modems require
a firmware reload or other reinitialization to switch between eg CDMA/EVDO
and GSM/UMTS.
</tp:docstring>
</property>
<!--
ModemCapabilities:
<property name="CurrentCapabilities" type="u" access="read" tp:type="MM_MODEM_CAPABILITIES">
<tp:docstring>
The generic family of access technologies the modem currently supports
without a firmware reload or reinitialization.
</tp:docstring>
</property>
Bitmask of <link linkend="MMModemCapability">MMModemCapability</link>
values, specifying the generic family of access technologies the modem
supports.
Not all capabilities are available at the same time however; some
modems require a firmware reload or other reinitialization to switch
between e.g. CDMA/EVDO and GSM/UMTS.
-->
<property name="ModemCapabilities" type="u" access="read" />
<!--
CurrentCapabilities:
Bitmask of <link linkend="MMModemCapability">MMModemCapability</link>
values, specifying the generic family of access technologies the modem
currently supports without a firmware reload or reinitialization.
-->
<property name="CurrentCapabilities" type="u" access="read" />
<!--
MaxBearers:
<property name="MaxBearers" type="u" access="read">
<tp:docstring>
The maximum number of defined packet data bearers the modem supports.
This is not the number of active/connected bearers the modem supports,
but simply the number of bearers that may be defined at any given time.
For example, POTS and CDMA2000-only devices support only one bearer,
while GSM/UMTS devices typically support three or more, and any
LTE-capable device (whether LTE-only, GSM/UMTS-capable, and/or
CDMA2000-capable) also typically support three or more.
</tp:docstring>
</property>
-->
<property name="MaxBearers" type="u" access="read" />
<!--
MaxActiveBearers:
<property name="MaxActiveBearers" type="u" access="read">
<tp:docstring>
The maximum number of active packet data bearers the modem supports.
POTS and CDMA2000-only devices support one active bearer, while
GSM/UMTS and LTE-capable devices (including LTE/CDMA devices) typically
support at least two active bearers.
</tp:docstring>
</property>
<property name="Manufacturer" type="s" access="read">
<tp:docstring>
The equipment manufacturer, as reported by the modem.
</tp:docstring>
</property>
POTS and CDMA2000-only devices support one active bearer, while GSM/UMTS
and LTE-capable devices (including LTE/CDMA devices) typically support
at least two active bearers.
-->
<property name="MaxActiveBearers" type="u" access="read" />
<property name="Model" type="s" access="read">
<tp:docstring>
The equipment model, as reported by the modem.
</tp:docstring>
</property>
<!--
Manufacturer:
<property name="Revision" type="s" access="read">
<tp:docstring>
The revision identification of the software, as reported by the modem.
</tp:docstring>
</property>
The equipment manufacturer, as reported by the modem.
-->
<property name="Manufacturer" type="s" access="read" />
<property name="DeviceIdentifier" type="s" access="read">
<tp:docstring>
A best-effort device identifier based on various device information like
model name, firmware revision, USB/PCI/PCMCIA IDs, and other properties.
This ID is not guaranteed to be unique and may be shared between
identical devices with the same firmware, but is intended to be
"unique enough" for use as a casual device identifier for various
user experience operations. This is not the device's IMEI or ESN since
those may not be available before unlocking the device via a PIN.
</tp:docstring>
</property>
<!--
Model:
<property name="Device" type="s" access="read">
<tp:docstring>
The physical modem device reference (ie, USB, PCI, PCMCIA device), which
may be dependent upon the operating system. In Linux for example, this
points to a sysfs path of the usb_device object.
</tp:docstring>
</property>
The equipment model, as reported by the modem.
-->
<property name="Model" type="s" access="read" />
<property name="Driver" type="s" access="read">
<tp:docstring>
The Operating System device driver handling communication with the
modem hardware.
</tp:docstring>
</property>
<!--
Revision:
The revision identification of the software, as reported by the modem.
-->
<property name="Revision" type="s" access="read" />
<!--
DeviceIdentifier:
A best-effort device identifier based on various device information like
model name, firmware revision, USB/PCI/PCMCIA IDs, and other properties.
This ID is not guaranteed to be unique and may be shared between
identical devices with the same firmware, but is intended to be "unique
enough" for use as a casual device identifier for various user
experience operations.
This is not the device's IMEI or ESN since those may not be available
before unlocking the device via a PIN.
-->
<property name="DeviceIdentifier" type="s" access="read" />
<!--
Device:
The physical modem device reference (ie, USB, PCI, PCMCIA device), which
may be dependent upon the operating system.
In Linux for example, this points to a sysfs path of the usb_device
object.
-->
<property name="Device" type="s" access="read" />
<!--
Driver:
The Operating System device driver handling communication with the modem
hardware.
-->
<property name="Driver" type="s" access="read" />
<!--
Plugin:
<property name="Plugin" type="s" access="read">
<tp:docstring>
The name of the plugin handling this modem.
</tp:docstring>
</property>
-->
<property name="Plugin" type="s" access="read" />
<property name="EquipmentIdentifier" type="s" access="read">
<tp:docstring>
The identity of the device. This will be the IMEI number for
GSM devices and the hex-format ESN/MEID for CDMA devices.
</tp:docstring>
</property>
<!--
EquipmentIdentifier:
<property name="UnlockRequired" type="u" access="read" tp:type="MM_MODEM_LOCK">
<tp:docstring>
Current lock state of the device.
</tp:docstring>
</property>
The identity of the device.
<property name="UnlockRetries" type="u" access="read">
<tp:docstring>
The number of unlock retries remaining for the unlock code given by the property UnlockRequired, or 999 if
the device does not support reporting unlock retries.
</tp:docstring>
</property>
This will be the IMEI number for GSM devices and the hex-format ESN/MEID
for CDMA devices.
-->
<property name="EquipmentIdentifier" type="s" access="read" />
<property name="State" type="u" access="read" tp:type="MM_MODEM_STATE">
<tp:docstring>
Overall state of the modem.
</tp:docstring>
</property>
<!--
UnlockRequired:
Current lock state of the device, given as a
<link linkend="MMModemLock">MMModemLock</link> value.
-->
<property name="UnlockRequired" type="u" access="read" />
<!--
UnlockRetries:
The number of unlock retries remaining for the lock code given by the
UnlockRequired property (if any), or 999 if the device does not support reporting
unlock retries.
-->
<property name="UnlockRetries" type="u" access="read" />
<!--
PinRetryCounts:
A dictionary in which the keys are <link linkend="MMModemLock">MMModemLock</link>
flags, and the values are integers giving the number of PIN tries remaining
before the code becomes blocked (requiring a PUK) or permanently blocked. Dictionary
entries exist only for the codes for which the modem is able to report retry
counts.
-->
<property name="PinRetryCounts" type="a{uu}" access="read" />
<!--
State:
Overall state of the modem, given as a
<link linkend="MMModemState">MMModemState</link> value.
If the device's state cannot be determined,
<link linkend="MM-MODEM-STATE-UNKNOWN:CAPS"><constant>MM_MODEM_STATE_UNKNOWN</constant></link>
will be reported.
-->
<property name="State" type="u" access="read" />
<!--
AccessTechnology:
<property name="AccessTechnology" type="u" access="read" tp:type="MM_MODEM_ACCESS_TECH">
<tp:docstring>
The current network access technology used by the device to communicate
with the network. (Note to plugin writers: if the device's access
technology cannot be determined, use UNKNOWN)
</tp:docstring>
</property>
with the network, given as a
<link linkend="MMModemAccessTech">MMModemAccessTech</link> value.
If the device's access technology cannot be determined,
<link linkend="MM-MODEM-ACCESS-TECH-UNKNOWN:CAPS"><constant>MM_MODEM_ACCESS_TECH_UNKNOWN</constant></link>
will be reported.
-->
<property name="AccessTechnology" type="u" access="read" />
<!--
SignalQuality:
<property name="SignalQuality" type="(ub)" access="read">
<tp:docstring>
Signal quality in percent (0 - 100) of the dominant access technology
the device is using to communicate with the network. Always 0 for POTS
devices. The additional boolean value indicates if the quality value
given was recently taken.
</tp:docstring>
</property>
the device is using to communicate with the network. Always 0 for POTS
devices.
<property name="AllowedModes" type="u" access="read" tp:type="MM_MODEM_MODE">
<tp:docstring>
The access technologies (eg 2G/3G/4G preference) the device is currently
allowed to use when connecting to a network. For POTS devices, only the
"any" mode is supported.
</tp:docstring>
</property>
The additional boolean value indicates if the quality value given was
recently taken.
-->
<property name="SignalQuality" type="(ub)" access="read" />
<property name="PreferredMode" type="u" access="read" tp:type="MM_MODEM_MODE">
<tp:docstring>
The preferred access technology (eg 2G/3G/4G), among the ones defined in
the allowed modes. Only one or none values must be given.
</tp:docstring>
</property>
<!--
SupportedModes:
<property name="SupportedModes" type="u" access="read" tp:type="MM_MODEM_MODE">
<tp:docstring>
Access technology selection modes supported by the device. For POTS
devices, only the "any" mode will be returned.
</tp:docstring>
</property>
Bitmask of <link linkend="MMModemMode">MMModemMode</link> values,
specifying the access technologies supported by the device.
<property name="AllowedBands" type="t" access="read" tp:type="MM_MODEM_BAND">
<tp:docstring>
The radio frequency and technology bands the device is currently allowed
to use when connecting to a network. For POTS devices, only the "any"
value is supported.
</tp:docstring>
</property>
For POTS devices, only the
<link linkend="MM-MODEM-MODE-ANY:CAPS"><constant>MM_MODEM_MODE_ANY</constant></link>
mode will be returned.
-->
<property name="SupportedModes" type="u" access="read" />
<property name="SupportedBands" type="t" access="read" tp:type="MM_MODEM_BAND">
<tp:docstring>
Radio frequency and technology bands supported by the device. For POTS
devices, only the "any" value will be returned.
</tp:docstring>
</property>
<!--
AllowedModes:
Bitmask of <link linkend="MMModemMode">MMModemMode</link> values,
specifying the access technologies (eg 2G/3G/4G preference) the device
is currently allowed to use when connecting to a network.
It must be a subset of #org.freedesktop.ModemManager1.Modem:SupportedModes.
For POTS devices, only the
<link linkend="MM-MODEM-MODE-ANY:CAPS"><constant>MM_MODEM_MODE_ANY</constant></link>
mode is supported.
-->
<property name="AllowedModes" type="u" access="read" />
<!--
PreferredMode:
A single <link linkend="MMModemMode">MMModemMode</link> value,
specifying the preferred access technology (eg 2G/3G/4G), among the
ones defined in the allowed modes.
It must be one of the modes configured in
#org.freedesktop.ModemManager1.Modem:AllowedModes.
-->
<property name="PreferredMode" type="u" access="read" />
<!--
SupportedBands:
Bitmask of <link linkend="MMModemBand">MMModemBand</link> values,
specifying the radio frequency and technology bands supported by the
device.
For POTS devices, only the
<link linkend="MM-MODEM-BAND-ANY:CAPS"><constant>MM_MODEM_BAND_ANY</constant></link>
mode will be returned.
-->
<property name="SupportedBands" type="t" access="read" />
<!--
AllowedBands:
Bitmask of <link linkend="MMModemBand">MMModemBand</link> values,
specifying the radio frequency and technology bands the device is
currently allowed to use when connecting to a network.
It must be a subset of #org.freedesktop.ModemManager1.Modem:SupportedBands.
For POTS devices, only the
<link linkend="MM-MODEM-BAND-ANY:CAPS"><constant>MM_MODEM_BAND_ANY</constant></link>
mode is supported.
-->
<property name="AllowedBands" type="t" access="read" />
<!-- ENUMS -->