/***************************************************************************
                            kde_KCrash.h -  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.                       *
 *                                                                         *
 ***************************************************************************/

#ifndef KDE_KCRASH
#define KDE_KCRASH

#include <qtc/qtc_types.h>

#include <kdec/kde_types.h>

/**

 This class handles segmentation-faults.
 By default it displays a  message-box saying the application crashed.
 This default can be overridden by setting a custom crash handler with
 @ref setCrashHandler().
 If a function is specified with @ref setEmergencySaveFunction() it will
 be called by the default crash handler, giving the application a chance
 to save its data.
 
 @short 
 This class handles segmentation-faults.
*/
//typedef kde_KCrash_void(kde_KCrash* instPointer,* HandlerType)(int arg1);
void kde_KCrash_defaultCrashHandler( int signal);

/** 
 Install a function to be called in case a SIGSEGV is caught.

*/
//void kde_KCrash_setCrashHandler( qt_HandlerType* handler);

/** 
 Returns the installed crash handler
   
*/
//qt_HandlerType* kde_KCrash_crashHandler( );

/** 
 Installs a function which should try to save the applications data.
 It is the crash handler´s responsibility to call this function.
 Therefore, if no crash handler is set, the default crash handler
 is installed to ensure the save function is called.
   
*/
//void kde_KCrash_setEmergencySaveFunction( HandlerType saveFunction 0);

/** 
 Return the currently set emergency save function.
   
*/
//qt_HandlerType* kde_KCrash_emergencySaveFunction( );

/** 
 Sets the application path @p path which should be passed to
 Dr. Konqi, our nice crash display application.
   
*/
void kde_KCrash_setApplicationPath( qt_QString * path);

/** 
 Sets the application name @p name which should be passed to
 Dr. Konqi, our nice crash display application.
   
*/
void kde_KCrash_setApplicationName( qt_QString * name);

#endif
