~ubuntu-branches/ubuntu/breezy/koffice/breezy-security

« back to all changes in this revision

Viewing changes to kexi/kexidb/drivers/sqlite/sqliteconnection.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2005-10-11 14:49:50 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051011144950-lwpngbifzp8nk0ds
Tags: 1:1.4.1-0ubuntu7
* SECURITY UPDATE: fix heap based buffer overflow in the RTF importer of KWord
* Opening specially crafted RTF files in KWord can cause
  execution of abitrary code.
* Add kubuntu_01_rtfimport_heap_overflow.diff
* References:
  CAN-2005-2971
  CESA-2005-005
  http://www.koffice.org/security/advisory-20051011-1.txt

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This file is part of the KDE project
 
2
   Copyright (C) 2003 Jaroslaw Staniek <js@iidea.pl>
 
3
 
 
4
   This program is free software; you can redistribute it and/or
 
5
   modify it under the terms of the GNU Library General Public
 
6
   License as published by the Free Software Foundation; either
 
7
   version 2 of the License, or (at your option) any later version.
 
8
 
 
9
   This program is distributed in the hope that it will be useful,
 
10
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
   Library General Public License for more details.
 
13
 
 
14
   You should have received a copy of the GNU Library General Public License
 
15
   along with this program; see the file COPYING.  If not, write to
 
16
   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
17
   Boston, MA 02111-1307, USA.
 
18
*/
 
19
 
 
20
#ifndef KEXIDB_CONN_SQLITE_H
 
21
#define KEXIDB_CONN_SQLITE_H
 
22
 
 
23
#include <qstringlist.h>
 
24
 
 
25
#include <kexidb/connection.h>
 
26
 
 
27
/*!
 
28
 */
 
29
 
 
30
namespace KexiDB
 
31
{
 
32
 
 
33
class SQLiteConnectionInternal;
 
34
class Driver;
 
35
 
 
36
//! sqlite-specific connection
 
37
class SQLiteConnection : public Connection
 
38
{
 
39
        Q_OBJECT
 
40
 
 
41
        public:
 
42
                virtual ~SQLiteConnection();
 
43
 
 
44
                virtual Cursor* prepareQuery( const QString& statement, uint cursor_options = 0 );
 
45
                virtual Cursor* prepareQuery( QuerySchema& query, uint cursor_options = 0 );
 
46
 
 
47
        protected:
 
48
                /*! Used by driver */
 
49
                SQLiteConnection( Driver *driver, ConnectionData &conn_data );
 
50
 
 
51
                virtual bool drv_connect();
 
52
                virtual bool drv_disconnect();
 
53
                virtual bool drv_getDatabasesList( QStringList &list );
 
54
//TODO: move this somewhere to low level class (MIGRATION?)
 
55
                virtual bool drv_getTablesList( QStringList &list );
 
56
//TODO: move this somewhere to low level class (MIGRATION?)
 
57
                virtual bool drv_containsTable( const QString &tableName );
 
58
                /*! Creates new database using connection. Note: Do not pass \a dbName 
 
59
                        arg because for file-based engine (that has one database per connection)
 
60
                        it is defined during connection. */
 
61
                virtual bool drv_createDatabase( const QString &dbName = QString::null );
 
62
                /*! Opens existing database using connection. Do not pass \a dbName 
 
63
                        arg because for file-based engine (that has one database per connection)
 
64
                        it is defined during connection. If you pass it, 
 
65
                        database file name will be changed. */
 
66
                virtual bool drv_useDatabase( const QString &dbName = QString::null );
 
67
                virtual bool drv_closeDatabase();
 
68
                /*! Drops database from the server using connection.
 
69
                        After drop, database shouldn't be accessible 
 
70
                        anymore, so database file is just removed. See note from drv_useDatabase(). */
 
71
                virtual bool drv_dropDatabase( const QString &dbName = QString::null );
 
72
 
 
73
                //virtual bool drv_createTable( const KexiDB::Table& table );
 
74
 
 
75
                virtual bool drv_executeSQL( const QString& statement );
 
76
//              virtual bool drv_executeQuery( const QString& statement );
 
77
 
 
78
                virtual Q_ULLONG drv_lastInsertRowID();
 
79
 
 
80
                virtual int serverResult();
 
81
                virtual QString serverResultName();
 
82
                virtual QString serverErrorMsg();
 
83
                virtual void drv_clearServerResult();
 
84
 
 
85
                SQLiteConnectionInternal* d;
 
86
 
 
87
        friend class SQLiteDriver;
 
88
        friend class SQLiteCursor;
 
89
};
 
90
 
 
91
}
 
92
 
 
93
#endif