From 50a283b6d1f3ce48e3a06eceeed3a466c6259fe7 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Sun, 15 Nov 2009 23:58:21 +0000 Subject: Implement query cancellation support within MCPKit, and add it to the task functionality: - MCPKit now supports cancelling the active query; for MySQL servers >= 5.0.0 a query kill is attempted from a new connection, and if that fails or for MySQL < 5 a reconnect is triggered. - TableDocument now supports enabling a cancel task button on the task interface, including an optional callback - Implement query cancellation for custom queries. This addresses Issue #86. - Implement query cancellation for table content loads, filters, and sorts. --- Source/TableDocument.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Source/TableDocument.h') diff --git a/Source/TableDocument.h b/Source/TableDocument.h index f9e96730..db4b48ae 100644 --- a/Source/TableDocument.h +++ b/Source/TableDocument.h @@ -138,6 +138,9 @@ float taskProgressValueDisplayInterval; NSTimer *taskDrawTimer; NSViewAnimation *taskFadeAnimator; + BOOL taskCanBeCancelled; + id taskCancellationCallbackObject; + SEL taskCancellationCallbackSelector; NSToolbar *mainToolbar; NSToolbarItem *chooseDatabaseToolbarItem; @@ -186,6 +189,9 @@ - (void) setTaskPercentage:(float)taskPercentage; - (void) setTaskProgressToIndeterminate; - (void) endTask; +- (void) enableTaskCancellationWithTitle:(NSString *)buttonTitle callbackObject:(id)callbackObject callbackFunction:(SEL)callbackFunction; +- (void) disableTaskCancellation; +- (IBAction) cancelTask:(id)sender; - (BOOL) isWorking; - (void) setDatabaseListIsSelectable:(BOOL)isSelectable; - (void) centerTaskWindow; -- cgit v1.2.3