/***************************************************************************
                            KCrash.m -  description
                             -------------------
    begin                : Fri Mar  8 13:55:08 2002
    copyright            : (C) 2000-2002 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Fri Mar  8 13:55:08 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.                       *
 *                                                                         *
 ***************************************************************************/

#include <qtc/qt_QString.h>
#include <qtc/qt_QCString.h>
#include <kdec/kde_KCrash.h>
#include <kdeobjc/KDESupport.h>
#include <kdeobjc/KCrash.h>

@implementation  KCrash

- (void *) qt
{
	return _qt;
}

- setQt: (void *) qt
{
	_qt = qt;
	return self;
}

- (BOOL) allocatedInObjcWorld
{
	return _allocatedInObjcWorld;
}

- setAllocatedInObjcWorld: (BOOL) yn
{
	_allocatedInObjcWorld = yn;
	return self;
}


//- (typedef) void: (* HandlerType)(int)arg1
//{
//	return (typedef) kde_KCrash_void((kde_KCrash *)[self qt], (* HandlerType)(int) arg1);
//}

+ defaultCrashHandler: (int)signal
{
	kde_KCrash_defaultCrashHandler((int)signal);
	return self;
}

//+ setCrashHandler: (HandlerType*)handler
//{
//	kde_KCrash_setCrashHandler((qt_HandlerType*) [handler qt]);
//	return self;
//}

//+ setCrashHandler
//{
//	kde_KCrash_setCrashHandler(defaultCrashHandler);
//	return self;
//}

//+ (HandlerType*) crashHandler
//{
//	return (HandlerType*) kde_KCrash_crashHandler();
//}

//+ setEmergencySaveFunction: (HandlerType saveFunction)0
//{
//	kde_KCrash_setEmergencySaveFunction((HandlerType saveFunction) 0);
//	return self;
//}

//+ setEmergencySaveFunction
//{
//	kde_KCrash_setEmergencySaveFunction((HandlerType));
//	return self;
//}

//+ (HandlerType*) emergencySaveFunction
//{
//	return (HandlerType*) kde_KCrash_emergencySaveFunction();
//}

+ setApplicationPath: (NSString *)path
{
static qt_QString * _qstring_path = 0L;
	kde_KCrash_setApplicationPath((qt_QString *) [path toQString: &_qstring_path]);
	return self;
}

+ setApplicationName: (NSString *)name
{
static qt_QString * _qstring_name = 0L;
	kde_KCrash_setApplicationName((qt_QString *) [name toQString: &_qstring_name]);
	return self;
}

@end
