<!DOCTYPE node PUBLIC
"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">

  <interface name="org.freedesktop.URfkill">
    <doc:doc>
      <doc:description>
        <doc:para>
          The urfkill service is available via the system message
          bus. To access the service, use
          the <doc:tt>org.freedesktop.URfkill</doc:tt> interface on
          the <doc:tt>/org/freedesktop/URfkill</doc:tt> object on
          the D-Bus system bus service with the well-known
          name <doc:tt>org.freedesktop.URfkill</doc:tt>.
        </doc:para>
        <doc:para>
          <doc:example language="shell" title="simple example">
            <doc:code>
$ dbus-send --print-reply \
            --system \
            --dest=org.freedesktop.URfkill \
            /org/freedesktop/URfkill \
            org.freedesktop.URfkill.EnumerateDevices

method return sender=:1.164 -> dest=:1.167 reply_serial=2
   array [
      object path "/org/freedesktop/URfkill/devices/0"
      object path "/org/freedesktop/URfkill/devices/1"
   ]
            </doc:code>
          </doc:example>
        </doc:para>
      </doc:description>
    </doc:doc>

    <!-- ************************************************************ -->

    <method name="Block">
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
      <arg type="u" name="type" direction="in">
        <doc:doc><doc:summary>
	  The type of devices to be blocked/unblocked
        </doc:summary></doc:doc>
      </arg>
      <arg type="b" name="block" direction="in">
        <doc:doc><doc:summary>
	  TRUE to block the devices, FALSE to unblock
        </doc:summary></doc:doc>
      </arg>
      <arg type="b" name="ret" direction="out">
        <doc:doc><doc:summary>
	  TRUE for success, otherwise FALSE
        </doc:summary></doc:doc>
      </arg>

      <doc:doc>
        <doc:description>
          <doc:para>
            Block or unblock the devices belonging to the type.
            The types are defined as the followings:
          </doc:para>
          <doc:list>
            <doc:item>
              <doc:term>0</doc:term><doc:definition>All</doc:definition>
            </doc:item>
            <doc:item>
              <doc:term>1</doc:term><doc:definition>WLAN</doc:definition>
            </doc:item>
            <doc:item>
              <doc:term>2</doc:term><doc:definition>Bluetooth</doc:definition>
            </doc:item>
            <doc:item>
              <doc:term>3</doc:term><doc:definition>UWB</doc:definition>
            </doc:item>
            <doc:item>
              <doc:term>4</doc:term><doc:definition>WIMAX</doc:definition>
            </doc:item>
            <doc:item>
              <doc:term>5</doc:term><doc:definition>WWAN</doc:definition>
            </doc:item>
            <doc:item>
              <doc:term>6</doc:term><doc:definition>GPS</doc:definition>
            </doc:item>
            <doc:item>
              <doc:term>7</doc:term><doc:definition>FM</doc:definition>
            </doc:item>
          </doc:list>
          <doc:para>
	    Note: This method only changes soft block. Hard block is controlled
	          by BIOS or the hardware and there is no way to change the
		  state of hard block through kernel functions.
          </doc:para>
        </doc:description>
        <doc:permission>
          This method is restricted to the active session user.
        </doc:permission>
      </doc:doc>
    </method>

    <!-- ************************************************************ -->

    <method name="BlockIdx">
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
      <arg type="u" name="index" direction="in">
        <doc:doc><doc:summary>
	  The index of the device to be blocked/unblocked
        </doc:summary></doc:doc>
      </arg>
      <arg type="b" name="block" direction="in">
        <doc:doc><doc:summary>
	  TRUE to block the device, FALSE to unblock
        </doc:summary></doc:doc>
      </arg>
      <arg type="b" name="ret" direction="out">
        <doc:doc><doc:summary>
	  TRUE for success, otherwise FALSE
        </doc:summary></doc:doc>
      </arg>

      <doc:doc>
        <doc:description>
          <doc:para>
            Block or unblock the device by the index.
          </doc:para>
          <doc:para>
	    Note: This method only changes soft block. Hard block is controlled
	          by BIOS or the hardware and there is no way to change the
		  state of hard block through kernel functions.
          </doc:para>
        </doc:description>
        <doc:permission>
          This method is restricted to the currently active session user.
        </doc:permission>
      </doc:doc>
    </method>

    <!-- ************************************************************ -->

    <method name="EnumerateDevices">
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
      <arg type="ao" name="array" direction="out">
        <doc:doc><doc:summary>
	  An array of the object pathes for the devices
        </doc:summary></doc:doc>
      </arg>

      <doc:doc>
        <doc:description>
          <doc:para>
            Enumerate all rfkill objects on the system.
          </doc:para>
        </doc:description>
      </doc:doc>
    </method>

    <!-- ************************************************************ -->

    <method name="IsInhibited">
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
      <arg type="b" name="is_inhibited" direction="out">
        <doc:doc><doc:summary>
	  TRUE if the key control is inhibited, otherwise FALSE
        </doc:summary></doc:doc>
      </arg>

      <doc:doc>
        <doc:description>
          <doc:para>
            Get whether the rfkill key handling function is inhibited or not.
          </doc:para>
        </doc:description>
      </doc:doc>
    </method>

    <!-- ************************************************************ -->

    <method name="Inhibit">
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
      <arg type="s" name="reason" direction="in">
        <doc:doc><doc:summary>
	  The reason to inhibit the key control
        </doc:summary></doc:doc>
      </arg>
      <arg type="u" name="inhibit_cookie" direction="out">
        <doc:doc><doc:summary>
	  The cookie
        </doc:summary></doc:doc>
      </arg>

      <doc:doc>
        <doc:description>
          <doc:para>
            Inhibit the rfkill key handling function for the session.
          </doc:para>
        </doc:description>
      </doc:doc>
    </method>

    <!-- ************************************************************ -->

    <method name="Uninhibit">
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
      <arg type="u" name="inhibit_cookie" direction="in">
        <doc:doc><doc:summary>
	  The cookie
        </doc:summary></doc:doc>
      </arg>

      <doc:doc>
        <doc:description>
          <doc:para>
            Cancel a previous call to <doc:ref type="method" to="org.freedesktop.URfkill.Inhibit">Inhibit()</doc:ref>
            identified by the cookie.
          </doc:para>
        </doc:description>
      </doc:doc>
    </method>

    <!-- ************************************************************ -->

    <signal name="DeviceAdded">
      <arg type="o" name="device" direction="out">
        <doc:doc><doc:summary>
	  The object path for the device that was added
        </doc:summary></doc:doc>
      </arg>

      <doc:doc>
        <doc:description>
          <doc:para>
            Emitted when a device is added.
          </doc:para>
        </doc:description>
      </doc:doc>
    </signal>

    <!-- ************************************************************ -->

    <signal name="DeviceRemoved">
      <arg type="o" name="device" direction="out">
        <doc:doc><doc:summary>
	  The object path for the device that was removed
        </doc:summary></doc:doc>
      </arg>

      <doc:doc>
        <doc:description>
          <doc:para>
            Emitted when a device is removed.
          </doc:para>
        </doc:description>
      </doc:doc>
    </signal>

    <!-- ************************************************************ -->

    <signal name="DeviceChanged">
      <arg type="o" name="device" direction="out">
        <doc:doc><doc:summary>
	  The object path for the device that was changed
        </doc:summary></doc:doc>
      </arg>

      <doc:doc>
        <doc:description>
          <doc:para>
            Emitted when a device is changed.
          </doc:para>
        </doc:description>
      </doc:doc>
    </signal>

    <!-- ************************************************************ -->

    <signal name="UrfkeyPressed">
      <arg type="i" name="keycode" direction="out">
        <doc:doc><doc:summary>
	  The keycode emitted from the input device
        </doc:summary></doc:doc>
      </arg>

      <doc:doc>
        <doc:description>
          <doc:para>
            Emitted when a rfkill key is pressed. The keycode is defined in
            &lt;linux/input.h&gt;.
          </doc:para>
          <doc:list>
            <doc:item>
              <doc:term>237</doc:term><doc:definition>KEY_BLUETOOTH</doc:definition>
            </doc:item>
            <doc:item>
              <doc:term>238</doc:term><doc:definition>KEY_WLAN</doc:definition>
            </doc:item>
            <doc:item>
              <doc:term>239</doc:term><doc:definition>KEY_UWB</doc:definition>
            </doc:item>
            <doc:item>
              <doc:term>246</doc:term><doc:definition>KEY_WIMAX</doc:definition>
            </doc:item>
            <doc:item>
              <doc:term>247</doc:term><doc:definition>KEY_RFKILL</doc:definition>
            </doc:item>
          </doc:list>
        </doc:description>
      </doc:doc>
    </signal>

    <!-- ************************************************************ -->

    <property name="DaemonVersion" type="s" access="read">
      <doc:doc>
        <doc:description>
          <doc:para>
	    The version the running daemon. e.g. 0.2.0
          </doc:para>
        </doc:description>
      </doc:doc>
    </property>

    <property name="KeyControl" type="b" access="read">
      <doc:doc>
        <doc:description>
          <doc:para>
	    Whether the key control is enabled or not
          </doc:para>
        </doc:description>
      </doc:doc>
    </property>

  </interface>
</node>
