aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDocument.h
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2009-07-21 16:47:11 +0000
committerstuconnolly <stuart02@gmail.com>2009-07-21 16:47:11 +0000
commit8b8f3e6cea540b17262aadf6d97a8ad28fe41c03 (patch)
treead6bb7f53b03924aa24d0cf5822a27b3bd453592 /Source/TableDocument.h
parent383863f98dfc488db0181e01d39da1bb025d421b (diff)
downloadsequelpro-8b8f3e6cea540b17262aadf6d97a8ad28fe41c03.tar.gz
sequelpro-8b8f3e6cea540b17262aadf6d97a8ad28fe41c03.tar.bz2
sequelpro-8b8f3e6cea540b17262aadf6d97a8ad28fe41c03.zip
Merge framework integration branch back to trunk. Summary of changes:
- Includes all custom code from subclasses CMMCPConnection and CMMCPResult, meaning they have subsequently been removed from the project. - All previous Sequel Pro specific code in the above subclasses has been removed in favour of the delegate (currently set to TableDocumet) informing the framework of such information. - All references to CMMCPConnection and CMMCPResult have subsequently been changed to MCPConnection and MCPResult. - Framework includes MySQL 5.1.36 client libraries and source headers. - Framework is now built as a 4-way (32/64 bit, i386/PPC arch) binary. - All import references to <MCPKit_bundled/MCPKit_bundled.h> have been changed to <MCPKit/MCPKit.h>. - New script 'build-mysql-client.sh' can be used to build the MySQL client libraries from the MySQL source. See the script's header for a list of available options or run it with no arguments to display it's usage. Note that there are still a few changes to be made to the framework with regard to removing Sequel Pro specific calls to the delegate. These however can be made later on as they have no effect on functionality and are merely design changes. Also, note that any future development done on the framework should be made to be as 'generic' as possible, with no Sequel Pro specific references. This should allow the framework to be integrated into another project without the need for SP specific code.
Diffstat (limited to 'Source/TableDocument.h')
-rw-r--r--Source/TableDocument.h38
1 files changed, 18 insertions, 20 deletions
diff --git a/Source/TableDocument.h b/Source/TableDocument.h
index 8272cd62..6b3acaef 100644
--- a/Source/TableDocument.h
+++ b/Source/TableDocument.h
@@ -26,10 +26,10 @@
// More info at <http://code.google.com/p/sequel-pro/>
#import <Cocoa/Cocoa.h>
-#import <MCPKit_bundled/MCPKit_bundled.h>
+#import <MCPKit/MCPKit.h>
#import <WebKit/WebKit.h>
-@class CMMCPConnection, CMMCPResult, SPConnectionController;
+@class SPConnectionController;
/**
* The TableDocument class controls the primary database view window.
@@ -79,10 +79,11 @@
IBOutlet id syntaxView;
IBOutlet id syntaxViewContent;
IBOutlet NSWindow *createTableSyntaxWindow;
+ IBOutlet NSWindow *connectionErrorDialog;
SPConnectionController *connectionController;
- CMMCPConnection *mySQLConnection;
+ MCPConnection *mySQLConnection;
NSArray *variables;
NSString *selectedDatabase;
@@ -95,6 +96,7 @@
BOOL _encodingViaLatin1;
BOOL _shouldOpenConnectionAutomatically;
BOOL _isConnected;
+ BOOL _mainNibLoaded;
NSToolbar *mainToolbar;
NSToolbarItem *chooseDatabaseToolbarItem;
@@ -107,11 +109,11 @@
- (NSString *)getHTMLforPrint;
// Connection callback and methods
-- (void) setConnection:(CMMCPConnection *)theConnection;
+- (void) setConnection:(MCPConnection *)theConnection;
- (void)setShouldAutomaticallyConnect:(BOOL)shouldAutomaticallyConnect;
- (BOOL)shouldAutomaticallyConnect;
-//database methods
+// Database methods
- (IBAction)setDatabases:(id)sender;
- (IBAction)chooseDatabase:(id)sender;
- (IBAction)addDatabase:(id)sender;
@@ -121,18 +123,18 @@
- (IBAction)saveServerVariables:(id)sender;
- (NSArray *)allDatabaseNames;
-//encoding methods
+// Encoding methods
- (void)setConnectionEncoding:(NSString *)mysqlEncoding reloadingViews:(BOOL)reloadViews;
- (NSString *)databaseEncoding;
- (NSString *)connectionEncoding;
-- (BOOL)connectionEncodingViaLatin1;
+- (BOOL)connectionEncodingViaLatin1:(id)connection;
- (IBAction)chooseEncoding:(id)sender;
- (BOOL)supportsEncoding;
- (void)updateEncodingMenuWithSelectedEncoding:(NSString *)encoding;
- (NSString *)encodingNameFromMySQLEncoding:(NSString *)mysqlEncoding;
- (NSString *)mysqlEncodingFromDisplayEncoding:(NSString *)encodingName;
-//table methods
+// Table methods
- (IBAction)showCreateTableSyntax:(id)sender;
- (IBAction)copyCreateTableSyntax:(id)sender;
- (NSArray *)columnNames;
@@ -143,8 +145,10 @@
- (IBAction)flushTable:(id)sender;
- (IBAction)checksumTable:(id)sender;
-//other methods
+// Other methods
- (NSString *)host;
+- (IBAction)closeSheet:(id)sender;
+- (IBAction)closeErrorConnectionSheet:(id)sender;
- (void)doPerformQueryService:(NSString *)query;
- (void)flushPrivileges:(id)sender;
- (void)showVariables:(id)sender;
@@ -152,19 +156,19 @@
- (NSWindow *)getCreateTableSyntaxWindow;
- (void) refreshCurrentDatabase;
-//getter methods
+// Getter methods
- (NSString *)name;
- (NSString *)database;
- (NSString *)table;
- (NSString *)mySQLVersion;
- (NSString *)user;
-//notification center methods
+// Notification center methods
- (void)willPerformQuery:(NSNotification *)notification;
- (void)hasPerformedQuery:(NSNotification *)notification;
- (void)applicationWillTerminate:(NSNotification *)notification;
-//menu methods
+// Menu methods
- (BOOL)validateMenuItem:(NSMenuItem *)anItem;
- (IBAction)import:(id)sender;
- (IBAction)export:(id)sender;
@@ -177,12 +181,12 @@
- (IBAction)viewRelations:(id)sender;
- (IBAction)addConnectionToFavorites:(id)sender;
-// titlebar methods
+// Titlebar methods
- (void)setStatusIconToImageWithName:(NSString *)imagePath;
- (void)setTitlebarStatus:(NSString *)status;
- (void)clearStatusIcon;
-//toolbar methods
+// Toolbar methods
- (void)setupToolbar;
- (NSToolbarItem *)toolbar:(NSToolbar *)toolbar itemForItemIdentifier:(NSString *)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag;
- (NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar*)toolbar;
@@ -190,10 +194,4 @@
- (BOOL)validateToolbarItem:(NSToolbarItem *)toolbarItem;
- (void)updateChooseDatabaseToolbarItemWidth;
-//SMySQL delegate methods
-- (void)willQueryString:(NSString *)query;
-- (void)queryGaveError:(NSString *)error;
-
-- (IBAction)closeSheet:(id)sender;
-
@end