HinawaFwUnit

HinawaFwUnit — An object to maintain association between IEEE 1394 unit and its parent.

Functions

Properties

gulong bus-manager-node-id Read
gulong generation Read
gulong ir-manager-node-id Read
gboolean listening Read
gulong local-node-id Read
gulong node-id Read
gulong root-node-id Read

Signals

void bus-update Run Last
void disconnected Run Last

Object Hierarchy

    GObject
    ╰── HinawaFwUnit
        ╰── HinawaSndUnit

Description

A HinawaFwUnit object has a reference to an instance of HinawaFwNode for Linux FireWire character device, corresponding to parent node on IEEE 1394 bus. This object is expected to be used by inheritance from subclasses; e.g. HinawaSndUnit, and should not be instantiated directly for newly written code since the object is planned to be abstract class in future libhinawa release.

All of operations are done by associated HinawaFwNode. Some APIs and properties which HinawaFwUnit has are maintained just for backward compatibility and already deprecated. Instead, use associated HinawaFwNode.

Functions

hinawa_fw_unit_new ()

HinawaFwUnit *
hinawa_fw_unit_new (void);

hinawa_fw_unit_new has been deprecated since version 1.4 and should not be used in newly-written code.

HinawaFwUnit is planned to be an abstract class in future release. Please instantiate for derived class, instead.

Instantiate HinawaFwUnit object and return the instance.

Returns

an instance of HinawaFwUnit.

Since: 1.3.


hinawa_fw_unit_open ()

void
hinawa_fw_unit_open (HinawaFwUnit *self,
                     gchar *path,
                     GError **exception);

Open Linux FireWire character device to operate for node on IEEE 1394 bus.

Parameters

self

A HinawaFwUnit

 

path

A path to Linux FireWire character device

 

exception

A GError

 

hinawa_fw_unit_get_config_rom ()

const guint8 *
hinawa_fw_unit_get_config_rom (HinawaFwUnit *self,
                               guint *length);

hinawa_fw_unit_get_config_rom has been deprecated since version 1.4 and should not be used in newly-written code.

Instead, use hinawa_fw_node_get_config_rom() for an instance of HinawaFwNode retrieved by a call of hinawa_fw_unit_get_node().

Get cached content of configuration ROM.

Parameters

self

A HinawaFwUnit

 

length

the number of bytes consists of the config rom.

[out][optional]

Returns

config rom image.

[element-type guint8][array length=length][transfer none]


hinawa_fw_unit_listen ()

void
hinawa_fw_unit_listen (HinawaFwUnit *self,
                       GError **exception);

hinawa_fw_unit_listen has been deprecated since version 1.4 and should not be used in newly-written code.

Instead, use GSource retrieved by a call of hinawa_fw_node_create_source() for an instance of HinawaFwNode retrieved by a call of hinawa_fw_unit_get_node(). Then use GMainContext and GMainLoop of GLib for event loop.

Start to listen to any events from the unit.

Parameters

self

A HinawaFwUnit

 

exception

A GError

 

hinawa_fw_unit_unlisten ()

void
hinawa_fw_unit_unlisten (HinawaFwUnit *self);

hinawa_fw_unit_unlisten has been deprecated since version 1.4 and should not be used in newly-written code.

Instead, maintain GMainContext and GMainLoop with GSource retrieved by a call of hinawa_fw_node_create_source().

Stop to listen to any events from the unit.

Parameters

self

A HinawaFwUnit

 

hinawa_fw_unit_get_node ()

void
hinawa_fw_unit_get_node (HinawaFwUnit *self,
                         HinawaFwNode **node);

Retrieve an instance of HinawaFwNode associated to the given unit.

Parameters

self

A HinawaFwUnit.

 

node

A HinawaFwNode.

[out][transfer none]

Since: 1.4.

Types and Values

Property Details

The “bus-manager-node-id” property

  “bus-manager-node-id”      gulong

Node-ID for bus manager on the bus at this generation.

Flags: Read


The “generation” property

  “generation”               gulong

current level of generation on this bus.

Flags: Read


The “ir-manager-node-id” property

  “ir-manager-node-id”       gulong

Node-ID for isochronous resource manager on the bus at this generation.

Flags: Read


The “listening” property

  “listening”                gboolean

Whether this device is under listening.

Flags: Read

Default value: FALSE


The “local-node-id” property

  “local-node-id”            gulong

Node-ID for a unit which this unit use to communicate to the other units on the bus at this generation.

Flags: Read


The “node-id” property

  “node-id”                  gulong

Node-ID of this unit at this generation.

Flags: Read


The “root-node-id” property

  “root-node-id”             gulong

Node-ID for root of bus topology at this generation.

Flags: Read

Signal Details

The “bus-update” signal

void
user_function (HinawaFwUnit *self,
               gpointer      user_data)

When IEEE 1394 bus is updated, the ::bus-update signal is generated. Handlers can read current generation in the bus via 'generation' property.

HinawaFwUnit::bus-update has been deprecated since version 1.4 and should not be used in newly-written code.

Use an instance of HinawaFwNode retrieved by a call of hinawa_fw_unit_get_node().

Parameters

self

A HinawaFwUnit

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “disconnected” signal

void
user_function (HinawaFwUnit *self,
               gpointer      user_data)

When physical FireWire devices are disconnected from IEEE 1394 bus, the HinawaFwUnit becomes unlistening and emits this signal.

HinawaFwUnit::disconnected has been deprecated since version 1.4 and should not be used in newly-written code.

Use an instance of HinawaFwNode retrieved by a call of hinawa_fw_unit_get_node().

Parameters

self

A HinawaFwUnit

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last