File indexing completed on 2024-04-21 15:29:53
0001 /* This file is part of the KDE project 0002 Copyright (C) 2008 Sharan Rao <sharanrao@gmail.com> 0003 0004 This program is free software; you can redistribute it and/or 0005 modify it under the terms of the GNU Library General Public 0006 License as published by the Free Software Foundation; either 0007 version 2 of the License, or (at your option) any later version. 0008 0009 This program is distributed in the hope that it will be useful, 0010 but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0012 Library General Public License for more details. 0013 0014 You should have received a copy of the GNU Library General Public License 0015 along with this program; see the file COPYING. If not, write to 0016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0017 * Boston, MA 02110-1301, USA. 0018 */ 0019 0020 #ifndef XBASE_EXPORT_H 0021 #define XBASE_EXPORT_H 0022 0023 #include "KDbTableSchema.h" 0024 0025 namespace Kexi { 0026 class ObjectStatus; 0027 } 0028 0029 namespace KexiMigration { 0030 class Data; 0031 } 0032 0033 class xBaseConnectionInternal; 0034 class xBaseExportPrivate; 0035 0036 class xBaseExport : public KDbObject 0037 { 0038 Q_OBJECT 0039 public: 0040 0041 void setData(KexiMigration::Data* migrateData); 0042 0043 //! Exports data 0044 bool performExport(Kexi::ObjectStatus* result = 0); 0045 0046 protected: 0047 0048 xBaseExport(); 0049 0050 //! Connect to destination database 0051 bool dest_connect(); 0052 0053 //! Disconnect from destination database 0054 bool dest_disconnect(); 0055 0056 //! Create a table in the destination database 0057 bool dest_createTable(const QString& originalName, KDbTableSchema* tableSchema); 0058 0059 //! Copy table data from source to destination 0060 bool dest_copyTable(const QString& srcTableName, KDbConnection *srcConn, 0061 KDbTableSchema* srcTable); 0062 0063 //! Checks whether objectName is a system object name 0064 bool dest_isSystemObjectName(const QString& objectName); 0065 0066 KexiMigration::Data* m_migrateData; 0067 0068 private: 0069 xBaseExportPrivate* d; 0070 0071 friend class KDbxBaseConnectionInternal; 0072 }; 0073 0074 #endif //