RAAAAAHHHHHHHHHHH NETWORK MENUTOOOONS!
[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 ITMTRemote;
19
20 @interface NetworkController : NSObject
21 {
22     NSNetService *service;
23     NSNetServiceBrowser *browser;
24     NSMutableArray *remoteServices;
25     
26     NSConnection *serverConnection, *clientConnection;
27     NSSocketPort *serverPort, *clientPort;
28     BOOL serverOn, clientConnected, connectedToServer;
29     ITMTRemote *clientProxy;
30 }
31 + (NetworkController *)sharedController;
32
33 - (void)startRemoteServerSearch;
34 - (void)stopRemoteServerSearch;
35
36 - (void)setServerStatus:(BOOL)status;
37 - (BOOL)connectToHost:(NSString *)host;
38 - (BOOL)disconnect;
39 - (BOOL)isServerOn;
40 - (BOOL)isClientConnected;
41 - (BOOL)isConnectedToServer;
42
43 - (ITMTRemote *)sharedRemote;
44 - (NSArray *)remoteServices;
45 @end