/***************************************************************************
                            qt_QFile.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_QFile.h"
}

#include <qfile.h>

class QFileBridge : public QFile
{
public:
	QFileBridge() : QFile() {}
	QFileBridge(const QString& name) : QFile(name) {}
	~QFileBridge() {}
};

qt_QFile * qt_new_QFile(){
	return (qt_QFile *) new QFileBridge();
}
qt_QFile * qt_new_QFile1(qt_QString * name){
	return (qt_QFile *) new QFileBridge((QString&)* (QString*)name);
}
void qt_del_QFile( qt_QFile* p ){
	delete (QFileBridge*) p;
}
qt_QString * qt_QFile_name( qt_QFile* instPointer){
	return (qt_QString *)new QString(((QFileBridge*)instPointer)->name());
}
void qt_QFile_setName( qt_QFile* instPointer,qt_QString * name){
	((QFileBridge*)instPointer)->setName((QString&)* (QString*)name);
	return;
}
//typedef qt_QFile_QCString( qt_QFile* instPointer,* EncoderFn)( QString fileName){
//	return (typedef) ((QFileBridge*)instPointer)->QCString((* EncoderFn)( QString&)fileName);
//}
//typedef qt_QFile_QString( qt_QFile* instPointer,* DecoderFn)( QCString localfileName){
//	return (typedef) ((QFileBridge*)instPointer)->QString((* DecoderFn)( QCString&)localfileName);
//}
int qt_QFile_exists( qt_QFile* instPointer){
	return (int) ((QFileBridge*)instPointer)->exists();
}
int qt_QFile_remove( qt_QFile* instPointer){
	return (int) ((QFileBridge*)instPointer)->remove();
}
int qt_QFile_open( qt_QFile* instPointer,int arg1){
	return (int) ((QFileBridge*)instPointer)->open((int)arg1);
}
int qt_QFile_open1( qt_QFile* instPointer,int arg1, FILE* arg2){
	return (int) ((QFileBridge*)instPointer)->open((int)arg1, (FILE*)arg2);
}
int qt_QFile_open2( qt_QFile* instPointer,int arg1, int arg2){
	return (int) ((QFileBridge*)instPointer)->open((int)arg1, (int)arg2);
}
void qt_QFile_close( qt_QFile* instPointer){
	((QFileBridge*)instPointer)->close();
	return;
}
void qt_QFile_flush( qt_QFile* instPointer){
	((QFileBridge*)instPointer)->flush();
	return;
}
int qt_QFile_size( qt_QFile* instPointer){
	return (int) ((QFileBridge*)instPointer)->size();
}
int qt_QFile_at( qt_QFile* instPointer){
	return (int) ((QFileBridge*)instPointer)->at();
}
int qt_QFile_at1( qt_QFile* instPointer,int arg1){
	return (int) ((QFileBridge*)instPointer)->at((QFile::Offset)arg1);
}
int qt_QFile_atEnd( qt_QFile* instPointer){
	return (int) ((QFileBridge*)instPointer)->atEnd();
}
long qt_QFile_readBlock( qt_QFile* instPointer,char* data, long len){
	return (long) ((QFileBridge*)instPointer)->readBlock((char*)data, (Q_ULONG)len);
}
long qt_QFile_writeBlock( qt_QFile* instPointer,char* data, long len){
	return (long) ((QFileBridge*)instPointer)->writeBlock((char*)data, (Q_ULONG)len);
}
long qt_QFile_writeBlock1( qt_QFile* instPointer,qt_QByteArray* data){
	return (long) ((QFileBridge*)instPointer)->writeBlock((QByteArray&)* (QByteArray*)data);
}
long qt_QFile_readLine( qt_QFile* instPointer,char* data, long maxlen){
	return (long) ((QFileBridge*)instPointer)->readLine((char*)data, (Q_ULONG)maxlen);
}
long qt_QFile_readLine1( qt_QFile* instPointer,qt_QString * arg1, long maxlen){
	return (long) ((QFileBridge*)instPointer)->readLine((QString&)* (QString*)arg1, (Q_ULONG)maxlen);
}
int qt_QFile_getch( qt_QFile* instPointer){
	return (int) ((QFileBridge*)instPointer)->getch();
}
int qt_QFile_putch( qt_QFile* instPointer,int arg1){
	return (int) ((QFileBridge*)instPointer)->putch((int)arg1);
}
int qt_QFile_ungetch( qt_QFile* instPointer,int arg1){
	return (int) ((QFileBridge*)instPointer)->ungetch((int)arg1);
}
int qt_QFile_handle( qt_QFile* instPointer){
	return (int) ((QFileBridge*)instPointer)->handle();
}
qt_QCString* qt_QFile_encodeName( qt_QString * fileName){
	return (qt_QCString*)new QCString(QFileBridge::encodeName((QString&)* (QString*)fileName));
}
qt_QString * qt_QFile_decodeName( qt_QCString* localFileName){
	return (qt_QString *)new QString(QFileBridge::decodeName((QCString&)* (QCString*)localFileName));
}
//void qt_QFile_setEncodingFunction( int arg1){
//	QFileBridge::setEncodingFunction((EncoderFn)arg1);
//	return;
//}
//void qt_QFile_setDecodingFunction( int arg1){
//	QFileBridge::setDecodingFunction((DecoderFn)arg1);
//	return;
//}
int qt_QFile_exists1( qt_QString * fileName){
	return (int) QFileBridge::exists((QString&)* (QString*)fileName);
}
int qt_QFile_remove1( qt_QString * fileName){
	return (int) QFileBridge::remove((QString&)* (QString*)fileName);
}
