Subversion Repositories public

Rev

Rev 232 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 232 Rev 314
Line 1... Line 1...
1
/***************************************************************************
1
/***************************************************************************
2
 *   Copyright (C) 2007 - 2009 by Andreas Theofilu                         *
2
 *   Copyright (C) 2007 - 2013 by Andreas Theofilu                         *
3
 *   andreas@theosys.at                                                    *
3
 *   andreas@theosys.at                                                    *
4
 *                                                                         *
4
 *                                                                         *
5
 *   This program is free software; you can redistribute it and/or modify  *
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  *
6
 *   it under the terms of the GNU General Public License as published by  *
7
 *   the Free Software Foundation version 3 of the License.                *
7
 *   the Free Software Foundation version 3 of the License.                *
Line 24... Line 24...
24
#include <qstring.h>
24
#include <qstring.h>
25
#include <QXmlReader>
25
#include <QXmlReader>
26
 
26
 
27
#include "garmin.h"
27
#include "garmin.h"
28
#include "disassemble.h"
28
#include "disassemble.h"
-
 
29
#include "callback.h"
29
 
30
 
30
#define eMax 7
31
#define eMax 7
31
 
32
 
32
#define FLD_FIRST	1
33
#define FLD_FIRST	1
33
#define FLD_LAST	30
34
#define FLD_LAST	30
Line 65... Line 66...
65
	   void Initialize ();
66
	   void Initialize ();
66
	   void setFile (const QFile &qfile);
67
	   void setFile (const QFile &qfile);
67
	   void setFile (const QString &sfile);
68
	   void setFile (const QString &sfile);
68
	   void setDisassemble (disassemble *dis) { ds = dis; };
69
	   void setDisassemble (disassemble *dis) { ds = dis; };
69
 
70
 
-
 
71
	   void connectCallback(CallbackInterface *cb) { m_cb = cb; }
-
 
72
 
70
	   int import ();
73
	   int import ();
71
	   garmin_data *getGarminData() { if (gmn) return gmn; else return 0; };
74
	   garmin_data *getGarminData() { if (gmn) return gmn; else return 0; };
72
 
75
 
73
	   QString getError (int err);
76
	   QString getError (int err);
74
	   QString getError ();
77
	   QString getError ();
75
 
78
 
76
	   bool startDocument ();
79
	   bool startDocument ();
77
	   bool startElement (const QString&, const QString&, const QString& , const QXmlAttributes&);
80
	   bool startElement (const QString&, const QString&, const QString& , const QXmlAttributes&);
78
	   bool endElement (const QString&, const QString&, const QString&);
81
	   bool endElement (const QString&, const QString&, const QString&);
79
	   bool characters (const QString&);
82
	   bool characters (const QString&);
-
 
83
	   void saveImported(void *g);
80
 
84
 
81
	protected:
85
	protected:
82
	   unsigned int garmin_time (const QString&);
86
	   unsigned int garmin_time (const QString&);
83
	   QString getKey (int pos);
87
	   QString getKey (int pos);
84
 
88
 
85
	private:
89
	private:
-
 
90
	   CallbackInterface *m_cb;
-
 
91
	   bool doCallback;
-
 
92
	   gmn_import *inst;
86
	   disassemble *ds;
93
	   disassemble *ds;
87
	   QFile file;
94
	   QFile file;
88
	   bool qfstat, qfopen;
95
	   bool qfstat, qfopen;
89
	   int __error;
96
	   int __error;
90
	   int indent, tpos, lpos, oldLPos;
97
	   int indent, tpos, lpos, oldLPos;