KDEUI
kcrash.h
Go to the documentation of this file.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 <kdeui_export.h> 00026 00027 class QString; 00028 00038 namespace KCrash 00039 { 00044 KDEUI_EXPORT void defaultCrashHandler (int signal); 00045 00050 typedef void (*HandlerType)(int); 00051 00063 KDEUI_EXPORT void setCrashHandler (HandlerType handler = defaultCrashHandler); 00064 00069 KDEUI_EXPORT HandlerType crashHandler(); 00070 00078 KDEUI_EXPORT void setEmergencySaveFunction (HandlerType saveFunction = 0); 00079 00084 KDEUI_EXPORT HandlerType emergencySaveFunction(); 00085 00089 enum CrashFlag { 00090 KeepFDs = 1, 00091 SaferDialog = 2, 00092 AlwaysDirectly = 4, 00093 AutoRestart = 8 00094 }; 00095 Q_DECLARE_FLAGS(CrashFlags, CrashFlag) 00096 00097 00101 KDEUI_EXPORT void setFlags( CrashFlags flags ); 00102 00108 KDEUI_EXPORT void setApplicationPath (const QString &path); 00109 00115 KDEUI_EXPORT void setApplicationName (const QString &name); 00116 } 00117 00118 Q_DECLARE_OPERATORS_FOR_FLAGS(KCrash::CrashFlags) 00119 00120 #endif 00121