[gnome-games] generic: Add GenericDescription & GenericRating
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] generic: Add GenericDescription & GenericRating
- Date: Tue, 24 Jul 2018 06:47:39 +0000 (UTC)
commit 7e19dcf130a27c79a698af1ced965e4cb259d34e
Author: 1PunMan <saurabhsingh412 gmail com>
Date: Sat Apr 14 23:37:19 2018 +0530
generic: Add GenericDescription & GenericRating
These will be used in a subsequent commit to provide game description and
rating to GenericGame.
src/generic/generic-description.vala | 13 +++++++++++++
src/generic/generic-rating.vala | 13 +++++++++++++
src/meson.build | 2 ++
3 files changed, 28 insertions(+)
---
diff --git a/src/generic/generic-description.vala b/src/generic/generic-description.vala
new file mode 100644
index 00000000..fa08666f
--- /dev/null
+++ b/src/generic/generic-description.vala
@@ -0,0 +1,13 @@
+// This file is part of GNOME Games. License: GPL-3.0+.
+
+public class Games.GenericDescription : Object, Description {
+ private string description;
+
+ public GenericDescription (string description) {
+ this.description = description;
+ }
+
+ public string get_description () {
+ return description;
+ }
+}
diff --git a/src/generic/generic-rating.vala b/src/generic/generic-rating.vala
new file mode 100644
index 00000000..315240c8
--- /dev/null
+++ b/src/generic/generic-rating.vala
@@ -0,0 +1,13 @@
+// This file is part of GNOME Games. License: GPL-3.0+.
+
+public class Games.GenericRating : Object, Rating {
+ private float rating;
+
+ public GenericRating (float rating) {
+ this.rating = rating;
+ }
+
+ public float get_rating () {
+ return rating;
+ }
+}
diff --git a/src/meson.build b/src/meson.build
index 4bb37aaa..14d70efb 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -74,12 +74,14 @@ vala_sources = [
'gamepad/gamepad-mapping-builder.vala',
'generic/generic-cooperative.vala',
+ 'generic/generic-description.vala',
'generic/generic-developer.vala',
'generic/generic-game.vala',
'generic/generic-game-uri-adapter.vala',
'generic/generic-genre.vala',
'generic/generic-players.vala',
'generic/generic-publisher.vala',
+ 'generic/generic-rating.vala',
'generic/generic-release-date.vala',
'generic/generic-title.vala',
'generic/generic-uid.vala',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]