Document the public DBus API.

This commit is contained in:
Tambet Ingo
2008-07-31 17:14:50 +03:00
parent 135fad9e6d
commit be059f7a73
8 changed files with 1009 additions and 21 deletions
+1
View File
@@ -22,4 +22,5 @@ libtool
org.freedesktop.ModemManager.service
ModemManager.pc
src/modem-manager
docs/spec.html
+23
View File
@@ -1,3 +1,25 @@
if WITH_DOCS
all:
XSLTPROC = xsltproc --xinclude --nonet
XMLS = $(wildcard introspection/mm-*.xml)
# Figure out if we need ASYNC_INTROSPECT and add it later
GENERATED_FILES = \
docs/spec.html
docs/spec.html: $(XMLS) introspection/all.xml doc-generator.xsl
@install -d docs
$(XSLTPROC) doc-generator.xsl introspection/all.xml > $@
all: $(GENERATED_FILES)
clean:
rm -f $(GENERATED_FILES)
endif
SUBDIRS = src plugins introspection test
pkgconfigdir = $(libdir)/pkgconfig
@@ -26,5 +48,6 @@ DISTCLEANFILES = \
EXTRA_DIST = \
ModemManager.pc.in \
doc-generator.xsl \
$(dbusservice_DATA) \
$(dbusactivation_in_files)
+9
View File
@@ -14,6 +14,15 @@ AC_PROG_LIBTOOL
PKG_CHECK_MODULES(MM, dbus-glib-1 >= 0.75 glib-2.0 >= 2.14 gmodule-2.0 gobject-2.0 hal)
AC_ARG_WITH(docs, AC_HELP_STRING([--with-docs], [Build ModemManager documentation]))
AM_CONDITIONAL(WITH_DOCS, test "x$with_docs" = "xyes")
case $with_docs in
yes) ;;
*)
with_docs=no
;;
esac
AC_CONFIG_FILES([
Makefile
src/Makefile
+691
View File
@@ -0,0 +1,691 @@
<!-- Generate HTML documentation from the Telepathy specification.
The master copy of this stylesheet is in the Telepathy spec repository -
please make any changes there.
Copyright (C) 2006, 2007 Collabora Limited
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
exclude-result-prefixes="tp">
<!--Don't move the declaration of the HTML namespace up here - XMLNSs
don't work ideally in the presence of two things that want to use the
absence of a prefix, sadly. -->
<xsl:template match="*" mode="identity">
<xsl:copy>
<xsl:apply-templates mode="identity"/>
</xsl:copy>
</xsl:template>
<xsl:template match="tp:docstring">
<xsl:apply-templates select="node()" mode="identity"/>
</xsl:template>
<xsl:template match="tp:errors">
<h1 xmlns="http://www.w3.org/1999/xhtml">Errors:</h1>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="tp:generic-types">
<h1 xmlns="http://www.w3.org/1999/xhtml">Generic types:</h1>
<xsl:call-template name="do-types"/>
</xsl:template>
<xsl:template name="do-types">
<xsl:if test="tp:simple-type">
<h2 xmlns="http://www.w3.org/1999/xhtml">Simple types:</h2>
<xsl:apply-templates select="tp:simple-type"/>
</xsl:if>
<xsl:if test="tp:enum">
<h2 xmlns="http://www.w3.org/1999/xhtml">Enumerated types:</h2>
<xsl:apply-templates select="tp:enum"/>
</xsl:if>
<xsl:if test="tp:flags">
<h2 xmlns="http://www.w3.org/1999/xhtml">Sets of flags:</h2>
<xsl:apply-templates select="tp:flags"/>
</xsl:if>
<xsl:if test="tp:struct">
<h2 xmlns="http://www.w3.org/1999/xhtml">Structure types:</h2>
<xsl:apply-templates select="tp:struct"/>
</xsl:if>
<xsl:if test="tp:mapping">
<h2 xmlns="http://www.w3.org/1999/xhtml">Mapping types:</h2>
<xsl:apply-templates select="tp:mapping"/>
</xsl:if>
<xsl:if test="tp:external-type">
<h2 xmlns="http://www.w3.org/1999/xhtml">Types defined elsewhere:</h2>
<dl><xsl:apply-templates select="tp:external-type"/></dl>
</xsl:if>
</xsl:template>
<xsl:template match="tp:error">
<h2 xmlns="http://www.w3.org/1999/xhtml"><a name="{concat(../@namespace, '.', translate(@name, ' ', ''))}"></a><xsl:value-of select="concat(../@namespace, '.', translate(@name, ' ', ''))"/></h2>
<xsl:apply-templates select="tp:docstring"/>
</xsl:template>
<xsl:template match="/tp:spec/tp:copyright">
<div xmlns="http://www.w3.org/1999/xhtml">
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template match="/tp:spec/tp:license">
<div xmlns="http://www.w3.org/1999/xhtml" class="license">
<xsl:apply-templates mode="identity"/>
</div>
</xsl:template>
<xsl:template match="tp:copyright"/>
<xsl:template match="tp:license"/>
<xsl:template match="interface">
<h1 xmlns="http://www.w3.org/1999/xhtml"><a name="{@name}"></a><xsl:value-of select="@name"/></h1>
<xsl:if test="@tp:causes-havoc">
<p xmlns="http://www.w3.org/1999/xhtml" class="causes-havoc">
This interface is <xsl:value-of select="@tp:causes-havoc"/>
and is likely to cause havoc to your API/ABI if bindings are generated.
Don't include it in libraries that care about compatibility.
</p>
</xsl:if>
<xsl:if test="tp:requires">
<p>Implementations of this interface must also implement:</p>
<ul xmlns="http://www.w3.org/1999/xhtml">
<xsl:for-each select="tp:requires">
<li><code><a href="#{@interface}"><xsl:value-of select="@interface"/></a></code></li>
</xsl:for-each>
</ul>
</xsl:if>
<xsl:apply-templates select="tp:docstring" />
<xsl:choose>
<xsl:when test="method">
<h2 xmlns="http://www.w3.org/1999/xhtml">Methods:</h2>
<xsl:apply-templates select="method"/>
</xsl:when>
<xsl:otherwise>
<p xmlns="http://www.w3.org/1999/xhtml">Interface has no methods.</p>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="signal">
<h2 xmlns="http://www.w3.org/1999/xhtml">Signals:</h2>
<xsl:apply-templates select="signal"/>
</xsl:when>
<xsl:otherwise>
<p xmlns="http://www.w3.org/1999/xhtml">Interface has no signals.</p>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="property">
<h2 xmlns="http://www.w3.org/1999/xhtml">Properties:</h2>
<dl xmlns="http://www.w3.org/1999/xhtml">
<xsl:apply-templates select="property"/>
</dl>
</xsl:when>
<xsl:otherwise>
<p xmlns="http://www.w3.org/1999/xhtml">Interface has no properties.</p>
</xsl:otherwise>
</xsl:choose>
<xsl:call-template name="do-types"/>
</xsl:template>
<xsl:template match="tp:flags">
<h3>
<a name="type-{@name}">
<xsl:value-of select="@name"/>
</a>
</h3>
<xsl:apply-templates select="tp:docstring" />
<dl xmlns="http://www.w3.org/1999/xhtml">
<xsl:variable name="value-prefix">
<xsl:choose>
<xsl:when test="@value-prefix">
<xsl:value-of select="@value-prefix"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@name"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:for-each select="tp:flag">
<dt xmlns="http://www.w3.org/1999/xhtml"><code><xsl:value-of select="concat($value-prefix, '_', @suffix)"/> = <xsl:value-of select="@value"/></code></dt>
<xsl:choose>
<xsl:when test="tp:docstring">
<dd xmlns="http://www.w3.org/1999/xhtml"><xsl:apply-templates select="tp:docstring" /></dd>
</xsl:when>
<xsl:otherwise>
<dd xmlns="http://www.w3.org/1999/xhtml">(Undocumented)</dd>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</dl>
</xsl:template>
<xsl:template match="tp:enum">
<h3 xmlns="http://www.w3.org/1999/xhtml">
<a name="type-{@name}">
<xsl:value-of select="@name"/>
</a>
</h3>
<xsl:apply-templates select="tp:docstring" />
<dl xmlns="http://www.w3.org/1999/xhtml">
<xsl:variable name="value-prefix">
<xsl:choose>
<xsl:when test="@value-prefix">
<xsl:value-of select="@value-prefix"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@name"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:for-each select="tp:enumvalue">
<dt xmlns="http://www.w3.org/1999/xhtml"><code><xsl:value-of select="concat($value-prefix, '_', @suffix)"/> = <xsl:value-of select="@value"/></code></dt>
<xsl:choose>
<xsl:when test="tp:docstring">
<dd xmlns="http://www.w3.org/1999/xhtml"><xsl:apply-templates select="tp:docstring" /></dd>
</xsl:when>
<xsl:otherwise>
<dd xmlns="http://www.w3.org/1999/xhtml">(Undocumented)</dd>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</dl>
</xsl:template>
<xsl:template match="property">
<dt xmlns="http://www.w3.org/1999/xhtml">
<xsl:if test="@name">
<code><xsl:value-of select="@name"/></code> -
</xsl:if>
<code><xsl:value-of select="@type"/></code> -
<code>(<xsl:value-of select="@access"/>)</code>
<xsl:call-template name="parenthesized-tp-type"/>
</dt>
<dd xmlns="http://www.w3.org/1999/xhtml">
<xsl:apply-templates select="tp:docstring"/>
</dd>
</xsl:template>
<xsl:template match="tp:mapping">
<div xmlns="http://www.w3.org/1999/xhtml" class="struct">
<h3>
<a name="type-{@name}">
<xsl:value-of select="@name"/>
</a> - a{
<xsl:for-each select="tp:member">
<xsl:value-of select="@type"/>
<xsl:text>: </xsl:text>
<xsl:value-of select="@name"/>
<xsl:if test="position() != last()"> &#x2192; </xsl:if>
</xsl:for-each>
}
</h3>
<div class="docstring">
<xsl:apply-templates select="tp:docstring"/>
</div>
<div>
<h4>Members</h4>
<dl>
<xsl:apply-templates select="tp:member" mode="members-in-docstring"/>
</dl>
</div>
</div>
</xsl:template>
<xsl:template match="tp:docstring" mode="in-index"/>
<xsl:template match="tp:simple-type | tp:enum | tp:flags | tp:external-type"
mode="in-index">
- <xsl:value-of select="@type"/>
</xsl:template>
<xsl:template match="tp:simple-type">
<div xmlns="http://www.w3.org/1999/xhtml" class="simple-type">
<h3>
<a name="type-{@name}">
<xsl:value-of select="@name"/>
</a> - <xsl:value-of select="@type"/>
</h3>
<div class="docstring">
<xsl:apply-templates select="tp:docstring"/>
</div>
</div>
</xsl:template>
<xsl:template match="tp:external-type">
<div xmlns="http://www.w3.org/1999/xhtml" class="external-type">
<dt>
<a name="type-{@name}">
<xsl:value-of select="@name"/>
</a> - <xsl:value-of select="@type"/>
</dt>
<dd>Defined by: <xsl:value-of select="@from"/></dd>
</div>
</xsl:template>
<xsl:template match="tp:struct" mode="in-index">
- ( <xsl:for-each select="tp:member">
<xsl:value-of select="@type"/>
<xsl:if test="position() != last()">, </xsl:if>
</xsl:for-each> )
</xsl:template>
<xsl:template match="tp:mapping" mode="in-index">
- a{ <xsl:for-each select="tp:member">
<xsl:value-of select="@type"/>
<xsl:if test="position() != last()"> &#x2192; </xsl:if>
</xsl:for-each> }
</xsl:template>
<xsl:template match="tp:struct">
<div xmlns="http://www.w3.org/1999/xhtml" class="struct">
<h3>
<a name="type-{@name}">
<xsl:value-of select="@name"/>
</a> - (
<xsl:for-each select="tp:member">
<xsl:value-of select="@type"/>
<xsl:text>: </xsl:text>
<xsl:value-of select="@name"/>
<xsl:if test="position() != last()">, </xsl:if>
</xsl:for-each>
)
</h3>
<div class="docstring">
<xsl:apply-templates select="tp:docstring"/>
</div>
<xsl:choose>
<xsl:when test="string(@array-name) != ''">
<p>In bindings that need a separate name, arrays of
<xsl:value-of select="@name"/> should be called
<xsl:value-of select="@array-name"/>.</p>
</xsl:when>
<xsl:otherwise>
<p>Arrays of <xsl:value-of select="@name"/> don't generally
make sense.</p>
</xsl:otherwise>
</xsl:choose>
<div>
<h4>Members</h4>
<dl>
<xsl:apply-templates select="tp:member" mode="members-in-docstring"/>
</dl>
</div>
</div>
</xsl:template>
<xsl:template match="method">
<div xmlns="http://www.w3.org/1999/xhtml" class="method">
<h3 xmlns="http://www.w3.org/1999/xhtml">
<a name="{concat(../@name, concat('.', @name))}">
<xsl:value-of select="@name"/>
</a> (
<xsl:for-each xmlns="" select="arg[@direction='in']">
<xsl:value-of select="@type"/>: <xsl:value-of select="@name"/>
<xsl:if test="position() != last()">, </xsl:if>
</xsl:for-each>
) &#x2192;
<xsl:choose>
<xsl:when test="arg[@direction='out']">
<xsl:for-each xmlns="" select="arg[@direction='out']">
<xsl:value-of select="@type"/>
<xsl:if test="position() != last()">, </xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>nothing</xsl:otherwise>
</xsl:choose>
</h3>
<div xmlns="http://www.w3.org/1999/xhtml" class="docstring">
<xsl:apply-templates select="tp:docstring" />
</div>
<xsl:if test="arg[@direction='in']">
<div xmlns="http://www.w3.org/1999/xhtml">
<h4>Parameters</h4>
<dl xmlns="http://www.w3.org/1999/xhtml">
<xsl:apply-templates select="arg[@direction='in']"
mode="parameters-in-docstring"/>
</dl>
</div>
</xsl:if>
<xsl:if test="arg[@direction='out']">
<div xmlns="http://www.w3.org/1999/xhtml">
<h4>Returns</h4>
<dl xmlns="http://www.w3.org/1999/xhtml">
<xsl:apply-templates select="arg[@direction='out']"
mode="returns-in-docstring"/>
</dl>
</div>
</xsl:if>
<xsl:if test="tp:possible-errors">
<div xmlns="http://www.w3.org/1999/xhtml">
<h4>Possible errors</h4>
<dl xmlns="http://www.w3.org/1999/xhtml">
<xsl:apply-templates select="tp:possible-errors/tp:error"/>
</dl>
</div>
</xsl:if>
</div>
</xsl:template>
<xsl:template name="parenthesized-tp-type">
<xsl:if test="@tp:type">
<xsl:variable name="tp-type" select="@tp:type"/>
<xsl:variable name="single-type">
<xsl:choose>
<xsl:when test="contains($tp-type, '[]')">
<xsl:value-of select="substring-before($tp-type, '[]')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$tp-type"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:choose>
<xsl:when test="//tp:simple-type[@name=$tp-type]" />
<xsl:when test="//tp:simple-type[concat(@name, '[]')=$tp-type]" />
<xsl:when test="//tp:struct[concat(@name, '[]')=$tp-type][string(@array-name) != '']" />
<xsl:when test="//tp:struct[@name=$tp-type]" />
<xsl:when test="//tp:enum[@name=$tp-type]" />
<xsl:when test="//tp:enum[concat(@name, '[]')=$tp-type]" />
<xsl:when test="//tp:flags[@name=$tp-type]" />
<xsl:when test="//tp:flags[concat(@name, '[]')=$tp-type]" />
<xsl:when test="//tp:mapping[@name=$tp-type]" />
<xsl:when test="//tp:external-type[concat(@name, '[]')=$tp-type]" />
<xsl:when test="//tp:external-type[@name=$tp-type]" />
<xsl:otherwise>
<xsl:message terminate="yes">
<xsl:text>ERR: Unable to find type '</xsl:text>
<xsl:value-of select="$tp-type"/>
<xsl:text>'&#10;</xsl:text>
</xsl:message>
</xsl:otherwise>
</xsl:choose>
(<a href="#type-{$single-type}"><xsl:value-of select="$tp-type"/></a>)
</xsl:if>
</xsl:template>
<xsl:template match="tp:member" mode="members-in-docstring">
<dt xmlns="http://www.w3.org/1999/xhtml">
<code><xsl:value-of select="@name"/></code> -
<code><xsl:value-of select="@type"/></code>
<xsl:call-template name="parenthesized-tp-type"/>
</dt>
<dd xmlns="http://www.w3.org/1999/xhtml">
<xsl:choose>
<xsl:when test="tp:docstring">
<xsl:apply-templates select="tp:docstring" />
</xsl:when>
<xsl:otherwise>
<em>(undocumented)</em>
</xsl:otherwise>
</xsl:choose>
</dd>
</xsl:template>
<xsl:template match="arg" mode="parameters-in-docstring">
<dt xmlns="http://www.w3.org/1999/xhtml">
<code><xsl:value-of select="@name"/></code> -
<code><xsl:value-of select="@type"/></code>
<xsl:call-template name="parenthesized-tp-type"/>
</dt>
<dd xmlns="http://www.w3.org/1999/xhtml">
<xsl:apply-templates select="tp:docstring" />
</dd>
</xsl:template>
<xsl:template match="arg" mode="returns-in-docstring">
<dt xmlns="http://www.w3.org/1999/xhtml">
<xsl:if test="@name">
<code><xsl:value-of select="@name"/></code> -
</xsl:if>
<code><xsl:value-of select="@type"/></code>
<xsl:call-template name="parenthesized-tp-type"/>
</dt>
<dd xmlns="http://www.w3.org/1999/xhtml">
<xsl:apply-templates select="tp:docstring"/>
</dd>
</xsl:template>
<xsl:template match="tp:possible-errors/tp:error">
<dt xmlns="http://www.w3.org/1999/xhtml">
<code><xsl:value-of select="@name"/></code>
</dt>
<dd xmlns="http://www.w3.org/1999/xhtml">
<xsl:variable name="name" select="@name"/>
<xsl:choose>
<xsl:when test="tp:docstring">
<xsl:apply-templates select="tp:docstring"/>
</xsl:when>
<xsl:when test="//tp:errors/tp:error[concat(../@namespace, '.', translate(@name, ' ', ''))=$name]/tp:docstring">
<xsl:apply-templates select="//tp:errors/tp:error[concat(../@namespace, '.', translate(@name, ' ', ''))=$name]/tp:docstring"/> <em xmlns="http://www.w3.org/1999/xhtml">(generic description)</em>
</xsl:when>
<xsl:otherwise>
(Undocumented.)
</xsl:otherwise>
</xsl:choose>
</dd>
</xsl:template>
<xsl:template match="signal">
<div xmlns="http://www.w3.org/1999/xhtml" class="signal">
<h3 xmlns="http://www.w3.org/1999/xhtml">
<a name="{concat(../@name, concat('.', @name))}">
<xsl:value-of select="@name"/>
</a> (
<xsl:for-each xmlns="" select="arg">
<xsl:value-of select="@type"/>: <xsl:value-of select="@name"/>
<xsl:if test="position() != last()">, </xsl:if>
</xsl:for-each>
)</h3>
<div xmlns="http://www.w3.org/1999/xhtml" class="docstring">
<xsl:apply-templates select="tp:docstring"/>
</div>
<xsl:if test="arg">
<div xmlns="http://www.w3.org/1999/xhtml">
<h4>Parameters</h4>
<dl xmlns="http://www.w3.org/1999/xhtml">
<xsl:apply-templates select="arg" mode="parameters-in-docstring"/>
</dl>
</div>
</xsl:if>
</div>
</xsl:template>
<xsl:output method="xml" indent="no" encoding="ascii"
omit-xml-declaration="yes"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" />
<xsl:template match="/tp:spec">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
<xsl:value-of select="tp:title"/>
<xsl:if test="tp:version">
<xsl:text> version </xsl:text>
<xsl:value-of select="tp:version"/>
</xsl:if>
</title>
<style type="text/css">
body {
font-family: sans-serif;
margin: 2em;
height: 100%;
font-size: 1.2em;
}
h1 {
padding-top: 5px;
padding-bottom: 5px;
font-size: 1.6em;
background: #dadae2;
}
h2 {
font-size: 1.3em;
}
h3 {
font-size: 1.2em;
}
a:link, a:visited, a:link:hover, a:visited:hover {
font-weight: bold;
}
.topbox {
padding-top: 10px;
padding-left: 10px;
border-bottom: black solid 1px;
padding-bottom: 10px;
background: #dadae2;
font-size: 2em;
font-weight: bold;
color: #5c5c5c;
}
.topnavbox {
padding-left: 10px;
padding-top: 5px;
padding-bottom: 5px;
background: #abacba;
border-bottom: black solid 1px;
font-size: 1.2em;
}
.topnavbox a{
color: black;
font-weight: normal;
}
.sidebar {
float: left;
/* width:9em;
border-right:#abacba solid 1px;
border-left: #abacba solid 1px;
height:100%; */
border: #abacba solid 1px;
padding-left: 10px;
margin-left: 10px;
padding-right: 10px;
margin-right: 10px;
color: #5d5d5d;
background: #dadae2;
}
.sidebar a {
text-decoration: none;
border-bottom: #e29625 dotted 1px;
color: #e29625;
font-weight: normal;
}
.sidebar h1 {
font-size: 1.2em;
color: black;
}
.sidebar ul {
padding-left: 25px;
padding-bottom: 10px;
border-bottom: #abacba solid 1px;
}
.sidebar li {
padding-top: 2px;
padding-bottom: 2px;
}
.sidebar h2 {
font-style:italic;
font-size: 0.81em;
padding-left: 5px;
padding-right: 5px;
font-weight: normal;
}
.date {
font-size: 0.6em;
float: right;
font-style: italic;
}
.method {
margin-left: 1em;
margin-right: 4em;
}
.signal {
margin-left: 1em;
margin-right: 4em;
}
</style>
</head>
<body>
<h1 class="topbox">
<xsl:value-of select="tp:title" />
</h1>
<xsl:if test="tp:version">
<h2>Version <xsl:apply-templates select="tp:version"/></h2>
</xsl:if>
<xsl:apply-templates select="tp:copyright"/>
<xsl:apply-templates select="tp:license"/>
<xsl:apply-templates select="tp:docstring"/>
<h2>Interfaces</h2>
<ul>
<xsl:for-each select="node/interface">
<li><code><a href="#{@name}"><xsl:value-of select="@name"/></a></code></li>
</xsl:for-each>
</ul>
<xsl:apply-templates select="node"/>
<xsl:apply-templates select="tp:generic-types"/>
<xsl:apply-templates select="tp:errors"/>
<h1>Index</h1>
<h2>Index of interfaces</h2>
<ul>
<xsl:for-each select="node/interface">
<li><code><a href="#{@name}"><xsl:value-of select="@name"/></a></code></li>
</xsl:for-each>
</ul>
<h2>Index of types</h2>
<ul>
<xsl:for-each select="//tp:simple-type | //tp:enum | //tp:flags | //tp:mapping | //tp:struct | //tp:external-type">
<xsl:sort select="@name"/>
<li>
<code>
<a href="#type-{@name}">
<xsl:value-of select="@name"/>
</a>
</code>
<xsl:apply-templates mode="in-index" select="."/>
</li>
</xsl:for-each>
</ul>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
<!-- vim:set sw=2 sts=2 et: -->
View File
+27
View File
@@ -0,0 +1,27 @@
<tp:spec
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
xmlns:xi="http://www.w3.org/2001/XInclude">
<tp:title>ModemManager D-Bus Interface Specification</tp:title>
<tp:version>0.1</tp:version>
<tp:copyright>Copyright (C) 2008 Novell, Inc.</tp:copyright>
<tp:license xmlns="http://www.w3.org/1999/xhtml">
<p>This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.</p>
<p>This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.</p>
<p>You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
<xi:include href="mm-manager.xml"/>
<xi:include href="mm-modem.xml"/>
</tp:spec>
+25 -4
View File
@@ -1,18 +1,39 @@
<?xml version="1.0" encoding="UTF-8" ?>
<node name="/">
<node name="/" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<interface name="org.freedesktop.ModemManager">
<method name="EnumerateDevices">
<tp:docstring>
Get the list of modem devices.
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_manager_enumerate_devices"/>
<arg name="devices" type="ao" direction="out"/>
<arg name="devices" type="ao" direction="out">
<tp:docstring>
List of object paths of modem devices known to the system.
</tp:docstring>
</arg>
</method>
<signal name="DeviceAdded">
<arg name="device" type="o"/>
<tp:docstring>
A device was added to the system.
</tp:docstring>
<arg name="device" type="o">
<tp:docstring>
The object path of the newly added device.
</tp:docstring>
</arg>
</signal>
<signal name="DeviceRemoved">
<arg name="device" type="o"/>
<tp:docstring>
A device was removed from the system, and is no longer available.
</tp:docstring>
<arg name="device" type="o">
<tp:docstring>
The object path of the device that was just removed.
</tp:docstring>
</arg>
</signal>
</interface>
+233 -17
View File
@@ -1,85 +1,301 @@
<?xml version="1.0" encoding="UTF-8" ?>
<node name="/">
<node name="/" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<interface name="org.freedesktop.ModemManager.Modem">
<method name="Enable">
<tp:docstring>
Enable the device. Initializes the modem and checks whether PIN (or PUK) is needed.
</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"/>
<arg name="enable" type="b" direction="in">
<tp:docstring>
True to enable the device, False to disable.
</tp:docstring>
</arg>
</method>
<method name="SetPin">
<tp:docstring>
Set the PIN (or PUK) to unlock the SIM card.
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_modem_set_pin"/>
<arg name="secret" type="s" direction="in"/>
<arg name="pin" type="s" direction="in">
The PIN code.
</arg>
</method>
<method name="Register">
<tp:docstring>
Register the device to network.
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_modem_register"/>
<arg name="network_id" type="s" direction="in"/>
<arg name="network_id" type="s" direction="in">
<tp:docstring>
The network ID to register. An empty string can be used to register to the home network.
</tp:docstring>
</arg>
</method>
<method name="Connect">
<tp:docstring>
Dial in.
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_modem_connect"/>
<arg name="number" type="s" direction="in"/>
<arg name="apn" type="s" direction="in"/>
<arg name="number" type="s" direction="in">
<tp:docstring>
The number to use for dialing.
</tp:docstring>
</arg>
<arg name="apn" type="s" direction="in">
<tp:docstring>
The APN to use. Can be an empty string to use the default APN from the SIM card.
</tp:docstring>
</arg>
</method>
<method name="Disconnect">
<tp:docstring>
Disconnect modem.
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_modem_disconnect"/>
</method>
<method name="Scan">
<tp:docstring>
Scan for available networks.
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_modem_scan"/>
<arg name="results" type="aa{ss}" direction="out"/>
<arg name="results" type="aa{ss}" direction="out">
<tp:docstring>
Found networks. It's an array of dictionaries (strings for keys and values), the list of known keys is the following: status, operator-long, operator-short, operator-num.
</tp:docstring>
</arg>
</method>
<method name="GetSignalQuality">
<tp:docstring>
Get the current signal quality.
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_modem_get_signal_quality"/>
<arg name="quality" type="u" direction="out"/>
<arg name="quality" type="u" direction="out">
<tp:docstring>
Signal quality (percent).
</tp:docstring>
</arg>
</method>
<method name="SetBand">
<tp:docstring>
Set the band.
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_modem_set_band"/>
<arg name="band" type="u" direction="in"/>
<arg name="band" type="u" direction="in" tp:type="MM_MODEM_BAND">
<tp:docstring>
The new band.
</tp:docstring>
</arg>
</method>
<method name="GetBand">
<tp:docstring>
Get the current band.
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_modem_get_band"/>
<arg name="band" type="u" direction="out"/>
<arg name="band" type="u" direction="out" tp:type="MM_MODEM_BAND">
<tp:docstring>
The current band.
</tp:docstring>
</arg>
</method>
<method name="SetNetworkMode">
<tp:docstring>
Set the network mode.
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_modem_set_network_mode"/>
<arg name="mode" type="u" direction="in"/>
<arg name="mode" type="u" direction="in" tp:type="MM_MODEM_NETWORK_MODE">
<tp:docstring>
The new mode.
</tp:docstring>
</arg>
</method>
<method name="GetNetworkMode">
<tp:docstring>
Get the network mode.
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_modem_get_network_mode"/>
<arg name="mode" type="u" direction="out"/>
<arg name="mode" type="u" direction="out">
<tp:docstring>
The current network mode.
</tp:docstring>
</arg>
</method>
<property name="DataDevice" type="s" access="read">
<tp:docstring>
The serial device which can be used to start pppd.
</tp:docstring>
</property>
<property name="DataDevice" type="s" access="read"/>
<property name="Driver" type="s" access="read"/>
<property name="Type" type="u" access="read"/>
<property name="Driver" type="s" access="read">
<tp:docstring>
The driver handling the device.
</tp:docstring>
</property>
<property name="Type" type="u" access="read" tp:type="MM_MODEM_TYPE">
<tp:docstring>
The modem type.
</tp:docstring>
</property>
<signal name="SignalQuality">
<arg name="quality" type="u"/>
<tp:docstring>
The signal quality changed.
</tp:docstring>
<arg name="quality" type="u">
<tp:docstring>
The new quality in percent, 0..100.
</tp:docstring>
</arg>
</signal>
<signal name="NetworkMode">
<arg name="mode" type="u"/>
<tp:docstring>
The network mode changed.
</tp:docstring>
<arg name="mode" type="u" tp:type="MM_MODEM_NETWORK_MODE">
<tp:docstring>
The new quality in percent, 0..100.
</tp:docstring>
</arg>
</signal>
<tp:enum name="MM_MODEM_TYPE" type="u">
<tp:enumvalue suffix="GSM" value="1">
<tp:docstring>
A GSM device.
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="CDMA" value="2">
<tp:docstring>
A CDMA device.
</tp:docstring>
</tp:enumvalue>
</tp:enum>
<tp:enum name="MM_MODEM_NETWORK_MODE" type="u">
<tp:enumvalue suffix="ANY" value="0">
<tp:docstring>
Any network mode can be used.
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="GPRS" value="1">
<tp:docstring>
GPRS
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="EDGE" value="2">
<tp:docstring>
EDGE
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="3G" value="3">
<tp:docstring>
3G
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="HSDPA" value="4">
<tp:docstring>
HSDPA
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="PREFER_2G" value="5">
<tp:docstring>
Prefer 2G (GPRS or EDGE).
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="PREFER_3G" value="6">
<tp:docstring>
Prefer 3G (3G or HSDPA).
</tp:docstring>
</tp:enumvalue>
</tp:enum>
<tp:enum name="MM_MODEM_BAND" type="u">
<tp:enumvalue suffix="ANY" value="0">
<tp:docstring>
Any band can be used.
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="EGSM" value="1">
<tp:docstring>
EGSM (900 MHz).
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="DCS" value="2">
<tp:docstring>
DCS (1800 MHz).
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="PCS" value="3">
<tp:docstring>
PCS (1900 MHz).
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="G850" value="4">
<tp:docstring>
G850 (850 MHz).
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="U2100" value="5">
<tp:docstring>
U2100 (WCDMA 2100 MHz).
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="U1700" value="6">
<tp:docstring>
U1700 (WCDMA 3GPP UMTS1800 MHz).
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="17IV" value="7">
<tp:docstring>
17IV (WCDMA 3GPP AWS 1700/2100 MHz).
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="U800" value="8">
<tp:docstring>
U800 (WCDMA 3GPP UMTS800 MHz).
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="U850" value="9">
<tp:docstring>
U850 (WCDMA 3GPP UMTS850 MHz).
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="U900" value="10">
<tp:docstring>
U900 (WCDMA 3GPP UMTS900 MHz).
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="U17IX" value="11">
<tp:docstring>
U17IX (WCDMA 3GPP UMTS MHz).
</tp:docstring>
</tp:enumvalue>
</tp:enum>
</interface>
</node>