[gnome-games] generic: Add GenericPlayers, GenericCoop, GenericReleaseDate & GenericGenre
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] generic: Add GenericPlayers, GenericCoop, GenericReleaseDate & GenericGenre
- Date: Thu, 19 Jul 2018 16:45:14 +0000 (UTC)
commit 19810b792e6b80b68994f81fabbf1359efe008d0
Author: 1PunMan <saurabhsingh412 gmail com>
Date: Thu May 17 18:11:36 2018 +0530
generic: Add GenericPlayers, GenericCoop, GenericReleaseDate & GenericGenre
These will be used in a subsequent commit to provide number of players, coop status, genre &
release date of a game to GenericGame.
src/generic/generic-coop.vala | 13 +++++++++++++
src/generic/generic-genre.vala | 13 +++++++++++++
src/generic/generic-players.vala | 13 +++++++++++++
src/generic/generic-release-date.vala | 13 +++++++++++++
src/meson.build | 4 ++++
5 files changed, 56 insertions(+)
---
diff --git a/src/generic/generic-coop.vala b/src/generic/generic-coop.vala
new file mode 100644
index 0000000..8073a25
--- /dev/null
+++ b/src/generic/generic-coop.vala
@@ -0,0 +1,13 @@
+// This file is part of GNOME Games. License: GPL-3.0+.
+
+public class Games.GenericCooperative : Object, Cooperative {
+ private bool cooperative;
+
+ public GenericCooperative (bool cooperative) {
+ this.cooperative = cooperative;
+ }
+
+ public bool get_cooperative () {
+ return cooperative;
+ }
+}
diff --git a/src/generic/generic-genre.vala b/src/generic/generic-genre.vala
new file mode 100644
index 0000000..2c04ff7
--- /dev/null
+++ b/src/generic/generic-genre.vala
@@ -0,0 +1,13 @@
+// This file is part of GNOME Games. License: GPL-3.0+.
+
+public class Games.GenericGenre : Object, Genre {
+ private List<string> genre;
+
+ public GenericGenre (List<string> genre) {
+ this.genre = genre.copy();
+ }
+
+ public unowned List<string> get_genre () {
+ return genre;
+ }
+}
diff --git a/src/generic/generic-players.vala b/src/generic/generic-players.vala
new file mode 100644
index 0000000..549a865
--- /dev/null
+++ b/src/generic/generic-players.vala
@@ -0,0 +1,13 @@
+// This file is part of GNOME Games. License: GPL-3.0+.
+
+public class Games.GenericPlayers : Object, Players {
+ private string players;
+
+ public GenericPlayers (string players) {
+ this.players = players;
+ }
+
+ public string get_players () {
+ return players;
+ }
+}
diff --git a/src/generic/generic-release-date.vala b/src/generic/generic-release-date.vala
new file mode 100644
index 0000000..ddf2e89
--- /dev/null
+++ b/src/generic/generic-release-date.vala
@@ -0,0 +1,13 @@
+// This file is part of GNOME Games. License: GPL-3.0+.
+
+public class Games.GenericReleaseDate : Object, ReleaseDate {
+ private DateTime release_date;
+
+ public GenericReleaseDate (DateTime release_date) {
+ this.release_date = release_date;
+ }
+
+ public DateTime get_release_date () {
+ return release_date;
+ }
+}
diff --git a/src/meson.build b/src/meson.build
index ec3c984..3299a03 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -65,8 +65,12 @@ vala_sources = [
'gamepad/gamepad-input.vala',
'gamepad/gamepad-mapping-builder.vala',
+ 'generic/generic-coop.vala',
'generic/generic-game.vala',
'generic/generic-game-uri-adapter.vala',
+ 'generic/generic-genre.vala',
+ 'generic/generic-players.vala',
+ 'generic/generic-release-date.vala',
'generic/generic-title.vala',
'generic/generic-uid.vala',
'generic/generic-uri-game-factory.vala',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]