git.ithinksw.org
/
MenuTunes.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adding a new proxy object for the networking. It's broken right now, but
[MenuTunes.git]
/
NetworkController.m
diff --git
a/NetworkController.m
b/NetworkController.m
index
fb3976c
..
9edb713
100755
(executable)
--- a/
NetworkController.m
+++ b/
NetworkController.m
@@
-13,9
+13,9
@@
#import "NetworkController.h"
#import "MainController.h"
#import "NetworkController.h"
#import "MainController.h"
+#import "NetworkObject.h"
#import <ITFoundation/ITDebug.h>
#import <ITFoundation/ITFoundation.h>
#import <ITFoundation/ITDebug.h>
#import <ITFoundation/ITFoundation.h>
-#import <ITMTRemote/ITMTRemote.h>
static NetworkController *sharedController;
static NetworkController *sharedController;
@@
-76,7
+76,7
@@
static NetworkController *sharedController;
serverPort = [[NSSocketPort alloc] initWithTCPPort:SERVER_PORT];
serverConnection = [[NSConnection alloc] initWithReceivePort:serverPort
sendPort:serverPort];
serverPort = [[NSSocketPort alloc] initWithTCPPort:SERVER_PORT];
serverConnection = [[NSConnection alloc] initWithReceivePort:serverPort
sendPort:serverPort];
- [serverConnection setRootObject:[[
MainController sharedController] currentRemote
]];
+ [serverConnection setRootObject:[[
NetworkObject alloc] init
]];
[serverConnection registerName:@"ITMTPlayerHost"];
[serverConnection setDelegate:self];
NS_HANDLER
[serverConnection registerName:@"ITMTPlayerHost"];
[serverConnection setDelegate:self];
NS_HANDLER
@@
-106,6
+106,7
@@
static NetworkController *sharedController;
//Turn off
[service stop];
[serverConnection registerName:nil];
//Turn off
[service stop];
[serverConnection registerName:nil];
+ [[serverConnection rootObject] release];
[serverPort invalidate];
[serverConnection invalidate];
[serverConnection release];
[serverPort invalidate];
[serverConnection invalidate];
[serverConnection release];
@@
-165,7
+166,7
@@
static NetworkController *sharedController;
unsigned char buffer;
NSConnection *testConnection;
NSSocketPort *testPort;
unsigned char buffer;
NSConnection *testConnection;
NSSocketPort *testPort;
- N
SDistant
Object *tempProxy;
+ N
etwork
Object *tempProxy;
ITDebugLog(@"Checking for shared remote at %@.", host);
if (fullPass) {
[fullPass getBytes:&buffer range:NSMakeRange(6, 4)];
ITDebugLog(@"Checking for shared remote at %@.", host);
if (fullPass) {
[fullPass getBytes:&buffer range:NSMakeRange(6, 4)];
@@
-182,7
+183,7
@@
static NetworkController *sharedController;
[testConnection setReplyTimeout:2];
tempProxy = [testConnection rootProxy];
[testConnection setDelegate:self];
[testConnection setReplyTimeout:2];
tempProxy = [testConnection rootProxy];
[testConnection setDelegate:self];
- [tempProxy s
haredRemote
Name];
+ [tempProxy s
erver
Name];
NS_HANDLER
ITDebugLog(@"Connection to host failed: %@", host);
[testConnection invalidate];
NS_HANDLER
ITDebugLog(@"Connection to host failed: %@", host);
[testConnection invalidate];
@@
-216,9
+217,9
@@
static NetworkController *sharedController;
return remoteHost;
}
return remoteHost;
}
-- (
ITMTRemote *)sharedRemote
+- (
NetworkObject *)networkObject
{
{
- return
(ITMTRemote *)
clientProxy;
+ return clientProxy;
}
- (NSArray *)remoteServices
}
- (NSArray *)remoteServices