int vfs_xspf_populate ( struct vfsent ve  ) 

Add all items in the XSPF file to the population of the current node.

Definition at line 51 of file vfs_xspf.c.

00052 {
00053         struct xspf_list *slist;
00054         struct xspf_track *strack;
00055         struct xspf_mvalue *sloc;
00056         char *dirname, *baseuri, *filename;
00057         struct vfsref *vr;
00058 
00059         baseuri = url_escape(ve->filename);
00060         slist = xspf_parse(ve->filename, baseuri);
00061         g_free(baseuri);
00062         if (slist == NULL)
00063                 return (-1);
00064 
00065         dirname = g_path_get_dirname(ve->filename);
00066 
00067         XSPF_LIST_FOREACH_TRACK(slist, strack) {
00068                 XSPF_TRACK_FOREACH_LOCATION(strack, sloc) {
00069                         /* Skip file:// part */
00070                         filename = url_unescape(sloc->value);
00071 
00072                         /* Add it to the list */
00073                         vr = vfs_lookup(filename, strack->title, dirname, 1);
00074                         if (vr != NULL)
00075                                 vfs_list_insert_tail(&ve->population, vr);
00076                 }
00077         }
00078         
00079         g_free(dirname);
00080         xspf_free(slist);
00081         return (0);
00082 }

Here is the call graph for this function:

 All Data Structures Files Functions Variables Defines
Generated on Mon Mar 15 04:45:54 2010 for herrie by  doxygen 1.6.3