2 * Copyright (C) 2005-2013 Team XBMC
5 * This Program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
10 * This Program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with XBMC; see the file COPYING. If not, see
17 * <http://www.gnu.org/licenses/>.
20 // NfoFile.h: interface for the CNfoFile class.
22 //////////////////////////////////////////////////////////////////////
24 #if !defined(AFX_NfoFile_H__641CCF68_6D2A_426E_9204_C0E4BEF12D00__INCLUDED_)
25 #define AFX_NfoFile_H__641CCF68_6D2A_426E_9204_C0E4BEF12D00__INCLUDED_
29 #include "utils/XBMCTinyXML.h"
30 #include "addons/Scraper.h"
31 #include "utils/CharsetConverter.h"
32 #include "utils/XMLUtils.h"
37 CNfoFile() : m_doc(NULL), m_headofdoc(NULL), m_type(ADDON::ADDON_UNKNOWN) {}
38 virtual ~CNfoFile() { Close(); }
49 NFOResult Create(const CStdString&, const ADDON::ScraperPtr&, int episode=-1,
50 const CStdString& strPath2="");
52 bool GetDetails(T& details,const char* document=NULL, bool prioritise=false)
61 doc.Parse(strDoc, TIXML_ENCODING_UNKNOWN);
62 return details.Load(doc.RootElement(), true, prioritise);
66 void SetScraperInfo(const ADDON::ScraperPtr& info) { m_info = info; }
67 const ADDON::ScraperPtr& GetScraperInfo() const { return m_info; }
68 const CScraperUrl &ScraperUrl() const { return m_scurl; }
73 ADDON::ScraperPtr m_info;
77 int Load(const CStdString&);
78 int Scrape(ADDON::ScraperPtr& scraper);
81 #endif // !defined(AFX_NfoFile_H__641CCF68_6D2A_426E_9204_C0E4BEF12D00__INCLUDED_)