[gnome-games/wip/exalm/psx-cleanup: 9/10] game: Add get_media_set()
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/psx-cleanup: 9/10] game: Add get_media_set()
- Date: Mon, 10 Feb 2020 11:55:41 +0000 (UTC)
commit 2f6d201b0b41c4f700293b77849ce975c339a35d
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Sun Feb 9 17:05:03 2020 +0500
game: Add get_media_set()
This will help to get rid of PlaystationGameinfoCache.
src/core/game.vala | 1 +
src/dummy/dummy-game.vala | 4 ++++
src/generic/generic-game.vala | 9 +++++++++
3 files changed, 14 insertions(+)
---
diff --git a/src/core/game.vala b/src/core/game.vala
index 9e4a02de..94a3a34b 100644
--- a/src/core/game.vala
+++ b/src/core/game.vala
@@ -8,6 +8,7 @@ public interface Games.Game : Object {
public abstract Icon get_icon ();
public abstract Cover get_cover ();
public abstract Platform get_platform ();
+ public abstract MediaSet? get_media_set ();
public bool matches_search_terms (string[] search_terms) {
if (search_terms.length != 0)
diff --git a/src/dummy/dummy-game.vala b/src/dummy/dummy-game.vala
index e944637a..2917bf83 100644
--- a/src/dummy/dummy-game.vala
+++ b/src/dummy/dummy-game.vala
@@ -41,4 +41,8 @@ private class Games.DummyGame : Object, Game {
public Platform get_platform () {
return new DummyPlatform ();
}
+
+ public MediaSet? get_media_set () {
+ return null;
+ }
}
diff --git a/src/generic/generic-game.vala b/src/generic/generic-game.vala
index cb2a54f6..d7eda445 100644
--- a/src/generic/generic-game.vala
+++ b/src/generic/generic-game.vala
@@ -24,6 +24,7 @@ public class Games.GenericGame : Object, Game {
private Icon game_icon;
private Cover game_cover;
private Platform game_platform;
+ private MediaSet? media_set;
public GenericGame (Uid uid, Uri uri, Title title, Platform platform) {
game_uid = uid;
@@ -62,6 +63,14 @@ public class Games.GenericGame : Object, Game {
game_cover = cover;
}
+ public MediaSet? get_media_set () {
+ return media_set;
+ }
+
+ public void set_media_set (MediaSet? media_set) {
+ this.media_set = media_set;
+ }
+
public Platform get_platform () {
return game_platform;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]