[gnome-games] utils: Add GenericUid



commit 0a252773feff6edf5da80ed2a52463775dd02988
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Thu May 12 18:30:12 2016 +0200

    utils: Add GenericUid
    
    This will be used in the next commit to provide MAME game UIDs to
    GenericGame and hence to allow to replace MameGame by GenericGame.

 src/Makefile.am            |    1 +
 src/utils/generic-uid.vala |   13 +++++++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 8ce9d42..647bbe0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -85,6 +85,7 @@ gnome_games_SOURCES = \
        utils/fingerprint.vala \
        utils/generic-game.vala \
        utils/generic-title.vala \
+       utils/generic-uid.vala \
        utils/grep.vala \
        \
        config.vala \
diff --git a/src/utils/generic-uid.vala b/src/utils/generic-uid.vala
new file mode 100644
index 0000000..31c6e81
--- /dev/null
+++ b/src/utils/generic-uid.vala
@@ -0,0 +1,13 @@
+// This file is part of GNOME Games. License: GPLv3
+
+public class Games.GenericUid : Object, Uid {
+       private string uid;
+
+       public GenericUid (string uid) {
+               this.uid = uid;
+       }
+
+       public string get_uid () throws Error {
+               return uid;
+       }
+}


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