RAAAAAHHHHHHHHHHH NETWORK MENUTOOOONS!
[MenuTunes.git] / NetworkController.h
diff --git a/NetworkController.h b/NetworkController.h
new file mode 100755 (executable)
index 0000000..de3801b
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ *     MenuTunes
+ *  NetworkController
+ *    Rendezvous network controller
+ *
+ *  Original Author : Kent Sutherland <ksuther@ithinksw.com>
+ *   Responsibility : Kent Sutherland <ksuther@ithinksw.com>
+ *
+ *  Copyright (c) 2003 iThink Software.
+ *  All Rights Reserved
+ *
+ */
+#import <Foundation/Foundation.h>
+
+#define SERVER_PORT 5712
+
+@class ITMTRemote;
+
+@interface NetworkController : NSObject
+{
+    NSNetService *service;
+    NSNetServiceBrowser *browser;
+    NSMutableArray *remoteServices;
+    
+    NSConnection *serverConnection, *clientConnection;
+    NSSocketPort *serverPort, *clientPort;
+    BOOL serverOn, clientConnected, connectedToServer;
+    ITMTRemote *clientProxy;
+}
++ (NetworkController *)sharedController;
+
+- (void)startRemoteServerSearch;
+- (void)stopRemoteServerSearch;
+
+- (void)setServerStatus:(BOOL)status;
+- (BOOL)connectToHost:(NSString *)host;
+- (BOOL)disconnect;
+- (BOOL)isServerOn;
+- (BOOL)isClientConnected;
+- (BOOL)isConnectedToServer;
+
+- (ITMTRemote *)sharedRemote;
+- (NSArray *)remoteServices;
+@end