~unity-team/unity-scope-mediascanner/rtm-14.09

« back to all changes in this revision

Viewing changes to src/main.c

  • Committer: James Henstridge
  • Date: 2013-07-30 11:18:09 UTC
  • Revision ID: james@jamesh.id.au-20130730111809-q7i5xn8xw6881hbr
Basic outline of Grilo/Hollywood based scope.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "scope.h"
 
2
 
 
3
int
 
4
unity_scope_module_get_version ()
 
5
{
 
6
    return UNITY_SCOPE_API_VERSION;
 
7
}
 
8
 
 
9
GList *
 
10
unity_scope_module_load_scopes (GError **error)
 
11
{
 
12
    grl_init (NULL, NULL);
 
13
 
 
14
    GrlRegistry *registry = grl_registry_get_default ();
 
15
    if (!grl_registry_load_plugin_directory (
 
16
            registry, "/home/james/src/unity/prefix/lib/grilo-0.2", error)) {
 
17
        return NULL;
 
18
    }
 
19
 
 
20
    GrlSource *source = grl_registry_lookup_source (registry, "grl-hollywood");
 
21
    UnityAbstractScope *scope = make_music_scope (source);
 
22
 
 
23
    return g_list_append(NULL, scope);
 
24
}
 
25