1 /*
2  *  Copyright (C) 2005-2018 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 <memory>
12 #include <string>
13 
14 class CAdvancedSettings;
15 class CFileItemList;
16 
17 class CAppParamParser
18 {
19 public:
20   CAppParamParser();
21   ~CAppParamParser();
22 
23   void Parse(const char* const* argv, int nArgs);
24   void SetAdvancedSettings(CAdvancedSettings& advancedSettings) const;
25 
26   const CFileItemList& GetPlaylist() const;
27 
28   int m_logLevel;
29   bool m_startFullScreen = false;
30   bool m_platformDirectories = true;
31   bool m_testmode = false;
32   bool m_standAlone = false;
33   std::string m_windowing;
34 
35 private:
36   void ParseArg(const std::string &arg);
37   void DisplayHelp();
38   void DisplayVersion();
39 
40   std::string m_settingsFile;
41   std::unique_ptr<CFileItemList> m_playlist;
42 };
43