xbmc
InfoTagGame.h
1 /*
2  * Copyright (C) 2021 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "AddonClass.h"
12 #include "games/tags/GameInfoTag.h"
13 
14 namespace KODI
15 {
16 namespace GAME
17 {
18 class CGameInfoTag;
19 }
20 } // namespace KODI
21 
22 namespace XBMCAddon
23 {
24 namespace xbmc
25 {
49 class InfoTagGame : public AddonClass
50 {
51 private:
52  KODI::GAME::CGameInfoTag* infoTag;
53  bool offscreen;
54  bool owned;
55 
56 public:
57 #ifndef SWIG
58  explicit InfoTagGame(const KODI::GAME::CGameInfoTag* tag);
59  explicit InfoTagGame(KODI::GAME::CGameInfoTag* tag, bool offscreen = false);
60 #endif
61 
62 #ifdef DOXYGEN_SHOULD_USE_THIS
63  InfoTagGame(...);
94 #else
95  explicit InfoTagGame(bool offscreen = false);
96 #endif
97  ~InfoTagGame() override;
98 
99 #ifdef DOXYGEN_SHOULD_USE_THIS
100  getTitle();
112 #else
113  String getTitle();
114 #endif
115 
116 #ifdef DOXYGEN_SHOULD_USE_THIS
117  getPlatform();
129 #else
130  String getPlatform();
131 #endif
132 
133 #ifdef DOXYGEN_SHOULD_USE_THIS
134  getGenres();
146 #else
147  std::vector<String> getGenres();
148 #endif
149 
150 #ifdef DOXYGEN_SHOULD_USE_THIS
151  getPublisher();
163 #else
164  String getPublisher();
165 #endif
166 
167 #ifdef DOXYGEN_SHOULD_USE_THIS
168  getDeveloper();
180 #else
181  String getDeveloper();
182 #endif
183 
184 #ifdef DOXYGEN_SHOULD_USE_THIS
185  getOverview();
197 #else
198  String getOverview();
199 #endif
200 
201 #ifdef DOXYGEN_SHOULD_USE_THIS
202  getYear();
214 #else
215  unsigned int getYear();
216 #endif
217 
218 #ifdef DOXYGEN_SHOULD_USE_THIS
219  getGameClient();
231 #else
232  String getGameClient();
233 #endif
234 
235 #ifdef DOXYGEN_SHOULD_USE_THIS
236  getCaption();
248 #else
249  String getCaption();
250 #endif
251 
252 #ifdef DOXYGEN_SHOULD_USE_THIS
253  setTitle(...);
265 #else
266  void setTitle(const String& title);
267 #endif
268 
269 #ifdef DOXYGEN_SHOULD_USE_THIS
270  setPlatform(...);
282 #else
283  void setPlatform(const String& platform);
284 #endif
285 
286 #ifdef DOXYGEN_SHOULD_USE_THIS
287  setGenres(...);
299 #else
300  void setGenres(const std::vector<String>& genres);
301 #endif
302 
303 #ifdef DOXYGEN_SHOULD_USE_THIS
304  setPublisher(...);
316 #else
317  void setPublisher(const String& publisher);
318 #endif
319 
320 #ifdef DOXYGEN_SHOULD_USE_THIS
321  setDeveloper(...);
333 #else
334  void setDeveloper(const String& developer);
335 #endif
336 
337 #ifdef DOXYGEN_SHOULD_USE_THIS
338  setOverview(...);
350 #else
351  void setOverview(const String& overview);
352 #endif
353 
354 #ifdef DOXYGEN_SHOULD_USE_THIS
355  setYear(...);
367 #else
368  void setYear(unsigned int year);
369 #endif
370 
371 #ifdef DOXYGEN_SHOULD_USE_THIS
372  setGameClient(...);
384 #else
385  void setGameClient(const String& gameClient);
386 #endif
387 
388 #ifdef DOXYGEN_SHOULD_USE_THIS
389  setCaption(...);
401 #else
402  void setCaption(const String& caption);
403 #endif
404 
405 #ifndef SWIG
406  static void setTitleRaw(KODI::GAME::CGameInfoTag* infoTag, const String& title);
407  static void setPlatformRaw(KODI::GAME::CGameInfoTag* infoTag, const String& platform);
408  static void setGenresRaw(KODI::GAME::CGameInfoTag* infoTag, const std::vector<String>& genres);
409  static void setPublisherRaw(KODI::GAME::CGameInfoTag* infoTag, const String& publisher);
410  static void setDeveloperRaw(KODI::GAME::CGameInfoTag* infoTag, const String& developer);
411  static void setOverviewRaw(KODI::GAME::CGameInfoTag* infoTag, const String& overview);
412  static void setYearRaw(KODI::GAME::CGameInfoTag* infoTag, unsigned int year);
413  static void setGameClientRaw(KODI::GAME::CGameInfoTag* infoTag, const String& gameClient);
414  static void setCaptionRaw(KODI::GAME::CGameInfoTag* infoTag, const String& caption);
415 #endif
416 };
417 
418 } // namespace xbmc
419 } // namespace XBMCAddon
Definition: InfoTagGame.h:49
Definition: GameInfoTag.h:24
Definition: AudioDecoder.h:18
Defining LOG_LIFECYCLE_EVENTS will log all instantiations, deletions and also reference countings (in...
Definition: Addon.cpp:25
This class is the superclass for all reference counted classes in the api.
Definition: AddonClass.h:57