• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GRL_DEBUG函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GRL_DEBUG函数的典型用法代码示例。如果您正苦于以下问题:C++ GRL_DEBUG函数的具体用法?C++ GRL_DEBUG怎么用?C++ GRL_DEBUG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GRL_DEBUG函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: produce_from_recent_theme

static void
produce_from_recent_theme (RaitvOperation *op)
{
  guint category_index;
  gchar	*start = NULL;
  gchar	*url = NULL;

  GrlRaitvSource *source = GRL_RAITV_SOURCE (op->source);

  category_index = get_theme_index_from_id (op->container_id);
  GRL_DEBUG ("produce_from_recent_theme (container_id=%s, category_index=%d",op->container_id,category_index);

  start = g_strdup_printf ("%u", op->offset+op->length);

  op->category_info = &themes_dir[category_index];
  url = g_strdup_printf (RAITV_VIDEO_RECENT, start, op->category_info->tags, op->category_info->excludeTags);

  GRL_DEBUG ("Starting browse request for recent theme (%s)", url);
  grl_net_wc_request_async (source->priv->wc,
                            url,
                            op->cancellable,
                            proxy_call_browse_grlnet_async_cb,
                            op);

  g_free (url);
}
开发者ID:GeorgesStavracas,项目名称:grilo-plugins,代码行数:26,代码来源:grl-raitv.c


示例2: create_media_from_mount

static GrlMedia *
create_media_from_mount (GMount *mount)
{
  char *id;
  GrlMedia *media;

  /* Is it an audio CD or a blank media */
  if (ignore_mount (mount)) {
    GRL_DEBUG ("%s: Ignoring mount %s", __FUNCTION__,
               g_mount_get_name (mount));
    g_object_unref (mount);
    return NULL;
  }

  id = create_mount_id (mount);
  if (id == NULL) {
    GRL_DEBUG ("%s: Not adding mount %s as has no device path", __FUNCTION__,
               g_mount_get_name (mount));
    return NULL;
  }

  media = grl_media_video_new ();

  grl_media_set_id (media, id);
  g_free (id);

  media_set_metadata (mount, media);
  grl_media_set_mime (media, "x-special/device-block");

  GRL_DEBUG ("%s: Adding mount %s (id: %s)", __FUNCTION__,
             g_mount_get_name (mount), grl_media_get_id (media));

  return media;
}
开发者ID:victortoso,项目名称:grilo-plugins,代码行数:34,代码来源:grl-optical-media.c


示例3: server_lost_cb

static void
server_lost_cb (GrlDleynaServersManager *serversmgr,
                GrlDleynaServer         *server,
                gpointer                *user_data)
{
  GrlDleynaMediaDevice *device;
  GrlSource *source;
  GrlRegistry *registry;
  const gchar* udn;
  gchar *source_id;

  GRL_DEBUG (G_STRFUNC);
  device = grl_dleyna_server_get_media_device (server);
  udn = grl_dleyna_media_device_get_udn (device);
  GRL_DEBUG ("%s udn: %s ", G_STRFUNC, udn);

  registry = grl_registry_get_default ();
  source_id = grl_dleyna_source_build_id (udn);

  GRL_DEBUG ("%s id: %s ", G_STRFUNC, source_id);

  source = grl_registry_lookup_source (registry, source_id);
  if (source != NULL) {
    GError *error = NULL;
    GRL_DEBUG ("%s unregistered %s", G_STRFUNC, source_id);
    grl_registry_unregister_source (registry, source, &error);
    if (error != NULL) {
      GRL_WARNING ("Failed to unregister source %s: %s", udn, error->message);
      g_error_free (error);
    }
  }

  g_free (source_id);
}
开发者ID:GNOME,项目名称:grilo-plugins,代码行数:34,代码来源:grl-dleyna.c


示例4: server_found_cb

static void
server_found_cb (GrlDleynaServersManager *serversmgr,
                 GrlDleynaServer         *server,
                 gpointer                *user_data)
{
  GrlPlugin *plugin = GRL_PLUGIN (user_data);
  GrlDleynaMediaDevice *device;
  GrlSource *source;
  GrlRegistry *registry;
  GError *error = NULL;

  GRL_DEBUG (G_STRFUNC);
  device = grl_dleyna_server_get_media_device (server);
  GRL_DEBUG ("%s udn: %s ", G_STRFUNC, grl_dleyna_media_device_get_udn (device));

  registry = grl_registry_get_default ();

  source = GRL_SOURCE (grl_dleyna_source_new (server));
  GRL_DEBUG ("%s id: %s ", G_STRFUNC, grl_source_get_id (source));
  grl_registry_register_source (registry, plugin, GRL_SOURCE (source), &error);

  if (error != NULL) {
    GRL_WARNING ("Failed to register source for DLNA device %s: %s",
                 grl_dleyna_media_device_get_udn (device), error->message);
    g_error_free (error);
  }
}
开发者ID:GNOME,项目名称:grilo-plugins,代码行数:27,代码来源:grl-dleyna.c


示例5: tracker_evt_update_items_cb

static void
tracker_evt_update_items_cb (gpointer              key,
                             gpointer              value,
                             tracker_evt_update_t *evt)
{
  guint id = GPOINTER_TO_INT (key);
  gchar *str_id;
  GrlTrackerSource *source = (GrlTrackerSource *) value;
  GrlMedia *media;

  GRL_DEBUG ("%s: evt=%p", __FUNCTION__, evt);

  if (!source) {
    g_assert ("\tnot in cache ???");
    return;
  }

  if (!grl_tracker_source_can_notify (source)) {
    GRL_DEBUG ("\tno notification for source %s...",
	       grl_source_get_name (GRL_SOURCE (source)));
    return;
  }

  media = grl_media_new ();
  str_id = g_strdup_printf ("%i", id);
  grl_media_set_id (media, str_id);
  g_free (str_id);

  GRL_DEBUG ("\tNotify id=%u source=%s", id,
             grl_source_get_name (GRL_SOURCE (source)));
  grl_source_notify_change (GRL_SOURCE (source), media, evt->change_type, FALSE);

  g_object_unref (media);
}
开发者ID:guyou,项目名称:grilo-plugins,代码行数:34,代码来源:grl-tracker-source-notif.c


示例6: ignore_drive

static gboolean
ignore_drive (GDrive *drive)
{
  GIcon *icon;

  if (g_drive_can_eject (drive) == FALSE ||
      g_drive_has_media (drive) == FALSE) {
    GRL_DEBUG ("%s: Not adding %s as cannot eject or has no media", __FUNCTION__,
               g_drive_get_name (drive));
    return TRUE;
  }

  /* Hack to avoid USB devices showing up
   * https://bugzilla.gnome.org/show_bug.cgi?id=679624 */
  icon = g_drive_get_icon (drive);
  if (icon && G_IS_THEMED_ICON (icon)) {
    const gchar * const * names;
    names = g_themed_icon_get_names (G_THEMED_ICON (icon));
    if (names && names[0] && !g_str_has_prefix (names[0], "drive-optical")) {
      g_object_unref (icon);
      GRL_DEBUG ("%s: Not adding drive %s as is not optical drive", __FUNCTION__,
                 g_drive_get_name (drive));
      return TRUE;
    }
  }
  g_clear_object (&icon);

  return FALSE;
}
开发者ID:victortoso,项目名称:grilo-plugins,代码行数:29,代码来源:grl-optical-media.c


示例7: grl_metadata_store_source_init

static void
grl_metadata_store_source_init (GrlMetadataStoreSource *source)
{
  gint r;
  gchar *path;
  gchar *db_path;
  gchar *sql_error = NULL;

  source->priv = GRL_METADATA_STORE_GET_PRIVATE (source);

  path = g_strconcat (g_get_user_data_dir (),
                      G_DIR_SEPARATOR_S, "grilo-plugins",
                      NULL);

  if (!g_file_test (path, G_FILE_TEST_IS_DIR)) {
    g_mkdir_with_parents (path, 0775);
  }

  GRL_DEBUG ("Opening database connection...");
  db_path = g_strconcat (path, G_DIR_SEPARATOR_S, GRL_SQL_DB, NULL);
  r = sqlite3_open (db_path, &source->priv->db);
  g_free (path);

  if (r) {
    g_critical ("Failed to open database '%s': %s",
                db_path, sqlite3_errmsg (source->priv->db));
    sqlite3_close (source->priv->db);
    g_free (db_path);
    return;
  }
  g_free (db_path);

  GRL_DEBUG ("  OK");

  GRL_DEBUG ("Checking database tables...");
  r = sqlite3_exec (source->priv->db, GRL_SQL_CREATE_TABLE_STORE,
		    NULL, NULL, &sql_error);

  if (r) {
    if (sql_error) {
      GRL_WARNING ("Failed to create database tables: %s", sql_error);
      g_clear_pointer (&sql_error, sqlite3_free);
    } else {
      GRL_WARNING ("Failed to create database tables.");
    }
    sqlite3_close (source->priv->db);
    return;
  }

  // For backwards compatibility, add newer columns if they don't exist
  // in the old database.
  sqlite3_exec (source->priv->db, GRL_SQL_ALTER_TABLE_ADD_FAVOURITE,
                NULL, NULL, &sql_error);

  sqlite3_exec (source->priv->db, GRL_SQL_ALTER_TABLE_ADD_TYPE_ID,
                NULL, NULL, &sql_error);

  GRL_DEBUG ("  OK");
}
开发者ID:guyou,项目名称:grilo-plugins,代码行数:59,代码来源:grl-metadata-store.c


示例8: grl_magnatune_source_init

static void
grl_magnatune_source_init(GrlMagnatuneSource *source)
{
  gint ret;
  gchar *path;
  gchar *db_path;
  gchar *crc_path;
  gchar *new_db_path;
  gchar *new_crc_path;

  GRL_DEBUG("magnatune_source_init");

  source->priv = GRL_MAGNATUNE_GET_PRIVATE(source);
  source->priv->db = NULL;

  path = g_build_filename(g_get_user_data_dir(), "grilo-plugins", NULL);
  db_path = g_build_filename(path, GRL_SQL_DB, NULL);
  crc_path = g_build_filename(path, GRL_SQL_CRC, NULL);
  new_db_path = g_build_filename(path, GRL_SQL_NEW_DB, NULL);
  new_crc_path = g_build_filename(path, GRL_SQL_NEW_CRC, NULL);

  if(!g_file_test(path, G_FILE_TEST_IS_DIR)) {
    g_mkdir_with_parents(path, 0775);
  }

  if (g_file_test(db_path, G_FILE_TEST_EXISTS) == TRUE) {
    if (g_file_test(new_db_path, G_FILE_TEST_EXISTS) == TRUE
        && g_rename(new_db_path, db_path) == 0) {
        GRL_DEBUG("New database in use.");
    }

    if (g_file_test(new_crc_path, G_FILE_TEST_EXISTS) == TRUE
        && g_rename(new_crc_path, crc_path) == 0) {
        GRL_DEBUG("New crc file in use.");
    }

    GRL_DEBUG("Opening database connection.");
    ret = sqlite3_open(db_path, &source->priv->db);
    if (ret != SQLITE_OK) {
      GRL_WARNING("Failed to open database '%s': %s",
                  db_path,
                  sqlite3_errmsg(source->priv->db));
      sqlite3_close(source->priv->db);
      source->priv->db = NULL;
    }
  } else {
    GRL_DEBUG("No database was found. Download when user interact.");
  }

  g_free(new_crc_path);
  g_free(new_db_path);
  g_free(crc_path);
  g_free(db_path);
  g_free(path);
}
开发者ID:victortoso,项目名称:grilo-plugins,代码行数:55,代码来源:grl-magnatune.c


示例9: on_configuration_ready

static void
on_configuration_ready (GObject *source,
                        GAsyncResult *result,
                        gpointer user_data)
{
  ResolveClosure *closure = (ResolveClosure *) user_data;
  GrlTmdbRequest *request = GRL_TMDB_REQUEST (source);
  GrlTmdbSource *self = closure->self;
  GError *error = NULL;
  GValue *value;

  GRL_DEBUG ("Configuration request ready...");

  if (!grl_tmdb_request_run_finish (GRL_TMDB_REQUEST (source),
                                    result,
                                    &error)) {
    resolve_closure_callback (closure, error);
    resolve_closure_free (closure);

    /* Notify pending requests about failure */
    while (!g_queue_is_empty (self->priv->pending_resolves)) {
      ResolveClosure *pending_closure;

      pending_closure = g_queue_pop_head (self->priv->pending_resolves);

      resolve_closure_callback (pending_closure, error);
      resolve_closure_free (pending_closure);
    }

    g_error_free (error);
    return;
  }

  self->priv->configuration = g_object_ref (request);
  remove_request (closure, request);

  value = grl_tmdb_request_get (request, "$.images.base_url");
  if (value != NULL) {
    GRL_DEBUG ("Got TMDb configuration.");
    self->priv->image_base_uri = soup_uri_new (g_value_get_string (value));
    g_value_unset (value);
    g_free (value);
  }

  g_queue_push_head (self->priv->pending_resolves, closure);

  /* Flush queue. GrlNetWc will take care of throttling */
  while (!g_queue_is_empty (self->priv->pending_resolves)) {
    ResolveClosure *pending_closure;

    pending_closure = g_queue_pop_head (self->priv->pending_resolves);
    run_pending_requests (pending_closure, G_MAXINT);
  }
}
开发者ID:GNOME,项目名称:grilo-plugins,代码行数:54,代码来源:grl-tmdb.c


示例10: grl_bookmarks_source_query

static void
grl_bookmarks_source_query (GrlSource *source,
                            GrlSourceQuerySpec *qs)
{
  GRL_DEBUG ("grl_bookmarks_source_query");

  GrlBookmarksSource *bookmarks_source;
  OperationSpec *os;
  GError *error = NULL;

  bookmarks_source = GRL_BOOKMARKS_SOURCE (source);
  if (!bookmarks_source->priv->adapter) {
    GRL_WARNING ("Can't execute operation: no database connection.");
    error = g_error_new_literal (GRL_CORE_ERROR,
                                 GRL_CORE_ERROR_QUERY_FAILED,
                                 _("No database connection"));
    qs->callback (qs->source, qs->operation_id, NULL, 0, qs->user_data, error);
    g_error_free (error);
  }

  os = g_slice_new0 (OperationSpec);
  os->source = qs->source;
  os->operation_id = qs->operation_id;
  os->count = grl_operation_options_get_count (qs->options);
  os->skip = grl_operation_options_get_skip (qs->options);
  os->type_filter = grl_operation_options_get_type_filter (qs->options);
  os->callback = qs->callback;
  os->user_data = qs->user_data;
  os->error_code = GRL_CORE_ERROR_SEARCH_FAILED;
  produce_bookmarks_from_query (os, qs->query);
}
开发者ID:vrutkovs,项目名称:grilo-plugins,代码行数:31,代码来源:grl-bookmarks.c


示例11: ignore_mount

static gboolean
ignore_mount (GMount *mount)
{
  GFile *root;
  GVolume *volume;
  gboolean ret = TRUE;

  root = g_mount_get_root (mount);

  if (g_file_has_uri_scheme (root, "burn") != FALSE || g_file_has_uri_scheme (root, "cdda") != FALSE) {
    /* We don't add Audio CDs, or blank media */
    g_object_unref (root);
    GRL_DEBUG ("%s: Not adding mount %s as is burn or cdda", __FUNCTION__,
               g_mount_get_name (mount));
    return TRUE;
  }
  g_object_unref (root);

  volume = g_mount_get_volume (mount);
  if (volume == NULL)
    return ret;

  ret = ignore_volume (volume);
  g_object_unref (volume);

  return ret;
}
开发者ID:victortoso,项目名称:grilo-plugins,代码行数:27,代码来源:grl-optical-media.c


示例12: produce_bookmarks_from_text

static void
produce_bookmarks_from_text (OperationSpec *os, const gchar *text)
{
  GomFilter *like1, *like2, *likes, *type1, *filter;
  GValue value = { 0, };

  GRL_DEBUG ("produce_bookmarks_from_text");

  /* WHERE (title LIKE '%text%' OR desc LIKE '%text%') AND type == BOOKMARKS_TYPE_STREAM */

  like1 = substr_filter ("title", text);
  like2 = substr_filter ("desc", text);
  likes = gom_filter_new_or (like1, like2);
  g_object_unref (like1);
  g_object_unref (like2);

  g_value_init (&value, G_TYPE_INT);
  g_value_set_int (&value, BOOKMARKS_TYPE_STREAM);
  type1 = gom_filter_new_eq (BOOKMARKS_TYPE_RESOURCE, "type", &value);
  g_value_unset (&value);

  filter = gom_filter_new_and (likes, type1);
  g_object_unref (likes);
  g_object_unref (type1);

  produce_bookmarks_from_filter (os, filter);
  g_object_unref (filter);
}
开发者ID:vrutkovs,项目名称:grilo-plugins,代码行数:28,代码来源:grl-bookmarks.c


示例13: grl_bookmarks_source_browse

static void
grl_bookmarks_source_browse (GrlSource *source,
                             GrlSourceBrowseSpec *bs)
{
  GRL_DEBUG ("grl_bookmarks_source_browse");

  OperationSpec *os;
  GrlBookmarksSource *bookmarks_source;
  GError *error = NULL;

  bookmarks_source = GRL_BOOKMARKS_SOURCE (source);
  if (!bookmarks_source->priv->adapter) {
    GRL_WARNING ("Can't execute operation: no database connection.");
    error = g_error_new_literal (GRL_CORE_ERROR,
                                 GRL_CORE_ERROR_BROWSE_FAILED,
                                 _("No database connection"));
    bs->callback (bs->source, bs->operation_id, NULL, 0, bs->user_data, error);
    g_error_free (error);
  }

  /* Configure browse operation */
  os = g_slice_new0 (OperationSpec);
  os->source = bs->source;
  os->operation_id = bs->operation_id;
  os->media_id = grl_media_get_id (bs->container);
  os->count = grl_operation_options_get_count (bs->options);
  os->skip = grl_operation_options_get_skip (bs->options);
  os->type_filter = grl_operation_options_get_type_filter (bs->options);
  os->callback = bs->callback;
  os->user_data = bs->user_data;
  os->error_code = GRL_CORE_ERROR_BROWSE_FAILED;

  produce_bookmarks_from_category (os, os->media_id ? os->media_id : "0");
}
开发者ID:vrutkovs,项目名称:grilo-plugins,代码行数:34,代码来源:grl-bookmarks.c


示例14: grl_dleyna_plugin_deinit

static void
grl_dleyna_plugin_deinit (GrlPlugin *plugin)
{
  GRL_DEBUG (G_STRFUNC);

  g_clear_object (&servers);
}
开发者ID:GNOME,项目名称:grilo-plugins,代码行数:7,代码来源:grl-dleyna.c


示例15: grl_dpap_source_new

static GrlDpapSource *
grl_dpap_source_new (DMAPMdnsBrowserService *service)
{
  gchar *source_desc;
  gchar *source_id;

  GrlDpapSource *source;

  GRL_DEBUG ("grl_dpap_source_new");

  source_desc = g_strdup_printf (SOURCE_DESC_TEMPLATE, service->name);
  source_id = g_strdup_printf (SOURCE_ID_TEMPLATE, service->name);

  source = g_object_new (GRL_DPAP_SOURCE_TYPE,
                         "source-id",   source_id,
                         "source-name", service->name,
                         "source-desc", source_desc,
                         "supported-media", GRL_SUPPORTED_MEDIA_IMAGE,
                         NULL);

  source->priv->service = service;

  g_free (source_desc);
  g_free (source_id);

  return source;
}
开发者ID:GNOME,项目名称:grilo-plugins,代码行数:27,代码来源:grl-dpap.c


示例16: resolve_album_art

static void
resolve_album_art (ResolveData         *resolve_data,
                   resolution_flags_t   flags)
{
  const gchar *artist, *album;
  GCancellable *cancellable = NULL;
  GFile *cache_file = NULL;

  resolve_data_start_operation (resolve_data, "album-art");

  artist = grl_media_audio_get_artist (GRL_MEDIA_AUDIO (resolve_data->rs->media));
  album = grl_media_audio_get_album (GRL_MEDIA_AUDIO (resolve_data->rs->media));

  if (!artist || !album)
    goto done;

  cancellable = resolve_data_ensure_cancellable (resolve_data);

  media_art_get_file (artist, album, "album", &cache_file);

  if (cache_file) {
    /* Check whether the cache file exists. */
    resolve_data_start_operation (resolve_data, "album-art");
    g_file_query_info_async (cache_file, G_FILE_ATTRIBUTE_ACCESS_CAN_READ,
                             G_FILE_QUERY_INFO_NONE, G_PRIORITY_DEFAULT,
                             cancellable, resolve_album_art_cb, resolve_data);
  } else {
    GRL_DEBUG ("Found no thumbnail for artist %s and album %s", artist, album);
  }

done:
  resolve_data_finish_operation (resolve_data, "album-art", NULL);

  g_clear_object (&cache_file);
}
开发者ID:GeorgesStavracas,项目名称:grilo-plugins,代码行数:35,代码来源:grl-local-metadata.c


示例17: grl_tmdb_source_plugin_init

gboolean
grl_tmdb_source_plugin_init (GrlRegistry *registry,
                             GrlPlugin *plugin,
                             GList *configs)
{
  GrlConfig *config;
  char *api_key;

  GRL_LOG_DOMAIN_INIT (tmdb_log_domain, "tmdb");

  GRL_DEBUG ("grl_tmdb_source_plugin_init");

  /* Initialize i18n */
  bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");

  if (!configs) {
    GRL_INFO ("No configuration provided. Will not load plugin");
    return FALSE;
  }

  config = GRL_CONFIG (configs->data);
  api_key = grl_config_get_api_key (config);
  if (!api_key) {
    GRL_INFO ("Missing API Key, cannot load plugin");
    return FALSE;
  }

  GRL_TMDB_METADATA_KEY_BACKDROP =
    register_metadata_key (registry,
                           "tmdb-backdrop",
                           "tmdb-backdrop",
                           "A list of URLs for movie backdrops");

  GRL_TMDB_METADATA_KEY_POSTER =
    register_metadata_key (registry,
                           "tmdb-poster",
                           "tmdb-poster",
                           "A list of URLs for movie posters");

  GRL_TMDB_METADATA_KEY_IMDB_ID =
    register_metadata_key (registry,
                           "tmdb-imdb-id",
                           "tmdb-imdb-id",
                           "ID of this movie at imdb.org");

  GRL_TMDB_METADATA_KEY_TMDB_ID =
    register_metadata_key (registry,
                           "tmdb-id",
                           "tmdb-id",
                           "ID of this movie at tmdb.org");

  GrlTmdbSource *source = grl_tmdb_source_new (api_key);
  grl_registry_register_source (registry,
                                       plugin,
                                       GRL_SOURCE (source),
                                       NULL);
  g_free (api_key);
  return TRUE;
}
开发者ID:kyoushuu,项目名称:grilo-plugins,代码行数:60,代码来源:grl-tmdb.c


示例18: grl_gravatar_source_resolve

static void
grl_gravatar_source_resolve (GrlSource *source,
                             GrlSourceResolveSpec *rs)
{
  gboolean artist_avatar_required = FALSE;
  gboolean author_avatar_required = FALSE;

  GRL_DEBUG (__FUNCTION__);

  GList *iter;

  /* Check that albumart is requested */
  iter = rs->keys;
  while (iter && (!artist_avatar_required || !author_avatar_required)) {
    GrlKeyID key = GRLPOINTER_TO_KEYID (iter->data);
    if (key == GRL_METADATA_KEY_ARTIST_AVATAR) {
      artist_avatar_required = TRUE;
    } else if (key == GRL_METADATA_KEY_AUTHOR_AVATAR) {
      author_avatar_required = TRUE;
    }
    iter = g_list_next (iter);
  }

  if (artist_avatar_required) {
    set_avatar (GRL_DATA (rs->media), GRL_METADATA_KEY_ARTIST);
  }

  if (author_avatar_required) {
    set_avatar (GRL_DATA (rs->media), GRL_METADATA_KEY_AUTHOR);
  }

  rs->callback (source, rs->operation_id, rs->media, rs->user_data, NULL);
}
开发者ID:GeorgesStavracas,项目名称:grilo-plugins,代码行数:33,代码来源:grl-gravatar.c


示例19: resolve_data_finish_operation

/* The caller is responsible for freeing @error. */
static void
resolve_data_finish_operation (ResolveData   *data,
                               const gchar   *op_name,
                               const GError  *error)
{
  g_assert (data->n_pending_operations >= 1);
  data->n_pending_operations--;

  GRL_DEBUG ("Finishing operation %s; %u operations still pending.",
             op_name, data->n_pending_operations);

  if (!data->has_invoked_callback &&
      (data->n_pending_operations == 0 || error != NULL)) {
    GrlSourceResolveSpec *rs = data->rs;

    /* All sub-operations have finished (or one has errored), so the callback
     * can be invoked. */
    data->has_invoked_callback = TRUE;
    rs->callback (data->source, rs->operation_id, rs->media,
                  rs->user_data, error);
  }

  /* All sub-operations have finished, so we can free the closure. */
  if (data->n_pending_operations == 0) {
    g_assert (data->has_invoked_callback);

    g_object_unref (data->source);
    g_slice_free (ResolveData, data);
  }
}
开发者ID:GeorgesStavracas,项目名称:grilo-plugins,代码行数:31,代码来源:grl-local-metadata.c


示例20: grl_gravatar_source_plugin_init

gboolean
grl_gravatar_source_plugin_init (GrlRegistry *registry,
                                 GrlPlugin *plugin,
                                 GList *configs)
{
  GRL_LOG_DOMAIN_INIT (gravatar_log_domain, "gravatar");

  GRL_DEBUG ("grl_gravatar_source_plugin_init");

  /* Initialize i18n */
  bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");

  if (!GRL_METADATA_KEY_ARTIST_AVATAR &&
      !GRL_METADATA_KEY_AUTHOR_AVATAR) {
    GRL_WARNING ("Unable to register \"author-avatar\" nor \"artist-avatar\"");
    return FALSE;
  }

  GrlGravatarSource *source = grl_gravatar_source_new ();
  grl_registry_register_source (registry,
                                plugin,
                                GRL_SOURCE (source),
                                NULL);
  return TRUE;
}
开发者ID:GeorgesStavracas,项目名称:grilo-plugins,代码行数:26,代码来源:grl-gravatar.c



注:本文中的GRL_DEBUG函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GRLine函数代码示例发布时间:2022-05-30
下一篇:
C++ GRID_WARN函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap