[gnome-games] wii: Provide MIME types and URI game factories
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] wii: Provide MIME types and URI game factories
- Date: Thu, 4 May 2017 19:21:35 +0000 (UTC)
commit 7beb9eb5fd0588e0653bd40735397a5c5138f9bc
Author: Adrien Plazas <kekun plazas laposte net>
Date: Thu May 4 15:40:22 2017 +0200
wii: Provide MIME types and URI game factories
Also stop providing a GameSource.
This helps splitting the conerns of looking for game resources and
building games from them.
https://bugzilla.gnome.org/show_bug.cgi?id=781334
plugins/wii/configure.ac | 1 -
plugins/wii/src/wii-plugin.vala | 13 +++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/plugins/wii/configure.ac b/plugins/wii/configure.ac
index 14c6fc0..544732c 100644
--- a/plugins/wii/configure.ac
+++ b/plugins/wii/configure.ac
@@ -3,7 +3,6 @@ PKG_CHECK_MODULES(WII_PLUGIN, [
glib-2.0 >= $GLIB_MIN_VERSION
gtk+-3.0
retro-gtk-0.10
- tracker-sparql-1.0
], [enable_wii_plugin=yes], [enable_wii_plugin=no])
AM_CONDITIONAL(ENABLE_WII_PLUGIN, test x$enable_wii_plugin != xno)
diff --git a/plugins/wii/src/wii-plugin.vala b/plugins/wii/src/wii-plugin.vala
index 9162605..daefa8c 100644
--- a/plugins/wii/src/wii-plugin.vala
+++ b/plugins/wii/src/wii-plugin.vala
@@ -4,15 +4,16 @@ private class Games.WiiPlugin : Object, Plugin {
private const string MIME_TYPE = "application/x-wii-rom";
private const string PLATFORM = "WiiWare";
- public GameSource? get_game_source () throws Error {
+ public string[] get_mime_types () {
+ return { MIME_TYPE };
+ }
+
+ public UriGameFactory[] get_uri_game_factories () {
var game_uri_adapter = new GenericSyncGameUriAdapter (game_for_uri);
var factory = new GenericUriGameFactory (game_uri_adapter);
- var query = new MimeTypeTrackerQuery (MIME_TYPE, factory);
- var connection = Tracker.Sparql.Connection.@get ();
- var source = new TrackerGameSource (connection);
- source.add_query (query);
+ factory.add_mime_type (MIME_TYPE);
- return source;
+ return { factory };
}
private static Game game_for_uri (string uri) throws Error {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]