IdeDevice

IdeDevice

Functions

Properties

gchar * display-name Read / Write
gchar * icon-name Read / Write
gchar * id Read / Write

Types and Values

Object Hierarchy

    GEnum
    ╰── IdeDeviceError
    GObject
    ╰── IdeObject
        ╰── IdeDevice
            ╰── IdeLocalDevice

Description

Functions

ide_device_error_quark ()

GQuark
ide_device_error_quark (void);

ide_device_get_display_name ()

const gchar *
ide_device_get_display_name (IdeDevice *self);

This function returns the name of the device. If no name has been set, then NULL is returned.

In some cases, this value wont be available until additional information has been probed from the device.

Returns

A string containing the display name for the device.

[nullable]

Since: 3.32


ide_device_set_display_name ()

void
ide_device_set_display_name (IdeDevice *self,
                             const gchar *display_name);

ide_device_get_icon_name ()

const gchar *
ide_device_get_icon_name (IdeDevice *self);

Gets the icon to use when displaying the device in UI elements.

Parameters

self

a IdeDevice

 

Returns

an icon-name or NULL.

[nullable]

Since: 3.32


ide_device_set_icon_name ()

void
ide_device_set_icon_name (IdeDevice *self,
                          const gchar *icon_name);

Sets the icon-name property.

This is the icon that is displayed with the device name in UI elements.

Parameters

self

a IdeDevice

 

Since: 3.32


ide_device_get_id ()

const gchar *
ide_device_get_id (IdeDevice *self);

Retrieves the "id" property of the IdeDevice. This is generally not a user friendly name as it is often a guid.

Returns

A unique identifier for the device.

Since: 3.32


ide_device_set_id ()

void
ide_device_set_id (IdeDevice *self,
                   const gchar *id);

ide_device_prepare_configuration ()

void
ide_device_prepare_configuration (IdeDevice *self,
                                  IdeConfig *configuration);

ide_device_get_info_async ()

void
ide_device_get_info_async (IdeDevice *self,
                           GCancellable *cancellable,
                           GAsyncReadyCallback callback,
                           gpointer user_data);

Asynchronously requests information about the device.

Some information may not be available until after a connection has been established. This allows the device to connect before fetching that information.

Parameters

self

an IdeDevice

 

cancellable

a GCancellable or NULL.

[nullable]

callback

a callback to execute upon completion

 

user_data

closure data for callback

 

Since: 3.32


ide_device_get_info_finish ()

IdeDeviceInfo *
ide_device_get_info_finish (IdeDevice *self,
                            GAsyncResult *result,
                            GError **error);

Completes an asynchronous request to load the information about a device.

Parameters

self

an IdeDevice

 

result

a GAsyncResult provided to callback

 

error

a location for a GError, or NULL

 

Returns

an IdeDeviceInfo or NULL and error is set.

[transfer full]

Since: 3.32

Types and Values

enum IdeDeviceError

Members

IDE_DEVICE_ERROR_NO_SUCH_DEVICE

   

IDE_TYPE_DEVICE

#define IDE_TYPE_DEVICE  (ide_device_get_type())

IDE_DEVICE_ERROR

#define IDE_DEVICE_ERROR (ide_device_error_quark())

struct IdeDeviceClass

struct IdeDeviceClass {
  IdeObjectClass parent;

  void           (*prepare_configuration) (IdeDevice            *self,
                                           IdeConfig     *configuration);
  void           (*get_info_async)        (IdeDevice            *self,
                                           GCancellable         *cancellable,
                                           GAsyncReadyCallback   callback,
                                           gpointer              user_data);
  IdeDeviceInfo *(*get_info_finish)       (IdeDevice            *self,
                                           GAsyncResult         *result,
                                           GError              **error);
};

IdeDevice

typedef struct _IdeDevice IdeDevice;

Property Details

The “display-name” property

  “display-name”             gchar *

The display name of the device.

Owner: IdeDevice

Flags: Read / Write

Default value: NULL


The “icon-name” property

  “icon-name”                gchar *

The "icon-name" property is the icon to display with the device in various UI elements of Builder.

Owner: IdeDevice

Flags: Read / Write

Default value: NULL

Since: 3.32


The “id” property

  “id”                       gchar *

The device identifier.

Owner: IdeDevice

Flags: Read / Write

Default value: NULL