Lines Matching refs:enumerator
74 static void g_file_enumerator_real_next_files_async (GFileEnumerator *enumerator,
80 static GList * g_file_enumerator_real_next_files_finish (GFileEnumerator *enumerator,
83 static void g_file_enumerator_real_close_async (GFileEnumerator *enumerator,
88 static gboolean g_file_enumerator_real_close_finish (GFileEnumerator *enumerator,
98 GFileEnumerator *enumerator; in g_file_enumerator_set_property() local
100 enumerator = G_FILE_ENUMERATOR (object); in g_file_enumerator_set_property()
104 enumerator->priv->container = g_value_dup_object (value); in g_file_enumerator_set_property()
115 GFileEnumerator *enumerator; in g_file_enumerator_dispose() local
117 enumerator = G_FILE_ENUMERATOR (object); in g_file_enumerator_dispose()
119 if (enumerator->priv->container) { in g_file_enumerator_dispose()
120 g_object_unref (enumerator->priv->container); in g_file_enumerator_dispose()
121 enumerator->priv->container = NULL; in g_file_enumerator_dispose()
130 GFileEnumerator *enumerator; in g_file_enumerator_finalize() local
132 enumerator = G_FILE_ENUMERATOR (object); in g_file_enumerator_finalize()
134 if (!enumerator->priv->closed) in g_file_enumerator_finalize()
135 g_file_enumerator_close (enumerator, NULL, NULL); in g_file_enumerator_finalize()
167 g_file_enumerator_init (GFileEnumerator *enumerator) in g_file_enumerator_init() argument
169 enumerator->priv = G_TYPE_INSTANCE_GET_PRIVATE (enumerator, in g_file_enumerator_init()
193 g_file_enumerator_next_file (GFileEnumerator *enumerator, in g_file_enumerator_next_file() argument
200 g_return_val_if_fail (G_IS_FILE_ENUMERATOR (enumerator), NULL); in g_file_enumerator_next_file()
201 g_return_val_if_fail (enumerator != NULL, NULL); in g_file_enumerator_next_file()
203 if (enumerator->priv->closed) in g_file_enumerator_next_file()
210 if (enumerator->priv->pending) in g_file_enumerator_next_file()
217 if (enumerator->priv->outstanding_error) in g_file_enumerator_next_file()
219 g_propagate_error (error, enumerator->priv->outstanding_error); in g_file_enumerator_next_file()
220 enumerator->priv->outstanding_error = NULL; in g_file_enumerator_next_file()
224 class = G_FILE_ENUMERATOR_GET_CLASS (enumerator); in g_file_enumerator_next_file()
229 enumerator->priv->pending = TRUE; in g_file_enumerator_next_file()
230 info = (* class->next_file) (enumerator, cancellable, error); in g_file_enumerator_next_file()
231 enumerator->priv->pending = FALSE; in g_file_enumerator_next_file()
255 g_file_enumerator_close (GFileEnumerator *enumerator, in g_file_enumerator_close() argument
261 g_return_val_if_fail (G_IS_FILE_ENUMERATOR (enumerator), FALSE); in g_file_enumerator_close()
262 g_return_val_if_fail (enumerator != NULL, FALSE); in g_file_enumerator_close()
264 class = G_FILE_ENUMERATOR_GET_CLASS (enumerator); in g_file_enumerator_close()
266 if (enumerator->priv->closed) in g_file_enumerator_close()
269 if (enumerator->priv->pending) in g_file_enumerator_close()
279 enumerator->priv->pending = TRUE; in g_file_enumerator_close()
280 (* class->close_fn) (enumerator, cancellable, error); in g_file_enumerator_close()
281 enumerator->priv->pending = FALSE; in g_file_enumerator_close()
282 enumerator->priv->closed = TRUE; in g_file_enumerator_close()
295 GFileEnumerator *enumerator = G_FILE_ENUMERATOR (source_object); in next_async_callback_wrapper() local
297 enumerator->priv->pending = FALSE; in next_async_callback_wrapper()
298 if (enumerator->priv->outstanding_callback) in next_async_callback_wrapper()
299 (*enumerator->priv->outstanding_callback) (source_object, res, user_data); in next_async_callback_wrapper()
300 g_object_unref (enumerator); in next_async_callback_wrapper()
331 g_file_enumerator_next_files_async (GFileEnumerator *enumerator, in g_file_enumerator_next_files_async() argument
341 g_return_if_fail (G_IS_FILE_ENUMERATOR (enumerator)); in g_file_enumerator_next_files_async()
342 g_return_if_fail (enumerator != NULL); in g_file_enumerator_next_files_async()
347 simple = g_simple_async_result_new (G_OBJECT (enumerator), in g_file_enumerator_next_files_async()
356 if (enumerator->priv->closed) in g_file_enumerator_next_files_async()
358 g_simple_async_report_error_in_idle (G_OBJECT (enumerator), in g_file_enumerator_next_files_async()
366 if (enumerator->priv->pending) in g_file_enumerator_next_files_async()
368 g_simple_async_report_error_in_idle (G_OBJECT (enumerator), in g_file_enumerator_next_files_async()
376 class = G_FILE_ENUMERATOR_GET_CLASS (enumerator); in g_file_enumerator_next_files_async()
378 enumerator->priv->pending = TRUE; in g_file_enumerator_next_files_async()
379 enumerator->priv->outstanding_callback = callback; in g_file_enumerator_next_files_async()
380 g_object_ref (enumerator); in g_file_enumerator_next_files_async()
381 (* class->next_files_async) (enumerator, num_files, io_priority, cancellable, in g_file_enumerator_next_files_async()
399 g_file_enumerator_next_files_finish (GFileEnumerator *enumerator, in g_file_enumerator_next_files_finish() argument
406 g_return_val_if_fail (G_IS_FILE_ENUMERATOR (enumerator), NULL); in g_file_enumerator_next_files_finish()
420 class = G_FILE_ENUMERATOR_GET_CLASS (enumerator); in g_file_enumerator_next_files_finish()
421 return class->next_files_finish (enumerator, result, error); in g_file_enumerator_next_files_finish()
429 GFileEnumerator *enumerator = G_FILE_ENUMERATOR (source_object); in close_async_callback_wrapper() local
431 enumerator->priv->pending = FALSE; in close_async_callback_wrapper()
432 enumerator->priv->closed = TRUE; in close_async_callback_wrapper()
433 if (enumerator->priv->outstanding_callback) in close_async_callback_wrapper()
434 (*enumerator->priv->outstanding_callback) (source_object, res, user_data); in close_async_callback_wrapper()
435 g_object_unref (enumerator); in close_async_callback_wrapper()
455 g_file_enumerator_close_async (GFileEnumerator *enumerator, in g_file_enumerator_close_async() argument
463 g_return_if_fail (G_IS_FILE_ENUMERATOR (enumerator)); in g_file_enumerator_close_async()
465 if (enumerator->priv->closed) in g_file_enumerator_close_async()
467 g_simple_async_report_error_in_idle (G_OBJECT (enumerator), in g_file_enumerator_close_async()
475 if (enumerator->priv->pending) in g_file_enumerator_close_async()
477 g_simple_async_report_error_in_idle (G_OBJECT (enumerator), in g_file_enumerator_close_async()
485 class = G_FILE_ENUMERATOR_GET_CLASS (enumerator); in g_file_enumerator_close_async()
487 enumerator->priv->pending = TRUE; in g_file_enumerator_close_async()
488 enumerator->priv->outstanding_callback = callback; in g_file_enumerator_close_async()
489 g_object_ref (enumerator); in g_file_enumerator_close_async()
490 (* class->close_async) (enumerator, io_priority, cancellable, in g_file_enumerator_close_async()
515 g_file_enumerator_close_finish (GFileEnumerator *enumerator, in g_file_enumerator_close_finish() argument
522 g_return_val_if_fail (G_IS_FILE_ENUMERATOR (enumerator), FALSE); in g_file_enumerator_close_finish()
532 class = G_FILE_ENUMERATOR_GET_CLASS (enumerator); in g_file_enumerator_close_finish()
533 return class->close_finish (enumerator, result, error); in g_file_enumerator_close_finish()
545 g_file_enumerator_is_closed (GFileEnumerator *enumerator) in g_file_enumerator_is_closed() argument
547 g_return_val_if_fail (G_IS_FILE_ENUMERATOR (enumerator), TRUE); in g_file_enumerator_is_closed()
549 return enumerator->priv->closed; in g_file_enumerator_is_closed()
561 g_file_enumerator_has_pending (GFileEnumerator *enumerator) in g_file_enumerator_has_pending() argument
563 g_return_val_if_fail (G_IS_FILE_ENUMERATOR (enumerator), TRUE); in g_file_enumerator_has_pending()
565 return enumerator->priv->pending; in g_file_enumerator_has_pending()
576 g_file_enumerator_set_pending (GFileEnumerator *enumerator, in g_file_enumerator_set_pending() argument
579 g_return_if_fail (G_IS_FILE_ENUMERATOR (enumerator)); in g_file_enumerator_set_pending()
581 enumerator->priv->pending = pending; in g_file_enumerator_set_pending()
595 g_file_enumerator_get_container (GFileEnumerator *enumerator) in g_file_enumerator_get_container() argument
597 g_return_val_if_fail (G_IS_FILE_ENUMERATOR (enumerator), NULL); in g_file_enumerator_get_container()
599 return enumerator->priv->container; in g_file_enumerator_get_container()
628 GFileEnumerator *enumerator; in next_files_thread() local
631 enumerator = G_FILE_ENUMERATOR (object); in next_files_thread()
641 info = class->next_file (enumerator, cancellable, &error); in next_files_thread()
652 enumerator->priv->outstanding_error = error; in next_files_thread()
664 g_file_enumerator_real_next_files_async (GFileEnumerator *enumerator, in g_file_enumerator_real_next_files_async() argument
679 …res = g_simple_async_result_new (G_OBJECT (enumerator), callback, user_data, g_file_enumerator_rea… in g_file_enumerator_real_next_files_async()
687 g_file_enumerator_real_next_files_finish (GFileEnumerator *enumerator, in g_file_enumerator_real_next_files_finish() argument
730 g_file_enumerator_real_close_async (GFileEnumerator *enumerator, in g_file_enumerator_real_close_async() argument
738 res = g_simple_async_result_new (G_OBJECT (enumerator), in g_file_enumerator_real_close_async()
753 g_file_enumerator_real_close_finish (GFileEnumerator *enumerator, in g_file_enumerator_real_close_finish() argument