4 * Remote network object that is vended
6 * Original Author : Kent Sutherland <ksutherland@ithinksw.com>
7 * Responsibility : Kent Sutherland <ksutherland@ithinksw.com>
9 * Copyright (c) 2002 - 2003 iThink Software.
12 * This header defines the Objective-C protocol which all MenuTunes Remote
13 * plugins must implement. To build a remote, create a subclass of this
14 * object, and implement each method in the @protocol below.
18 #import "NetworkObject.h"
19 #import "MainController.h"
20 #import <ITMTRemote/ITMTRemote.h>
22 @implementation NetworkObject
26 if ( (self = [super init]) ) {
27 if (![self requiresPassword]) {
36 - (ITMTRemote *)remote
39 return [[MainController sharedController] currentRemote];
45 - (NSString *)serverName
47 NSString *name = [[NSUserDefaults standardUserDefaults] stringForKey:@"sharedPlayerName"];
49 name = @"MenuTunes Shared Player";
53 - (BOOL)requiresPassword
55 return [[NSUserDefaults standardUserDefaults] boolForKey:@"enableSharingPassword"];
58 - (BOOL)sendPassword:(NSData *)password
60 if ([password isEqualToData:[[NSUserDefaults standardUserDefaults] dataForKey:@"sharedPlayerPassword"]]) {