Exemplo n.º 1
0
static void
produce_bookmarks_from_filter (OperationSpec *os,
                               GomFilter     *filter)
{
  GomRepository *repository;

  GRL_DEBUG ("produce_bookmarks_from_filter");

  repository = GRL_BOOKMARKS_SOURCE (os->source)->priv->repository;
  gom_repository_find_async (repository,
                             BOOKMARKS_TYPE_RESOURCE,
                             filter,
                             find_cb,
                             os);
}
Exemplo n.º 2
0
void
gom_repository_find_one_async (GomRepository       *repository,
                               GType                resource_type,
                               GomFilter           *filter,
                               GAsyncReadyCallback  callback,
                               gpointer             user_data)
{
   GSimpleAsyncResult *simple;

   g_return_if_fail(GOM_IS_REPOSITORY(repository));
   g_return_if_fail(g_type_is_a(resource_type, GOM_TYPE_RESOURCE));
   g_return_if_fail(!filter || GOM_IS_FILTER(filter));
   g_return_if_fail(callback != NULL);

   simple = g_simple_async_result_new(G_OBJECT(repository), callback, user_data,
                                      gom_repository_find_one_async);
   gom_repository_find_async(repository, resource_type, filter,
                             gom_repository_find_one_cb,
                             simple);
}