/***************************************************************************
                            qt_QSqlDriver.cpp -  description
                             -------------------
    begin                : Tue Nov 20 20:51:20 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Tue Nov 20 20:51:20 2001, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This library is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU Library General Public License as       *
 *   published by the Free Software Foundation; either version 2 of the    *
 *   License, or (at your option) any later version.                       *
 *                                                                         *
 ***************************************************************************/

extern "C" {
#include "qt_QSqlDriver.h"
}

#include <qsqldriver.h>

void qt_del_QSqlDriver( qt_QSqlDriver* p ){
	delete (QSqlDriver*) p;
}
int qt_QSqlDriver_isOpen( qt_QSqlDriver* instPointer){
	return (int) ((QSqlDriver*)instPointer)->isOpen();
}
int qt_QSqlDriver_isOpenError( qt_QSqlDriver* instPointer){
	return (int) ((QSqlDriver*)instPointer)->isOpenError();
}
int qt_QSqlDriver_beginTransaction( qt_QSqlDriver* instPointer){
	return (int) ((QSqlDriver*)instPointer)->beginTransaction();
}
int qt_QSqlDriver_commitTransaction( qt_QSqlDriver* instPointer){
	return (int) ((QSqlDriver*)instPointer)->commitTransaction();
}
int qt_QSqlDriver_rollbackTransaction( qt_QSqlDriver* instPointer){
	return (int) ((QSqlDriver*)instPointer)->rollbackTransaction();
}
qt_QStringList* qt_QSqlDriver_tables( qt_QSqlDriver* instPointer,qt_QString * user){
	return (qt_QStringList*)new QStringList(((QSqlDriver*)instPointer)->tables((QString&)* (QString*)user));
}
qt_QSqlIndex* qt_QSqlDriver_primaryIndex( qt_QSqlDriver* instPointer,qt_QString * tableName){
	return (qt_QSqlIndex*)new QSqlIndex(((QSqlDriver*)instPointer)->primaryIndex((QString&)* (QString*)tableName));
}
qt_QSqlRecord* qt_QSqlDriver_record( qt_QSqlDriver* instPointer,qt_QString * tableName){
	return (qt_QSqlRecord*)new QSqlRecord(((QSqlDriver*)instPointer)->record((QString&)* (QString*)tableName));
}
qt_QSqlRecord* qt_QSqlDriver_record1( qt_QSqlDriver* instPointer,qt_QSqlQuery* query){
	return (qt_QSqlRecord*)new QSqlRecord(((QSqlDriver*)instPointer)->record((QSqlQuery&)* (QSqlQuery*)query));
}
//qt_QSqlRecordInfo* qt_QSqlDriver_recordInfo( qt_QSqlDriver* instPointer,qt_QString * tablename){
//	return (qt_QSqlRecordInfo*)new QSqlRecordInfo(((QSqlDriver*)instPointer)->recordInfo((QString&)* (QString*)tablename));
//}
//qt_QSqlRecordInfo* qt_QSqlDriver_recordInfo1( qt_QSqlDriver* instPointer,qt_QSqlQuery* query){
//	return (qt_QSqlRecordInfo*)new QSqlRecordInfo(((QSqlDriver*)instPointer)->recordInfo((QSqlQuery&)* (QSqlQuery*)query));
//}
qt_QString * qt_QSqlDriver_nullText( qt_QSqlDriver* instPointer){
	return (qt_QString *)new QString(((QSqlDriver*)instPointer)->nullText());
}
qt_QString * qt_QSqlDriver_formatValue( qt_QSqlDriver* instPointer,qt_QSqlField* field, int trimStrings){
	return (qt_QString *)new QString(((QSqlDriver*)instPointer)->formatValue((QSqlField*)field, (bool)trimStrings));
}
qt_QSqlError* qt_QSqlDriver_lastError( qt_QSqlDriver* instPointer){
	return (qt_QSqlError*)new QSqlError(((QSqlDriver*)instPointer)->lastError());
}
int qt_QSqlDriver_hasFeature( qt_QSqlDriver* instPointer,int f){
	return (int) ((QSqlDriver*)instPointer)->hasFeature((QSqlDriver::DriverFeature)f);
}
int qt_QSqlDriver_open( qt_QSqlDriver* instPointer,qt_QString * db, qt_QString * user, qt_QString * password, qt_QString * host, int port){
	return (int) ((QSqlDriver*)instPointer)->open((QString&)* (QString*)db, (QString&)* (QString*)user, (QString&)* (QString*)password, (QString&)* (QString*)host, (int)port);
}
void qt_QSqlDriver_close( qt_QSqlDriver* instPointer){
	((QSqlDriver*)instPointer)->close();
	return;
}
qt_QSqlQuery* qt_QSqlDriver_createQuery( qt_QSqlDriver* instPointer){
	return (qt_QSqlQuery*)new QSqlQuery(((QSqlDriver*)instPointer)->createQuery());
}
