[gnome-games/wip/aplazas/run-uri: 4/21] Remove unused UriGameFactory.is_uri_valid()



commit 90f9c56fee568f3f16fdd1c8e54594af596ebbbc
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Thu Apr 13 13:27:09 2017 +0200

    Remove unused UriGameFactory.is_uri_valid()

 .../playstation/src/playstation-game-factory.vala  |   12 ------------
 src/core/uri-game-factory.vala                     |    1 -
 src/generic/generic-uri-game-factory.vala          |    9 +--------
 3 files changed, 1 insertions(+), 21 deletions(-)
---
diff --git a/plugins/playstation/src/playstation-game-factory.vala 
b/plugins/playstation/src/playstation-game-factory.vala
index 0979547..f668da0 100644
--- a/plugins/playstation/src/playstation-game-factory.vala
+++ b/plugins/playstation/src/playstation-game-factory.vala
@@ -20,18 +20,6 @@ public class Games.PlayStationGameFactory : Object, UriGameFactory {
                games = new HashTable<string, Game> (GLib.str_hash, GLib.str_equal);
        }
 
-       public bool is_cursor_valid (Tracker.Sparql.Cursor cursor) {
-               var uri = cursor.get_string (0);
-
-               return is_uri_valid (uri);
-       }
-
-       public bool is_uri_valid (string uri) {
-               File file = File.new_for_uri(uri);
-
-               return file.query_exists ();
-       }
-
        public void add_uri (string uri) {
                string disc_id;
 
diff --git a/src/core/uri-game-factory.vala b/src/core/uri-game-factory.vala
index b60b51c..1ef9b37 100644
--- a/src/core/uri-game-factory.vala
+++ b/src/core/uri-game-factory.vala
@@ -1,5 +1,4 @@
 public interface Games.UriGameFactory : Object {
-       public abstract bool is_uri_valid (string uri);
        public abstract void add_uri (string uri);
        public abstract async void foreach_game (Games.GameCallback game_callback);
 }
diff --git a/src/generic/generic-uri-game-factory.vala b/src/generic/generic-uri-game-factory.vala
index b6da6be..78bd0b8 100644
--- a/src/generic/generic-uri-game-factory.vala
+++ b/src/generic/generic-uri-game-factory.vala
@@ -1,23 +1,16 @@
 // This file is part of GNOME Games. License: GPL-3.0+.
 
 public class Games.GenericUriGameFactory : Object, UriGameFactory {
-       public delegate bool UriTest (string uri);
        private const uint HANDLED_URIS_PER_CYCLE = 5;
 
        private GameUriAdapter game_uri_adapter;
-       private UriTest? uri_validity_test;
        private string[] uris;
 
-       public GenericUriGameFactory (GameUriAdapter game_uri_adapter, owned UriTest? uri_validity_test = 
null) {
+       public GenericUriGameFactory (GameUriAdapter game_uri_adapter) {
                this.game_uri_adapter = game_uri_adapter;
-               this.uri_validity_test = (owned) uri_validity_test;
                this.uris = {};
        }
 
-       public bool is_uri_valid (string uri) {
-               return uri_validity_test == null ? true : uri_validity_test (uri);
-       }
-
        public void add_uri (string uri) {
                uris += uri;
        }


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