Updated to version 1.6.5
[MenuTunes.git] / NetworkController.h
1 /*
2  *      MenuTunes
3  *  NetworkController
4  *    Rendezvous network controller
5  *
6  *  Original Author : Kent Sutherland <ksuther@ithinksw.com>
7  *   Responsibility : Kent Sutherland <ksuther@ithinksw.com>
8  *
9  *  Copyright (c) 2003 iThink Software.
10  *  All Rights Reserved
11  *
12  */
13  
14 #import <Foundation/Foundation.h>
15
16 #define SERVER_PORT 5712
17
18 @class NetworkObject;
19
20 @interface NetworkController : NSObject
21 {
22     NSNetService *service;
23     NSNetServiceBrowser *browser;
24     NSMutableArray *remoteServices;
25     
26     NSConnection *serverConnection, *clientConnection;
27     NSSocketPort *clientPort, *serverPort;
28     NSString *remoteHost;
29     BOOL serverOn, clientConnected, connectedToServer;
30     NSData *serverPass, *clientPass;
31     NetworkObject *rootObject, *clientProxy;
32 }
33 + (NetworkController *)sharedController;
34
35 - (void)startRemoteServerSearch;
36 - (void)stopRemoteServerSearch;
37
38 - (void)setServerStatus:(BOOL)status;
39 - (int)connectToHost:(NSString *)host;
40 - (BOOL)checkForServerAtHost:(NSString *)host;
41 - (BOOL)disconnect;
42 - (void)resetServerName;
43 - (BOOL)isServerOn;
44 - (BOOL)isClientConnected;
45 - (BOOL)isConnectedToServer;
46 - (NSString *)remoteHost;
47
48 - (NetworkObject *)networkObject;
49 - (NSArray *)remoteServices;
50 @end