[gnome-games] generic: Add GenericPlatform



commit d4aa46842a57b09d2e42bee060c0a72864e1ec21
Author: 1PunMan <saurabhsingh412 gmail com>
Date:   Tue Jun 26 16:06:44 2018 +0530

    generic: Add GenericPlatform
    
    This will be used in a subsequent commit to provide game platform
    to GenericGame.

 src/generic/generic-platform.vala | 13 +++++++++++++
 src/meson.build                   |  1 +
 2 files changed, 14 insertions(+)
---
diff --git a/src/generic/generic-platform.vala b/src/generic/generic-platform.vala
new file mode 100644
index 00000000..04bb1bc7
--- /dev/null
+++ b/src/generic/generic-platform.vala
@@ -0,0 +1,13 @@
+// This file is part of GNOME Games. License: GPL-3.0+.
+
+public class Games.GenericPlatform : Object, Platform {
+       private string platform;
+
+       public GenericPlatform (string platform) {
+               this.platform = platform;
+       }
+
+       public string get_name () {
+               return platform;
+       }
+}
diff --git a/src/meson.build b/src/meson.build
index 71317ce7..d6349d8a 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -81,6 +81,7 @@ vala_sources = [
   'generic/generic-game.vala',
   'generic/generic-game-uri-adapter.vala',
   'generic/generic-genre.vala',
+  'generic/generic-platform.vala',
   'generic/generic-players.vala',
   'generic/generic-publisher.vala',
   'generic/generic-rating.vala',


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