[gnome-games/wip/exalm/platform-preferences: 25/46] retro: Add RetroPlatform



commit f73f503a4562611854db2f46e39f8d52e7b29364
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Tue Sep 25 23:03:19 2018 +0500

    retro: Add RetroPlatform
    
    Introduce a specific platform for libretro-based games.
    
    This is just like GenericPlatform, except it also references platform's
    MIME type.
    
    This will be used later to provide a preference page with core chooser and
    firmware installer.

 src/meson.build               |  1 +
 src/retro/retro-platform.vala | 25 +++++++++++++++++++++++++
 2 files changed, 26 insertions(+)
---
diff --git a/src/meson.build b/src/meson.build
index d328e227..7366e14e 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -114,6 +114,7 @@ vala_sources = [
   'retro/retro-gamepad.vala',
   'retro/retro-input-manager.vala',
   'retro/retro-options.vala',
+  'retro/retro-platform.vala',
   'retro/retro-runner.vala',
   'retro/retro-runner-builder.vala',
   'retro/retro-simple-game-uri-adapter.vala',
diff --git a/src/retro/retro-platform.vala b/src/retro/retro-platform.vala
new file mode 100644
index 00000000..9e4a80ec
--- /dev/null
+++ b/src/retro/retro-platform.vala
@@ -0,0 +1,25 @@
+// This file is part of GNOME Games. License: GPL-3.0+.
+
+public class Games.RetroPlatform : Object, Platform {
+       private string name;
+       private string id;
+       private string[] mime_types;
+
+       public RetroPlatform (string id, string name, string[] mime_types) {
+               this.id = id;
+               this.name = name;
+               this.mime_types = mime_types;
+       }
+
+       public string get_id () {
+               return id;
+       }
+
+       public string get_name () {
+               return name;
+       }
+
+       public string[] get_mime_types () {
+               return mime_types;
+       }
+}


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