One more little nib tweak
[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 *serverPort, *clientPort;
28     NSString *remoteHost;
29     BOOL serverOn, clientConnected, connectedToServer;
30     NSData *serverPass, *clientPass;
31     NetworkObject *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 - (BOOL)isServerOn;
43 - (BOOL)isClientConnected;
44 - (BOOL)isConnectedToServer;
45 - (NSString *)remoteHost;
46
47 - (NetworkObject *)networkObject;
48 - (NSArray *)remoteServices;
49 @end