| Top | Description |  |  |  |  | 
gboolean cd_sensor_connect_sync (CdSensor *sensor,GCancellable *cancellable,GError **error); gboolean cd_sensor_lock_sync (CdSensor *sensor,GCancellable *cancellable,GError **error); gboolean cd_sensor_unlock_sync (CdSensor *sensor,GCancellable *cancellable,GError **error); gboolean cd_sensor_set_options_sync (CdSensor *sensor,GHashTable *values,GCancellable *cancellable,GError **error); CdColorXYZ * cd_sensor_get_sample_sync (CdSensor *sensor,CdSensorCap cap,GCancellable *cancellable,GError **error);
These helper functions provide a simple way to use the async functions in command line tools.
See also: CdSensor
gboolean cd_sensor_connect_sync (CdSensor *sensor,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.
| 
 | a CdSensor instance. | 
| 
 | a GCancellable or NULL | 
| 
 | a GError, or NULL. | 
| Returns : | TRUEfor success, elseFALSE. | 
Since 0.1.8
gboolean cd_sensor_lock_sync (CdSensor *sensor,GCancellable *cancellable,GError **error);
Locks the device so we can use it.
WARNING: This function is synchronous, and may block. Do not use it in GUI applications.
| 
 | a CdSensor instance. | 
| 
 | a GCancellable or NULL | 
| 
 | a GError, or NULL. | 
| Returns : | TRUEfor success, elseFALSE. | 
Since 0.1.6
gboolean cd_sensor_unlock_sync (CdSensor *sensor,GCancellable *cancellable,GError **error);
Unlocks the device for use by other programs.
WARNING: This function is synchronous, and may block. Do not use it in GUI applications.
| 
 | a CdSensor instance. | 
| 
 | a GCancellable or NULL | 
| 
 | a GError, or NULL. | 
| Returns : | TRUEfor success, elseFALSE. | 
Since 0.1.6
gboolean cd_sensor_set_options_sync (CdSensor *sensor,GHashTable *values,GCancellable *cancellable,GError **error);
Sets options on the sensor device.
WARNING: This function is synchronous, and may block. Do not use it in GUI applications.
| 
 | a CdSensor instance. | 
| 
 | the options. [element-type utf8 GVariant] | 
| 
 | a GCancellable or NULL | 
| 
 | a GError, or NULL. | 
| Returns : | TRUEfor success, elseFALSE. | 
Since 0.1.20
CdColorXYZ * cd_sensor_get_sample_sync (CdSensor *sensor,CdSensorCap cap,GCancellable *cancellable,GError **error);
Gets a sample from the sensor.
WARNING: This function is synchronous, and may block. Do not use it in GUI applications.
| 
 | a CdSensor instance. | 
| 
 | The device capability, e.g. CD_SENSOR_CAP_AMBIENT. | 
| 
 | a GCancellable or NULL | 
| 
 | a GError, or NULL. | 
| Returns : | the XYZ reading, with ambient levels in Lux encoded in X, or NULLfor error. | 
Since 0.1.8