Skip to content
Newer
Older
100644 89 lines (71 sloc) 2.84 KB
dc5be1c Initial check-in.
uli authored Jul 4, 2009
1 //
2 // UKCrashReporter.h
3 // NiftyFeatures
4 //
5 // Created by Uli Kusterer on Sat Feb 04 2006.
720b0e7 @uliwitness Added licensing information to the source files.
authored Mar 4, 2010
6 // Copyright (c) 2006 Uli Kusterer.
7 //
8 // This software is provided 'as-is', without any express or implied
9 // warranty. In no event will the authors be held liable for any damages
10 // arising from the use of this software.
11 //
12 // Permission is granted to anyone to use this software for any purpose,
13 // including commercial applications, and to alter it and redistribute it
14 // freely, subject to the following restrictions:
15 //
16 // 1. The origin of this software must not be misrepresented; you must not
17 // claim that you wrote the original software. If you use this software
18 // in a product, an acknowledgment in the product documentation would be
19 // appreciated but is not required.
20 //
21 // 2. Altered source versions must be plainly marked as such, and must not be
22 // misrepresented as being the original software.
23 //
24 // 3. This notice may not be removed or altered from any source
25 // distribution.
dc5be1c Initial check-in.
uli authored Jul 4, 2009
26 //
27
28 // -----------------------------------------------------------------------------
29 // Headers:
30 // -----------------------------------------------------------------------------
31
32 #import <Foundation/Foundation.h>
33 #import "UKNibOwner.h"
34
35
36 // -----------------------------------------------------------------------------
37 // Prototypes:
38 // -----------------------------------------------------------------------------
39
40 /* Call this sometime during startup (e.g. in applicationDidLaunch) and it'll
41 check for a new crash log and offer to the user to send it.
42
43 The crash log is sent to a CGI script whose URL you specify in the
44 UKUpdateChecker.strings file. If you want, you can even have different
45 URLs for different locales that way, in case a crash is caused by an error
46 in a localized file.
47 */
48 void UKCrashReporterCheckForCrash();
49
50
51 // -----------------------------------------------------------------------------
52 // Classes:
53 // -----------------------------------------------------------------------------
54
55 @interface UKCrashReporter : UKNibOwner
56 {
57 IBOutlet NSWindow* reportWindow;
58 IBOutlet NSTextView* informationField;
59 IBOutlet NSTextView* crashLogField;
60 IBOutlet NSTextField* explanationField;
61 IBOutlet NSProgressIndicator* progressIndicator;
62 IBOutlet NSButton* sendButton;
63 IBOutlet NSButton* remindButton;
64 IBOutlet NSButton* discardButton;
65 IBOutlet NSTabView* switchTabView;
66 NSURLConnection* connection;
67 BOOL feedbackMode;
68 }
69
70 -(id) initWithLogString: (NSString*)theLog;
71 -(id) init; // This gives you a feedback window instead of a crash reporter.
72
73 -(IBAction) sendCrashReport: (id)sender;
74 -(IBAction) remindMeLater: (id)sender;
75 -(IBAction) discardCrashReport: (id)sender;
76
77 @end
78
79
80 @interface UKFeedbackProvider : NSObject
81 {
82
83 }
84
85 -(IBAction) orderFrontFeedbackWindow: (id)sender;
86 -(IBAction) orderFrontBugReportWindow: (id)sender;
87
88 @end
Something went wrong with that request. Please try again.