[gnome-games] core: Add GameCollection.search_games()



commit e6396a0d590f3cc86c73dc26bcd16f6e2fe69ce5
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Sun May 7 16:14:51 2017 +0200

    core: Add GameCollection.search_games()
    
    This will be used in the next commits to move game collection handling
    out of the Application class.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=782295

 src/core/game-collection.vala |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/core/game-collection.vala b/src/core/game-collection.vala
index 1b8ead6..47a349e 100644
--- a/src/core/game-collection.vala
+++ b/src/core/game-collection.vala
@@ -65,6 +65,12 @@ public class Games.GameCollection : Object {
                return games[0];
        }
 
+       public async void search_games () {
+               foreach (var source in sources)
+                       foreach (var uri in source)
+                               yield add_uri (uri);
+       }
+
        public async void each_game (GameCallback callback) {
                foreach (var source in sources)
                        foreach (var uri in source)


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