Next: , Previous: , Up: STInput: The Sensor Abstraction   [Contents]


B.4.3 STInput Metadata Accessors

get_* strings are borrowed (valid until the next set or finalize). Prefer dup_* across threads (caller frees with g_free). Setters return TRUE on success and queue notify::property when the value actually changed.

Function: const char * st_input_get_name (const STInput *self)

Reads the identifier.

self

The input.

Returns: Borrowed name string.

Function: char * st_input_dup_name (const STInput *self)

Thread-safe copy of the identifier.

self

The input.

Returns: Newly allocated name (transfer full).

Function: gboolean st_input_set_name (STInput *self, const char *name, GError **error)

Renames the input.

self

The input.

name

New identifier.

error

Filled on invalid name.

Returns: TRUE if accepted, FALSE on failure.

Function: const char * st_input_get_description (const STInput *self)

Reads the human-readable description.

self

The input.

Returns: Borrowed description string.

Function: char * st_input_dup_description (const STInput *self)

Thread-safe copy of the description.

self

The input.

Returns: Newly allocated description (transfer full).

Function: gboolean st_input_set_description (STInput *self, const char *description, GError **error)

Updates the description.

self

The input.

description

New text.

error

Filled on failure.

Returns: TRUE on success.

Function: STUnit st_input_get_unit (const STInput *self)

Reads the quantity kind.

self

The input.

Returns: Current STUnit.

Function: gboolean st_input_set_unit (STInput *self, STUnit unit, GError **error)

Changes the quantity kind.

self

The input.

unit

New unit enumerator.

error

Filled on failure.

Returns: TRUE on success.


Next: Range and Value Control, Previous: STInput Properties and Notify, Up: STInput: The Sensor Abstraction   [Contents]