X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/2404965b693451fd71dcffd06eb82695e9085389..086d6be5a155d0390ec1915350ad126c95a88416:/NetworkObject.m diff --git a/NetworkObject.m b/NetworkObject.m index 4473970..2d7207d 100755 --- a/NetworkObject.m +++ b/NetworkObject.m @@ -24,6 +24,7 @@ - (id)init { if ( (self = [super init]) ) { + _valid = YES; if (![self requiresPassword]) { _authenticated = YES; } else { @@ -35,7 +36,7 @@ - (ITMTRemote *)remote { - if (_authenticated) { + if (_authenticated && _valid) { return [[MainController sharedController] currentRemote]; } else { return nil; @@ -52,7 +53,7 @@ - (BOOL)requiresPassword { - return [[NSUserDefaults standardUserDefaults] boolForKey:@"enableSharingPassword"]; + return [[[NSUserDefaults standardUserDefaults] dataForKey:@"sharedPlayerPassword"] length]; } - (BOOL)sendPassword:(NSData *)password @@ -66,4 +67,19 @@ } } +- (void)invalidate +{ + _valid = NO; +} + +- (void)makeValid +{ + _valid = YES; +} + +- (BOOL)isValid +{ + return _valid; +} + @end