[gnome-games/wip/aplazas/781334-refactor-game-source: 1/10] core: Add UriSource



commit 82d7ab6436346eff5b57b6fd94ac884e79f546b5
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Wed May 3 19:40:51 2017 +0200

    core: Add UriSource
    
    This will be used in some next commit to split the concern of
    discovering potential game resources and turning them into usable game
    objects.

 src/Makefile.am            |    2 ++
 src/core/uri-iterator.vala |    6 ++++++
 src/core/uri-source.vala   |    5 +++++
 3 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 2ad85d7..9805a0e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -57,6 +57,8 @@ gnome_games_SOURCES = \
        core/title.vala \
        core/uid.vala \
        core/uri-game-factory.vala \
+       core/uri-iterator.vala \
+       core/uri-source.vala \
        \
        dummy/dummy-cover.vala \
        dummy/dummy-game.vala \
diff --git a/src/core/uri-iterator.vala b/src/core/uri-iterator.vala
new file mode 100644
index 0000000..613e1ed
--- /dev/null
+++ b/src/core/uri-iterator.vala
@@ -0,0 +1,6 @@
+// This file is part of GNOME Games. License: GPL-3.0+.
+
+public interface Games.UriIterator : Object {
+       public new string? get ();
+       public bool next ();
+}
diff --git a/src/core/uri-source.vala b/src/core/uri-source.vala
new file mode 100644
index 0000000..69de450
--- /dev/null
+++ b/src/core/uri-source.vala
@@ -0,0 +1,5 @@
+// This file is part of GNOME Games. License: GPL-3.0+.
+
+public interface Games.UriSource : Object {
+       public UriIterator iterator ();
+}


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