stationlistxmlhandler.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           radiocfgxmlhandler.h  -  description
00003                              -------------------
00004     begin                : Son Jan 12 2003
00005     copyright            : (C) 2003 by Martin Witte
00006     email                : witte@kawo1.rwth-aachen.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 #ifndef KRADIO_RADIOCFGXMLHANDLER_H
00018 #define KRADIO_RADIOCFGXMLHANDLER_H
00019 
00020 #ifdef HAVE_CONFIG_H
00021 #include <config.h>
00022 #endif
00023 
00024 #include <qxml.h>
00025 #include <qobject.h>
00026 
00027 #include "radiostation.h"
00028 #include "stationlist.h"
00029 
00030 class StationListXmlHandler : public QXmlDefaultHandler
00031 {
00032 protected:
00033     QStringList           m_status;
00034     const IErrorLogClient&m_logger;
00035 
00036     RawStationList        m_stations;
00037     StationListMetaData   m_metaData;
00038 
00039     RadioStation         *m_newStation;
00040 
00041     bool                  m_compatMode;
00042 
00043 public :
00044     StationListXmlHandler (const IErrorLogClient &logger);
00045     virtual ~StationListXmlHandler ();
00046     bool startDocument ();
00047     bool startElement (const QString &ns, const QString &localname,
00048                        const QString& qname, const QXmlAttributes &);
00049     bool endElement   (const QString &ns, const QString &localname,
00050                        const QString &qname);
00051     bool characters   (const QString &ch);
00052 
00053     const RawStationList &getStations() const { return m_stations; }
00054     const StationListMetaData &getMetaData() const { return m_metaData; }
00055 
00056 
00057     bool  wasCompatMode() const { return m_compatMode; }
00058 
00059 protected:
00060 
00061     void clearNewStation();
00062 };
00063 
00064 
00065 
00066 extern const char *KRadioConfigElement;
00067 extern const char *StationListElement;
00068 
00069 extern const char *StationListInfo;
00070 extern const char *StationListInfoMaintainer;
00071 extern const char *StationListInfoCountry;
00072 extern const char *StationListInfoCity;
00073 extern const char *StationListInfoMedia;
00074 extern const char *StationListInfoComments;
00075 extern const char *StationListInfoChanged;
00076 extern const char *StationListInfoCreator;
00077 
00078 extern const char *StationQuickSelectElement;
00079 extern const char *StationDockingMenuElement;
00080 extern const char *StationListFormat;
00081 
00082 #define STATION_LIST_FORMAT   "kradio-1.0"
00083 
00084 
00085 #endif

Generated on Fri Jan 28 16:42:13 2011 for kradio by  doxygen 1.4.7