UrfKillswitch

## UrfKillswitch UrfKillswitch — Client object for accessing information about killswitches |

## Synopsis

    #include <urfkill.h>

                        UrfKillswitch;
                        UrfKillswitchClass;
    UrfKillswitch *     urf_killswitch_new                  (UrfSwitchType type);
    UrfSwitchType       urf_killswitch_get_switch_type      (UrfKillswitch *killswitch);

## Object Hierarchy

      GObject
       +----UrfKillswitch

## Properties

      "state"                    gint                  : Read / Write

## Signals

      "state-changed"                                  : Run Last

## Description

A helper GObject for accessing killswitches

## Details

### UrfKillswitch

    typedef struct _UrfKillswitch UrfKillswitch;

The UrfKillswitch struct contains only private fields and should not be directly accessed.

### UrfKillswitchClass

    typedef struct {
    } UrfKillswitchClass;

Class structure for UrfKillswitch

### urf_killswitch_new ()

    UrfKillswitch *     urf_killswitch_new                  (UrfSwitchType type);

Creates a new UrfKillswitch object.

`type` : | The killswitch type
Returns : | a new UrfKillswitch object.

Since 0.3.0

### urf_killswitch_get_switch_type ()

    UrfSwitchType       urf_killswitch_get_switch_type      (UrfKillswitch *killswitch);

Get the type of the killswitch.

`killswitch` : | a UrfKillswitch instance
Returns : | The type of the killswitch

Since 0.3.0

## Property Details

### The `"state"` property

      "state"                    gint                  : Read / Write

The state of the killswitch. See UrfSwitchState.

### Note

Writing the states other than URFSWITCH_STATE_UNBLOCKED or URFSWITCH_STATE_SOFT_BLOCKED will be ignored. Also, the state writing may not take effect, and it depends on the state of the hardware.

Allowed values: [-1,2]

Default value: -1

Since 0.3.0

## Signal Details

### The `"state-changed"` signal

    void                user_function                      (UrfKillswitch *client,
                                                            gint           state,
                                                            gpointer       user_data)      : Run Last

The state-changed signal is emitted when the killswitch state is changed. See UrfSwitchState.

Since 0.3.0

`client` : | the UrfKillswitch instance that emitted the signal
`state` : | the new state
`user_data` : | user data set when the signal handler was connected.

## See Also

UrfClient, UrfDevice