4 * Copyright (C) 2005-2013 Team XBMC
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)
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.
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/>.
23 #include "StdString.h"
24 #include "threads/Thread.h"
34 CStdString service_name;
35 CStdString service_reference;
45 CStdString video_format;
46 CStdString supported_crypt_systems;
47 CStdString used_crypt_systems;
50 CStdString symbol_rate;
51 CStdString polarisation;
60 struct VIDEOSUBCHANNEL
62 std::vector<CStdString> reference;
63 std::vector<CStdString> name;
64 std::vector<CStdString> selected;
65 CStdString current_name;
68 typedef struct AUDIOCHANNEL
74 struct CURRENTSERVICEDATA
76 CStdString service_name;
77 CStdString service_reference;
78 std::vector<AUDIOCHANNEL> audio_channels;
79 int requested_audio_channel;
80 CStdString audio_track;
81 CStdString current_event_date;
82 CStdString current_event_time;
83 CStdString current_event_start;
84 CStdString current_event_duration;
85 CStdString current_event_description;
86 CStdString current_event_details;
87 CStdString next_event_date;
88 CStdString next_event_time;
89 CStdString next_event_start;
90 CStdString next_event_duration;
91 CStdString next_event_description;
92 CStdString next_event_details;
96 CStdString current_time;
104 CStdString image_version;
105 CStdString image_url;
106 CStdString image_comment;
107 CStdString image_catalog;
109 CStdString fpfirmware;
110 CStdString webinterface;
112 CStdString manufacturer;
113 CStdString processor;
119 CStdString service_reference;
120 CStdString service_name;
121 CStdString image_comment;
126 CStdString descritption;
128 CStdString genrecategory;
140 STREAMINFO sStrmInfo;
141 CURRENTSERVICEDATA sCurSrvData;
142 BOXSTATUS sBoxStatus;
144 SERVICE_EPG sServiceEPG;
145 VIDEOSUBCHANNEL vVideoSubChannel;
146 ZAPSTREAM sZapstream;
149 virtual ~CTuxBoxUtil(void);
151 bool GetZapUrl(const CStdString& strPath, CFileItem &items);
152 bool ParseBouquets(TiXmlElement *root, CFileItemList &items, CURL &url, CStdString strFilter, CStdString strChild);
153 bool ParseBouquetsEnigma2(TiXmlElement *root, CFileItemList &items, CURL &url, CStdString& strFilter, CStdString& strChild);
154 bool ParseChannels(TiXmlElement *root, CFileItemList &items, CURL &url, CStdString strFilter, CStdString strChild);
155 bool ParseChannelsEnigma2(TiXmlElement *root, CFileItemList &items, CURL &url, CStdString& strFilter, CStdString& strChild);
156 bool ZapToUrl(CURL url, const CStdString &pathOption);
157 bool StreamInformations(TiXmlElement *pRootElement);
158 bool CurrentServiceData(TiXmlElement *pRootElement);
159 bool BoxStatus(TiXmlElement *pRootElement);
160 bool BoxInfo(TiXmlElement *pRootElement);
161 bool ServiceEPG(TiXmlElement *pRootElement);
162 bool GetHttpXML(CURL url,CStdString strRequestType);
163 bool GetGUIRequestedAudioChannel(AUDIOCHANNEL& sRequestedAC);
164 bool GetRequestedAudioChannel(AUDIOCHANNEL& sRequestedAC);
165 bool GetVideoSubChannels(CStdString& strVideoSubChannelName, CStdString& strVideoSubChannelPid);
166 bool GetVideoChannels(TiXmlElement *pRootElement);
167 bool CreateNewItem(const CFileItem& item, CFileItem& item_new);
168 bool InitZapstream(const CStdString& strPath);
169 bool SetAudioChannel(const CStdString& strPath, const AUDIOCHANNEL& sAC);
171 CStdString GetPicon(CStdString strServiceName);
172 CStdString GetSubMode(int iMode, CStdString& strXMLRootString, CStdString& strXMLChildString);
173 CStdString DetectSubMode(CStdString strSubMode, CStdString& strXMLRootString, CStdString& strXMLChildString);
175 extern CTuxBoxUtil g_tuxbox;
177 class CTuxBoxService : public CThread
187 virtual void OnExit();
188 virtual void OnStartup();
189 virtual void Process();
191 extern CTuxBoxService g_tuxboxService;