[PVR][Estuary] Timer settings dialog: Show client name in timer type selection dialog...
[xbmc.git] / xbmc / utils / RssReader.h
blobae9d2f73cae5c9e1568d8e715758d9959f408078
1 /*
2 * Copyright (C) 2005-2018 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.
7 */
9 #pragma once
11 #include "threads/CriticalSection.h"
12 #include "threads/Thread.h"
13 #include "utils/IRssObserver.h"
14 #include "utils/XBMCTinyXML.h"
16 #include <list>
17 #include <string>
18 #include <vector>
20 namespace KODI::TIME
22 struct SystemTime;
25 class CRssReader : public CThread
27 public:
28 CRssReader();
29 ~CRssReader() override;
31 void Create(IRssObserver* aObserver, const std::vector<std::string>& aUrl, const std::vector<int>& times, int spacesBetweenFeeds, bool rtl);
32 bool Parse(const std::string& data, int iFeed, const std::string& charset);
33 void getFeed(vecText &text);
34 void AddTag(const std::string &addTag);
35 void AddToQueue(int iAdd);
36 void UpdateObserver();
37 void SetObserver(IRssObserver* observer);
38 void CheckForUpdates();
39 void requestRefresh();
40 float m_savedScrollPixelPos;
42 private:
43 void Process() override;
44 bool Parse(int iFeed);
45 void GetNewsItems(TiXmlElement* channelXmlNode, int iFeed);
46 void AddString(std::wstring aString, int aColour, int iFeed);
47 void UpdateFeed();
48 void OnExit() override;
49 int GetQueueSize();
51 IRssObserver* m_pObserver;
53 std::vector<std::wstring> m_strFeed;
54 std::vector<std::wstring> m_strColors;
55 std::vector<KODI::TIME::SystemTime*> m_vecTimeStamps;
56 std::vector<int> m_vecUpdateTimes;
57 int m_spacesBetweenFeeds;
58 CXBMCTinyXML m_xml;
59 std::list<std::string> m_tagSet;
60 std::vector<std::string> m_vecUrls;
61 std::vector<int> m_vecQueue;
62 bool m_bIsRunning;
63 bool m_rtlText;
64 bool m_requestRefresh;
66 CCriticalSection m_critical;