cd-device-sync

cd-device-sync — Sync helpers for CdDevice

Functions

Description

These helper functions provide a simple way to use the async functions in command line tools.

See also: CdDevice

Functions

cd_device_connect_sync ()

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

Connects to the object and fills up initial properties.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

Parameters

device

a CdDevice instance.

 

cancellable

a GCancellable or NULL

 

error

a GError, or NULL.

 

Returns

TRUE for success, else FALSE.

Since: 0.1.8


cd_device_set_property_sync ()

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

Sets an object property.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

Parameters

device

a CdDevice instance.

 

key

The property key

 

value

The property value

 

cancellable

a GCancellable or NULL

 

error

a GError, or NULL.

 

Returns

TRUE for success, else FALSE.

Since: 0.1.8


cd_device_add_profile_sync ()

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

Adds a profile to a device.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

Parameters

device

a CdDevice instance.

 

relation

a CdDeviceRelation, e.g. CD_DEVICE_RELATION_HARD

 

profile

a CdProfile instance

 

cancellable

a GCancellable or NULL

 

error

a GError, or NULL.

 

Returns

TRUE for success, else FALSE.

Since: 0.1.3


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.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

Parameters

device

a CdDevice instance.

 

profile

a CdProfile instance

 

cancellable

a GCancellable or NULL

 

error

a GError, or NULL.

 

Returns

TRUE for success, else FALSE.

Since: 0.1.2


cd_device_get_profile_for_qualifiers_sync ()

CdProfile *
cd_device_get_profile_for_qualifiers_sync
                               (CdDevice *device,
                                const gchar **qualifiers,
                                GCancellable *cancellable,
                                GError **error);

Gets the prefered profile for some qualifiers.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

Parameters

device

a CdDevice instance.

 

qualifiers

a set of qualifiers that can included wildcards

 

cancellable

a GCancellable or NULL

 

error

a GError, or NULL.

 

Returns

a CdProfile or NULL.

[transfer full]

Since: 0.1.8


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.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

Parameters

device

a CdDevice instance.

 

profile

a CdProfile instance

 

cancellable

a GCancellable or NULL

 

error

a GError, or NULL.

 

Returns

TRUE for success, else FALSE.

Since: 0.1.8


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.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

Parameters

device

a CdDevice instance.

 

cancellable

a GCancellable or NULL

 

error

a GError, or NULL.

 

Returns

TRUE for success, else FALSE.

Since: 0.1.1


cd_device_profiling_uninhibit_sync ()

gboolean
cd_device_profiling_uninhibit_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.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

Parameters

device

a CdDevice instance.

 

cancellable

a GCancellable or NULL

 

error

a GError, or NULL.

 

Returns

TRUE for success, else FALSE.

Since: 0.1.1


cd_device_get_profile_relation_sync ()

CdDeviceRelation
cd_device_get_profile_relation_sync (CdDevice *device,
                                     CdProfile *profile,
                                     GCancellable *cancellable,
                                     GError **error);

Gets the property relationship to the device.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

Parameters

device

a CdDevice instance.

 

profile

a CdProfile instance.

 

cancellable

a GCancellable or NULL

 

error

a GError, or NULL.

 

Returns

TRUE for success, else FALSE.

Since: 0.1.8


cd_device_set_enabled_sync ()

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

Enables or disables a device.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

Parameters

device

a CdDevice instance.

 

enabled

the enabled state

 

cancellable

a GCancellable or NULL

 

error

a GError, or NULL.

 

Returns

TRUE for success, else FALSE.

Since: 0.1.26


cd_device_set_model_sync ()

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

Sets the device model.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

Parameters

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.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

Parameters

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.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

Parameters

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.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

Parameters

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.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

Parameters

device

a CdDevice instance.

 

colorspace

The device colorspace, e.g. CD_COLORSPACE_RGB

 

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.

WARNING: This function is synchronous, and may block. Do not use it in GUI applications.

Parameters

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

Types and Values