1 #import "NetworkObject.h"
2 #import "MainController.h"
3 #import <ITMTRemote/ITMTRemote.h>
5 @implementation NetworkObject
9 if ( (self = [super init]) ) {
11 if (![self requiresPassword]) {
20 - (ITMTRemote *)remote
22 if (_authenticated && _valid) {
23 return [[MainController sharedController] currentRemote];
29 - (NSString *)serverName
31 NSString *name = [[NSUserDefaults standardUserDefaults] stringForKey:@"sharedPlayerName"];
33 name = @"MenuTunes Shared Player";
37 - (BOOL)requiresPassword
39 return ([[[NSUserDefaults standardUserDefaults] dataForKey:@"sharedPlayerPassword"] length] > 0);
42 - (BOOL)sendPassword:(NSData *)password
44 if ([password isEqualToData:[[NSUserDefaults standardUserDefaults] dataForKey:@"sharedPlayerPassword"]]) {