org.freedesktop.URfkill

## org.freedesktop.URfkill org.freedesktop.URfkill — URfkill interface |

## Methods

    Block            (in  'u'  type,
                      in  'b'  block,
                      out 'b'  ret)
    BlockIdx         (in  'u'  index,
                      in  'b'  block,
                      out 'b'  ret)
    EnumerateDevices (out 'ao' array)
    IsInhibited      (out 'b'  is_inhibited)
    Inhibit          (in  's'  reason,
                      out 'u'  inhibit_cookie)
    Uninhibit        (in  'u'  inhibit_cookie)

## Signals

    DeviceAdded   ('o' device)
    DeviceRemoved ('o' device)
    DeviceChanged ('o' device)
    UrfkeyPressed ('i' keycode)

## Implemented Interfaces

Objects implementing org.freedesktop.URfkill also implements org.freedesktop.DBus.Introspectable, org.freedesktop.DBus.Properties

## Properties

    'DaemonVersion' read      's'
    'KeyControl'    read      'b'

## Description

The urfkill service is available via the system message bus. To access the service, use the `org.freedesktop.URfkill` interface on the `/org/freedesktop/URfkill` object on the D-Bus system bus service with the well-known name `org.freedesktop.URfkill`.

    $ 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"
       ]

## Details

### Block ()

    Block (in  'u' type,
           in  'b' block,
           out 'b' ret)

Block or unblock the devices belonging to the type. The types are defined as the followings:

- 0: All
- 1: WLAN
- 2: Bluetooth
- 3: UWB
- 4: WIMAX
- 5: WWAN
- 6: GPS
- 7: FM

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.

`type`: | The type of devices to be blocked/unblocked
`block`: | TRUE to block the devices, FALSE to unblock
`ret`: | TRUE for success, otherwise FALSE

#### Permissions

This method is restricted to the active session user.

### BlockIdx ()

    BlockIdx (in  'u' index,
              in  'b' block,
              out 'b' ret)

Block or unblock the device by the index.

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.

`index`: | The index of the device to be blocked/unblocked
`block`: | TRUE to block the device, FALSE to unblock
`ret`: | TRUE for success, otherwise FALSE

#### Permissions

This method is restricted to the currently active session user.

### EnumerateDevices ()

    EnumerateDevices (out 'ao' array)

Enumerate all rfkill objects on the system.

`array`: | An array of the object pathes for the devices

### IsInhibited ()

    IsInhibited (out 'b' is_inhibited)

Get whether the rfkill key handling function is inhibited or not.

`is_inhibited`: | TRUE if the key control is inhibited, otherwise FALSE

### Inhibit ()

    Inhibit (in  's' reason,
             out 'u' inhibit_cookie)

Inhibit the rfkill key handling function for the session.

`reason`: | The reason to inhibit the key control
`inhibit_cookie`: | The cookie

### Uninhibit ()

    Uninhibit (in  'u' inhibit_cookie)

Cancel a previous call to `Inhibit()` identified by the cookie.

`inhibit_cookie`: | The cookie

## Signal Details

### The DeviceAdded signal

    DeviceAdded ('o' device)

Emitted when a device is added.

`device`: | The object path for the device that was added

### The DeviceRemoved signal

    DeviceRemoved ('o' device)

Emitted when a device is removed.

`device`: | The object path for the device that was removed

### The DeviceChanged signal

    DeviceChanged ('o' device)

Emitted when a device is changed.

`device`: | The object path for the device that was changed

### The UrfkeyPressed signal

    UrfkeyPressed ('i' keycode)

Emitted when a rfkill key is pressed. The keycode is defined in <linux/input.h>.

- 237: KEY_BLUETOOTH
- 238: KEY_WLAN
- 239: KEY_UWB
- 246: KEY_WIMAX
- 247: KEY_RFKILL

`keycode`: | The keycode emitted from the input device

## Property Details

### The "DaemonVersion" property

    'DaemonVersion'  read      's'

The version the running daemon. e.g. 0.2.0

### The "KeyControl" property

    'KeyControl'  read      'b'

Whether the key control is enabled or not