xbmc
GameAgent.h
1 /*
2  * Copyright (C) 2017-2023 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 #pragma once
9 
10 #include "XBDateTime.h"
11 #include "games/controllers/ControllerTypes.h"
12 #include "peripherals/PeripheralTypes.h"
13 
14 #include <memory>
15 #include <string>
16 
17 namespace KODI
18 {
19 namespace GAME
20 {
21 class CGameAgentJoystick;
22 
32 {
33 public:
34  CGameAgent(PERIPHERALS::PeripheralPtr peripheral);
35  ~CGameAgent();
36 
37  // Lifecycle functions
38  void Initialize();
39  void Deinitialize();
40 
41  // Input properties
42  PERIPHERALS::PeripheralPtr GetPeripheral() const { return m_peripheral; }
43  std::string GetPeripheralName() const;
44  const std::string& GetPeripheralLocation() const;
45  ControllerPtr GetController() const;
46  CDateTime LastActive() const;
47  float GetActivation() const;
48 
49 private:
50  // Construction parameters
51  const PERIPHERALS::PeripheralPtr m_peripheral;
52 
53  // Input parameters
54  std::unique_ptr<CGameAgentJoystick> m_joystick;
55 };
56 
57 } // namespace GAME
58 } // namespace KODI
Definition: AudioDecoder.h:18
std::shared_ptr< CController > ControllerPtr
Smart pointer to a game controller (CController)
Definition: ControllerTypes.h:25
DateTime class, which uses FileTime as it&#39;s base.
Definition: XBDateTime.h:63
Class to represent a game player (a.k.a. agent)
Definition: GameAgent.h:31