• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

kcrash.h

00001 /*
00002  * This file is part of the KDE Libraries
00003  * Copyright (C) 2000 Timo Hummel <timo.hummel@sap.com>
00004  *                    Tom Braun <braunt@fh-konstanz.de>
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Library General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Library General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Library General Public License
00016  * along with this library; see the file COPYING.LIB.  If not, write to
00017  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019  *
00020  */
00021 
00022 #ifndef __KCRASH_H
00023 #define __KCRASH_H
00024 
00025 #include <tqstring.h>
00026 #include "tdelibs_export.h"
00027 
00037 class TDECORE_EXPORT TDECrash
00038 {
00039  private: // ;o)
00040   static const char *appName;
00041   static const char *appPath;
00042   static bool safer;
00043 
00044  public:
00049   static void defaultCrashHandler (int signal);
00050 
00055   typedef void (*HandlerType)(int);
00056 
00068   static void setCrashHandler (HandlerType handler = defaultCrashHandler);
00069 
00074   static HandlerType crashHandler() { return _crashHandler; }
00075 
00083   static void setEmergencySaveFunction (HandlerType saveFunction = (HandlerType)0);
00088   static HandlerType emergencySaveFunction() { return _emergencySaveFunction; }
00089 
00093   static void setSafer( bool on ) { safer = on; }
00094 
00100   static void setApplicationPath (TQString path) { appPath = tqstrdup(path.local8Bit().data()); }
00101   /* KDE 4: Make it const TQString & */
00102 
00108   static void setApplicationName (TQString name) { appName = tqstrdup(name.local8Bit().data()); }
00109   /* KDE 4: Make it const TQString & */
00110 
00111  protected:
00115   static HandlerType _crashHandler;
00119   static HandlerType _emergencySaveFunction;
00120   
00121  private:
00122    static void startDrKonqi( const char* argv[], int argc );
00123    static void startDirectly( const char* argv[], int argc );
00124 };
00125 
00126 #endif
00127 

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.7.1
This website is maintained by Timothy Pearson.