2 * Copyright (C) 2005-202 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
11 #include "commons/ilog.h"
15 #include <string_view>
24 virtual ~CAppParams() = default;
26 int GetLogLevel() const { return m_logLevel
; }
27 void SetLogLevel(int logLevel
) { m_logLevel
= logLevel
; }
29 bool IsStartFullScreen() const { return m_startFullScreen
; }
30 void SetStartFullScreen(bool startFullScreen
) { m_startFullScreen
= startFullScreen
; }
32 bool IsStandAlone() const { return m_standAlone
; }
33 void SetStandAlone(bool standAlone
) { m_standAlone
= standAlone
; }
35 bool HasPlatformDirectories() const { return m_platformDirectories
; }
36 void SetPlatformDirectories(bool platformDirectories
)
38 m_platformDirectories
= platformDirectories
;
41 bool IsTestMode() const { return m_testmode
; }
42 void SetTestMode(bool testMode
) { m_testmode
= testMode
; }
44 const std::string
& GetSettingsFile() const { return m_settingsFile
; }
45 void SetSettingsFile(const std::string
& settingsFile
) { m_settingsFile
= settingsFile
; }
47 const std::string
& GetWindowing() const { return m_windowing
; }
48 void SetWindowing(const std::string
& windowing
) { m_windowing
= windowing
; }
50 const std::string
& GetLogTarget() const { return m_logTarget
; }
51 void SetLogTarget(const std::string
& logTarget
) { m_logTarget
= logTarget
; }
53 std::string_view
GetAudioBackend() const { return m_audioBackend
; }
54 void SetAudioBackend(std::string_view audioBackend
) { m_audioBackend
= audioBackend
; }
56 std::string_view
GetGlInterface() const { return m_glInterface
; }
57 void SetGlInterface(const std::string
& glInterface
) { m_glInterface
= glInterface
; }
59 CFileItemList
& GetPlaylist() const { return *m_playlist
; }
62 * \brief Get the raw command-line arguments
64 * Note: Raw arguments are currently not used by Kodi, but they will be
65 * useful if/when ROS 2 support is ever merged.
67 * \return The arguments. Note that the leading argument is the executable
70 const std::vector
<std::string
>& GetRawArgs() const { return m_rawArgs
; }
73 * \brief Set the raw command-line arguments
75 * \args The arguments. Note that the leading argument is the executable path
78 void SetRawArgs(std::vector
<std::string
> args
);
81 int m_logLevel
{LOG_LEVEL_NORMAL
};
83 bool m_startFullScreen
{false};
84 bool m_standAlone
{false};
85 bool m_platformDirectories
{true};
86 bool m_testmode
{false};
88 std::string m_settingsFile
;
89 std::string m_windowing
;
90 std::string m_logTarget
;
91 std::string m_audioBackend
;
92 std::string m_glInterface
;
94 std::unique_ptr
<CFileItemList
> m_playlist
;
96 // The raw command-line arguments
97 std::vector
<std::string
> m_rawArgs
;