DBus API Reference

Interfaces

org.gnome.Wiican

A D-Bus service which allows to manage wiimote connections and track the wiimote connection states.

Methods

ConnectWiimote(self, config_file, daemon):

Request a wiimote connection using the config_file as mapping.

In order to allow connections a bluetooth adaptor must be available, the uinput module must be loaded and no other connection could be in use (WC_AVAILABLE status)

The bluetooth adaptor connection changes are auto-discovered. By now, the uinput module load/unload it’s only discovered at service start and at bluetooth adaptor connection changes too. So the best it’s to ensure that module it’s loaded before launching the service.

The daemon mode sets the connection for waiting indefinitely for pressing 1+2 (not daemon mode only wait for 3 seconds) and trying to reconnect if wiimote it’s disconnected.

Parameters:
  • config_file (string) – Absolute path to mapping config file
  • daemon (bool) – Set the daemon mode

Possible Errors:

  • Not uinput module present
  • Not bluetooth adapter present
  • A wiimote connection still in use (disconnect first)
  • Mapping validation error
DisconnectWiimote()
Close the wiimote connection or do nothing if no connection in use.
GetStatus()

Get the current status as defined in the StatusChanged signal.

Return type:an integer representing the current status
Quit()
Exit wiican dbus service.

Signals

StatusChanged(status)

Emitted when the status of the connection changes.

Parameter:status (int) – an integer indicating the new status

Types

WC_DISABLED

Status indicating No bluetooth adaptor available and uinput module it’s not loaded.

Wiimote connection could not be performed.

Integer value: 0

WC_BLUEZ_PRESENT

Status indicating Bluetooth adaptor available, nor uinput module.

Wiimote connection could not be performed.

Integer value: 1

WC_UINPUT_PRESENT

Status indicating the uinput module it’s loaded, no bluetooth device available.

Wiimote connection could not be performed.

Integer value: 2

WC_AVAILABLE

Status indicating bluetooth adaptor available, uinput module loaded.

Wiimote connection could be performed.

Integer value: 3

WC_CONNECTED

Status indicating wiimote connection in use.

Disconnect first to make a new connection.

Integer value: 7

Table Of Contents

Previous topic

Welcome to Wiican’s documentation!

Next topic

mapping — representation of a wiican mapping

This Page