Diffstat (limited to 'libopie2/opiedb/osqlitedriver.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiedb/osqlitedriver.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libopie2/opiedb/osqlitedriver.h b/libopie2/opiedb/osqlitedriver.h index e38fd52..4990a11 100644 --- a/libopie2/opiedb/osqlitedriver.h +++ b/libopie2/opiedb/osqlitedriver.h | |||
@@ -1,51 +1,51 @@ | |||
1 | #ifndef OSQL_LITE_DRIVER_H | 1 | #ifndef OSQL_LITE_DRIVER_H |
2 | #define OSQL_LITE_DRIVER_H | 2 | #define OSQL_LITE_DRIVER_H |
3 | 3 | ||
4 | #include <sqlite.h> | 4 | #include <sqlite3.h> |
5 | #include <sys/types.h> | 5 | #include <sys/types.h> |
6 | #include <regex.h> | 6 | #include <regex.h> |
7 | 7 | ||
8 | #include "osqldriver.h" | 8 | #include "osqldriver.h" |
9 | #include "osqlerror.h" | 9 | #include "osqlerror.h" |
10 | #include "osqlresult.h" | 10 | #include "osqlresult.h" |
11 | 11 | ||
12 | namespace Opie { | 12 | namespace Opie { |
13 | namespace DB { | 13 | namespace DB { |
14 | namespace Internal { | 14 | namespace Internal { |
15 | 15 | ||
16 | struct sqregex { | 16 | struct sqregex { |
17 | char *regex_raw; | 17 | char *regex_raw; |
18 | regex_t regex_c; | 18 | regex_t regex_c; |
19 | }; | 19 | }; |
20 | 20 | ||
21 | class OSQLiteDriver : public OSQLDriver { | 21 | class OSQLiteDriver : public OSQLDriver { |
22 | Q_OBJECT | 22 | Q_OBJECT |
23 | public: | 23 | public: |
24 | OSQLiteDriver( QLibrary *lib = 0l ); | 24 | OSQLiteDriver( QLibrary *lib = 0l ); |
25 | ~OSQLiteDriver(); | 25 | ~OSQLiteDriver(); |
26 | QString id()const; | 26 | QString id()const; |
27 | void setUserName( const QString& ); | 27 | void setUserName( const QString& ); |
28 | void setPassword( const QString& ); | 28 | void setPassword( const QString& ); |
29 | void setUrl( const QString& url ); | 29 | void setUrl( const QString& url ); |
30 | void setOptions( const QStringList& ); | 30 | void setOptions( const QStringList& ); |
31 | bool open(); | 31 | bool open(); |
32 | bool close(); | 32 | bool close(); |
33 | OSQLError lastError(); | 33 | OSQLError lastError(); |
34 | OSQLResult query( OSQLQuery* ); | 34 | OSQLResult query( OSQLQuery* ); |
35 | OSQLTable::ValueList tables()const; | 35 | OSQLTable::ValueList tables()const; |
36 | 36 | ||
37 | private: | 37 | private: |
38 | OSQLError m_lastE; | 38 | OSQLError m_lastE; |
39 | OSQLResult m_result; | 39 | OSQLResult m_result; |
40 | OSQLResultItem m_items; | 40 | OSQLResultItem m_items; |
41 | int handleCallBack( int, char**, char** ); | 41 | int handleCallBack( int, char**, char** ); |
42 | static int call_back( void*, int, char**, char** ); | 42 | static int call_back( void*, int, char**, char** ); |
43 | QString m_url; | 43 | QString m_url; |
44 | sqlite *m_sqlite; | 44 | sqlite3 *m_sqlite; |
45 | sqregex sqreg; | 45 | sqregex sqreg; |
46 | }; | 46 | }; |
47 | } | 47 | } |
48 | } | 48 | } |
49 | } | 49 | } |
50 | 50 | ||
51 | #endif | 51 | #endif |