/***************************************************************************
                            kde_KTempFile.cpp -  description
                             -------------------
    begin                : Wed Feb  6 15:12:26 2002
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Feb  6 15:12:26 2002, 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 "kde_KTempFile.h"
}

#include <ktempfile.h>

class KTempFileBridge : public KTempFile
{
public:
	KTempFileBridge(QString filePrefix, QString fileExtension, int mode) : KTempFile(filePrefix, fileExtension, mode) {}
	~KTempFileBridge() {}
	KTempFileBridge(bool arg1) : KTempFile(arg1) {}
	bool  protected_create(const QString& filePrefix, const QString& fileExtension, int mode) {
		return (bool ) KTempFile::create(filePrefix, fileExtension, mode);
	}
	void protected_setError(int error) {
		KTempFile::setError(error);
		return;
	}
};

kde_KTempFile * kde_new_KTempFile(qt_QString * filePrefix, qt_QString * fileExtension, int mode){
	return (kde_KTempFile *) new KTempFileBridge((QString)* (QString*)filePrefix, (QString)* (QString*)fileExtension, (int)mode);
}
void kde_del_KTempFile( kde_KTempFile* p ){
	delete (KTempFileBridge*) p;
}
void kde_KTempFile_setAutoDelete( kde_KTempFile* instPointer,int autoDelete){
	((KTempFileBridge*)instPointer)->setAutoDelete((bool)autoDelete);
	return;
}
int kde_KTempFile_status( kde_KTempFile* instPointer){
	return (int) ((KTempFileBridge*)instPointer)->status();
}
qt_QString * kde_KTempFile_name( kde_KTempFile* instPointer){
	return (qt_QString *)new QString(((KTempFileBridge*)instPointer)->name());
}
int kde_KTempFile_handle( kde_KTempFile* instPointer){
	return (int) ((KTempFileBridge*)instPointer)->handle();
}
FILE* kde_KTempFile_fstream( kde_KTempFile* instPointer){
	return (FILE*) ((KTempFileBridge*)instPointer)->fstream();
}
qt_QTextStream* kde_KTempFile_textStream( kde_KTempFile* instPointer){
	return (qt_QTextStream*) ((KTempFileBridge*)instPointer)->textStream();
}
qt_QDataStream* kde_KTempFile_dataStream( kde_KTempFile* instPointer){
	return (qt_QDataStream*) ((KTempFileBridge*)instPointer)->dataStream();
}
qt_QFile* kde_KTempFile_file( kde_KTempFile* instPointer){
	return (qt_QFile*) ((KTempFileBridge*)instPointer)->file();
}
void kde_KTempFile_unlink( kde_KTempFile* instPointer){
	((KTempFileBridge*)instPointer)->unlink();
	return;
}
int kde_KTempFile_close( kde_KTempFile* instPointer){
	return (int) ((KTempFileBridge*)instPointer)->close();
}
kde_KTempFile * kde_new_KTempFile1(int arg1){
	return (kde_KTempFile *) new KTempFileBridge((bool)arg1);
}
int kde_KTempFile_create( kde_KTempFile* instPointer,qt_QString * filePrefix, qt_QString * fileExtension, int mode){
	return (int) ((KTempFileBridge*)instPointer)->protected_create((QString&)* (QString*)filePrefix, (QString&)* (QString*)fileExtension, (int)mode);
}
void kde_KTempFile_setError( kde_KTempFile* instPointer,int error){
	((KTempFileBridge*)instPointer)->protected_setError((int)error);
	return;
}
