/*
 * xmlfile.h: A plugin for the Video Disk Recorder
 *
 * See the README file for copyright information and how to reach the author.
 *
 * $Id$
 */

#ifndef MANUAL_XMLFILE_H_
#define MANUAL_XMLFILE_H_

#include <vdr/tools.h>
#include <libxml/parser.h>
#include <libxml/xpath.h>


extern char * cfgDir;

class cManualFileInfo : public cListObject
{
private:
  int usedby;
  xmlDocPtr manual;
  xmlXPathContextPtr context;
  char *langxpath;
  char * filename;
  char * type;
  char *Conv(xmlChar *xmlText);

public:
  cManualFileInfo(const char * FileName);
  ~cManualFileInfo();
  const char *FileName(void) const { return filename; }
  const char *LangXPath(void) const { return langxpath; }
  const char *Type(void) const { return type; }
  bool Init(void);
  xmlXPathObjectPtr GetNodeset(xmlChar *xpath);
  char *GetString(xmlNodePtr list);
  int getUsedBy(void) const { return usedby; }
  void decUsedBy(void);
  void incUsedBy(void);
};

class cManualFiles : public cList<cManualFileInfo>
{};

extern cManualFiles ManualFiles;

#endif
