xbmc
AppParams.h
1 /*
2  * Copyright (C) 2005-202 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 "commons/ilog.h"
12 
13 #include <memory>
14 #include <string>
15 #include <vector>
16 
17 class CFileItemList;
18 
20 {
21 public:
22  CAppParams();
23  virtual ~CAppParams() = default;
24 
25  int GetLogLevel() const { return m_logLevel; }
26  void SetLogLevel(int logLevel) { m_logLevel = logLevel; }
27 
28  bool IsStartFullScreen() const { return m_startFullScreen; }
29  void SetStartFullScreen(bool startFullScreen) { m_startFullScreen = startFullScreen; }
30 
31  bool IsStandAlone() const { return m_standAlone; }
32  void SetStandAlone(bool standAlone) { m_standAlone = standAlone; }
33 
34  bool HasPlatformDirectories() const { return m_platformDirectories; }
35  void SetPlatformDirectories(bool platformDirectories)
36  {
37  m_platformDirectories = platformDirectories;
38  }
39 
40  bool IsTestMode() const { return m_testmode; }
41  void SetTestMode(bool testMode) { m_testmode = testMode; }
42 
43  const std::string& GetSettingsFile() const { return m_settingsFile; }
44  void SetSettingsFile(const std::string& settingsFile) { m_settingsFile = settingsFile; }
45 
46  const std::string& GetWindowing() const { return m_windowing; }
47  void SetWindowing(const std::string& windowing) { m_windowing = windowing; }
48 
49  const std::string& GetLogTarget() const { return m_logTarget; }
50  void SetLogTarget(const std::string& logTarget) { m_logTarget = logTarget; }
51 
52  CFileItemList& GetPlaylist() const { return *m_playlist; }
53 
63  const std::vector<std::string>& GetRawArgs() const { return m_rawArgs; }
64 
71  void SetRawArgs(std::vector<std::string> args);
72 
73 private:
74  int m_logLevel{LOG_LEVEL_NORMAL};
75 
76  bool m_startFullScreen{false};
77  bool m_standAlone{false};
78  bool m_platformDirectories{true};
79  bool m_testmode{false};
80 
81  std::string m_settingsFile;
82  std::string m_windowing;
83  std::string m_logTarget;
84 
85  std::unique_ptr<CFileItemList> m_playlist;
86 
87  // The raw command-line arguments
88  std::vector<std::string> m_rawArgs;
89 };
Represents a list of files.
Definition: FileItem.h:713
const std::vector< std::string > & GetRawArgs() const
Get the raw command-line arguments.
Definition: AppParams.h:63
void SetRawArgs(std::vector< std::string > args)
Set the raw command-line arguments.
Definition: AppParams.cpp:17
Definition: AppParams.h:19