[cosmetics] update date in GPL header
[vuplus_xbmc] / xbmc / settings / GUIDialogContentSettings.h
1 #pragma once
2
3 /*
4  *      Copyright (C) 2005-2013 Team XBMC
5  *      http://www.xbmc.org
6  *
7  *  This Program is free software; you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License as published by
9  *  the Free Software Foundation; either version 2, or (at your option)
10  *  any later version.
11  *
12  *  This Program is distributed in the hope that it will be useful,
13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  *  GNU General Public License for more details.
16  *
17  *  You should have received a copy of the GNU General Public License
18  *  along with XBMC; see the file COPYING.  If not, see
19  *  <http://www.gnu.org/licenses/>.
20  *
21  */
22
23 #include "GUIDialogSettings.h"
24 #include "addons/Scraper.h"
25 #include "addons/AddonManager.h"
26 #include <vector>
27
28 namespace VIDEO
29 {
30   struct SScanSettings;
31 }
32 class CFileItemList;
33
34 class CGUIDialogContentSettings : public CGUIDialogSettings
35 {
36 public:
37   CGUIDialogContentSettings(void);
38   virtual ~CGUIDialogContentSettings(void);
39   virtual bool OnMessage(CGUIMessage& message);
40
41   static bool Show(ADDON::ScraperPtr& scraper, CONTENT_TYPE musicContext = CONTENT_NONE);
42   static bool Show(ADDON::ScraperPtr& scraper, VIDEO::SScanSettings& settings, CONTENT_TYPE musicContext = CONTENT_NONE);
43   static bool ShowForDirectory(const CStdString& strDirectory, ADDON::ScraperPtr& scraper, VIDEO::SScanSettings& settings);
44   virtual bool HasListItems() const { return true; };
45   virtual CFileItemPtr GetCurrentListItem(int offset = 0);
46 protected:
47   virtual void OnOkay();
48   virtual void OnCancel();
49   virtual void OnInitWindow();
50   virtual void SetupPage();
51   virtual void CreateSettings();
52   void FillContentTypes();
53   void FillContentTypes(const CONTENT_TYPE& content);
54   void AddContentType(const CONTENT_TYPE& content);
55   void FillListControl();
56   virtual void OnSettingChanged(SettingInfo& setting);
57
58   bool m_bNeedSave;
59
60   bool m_bShowScanSettings;
61   bool m_bScanRecursive;
62   bool m_bUseDirNames;
63   bool m_bSingleItem;
64   bool m_bExclude;
65   bool m_bNoUpdate;
66   std::map<CONTENT_TYPE, ADDON::VECADDONS> m_scrapers;
67   std::map<CONTENT_TYPE, ADDON::AddonPtr>  m_lastSelected;
68   CFileItemList* m_vecItems;
69
70   CStdString m_strContentType;
71   ADDON::AddonPtr m_scraper;
72   CStdString m_defaultScraper;
73   CONTENT_TYPE m_content;
74   CONTENT_TYPE m_origContent;
75 };