1 /* Copyright (C) 2005-2011 Fabio Riccardi */ 2 3 #import <Cocoa/Cocoa.h> 4 5 /** 6 * Define if we're to check a web site to obtain the latest version of the 7 * application and, if the version that crashed is older, forbid submitting 8 * crash reports. 9 */ 10 /* #define FORBID_OLD_VERSIONS */ 11 12 /** 13 * A CrashController is the main class for this application. 14 */ 15 @interface CrashController : NSObject 16 { 17 IBOutlet NSTextView* descriptionText; 18 IBOutlet NSButton* detailsOKButton; 19 IBOutlet NSPanel* detailsPanel; 20 IBOutlet NSTextView* detailsText; 21 IBOutlet NSWindow* mainWindow; 22 IBOutlet NSProgressIndicator* progressIndicator; 23 IBOutlet NSButton* sendButton; 24 IBOutlet NSButton* showDetailsButton; 25 IBOutlet NSTextField* statusText; 26 27 NSString* crashedAppName; 28 NSString* crashedAppBuild; 29 NSAppleScript* killAppleCrashReporterScript; 30 NSString* logContents; 31 #ifdef FORBID_OLD_VERSIONS 32 NSString* latestAppBuild; 33 #endif 34 } 35 36 - (IBAction) hideDetails: 37 (id)sender; 38 39 - (void) interactWithUser; 40 41 - (void) quit; 42 43 - (BOOL) readCrashedAppInfo; 44 45 - (BOOL) readCrashLog: 46 (NSString*)logPath; 47 48 - (IBAction) sendReport: 49 (id)sender; 50 51 - (void) setStatusMessage: 52 (NSString*)message; 53 54 - (int) showAlert: 55 (NSString*)msg 56 info:(NSString*)info 57 localizeInfo:(BOOL)localizeInfo 58 button1:(NSString*)button1 59 button2:(NSString*)button2; 60 61 - (IBAction) showDetails: 62 (id)sender; 63 64 - (void) startTask: 65 (NSString*)message; 66 67 - (void) stopTask; 68 69 - (void) waitForCrashLog: 70 (NSTimer*)timer; 71 72 #ifdef FORBID_OLD_VERSIONS 73 74 - (BOOL) fetchLatestAppVersion; 75 76 - (void) showOldVersionAlertAndQuit; 77 78 #endif /* FORBID_OLD_VERSIONS */ 79 80 @end 81 /* vim:set et sw=4 ts=4: */ 82