git.ithinksw.org
/
MenuTunes.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Upgrading MenuTunes to Xcode 2.1 and updating code
[MenuTunes.git]
/
NetworkObject.m
diff --git
a/NetworkObject.m
b/NetworkObject.m
index
4473970
..
8721e98
100755
(executable)
--- a/
NetworkObject.m
+++ b/
NetworkObject.m
@@
-24,6
+24,7
@@
- (id)init
{
if ( (self = [super init]) ) {
- (id)init
{
if ( (self = [super init]) ) {
+ _valid = YES;
if (![self requiresPassword]) {
_authenticated = YES;
} else {
if (![self requiresPassword]) {
_authenticated = YES;
} else {
@@
-35,7
+36,7
@@
- (ITMTRemote *)remote
{
- (ITMTRemote *)remote
{
- if (_authenticated) {
+ if (_authenticated
&& _valid
) {
return [[MainController sharedController] currentRemote];
} else {
return nil;
return [[MainController sharedController] currentRemote];
} else {
return nil;
@@
-52,7
+53,7
@@
- (BOOL)requiresPassword
{
- (BOOL)requiresPassword
{
- return
[[NSUserDefaults standardUserDefaults] boolForKey:@"enableSharingPassword"]
;
+ return
([[[NSUserDefaults standardUserDefaults] dataForKey:@"sharedPlayerPassword"] length] > 0)
;
}
- (BOOL)sendPassword:(NSData *)password
}
- (BOOL)sendPassword:(NSData *)password
@@
-66,4
+67,19
@@
}
}
}
}
+- (void)invalidate
+{
+ _valid = NO;
+}
+
+- (void)makeValid
+{
+ _valid = YES;
+}
+
+- (BOOL)isValid
+{
+ return _valid;
+}
+
@end
@end