/***************************************************************************
                            qt_QImageDecoder.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_QImageDecoder.h"
}

#include <qasyncimageio.h>

class QImageDecoderBridge : public QImageDecoder
{
public:
	QImageDecoderBridge(QImageConsumer* c) : QImageDecoder(c) {}
	~QImageDecoderBridge() {}
};

qt_QImageDecoder * qt_new_QImageDecoder(qt_QImageConsumer* c){
	return (qt_QImageDecoder *) new QImageDecoderBridge((QImageConsumer*)c);
}
void qt_del_QImageDecoder( qt_QImageDecoder* p ){
	delete (QImageDecoderBridge*) p;
}
qt_QImage * qt_QImageDecoder_image( qt_QImageDecoder* instPointer){
	return (qt_QImage *) (const QImage *)&((QImageDecoderBridge*)instPointer)->image();
}
int qt_QImageDecoder_decode( qt_QImageDecoder* instPointer,unsigned char* buffer, int length){
	return (int) ((QImageDecoderBridge*)instPointer)->decode((uchar*)buffer, (int)length);
}
char* qt_QImageDecoder_formatName( unsigned char* buffer, int length){
	return (char*) QImageDecoderBridge::formatName((uchar*)buffer, (int)length);
}
qt_QImageFormatType* qt_QImageDecoder_format( char* name){
	return (qt_QImageFormatType*) QImageDecoderBridge::format((char*)name);
}
qt_QStrList * qt_QImageDecoder_inputFormats( ){
	return (qt_QStrList *)new QStrList(QImageDecoderBridge::inputFormats());
}
void qt_QImageDecoder_registerDecoderFactory( qt_QImageFormatType* arg1){
	QImageDecoderBridge::registerDecoderFactory((QImageFormatType*)arg1);
	return;
}
void qt_QImageDecoder_unregisterDecoderFactory( qt_QImageFormatType* arg1){
	QImageDecoderBridge::unregisterDecoderFactory((QImageFormatType*)arg1);
	return;
}
