Added parsing of CSV-formatted Symbian event logs
[qwerkisync] / EventParsers / CSVSymbianEventLogParser.h
index 4b155fb..5441647 100644 (file)
@@ -20,8 +20,9 @@
 #define EVENTPARSERS_CSVSYMBIANEVENTLOGPARSER_H
 
 #include "iEventParser.h"
+class Settings;
 
-template <typename T1, typename T2> class QHash;
+#include <QHash>
 class QFile;
 class QString;
 
@@ -32,11 +33,20 @@ namespace EventParsers
        public:
                typedef QHash<QString, int> ColumnIndicesHash;
 
-               static iEventParser *IsValid(QFile &eventFile);
+               static iEventParser *IsValid(const Settings &currentSettings, QFile &eventFile);
 
-               CSVSymbianEventLogParser(const QString &filename, const ColumnIndicesHash &columns);
+               CSVSymbianEventLogParser(const Settings &currentSettings, const QString &filename, const char delimiter, const int numColumnsPerRecord, const ColumnIndicesHash &columns);
 
                virtual EventTypes::EventFromFileList ParseFile(QFile &eventFile, const QList<unsigned int> &recordsToReturn);
+
+       protected:
+               const Settings &CurrentSettings() const { return m_Settings; }
+
+       private:
+               const Settings &m_Settings;
+               const char m_Delimiter;
+               const int m_NumColumnsPerRecord;
+               const ColumnIndicesHash m_HeadingIndices;
        };
 }