Movie Info Provider test: Received list
authorSimón Pena <spenap@gmail.com>
Sun, 16 May 2010 23:37:49 +0000 (01:37 +0200)
committerSimón Pena <spenap@gmail.com>
Mon, 17 May 2010 00:02:46 +0000 (02:02 +0200)
The result list read from the service is now received and
displayed in the Movie Info Provider test.

test/mvs-minfo-provider-test.c

index f4d3bf6..343d0a0 100644 (file)
 static GMainLoop *loop = NULL;
 
 static void
-response_received_callback (MvsMInfoProvider minfo_provider,
+response_received_callback (MvsMInfoProvider *minfo_provider, GList *list,
                             gpointer user_data)
 {
+        GList *tmp = NULL;
+
+        for (tmp = list; tmp; tmp = tmp->next) {
+
+                g_return_if_fail (MVS_IS_TMDB_MOVIE (tmp->data));
+
+                MvsTmdbMovie *movie_info = MVS_TMDB_MOVIE (tmp->data);
+
+                mvs_tmdb_movie_print (movie_info);
+
+                g_object_unref (movie_info);
+        }
+
+        g_list_free (list);
         g_main_loop_quit (loop);
 }