5 * Copyright (C) 2005-2013 Team XBMC
8 * This Program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2, or (at your option)
13 * This Program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with XBMC; see the file COPYING. If not, see
20 * <http://www.gnu.org/licenses/>.
26 #include "StdString.h"
29 namespace XFILE { class CCurlFile; }
34 CScraperUrl(const CStdString&);
35 CScraperUrl(const TiXmlElement*);
58 bool ParseString(CStdString); // copies by intention
59 bool ParseElement(const TiXmlElement*);
60 bool ParseEpisodeGuide(CStdString strUrls); // copies by intention
62 const SUrlEntry GetFirstThumb(const std::string &type = "") const;
63 const SUrlEntry GetSeasonThumb(int season, const std::string &type = "") const;
64 unsigned int GetMaxSeasonThumb() const;
66 /*! \brief fetch the full URL (including referrer) of a thumb
67 \param URL entry to use to create the full URL
68 \return the full URL, including referrer
70 static CStdString GetThumbURL(const CScraperUrl::SUrlEntry &entry);
72 /*! \brief fetch the full URL (including referrer) of thumbs
73 \param thumbs [out] vector of thumb URLs to fill
74 \param type the type of thumb URLs to fetch, if empty (the default) picks any
75 \param season number of season that we want thumbs for, -1 indicates no season (the default)
77 void GetThumbURLs(std::vector<CStdString> &thumbs, const std::string &type = "", int season = -1) const;
79 static bool Get(const SUrlEntry&, std::string&, XFILE::CCurlFile& http,
80 const CStdString& cacheContext);
83 CStdString m_spoof; // for backwards compatibility only!
87 std::vector<SUrlEntry> m_url;