cd-device

cd-device — Client object for accessing information about colord devices

Synopsis

#define             CD_DEVICE_ERROR
#define             CD_DEVICE_TYPE_ERROR
void                (*changed)                          (CdProfile *profile);
void                (*_cd_device_reserved1)             (void);
void                (*_cd_device_reserved2)             (void);
void                (*_cd_device_reserved3)             (void);
void                (*_cd_device_reserved4)             (void);
void                (*_cd_device_reserved5)             (void);
void                (*_cd_device_reserved6)             (void);
void                (*_cd_device_reserved7)             (void);
void                (*_cd_device_reserved8)             (void);
enum                CdDeviceError;
GQuark              cd_device_error_quark               (void);
CdDevice *          cd_device_new                       (void);
gchar *             cd_device_to_string                 (CdDevice *device);
gboolean            cd_device_set_object_path_sync      (CdDevice *device,
                                                         const gchar *object_path,
                                                         GCancellable *cancellable,
                                                         GError **error);
gboolean            cd_device_set_model_sync            (CdDevice *device,
                                                         const gchar *value,
                                                         GCancellable *cancellable,
                                                         GError **error);
gboolean            cd_device_set_serial_sync           (CdDevice *device,
                                                         const gchar *value,
                                                         GCancellable *cancellable,
                                                         GError **error);
gboolean            cd_device_set_vendor_sync           (CdDevice *device,
                                                         const gchar *value,
                                                         GCancellable *cancellable,
                                                         GError **error);
gboolean            cd_device_set_kind_sync             (CdDevice *device,
                                                         CdDeviceKind kind,
                                                         GCancellable *cancellable,
                                                         GError **error);
gboolean            cd_device_set_colorspace_sync       (CdDevice *device,
                                                         CdColorspace colorspace,
                                                         GCancellable *cancellable,
                                                         GError **error);
gboolean            cd_device_set_mode_sync             (CdDevice *device,
                                                         CdDeviceMode mode,
                                                         GCancellable *cancellable,
                                                         GError **error);
gboolean            cd_device_add_profile_sync          (CdDevice *device,
                                                         CdProfile *profile,
                                                         GCancellable *cancellable,
                                                         GError **error);
gboolean            cd_device_remove_profile_sync       (CdDevice *device,
                                                         CdProfile *profile,
                                                         GCancellable *cancellable,
                                                         GError **error);
CdProfile *         cd_device_get_profile_for_qualifier_sync
                                                        (CdDevice *device,
                                                         const gchar *qualifier,
                                                         GCancellable *cancellable,
                                                         GError **error);
gboolean            cd_device_make_profile_default_sync (CdDevice *device,
                                                         CdProfile *profile,
                                                         GCancellable *cancellable,
                                                         GError **error);
gboolean            cd_device_profiling_inhibit_sync    (CdDevice *device,
                                                         GCancellable *cancellable,
                                                         GError **error);
gboolean            cd_device_profiling_uninhibit_sync  (CdDevice *device,
                                                         GCancellable *cancellable,
                                                         GError **error);
const gchar *       cd_device_get_id                    (CdDevice *device);
const gchar *       cd_device_get_model                 (CdDevice *device);
const gchar *       cd_device_get_vendor                (CdDevice *device);
const gchar *       cd_device_get_serial                (CdDevice *device);
guint64             cd_device_get_created               (CdDevice *device);
guint64             cd_device_get_modified              (CdDevice *device);
CdDeviceKind        cd_device_get_kind                  (CdDevice *device);
CdColorspace        cd_device_get_colorspace            (CdDevice *device);
CdDeviceMode        cd_device_get_mode                  (CdDevice *device);
GPtrArray *         cd_device_get_profiles              (CdDevice *device);
CdProfile *         cd_device_get_default_profile       (CdDevice *device);
const gchar *       cd_device_get_object_path           (CdDevice *device);
                    CdDevicePrivate;

Description

A helper GObject to use for accessing colord devices, and to be notified when it is changed.

See also: CdClient

Details

CD_DEVICE_ERROR

#define CD_DEVICE_ERROR		(cd_device_error_quark ())


CD_DEVICE_TYPE_ERROR

#define CD_DEVICE_TYPE_ERROR (cd_device_error_get_type ())


changed ()

void                (*changed)                          (CdProfile *profile);

profile :


_cd_device_reserved1 ()

void                (*_cd_device_reserved1)             (void);


_cd_device_reserved2 ()

void                (*_cd_device_reserved2)             (void);


_cd_device_reserved3 ()

void                (*_cd_device_reserved3)             (void);


_cd_device_reserved4 ()

void                (*_cd_device_reserved4)             (void);


_cd_device_reserved5 ()

void                (*_cd_device_reserved5)             (void);


_cd_device_reserved6 ()

void                (*_cd_device_reserved6)             (void);


_cd_device_reserved7 ()

void                (*_cd_device_reserved7)             (void);


_cd_device_reserved8 ()

void                (*_cd_device_reserved8)             (void);


enum CdDeviceError

typedef enum
{
	CD_DEVICE_ERROR_FAILED,
	CD_DEVICE_ERROR_LAST
} CdDeviceError;

Errors that can be thrown

CD_DEVICE_ERROR_FAILED

the transaction failed for an unknown reason

CD_DEVICE_ERROR_LAST


cd_device_error_quark ()

GQuark              cd_device_error_quark               (void);

Returns :

An error quark.

Since 0.1.0


cd_device_new ()

CdDevice *          cd_device_new                       (void);

Creates a new CdDevice object.

Returns :

a new CdDevice object.

Since 0.1.0


cd_device_to_string ()

gchar *             cd_device_to_string                 (CdDevice *device);

Converts the device to a string description.

device :

a CdDevice instance.

Returns :

text representation of CdDevice

Since 0.1.0


cd_device_set_object_path_sync ()

gboolean            cd_device_set_object_path_sync      (CdDevice *device,
                                                         const gchar *object_path,
                                                         GCancellable *cancellable,
                                                         GError **error);

Sets the object path of the object and fills up initial properties.

device :

a CdDevice instance.

object_path :

The colord object path.

cancellable :

a GCancellable or NULL

error :

a GError, or NULL.

Returns :

TRUE for success, else FALSE and error is used

Since 0.1.0


cd_device_set_model_sync ()

gboolean            cd_device_set_model_sync            (CdDevice *device,
                                                         const gchar *value,
                                                         GCancellable *cancellable,
                                                         GError **error);

Sets the device model.

device :

a CdDevice instance.

value :

The model.

cancellable :

a GCancellable or NULL

error :

a GError, or NULL.

Returns :

TRUE for success, else FALSE and error is used

Since 0.1.0


cd_device_set_serial_sync ()

gboolean            cd_device_set_serial_sync           (CdDevice *device,
                                                         const gchar *value,
                                                         GCancellable *cancellable,
                                                         GError **error);

Sets the device serial number.

device :

a CdDevice instance.

value :

The string value.

cancellable :

a GCancellable or NULL

error :

a GError, or NULL.

Returns :

TRUE for success, else FALSE and error is used

Since 0.1.1


cd_device_set_vendor_sync ()

gboolean            cd_device_set_vendor_sync           (CdDevice *device,
                                                         const gchar *value,
                                                         GCancellable *cancellable,
                                                         GError **error);

Sets the device vendor.

device :

a CdDevice instance.

value :

The string value.

cancellable :

a GCancellable or NULL

error :

a GError, or NULL.

Returns :

TRUE for success, else FALSE and error is used

Since 0.1.1


cd_device_set_kind_sync ()

gboolean            cd_device_set_kind_sync             (CdDevice *device,
                                                         CdDeviceKind kind,
                                                         GCancellable *cancellable,
                                                         GError **error);

Sets the device kind.

device :

a CdDevice instance.

kind :

The device kind, e.g. CD_DEVICE_KIND_DISPLAY

cancellable :

a GCancellable or NULL

error :

a GError, or NULL.

Returns :

TRUE for success, else FALSE and error is used

Since 0.1.0


cd_device_set_colorspace_sync ()

gboolean            cd_device_set_colorspace_sync       (CdDevice *device,
                                                         CdColorspace colorspace,
                                                         GCancellable *cancellable,
                                                         GError **error);

Sets the device kind.

device :

a CdDevice instance.

colorspace :

cancellable :

a GCancellable or NULL

error :

a GError, or NULL.

Returns :

TRUE for success, else FALSE and error is used

Since 0.1.1


cd_device_set_mode_sync ()

gboolean            cd_device_set_mode_sync             (CdDevice *device,
                                                         CdDeviceMode mode,
                                                         GCancellable *cancellable,
                                                         GError **error);

Sets the device mode.

device :

a CdDevice instance.

mode :

The device kind, e.g. CD_DEVICE_MODE_VIRTUAL

cancellable :

a GCancellable or NULL

error :

a GError, or NULL.

Returns :

TRUE for success, else FALSE and error is used

Since 0.1.2


cd_device_add_profile_sync ()

gboolean            cd_device_add_profile_sync          (CdDevice *device,
                                                         CdProfile *profile,
                                                         GCancellable *cancellable,
                                                         GError **error);

Adds a profile to a device.

device :

a CdDevice instance.

profile :

a CdProfile instance

cancellable :

a GCancellable or NULL

error :

a GError, or NULL.

Returns :

TRUE for success, else FALSE and error is used

Since 0.1.0


cd_device_remove_profile_sync ()

gboolean            cd_device_remove_profile_sync       (CdDevice *device,
                                                         CdProfile *profile,
                                                         GCancellable *cancellable,
                                                         GError **error);

Removes a profile from a device.

device :

a CdDevice instance.

profile :

a CdProfile instance

cancellable :

a GCancellable or NULL

error :

a GError, or NULL.

Returns :

TRUE for success, else FALSE and error is used

Since 0.1.2


cd_device_get_profile_for_qualifier_sync ()

CdProfile *         cd_device_get_profile_for_qualifier_sync
                                                        (CdDevice *device,
                                                         const gchar *qualifier,
                                                         GCancellable *cancellable,
                                                         GError **error);

device :

qualifier :

cancellable :

error :

Returns :


cd_device_make_profile_default_sync ()

gboolean            cd_device_make_profile_default_sync (CdDevice *device,
                                                         CdProfile *profile,
                                                         GCancellable *cancellable,
                                                         GError **error);

Makes an already added profile default for a device.

device :

a CdDevice instance.

profile :

a CdProfile instance

cancellable :

a GCancellable or NULL

error :

a GError, or NULL.

Returns :

TRUE for success, else FALSE and error is used

Since 0.1.0


cd_device_profiling_inhibit_sync ()

gboolean            cd_device_profiling_inhibit_sync    (CdDevice *device,
                                                         GCancellable *cancellable,
                                                         GError **error);

Sets up the device for profiling and causes no profiles to be returned if cd_device_get_profile_for_qualifiers_sync() is used.

device :

a CdDevice instance.

cancellable :

a GCancellable or NULL

error :

a GError, or NULL.

Returns :

TRUE for success, else FALSE and error is used

Since 0.1.1


cd_device_profiling_uninhibit_sync ()

gboolean            cd_device_profiling_uninhibit_sync  (CdDevice *device,
                                                         GCancellable *cancellable,
                                                         GError **error);

Restores the device after profiling and causes normal profiles to be returned if cd_device_get_profile_for_qualifiers_sync() is used.

device :

a CdDevice instance.

cancellable :

a GCancellable or NULL

error :

a GError, or NULL.

Returns :

TRUE for success, else FALSE and error is used

Since 0.1.1


cd_device_get_id ()

const gchar *       cd_device_get_id                    (CdDevice *device);

Gets the device ID.

device :

a CdDevice instance.

Returns :

A string, or NULL for invalid

Since 0.1.0


cd_device_get_model ()

const gchar *       cd_device_get_model                 (CdDevice *device);

Gets the device model.

device :

a CdDevice instance.

Returns :

A string, or NULL for invalid

Since 0.1.0


cd_device_get_vendor ()

const gchar *       cd_device_get_vendor                (CdDevice *device);

Gets the device vendor.

device :

a CdDevice instance.

Returns :

A string, or NULL for invalid

Since 0.1.1


cd_device_get_serial ()

const gchar *       cd_device_get_serial                (CdDevice *device);

Gets the device serial number.

device :

a CdDevice instance.

Returns :

A string, or NULL for invalid

Since 0.1.0


cd_device_get_created ()

guint64             cd_device_get_created               (CdDevice *device);

Gets the device creation date.

device :

a CdDevice instance.

Returns :

A value in seconds, or 0 for invalid

Since 0.1.0


cd_device_get_modified ()

guint64             cd_device_get_modified              (CdDevice *device);

Gets the device modified date.

device :

a CdDevice instance.

Returns :

A value in seconds, or 0 for invalid

Since 0.1.1


cd_device_get_kind ()

CdDeviceKind        cd_device_get_kind                  (CdDevice *device);

Gets the device kind.

device :

a CdDevice instance.

Returns :

A device kind, e.g. CD_DEVICE_KIND_DISPLAY

Since 0.1.0


cd_device_get_colorspace ()

CdColorspace        cd_device_get_colorspace            (CdDevice *device);

Gets the device colorspace.

device :

a CdDevice instance.

Returns :

A colorspace, e.g. CD_COLORSPACE_RGB

Since 0.1.1


cd_device_get_mode ()

CdDeviceMode        cd_device_get_mode                  (CdDevice *device);

Gets the device mode.

device :

a CdDevice instance.

Returns :

A colorspace, e.g. CD_DEVICE_MODE_VIRTUAL

Since 0.1.2


cd_device_get_profiles ()

GPtrArray *         cd_device_get_profiles              (CdDevice *device);

Gets the device profiles.

device :

a CdDevice instance.

Returns :

An array of CdProfile's, free with g_ptr_array_unref()

Since 0.1.0


cd_device_get_default_profile ()

CdProfile *         cd_device_get_default_profile       (CdDevice *device);

Gets the default device profile.

device :

a CdDevice instance.

Returns :

A CdProfile's or NULL, free with g_object_unref()

Since 0.1.1


cd_device_get_object_path ()

const gchar *       cd_device_get_object_path           (CdDevice *device);

Gets the object path for the device.

device :

a CdDevice instance.

Returns :

the object path, or NULL

Since 0.1.0


CdDevicePrivate

typedef struct _CdDevicePrivate CdDevicePrivate;

Private PkDevice data