-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathBugSplatCrashReportWindow.h
More file actions
92 lines (74 loc) · 2.38 KB
/
BugSplatCrashReportWindow.h
File metadata and controls
92 lines (74 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
//
// BugSplatCrashReportWindow.h
//
// Copyright © BugSplat, LLC. All rights reserved.
//
#import <TargetConditionals.h>
#if TARGET_OS_OSX
#import <Cocoa/Cocoa.h>
NS_ASSUME_NONNULL_BEGIN
/**
* User action from the crash report dialog.
*/
typedef NS_ENUM(NSUInteger, BugSplatUserAction) {
BugSplatUserActionSend,
BugSplatUserActionCancel
};
/**
* Completion handler for crash report dialog.
*
* @param action The action the user took (send or cancel).
* @param userName The name entered by the user (may be nil).
* @param userEmail The email entered by the user (may be nil).
* @param comments The comments entered by the user (may be nil).
*/
typedef void(^BugSplatCrashReportCompletion)(BugSplatUserAction action,
NSString * _Nullable userName,
NSString * _Nullable userEmail,
NSString * _Nullable comments);
/**
* Window controller for the crash report dialog.
* Displays a user-friendly interface for submitting crash reports.
*/
@interface BugSplatCrashReportWindow : NSWindowController
/**
* The application name to display in the dialog.
*/
@property (nonatomic, copy) NSString *applicationName;
/**
* Custom banner image to display at the top of the dialog.
* If nil, a default BugSplat logo will be used if available.
*/
@property (nonatomic, strong, nullable) NSImage *bannerImage;
/**
* The crash report text to show in the details view.
*/
@property (nonatomic, copy, nullable) NSString *crashReportText;
/**
* Whether to show the name and email fields.
* Default is YES.
*/
@property (nonatomic, assign) BOOL askUserDetails;
/**
* Pre-filled user name (from persisted data).
*/
@property (nonatomic, copy, nullable) NSString *prefillUserName;
/**
* Pre-filled user email (from persisted data).
*/
@property (nonatomic, copy, nullable) NSString *prefillUserEmail;
/**
* Shows the crash report dialog and calls completion when user makes a choice.
*
* @param completion Called when user clicks Send or Cancel.
*/
- (void)showWithCompletion:(BugSplatCrashReportCompletion)completion;
/**
* Shows the dialog modally, blocking until user makes a choice.
*
* @param completion Called when user clicks Send or Cancel.
*/
- (void)showModalWithCompletion:(BugSplatCrashReportCompletion)completion;
@end
NS_ASSUME_NONNULL_END
#endif