[PATCH 5/6] [grl-media-plugin] Use grl_media_plugin_get_info to retrieve default info



Uses the mentioned function when retrieving the author, description, license and site.
---
 src/grl-media-plugin.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/grl-media-plugin.c b/src/grl-media-plugin.c
index 6378931..539be9d 100644
--- a/src/grl-media-plugin.c
+++ b/src/grl-media-plugin.c
@@ -107,7 +107,7 @@ grl_media_plugin_get_name (GrlMediaPlugin *plugin)
 {
   g_return_val_if_fail (GRL_IS_MEDIA_PLUGIN (plugin), NULL);
 
-  return plugin->priv->info->name;
+  return grl_media_plugin_get_info (plugin, GRL_MEDIA_PLUGIN_NAME);
 }
 
 /**
@@ -123,7 +123,7 @@ grl_media_plugin_get_description (GrlMediaPlugin *plugin)
 {
   g_return_val_if_fail (GRL_IS_MEDIA_PLUGIN (plugin), NULL);
 
-  return plugin->priv->info->desc;
+  return grl_media_plugin_get_info (plugin, GRL_MEDIA_PLUGIN_DESCRIPTION);
 }
 
 /**
@@ -139,7 +139,7 @@ grl_media_plugin_get_version (GrlMediaPlugin *plugin)
 {
   g_return_val_if_fail (GRL_IS_MEDIA_PLUGIN (plugin), NULL);
 
-  return plugin->priv->info->version;
+  return grl_media_plugin_get_info (plugin, GRL_MEDIA_PLUGIN_VERSION);
 }
 
 /**
@@ -155,7 +155,7 @@ grl_media_plugin_get_license (GrlMediaPlugin *plugin)
 {
   g_return_val_if_fail (GRL_IS_MEDIA_PLUGIN (plugin), NULL);
 
-  return plugin->priv->info->license;
+  return grl_media_plugin_get_info (plugin, GRL_MEDIA_PLUGIN_LICENSE);
 }
 
 
@@ -172,7 +172,7 @@ grl_media_plugin_get_author (GrlMediaPlugin *plugin)
 {
   g_return_val_if_fail (GRL_IS_MEDIA_PLUGIN (plugin), NULL);
 
-  return plugin->priv->info->author;
+  return grl_media_plugin_get_info (plugin, GRL_MEDIA_PLUGIN_AUTHOR);
 }
 
 /**
@@ -188,7 +188,7 @@ grl_media_plugin_get_site (GrlMediaPlugin *plugin)
 {
   g_return_val_if_fail (GRL_IS_MEDIA_PLUGIN (plugin), NULL);
 
-  return plugin->priv->info->site;
+  return grl_media_plugin_get_info (plugin, GRL_MEDIA_PLUGIN_SITE);
 }
 
 /**
-- 
1.7.0.4



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]