aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CMMCPConnection.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CMMCPConnection.h')
-rw-r--r--Source/CMMCPConnection.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/Source/CMMCPConnection.h b/Source/CMMCPConnection.h
index 584b8056..8473c962 100644
--- a/Source/CMMCPConnection.h
+++ b/Source/CMMCPConnection.h
@@ -26,15 +26,11 @@
#import <MCPKit_bundled/MCPKit_bundled.h>
#import "CMMCPResult.h"
-// Set the connection timeout to enforce for all connections - used for the initial connection
-// timeout and ping timeouts, but not for long queries/reads/writes.
-// Probably worth moving this to a preference at some point.
-#define SP_CONNECTION_TIMEOUT 10
-
@interface NSObject (CMMCPConnectionDelegate)
- (void)willQueryString:(NSString *)query;
- (void)queryGaveError:(NSString *)error;
+- (BOOL)connectionEncodingViaLatin1;
@end
@@ -49,6 +45,10 @@
NSString *connectionHost;
int connectionPort;
NSString *connectionSocket;
+ float lastQueryExecutionTime;
+ int connectionTimeout;
+ BOOL useKeepAlive;
+ float keepAliveInterval;
NSTimer *keepAliveTimer;
NSDate *lastKeepAliveSuccess;
@@ -66,6 +66,8 @@
- (void) setParentWindow:(NSWindow *)theWindow;
- (BOOL) selectDB:(NSString *) dbName;
- (CMMCPResult *) queryString:(NSString *) query;
+- (CMMCPResult *) queryString:(NSString *) query usingEncoding:(NSStringEncoding) encoding;
+- (float) lastQueryExecutionTime;
- (MCPResult *) listDBsLike:(NSString *) dbsName;
- (BOOL) checkConnection;
- (void) setDelegate:(id)object;
@@ -75,5 +77,6 @@
- (void) stopKeepAliveTimer;
- (void) keepAlive:(NSTimer *)theTimer;
- (void) threadedKeepAlive;
+- (const char *) cStringFromString:(NSString *) theString usingEncoding:(NSStringEncoding) encoding;
@end