aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.h
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-10-20 20:08:08 +0000
committerstuconnolly <stuart02@gmail.com>2010-10-20 20:08:08 +0000
commitc92776958cb5d5fca8f165e9bac043e5a91521dc (patch)
tree9146f7a5f62b799eadf8126f3b3708284e940fd8 /Frameworks/MCPKit/MCPFoundationKit/MCPConnection.h
parent3b92b30ca625eff33df49b538e3c4f2da7a9cf09 (diff)
downloadsequelpro-c92776958cb5d5fca8f165e9bac043e5a91521dc.tar.gz
sequelpro-c92776958cb5d5fca8f165e9bac043e5a91521dc.tar.bz2
sequelpro-c92776958cb5d5fca8f165e9bac043e5a91521dc.zip
Split MCPConnection's delegate methods into it's own protocol.
Diffstat (limited to 'Frameworks/MCPKit/MCPFoundationKit/MCPConnection.h')
-rw-r--r--Frameworks/MCPKit/MCPFoundationKit/MCPConnection.h98
1 files changed, 9 insertions, 89 deletions
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.h b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.h
index 609830ce..ad30fa07 100644
--- a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.h
+++ b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.h
@@ -38,101 +38,21 @@ typedef struct {
BOOL *lastPingSuccessPointer;
} MCPConnectionPingDetails;
-@protocol MCPConnectionProxy;
-
@class MCPResult, MCPStreamingResult;
-
-@interface NSObject (MCPConnectionDelegate)
-
-/**
- *
- */
-- (void)willQueryString:(NSString *)query connection:(id)connection;
-
-/**
- *
- */
-- (void)queryGaveError:(NSString *)error connection:(id)connection;
-
-/**
- *
- */
-- (void)showErrorWithTitle:(NSString *)error message:(NSString *)connection;
-
-/**
- *
- */
-- (NSString *)keychainPasswordForConnection:(id)connection;
-
-/**
- *
- */
-- (NSString *)onReconnectShouldSelectDatabase:(id)connection;
-
-/**
- *
- */
-- (void)noConnectionAvailable:(id)connection;
-
-/**
- *
- */
-- (MCPConnectionCheck)connectionLost:(id)connection;
-
-/**
- *
- */
-- (NSString *)connectionID;
-
-/**
- *
- */
-- (NSString *)database;
-
-/**
- *
- */
-- (BOOL)navigatorSchemaPathExistsForDatabase:(NSString*)dbname;
-
-/**
- *
- */
-- (NSArray*)allDatabaseNames;
-
-/**
- *
- */
-- (NSArray*)allSystemDatabaseNames;
-
-/**
- *
- */
-- (NSArray*)allTableNames;
-
-/**
- *
- */
-- (NSArray*)allViewNames;
-
-/**
- *
- */
-- (NSArray*)allSchemaKeys;
-
-@end
+@protocol MCPConnectionProxy, MCPConnectionDelegate;
@interface MCPConnection : NSObject
{
- MYSQL *mConnection; /* The inited MySQL connection. */
- BOOL mConnected; /* Reflect the fact that the connection is already in place or not. */
- NSStringEncoding mEncoding; /* The encoding used by MySQL server, to ISO-1 default. */
- NSTimeZone *mTimeZone; /* The time zone of the session. */
- NSUInteger mConnectionFlags; /* The flags to be used for the connection to the database. */
+ MYSQL *mConnection;
+ BOOL mConnected;
+ NSStringEncoding mEncoding;
+ NSTimeZone *mTimeZone;
+ NSUInteger mConnectionFlags;
- id delegate; /* Connection delegate */
+ id <MCPConnectionDelegate> delegate;
- /* Anything that performs a mysql_net_read is not thread-safe: mysql queries, pings */
- /* Always lock the connection first. Don't use this lock directly, use the lockConnection method! */
+ // Anything that performs a mysql_net_read is not thread-safe: mysql queries, pings
+ // Always lock the connection first. Don't use this lock directly, use the lockConnection method!
NSConditionLock *connectionLock;
BOOL useKeepAlive;