365
365
/**********************************************************************/
368
cd_client_import_profile_finish_sync (CdClient *client,
370
CdClientHelper *helper)
372
helper->profile = cd_client_import_profile_finish (client,
375
g_main_loop_quit (helper->loop);
379
* cd_client_import_profile_sync:
380
* @client: a #CdClient instance.
382
* @cancellable: a #GCancellable, or %NULL
383
* @error: a #GError, or %NULL
385
* Imports a color profile into the users home directory.
387
* WARNING: This function is synchronous, and may block.
388
* Do not use it in GUI applications.
390
* Return value: (transfer full): A #CdProfile object, or %NULL for error
395
cd_client_import_profile_sync (CdClient *client,
397
GCancellable *cancellable,
400
CdClientHelper helper;
402
/* import temp object */
403
helper.loop = g_main_loop_new (NULL, FALSE);
404
helper.error = error;
405
helper.profile = NULL;
407
/* run async method */
408
cd_client_import_profile (client, file, cancellable,
409
(GAsyncReadyCallback) cd_client_import_profile_finish_sync,
411
g_main_loop_run (helper.loop);
413
/* free temp object */
414
g_main_loop_unref (helper.loop);
416
return helper.profile;
419
/**********************************************************************/
368
422
cd_client_create_device_finish_sync (CdClient *client,
369
423
GAsyncResult *res,
370
424
CdClientHelper *helper)