Skip to content

Commit

Permalink
Merge branch 'release/2.1.5'
Browse files Browse the repository at this point in the history
* release/2.1.5:
  Clean up the Mac UI and Manager interface and move them into their own files
  Fix indenting on Mac files
  Fix bugs in Mac client
  Update copyright years in license file
  • Loading branch information
DerAndereAndi committed Feb 29, 2012
2 parents 17ac193 + dd5cf6d commit 171c947
Show file tree
Hide file tree
Showing 11 changed files with 555 additions and 489 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
QuincyKit is provided under the following license:

The MIT License
Copyright (c) 2011 Andreas Linde. All rights reserved.
Copyright (c) 2011-2012 Andreas Linde. All rights reserved.

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand Down
172 changes: 61 additions & 111 deletions client/Mac/BWQuincyManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,72 +29,69 @@

#import <Cocoa/Cocoa.h>

#define CRASHREPORTSENDER_MAX_CONSOLE_SIZE 50000

typedef enum CrashAlertType {
CrashAlertTypeSend = 0,
CrashAlertTypeFeedback = 1,
CrashAlertTypeSend = 0,
CrashAlertTypeFeedback = 1,
} CrashAlertType;

typedef enum CrashReportStatus {
// This app version is set to discontinued, no new crash reports accepted by the server
CrashReportStatusFailureVersionDiscontinued = -30,
// This app version is set to discontinued, no new crash reports accepted by the server
CrashReportStatusFailureVersionDiscontinued = -30,

// XML: Sender ersion string contains not allowed characters, only alphanumberical including space and . are allowed
CrashReportStatusFailureXMLSenderVersionNotAllowed = -21,
// XML: Sender ersion string contains not allowed characters, only alphanumberical including space and . are allowed
CrashReportStatusFailureXMLSenderVersionNotAllowed = -21,

// XML: Version string contains not allowed characters, only alphanumberical including space and . are allowed
CrashReportStatusFailureXMLVersionNotAllowed = -20,
// XML: Version string contains not allowed characters, only alphanumberical including space and . are allowed
CrashReportStatusFailureXMLVersionNotAllowed = -20,

// SQL for adding a symoblicate todo entry in the database failed
CrashReportStatusFailureSQLAddSymbolicateTodo = -18,
// SQL for adding a symoblicate todo entry in the database failed
CrashReportStatusFailureSQLAddSymbolicateTodo = -18,

// SQL for adding crash log in the database failed
CrashReportStatusFailureSQLAddCrashlog = -17,
// SQL for adding crash log in the database failed
CrashReportStatusFailureSQLAddCrashlog = -17,

// SQL for adding a new version in the database failed
CrashReportStatusFailureSQLAddVersion = -16,
// SQL for checking if the version is already added in the database failed
CrashReportStatusFailureSQLCheckVersionExists = -15,
// SQL for creating a new pattern for this bug and set amount of occurrances to 1 in the database failed
CrashReportStatusFailureSQLAddPattern = -14,
// SQL for checking the status of the bugfix version in the database failed
CrashReportStatusFailureSQLCheckBugfixStatus = -13,
// SQL for updating the occurances of this pattern in the database failed
CrashReportStatusFailureSQLUpdatePatternOccurances = -12,
// SQL for getting all the known bug patterns for the current app version in the database failed
CrashReportStatusFailureSQLFindKnownPatterns = -11,
// SQL for finding the bundle identifier in the database failed
CrashReportStatusFailureSQLSearchAppName = -10,
// the post request didn't contain valid data
CrashReportStatusFailureInvalidPostData = -3,
// incoming data may not be added, because e.g. bundle identifier wasn't found
CrashReportStatusFailureInvalidIncomingData = -2,
// database cannot be accessed, check hostname, username, password and database name settings in config.php
CrashReportStatusFailureDatabaseNotAvailable = -1,
CrashReportStatusUnknown = 0,
CrashReportStatusAssigned = 1,
CrashReportStatusSubmitted = 2,
CrashReportStatusAvailable = 3,
// SQL for adding a new version in the database failed
CrashReportStatusFailureSQLAddVersion = -16,
// SQL for checking if the version is already added in the database failed
CrashReportStatusFailureSQLCheckVersionExists = -15,
// SQL for creating a new pattern for this bug and set amount of occurrances to 1 in the database failed
CrashReportStatusFailureSQLAddPattern = -14,
// SQL for checking the status of the bugfix version in the database failed
CrashReportStatusFailureSQLCheckBugfixStatus = -13,
// SQL for updating the occurances of this pattern in the database failed
CrashReportStatusFailureSQLUpdatePatternOccurances = -12,
// SQL for getting all the known bug patterns for the current app version in the database failed
CrashReportStatusFailureSQLFindKnownPatterns = -11,
// SQL for finding the bundle identifier in the database failed
CrashReportStatusFailureSQLSearchAppName = -10,
// the post request didn't contain valid data
CrashReportStatusFailureInvalidPostData = -3,
// incoming data may not be added, because e.g. bundle identifier wasn't found
CrashReportStatusFailureInvalidIncomingData = -2,
// database cannot be accessed, check hostname, username, password and database name settings in config.php
CrashReportStatusFailureDatabaseNotAvailable = -1,
CrashReportStatusUnknown = 0,
CrashReportStatusAssigned = 1,
CrashReportStatusSubmitted = 2,
CrashReportStatusAvailable = 3,
} CrashReportStatus;


@class BWQuincyUI;

// This protocol is used to send the image updates
@protocol BWQuincyManagerDelegate <NSObject>

@required
Expand All @@ -107,36 +104,34 @@ typedef enum CrashReportStatus {
// Return the description the crashreport should contain, empty by default. The string will automatically be wrapped into <[DATA[ ]]>, so make sure you don't do that in your string.
-(NSString *) crashReportDescription;

@optional

// Return the userid the crashreport should contain, empty by default
-(NSString *) crashReportUserID;

// Return the contact value (e.g. email) the crashreport should contain, empty by default
-(NSString *) crashReportContact;
@end


@interface BWQuincyManager : NSObject
#if defined(MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
<NSXMLParserDelegate>
#endif
{
CrashReportStatus _serverResult;

NSInteger _statusCode;
CrashReportStatus _serverResult;
NSInteger _statusCode;

NSMutableString *_contentOfProperty;
NSMutableString *_contentOfProperty;

id _delegate;
id<BWQuincyManagerDelegate> _delegate;

NSString *_submissionURL;
NSString *_companyName;
NSString *_appIdentifier;
BOOL _autoSubmitCrashReport;
NSString *_submissionURL;
NSString *_companyName;
NSString *_appIdentifier;
BOOL _autoSubmitCrashReport;

NSString *_crashFile;
BWQuincyUI *_quincyUI;
NSString *_crashFile;
BWQuincyUI *_quincyUI;
}

- (NSString*) modelVersion;
Expand Down Expand Up @@ -172,48 +167,3 @@ typedef enum CrashReportStatus {
- (NSString *) applicationVersion;

@end


@interface BWQuincyUI : NSWindowController {
IBOutlet NSTextField *descriptionTextField;
IBOutlet NSTextView *crashLogTextView;

IBOutlet NSTextField *noteText;

IBOutlet NSButton *showButton;
IBOutlet NSButton *hideButton;
IBOutlet NSButton *cancelButton;
IBOutlet NSButton *submitButton;

BWQuincyManager *_delegate;

NSString *_xml;

NSString *_crashFile;
NSString *_companyName;
NSString *_applicationName;

NSMutableString *_consoleContent;
NSString *_crashLogContent;

BOOL showComments;
BOOL showDetails;
}

- (id)init:(id)delegate crashFile:(NSString *)crashFile companyName:(NSString *)companyName applicationName:(NSString *)applicationName;

- (void) askCrashReportDetails;

- (IBAction) cancelReport:(id)sender;
- (IBAction) submitReport:(id)sender;
- (IBAction) showDetails:(id)sender;
- (IBAction) hideDetails:(id)sender;
- (IBAction) showComments:(id)sender;

- (BOOL)showComments;
- (void)setShowComments:(BOOL)value;

- (BOOL)showDetails;
- (void)setShowDetails:(BOOL)value;

@end
Loading

0 comments on commit 171c947

Please sign in to comment.