typedef void (*ObjectCacheReadyCb)(void *data);
/**
- * @brief Recursivly build ObjectCache structures for root Accessible
- * object from and its descendants. (Children's children also, etc.)
- *
- * @param root starting object.
- *
- * @remarks This function may block main-loop for significant ammount of time.
- * Flushes all previously cached items.
- */
-void object_cache_build(AtspiAccessible *root);
-
-/**
* @brief Recursivly build ObjectCache structures for ever Accessible
* object from root and its all descendants.
*
return eina_hash_pointer_new(_cache_item_free_cb);
}
-void
-object_cache_build(AtspiAccessible *root)
-{
- DEBUG("START");
- Eina_List *objs;
-
- _object_cache_free_internal();
- cache = _object_cache_new();
- if (!cache)
- {
- ERROR("ObjectCache: hash table creation failed");
- return;
- }
-
- objs = _cache_candidates_list_prepare(root);
- _cache_item_n_cache(objs, eina_list_count(objs));
-
- return;
-}
-
static Eina_Bool
_do_cache(void *data)
{
object_cache_build_async(AtspiAccessible *root, int bulk_size, ObjectCacheReadyCb cb, void *ud)
{
DEBUG("START");
- if (idler)
- {
- ERROR("Invalid usage. Async cache build is ongoing...");
- return;
- }
+
_object_cache_free_internal();
callback = cb;