summaryrefslogtreecommitdiffstats
path: root/kradio3/src/include/stationlistxmlhandler.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-22 18:23:26 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-22 18:23:26 +0000
commitae364d9bed0589bf1a22cd5f530c563462379e3e (patch)
treee32727e2664e7ce68d0d30270afa040320ae35a1 /kradio3/src/include/stationlistxmlhandler.h
downloadtderadio-ae364d9bed0589bf1a22cd5f530c563462379e3e.tar.gz
tderadio-ae364d9bed0589bf1a22cd5f530c563462379e3e.zip
Added old KDE3 version of kradio
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kradio@1094417 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kradio3/src/include/stationlistxmlhandler.h')
-rw-r--r--kradio3/src/include/stationlistxmlhandler.h85
1 files changed, 85 insertions, 0 deletions
diff --git a/kradio3/src/include/stationlistxmlhandler.h b/kradio3/src/include/stationlistxmlhandler.h
new file mode 100644
index 0000000..7386933
--- /dev/null
+++ b/kradio3/src/include/stationlistxmlhandler.h
@@ -0,0 +1,85 @@
+/***************************************************************************
+ radiocfgxmlhandler.h - description
+ -------------------
+ begin : Son Jan 12 2003
+ copyright : (C) 2003 by Martin Witte
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+#ifndef KRADIO_RADIOCFGXMLHANDLER_H
+#define KRADIO_RADIOCFGXMLHANDLER_H
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <qxml.h>
+#include <qobject.h>
+
+#include "radiostation.h"
+#include "stationlist.h"
+
+class StationListXmlHandler : public QXmlDefaultHandler
+{
+protected:
+ QStringList m_status;
+ const IErrorLogClient&m_logger;
+
+ RawStationList m_stations;
+ StationListMetaData m_metaData;
+
+ RadioStation *m_newStation;
+
+ bool m_compatMode;
+
+public :
+ StationListXmlHandler (const IErrorLogClient &logger);
+ virtual ~StationListXmlHandler ();
+ bool startDocument ();
+ bool startElement (const QString &ns, const QString &localname,
+ const QString& qname, const QXmlAttributes &);
+ bool endElement (const QString &ns, const QString &localname,
+ const QString &qname);
+ bool characters (const QString &ch);
+
+ const RawStationList &getStations() const { return m_stations; }
+ const StationListMetaData &getMetaData() const { return m_metaData; }
+
+
+ bool wasCompatMode() const { return m_compatMode; }
+
+protected:
+
+ void clearNewStation();
+};
+
+
+
+extern const char *KRadioConfigElement;
+extern const char *StationListElement;
+
+extern const char *StationListInfo;
+extern const char *StationListInfoMaintainer;
+extern const char *StationListInfoCountry;
+extern const char *StationListInfoCity;
+extern const char *StationListInfoMedia;
+extern const char *StationListInfoComments;
+extern const char *StationListInfoChanged;
+extern const char *StationListInfoCreator;
+
+extern const char *StationQuickSelectElement;
+extern const char *StationDockingMenuElement;
+extern const char *StationListFormat;
+
+#define STATION_LIST_FORMAT "kradio-1.0"
+
+
+#endif