/* Copyright (C) 2002-2003, Jeffrey D. Argast. The authors make NO WARRANTY or representation, either express or implied, with respect to this software, its quality, accuracy, merchantability, or fitness for a particular purpose. This software is provided "AS IS", and you, its user, assume the entire risk as to its quality and accuracy. Permission is hereby granted to use, copy, modify, and distribute this software or portions thereof for any purpose, without fee, subject to these conditions: (1) If any part of the source code is distributed, then this statement must be included, with this copyright and no-warranty notice unaltered. (2) Permission for use of this software is granted only if the user accepts full responsibility for any undesirable consequences; the authors accept NO LIABILITY for damages of any kind. */ #import "PerforceConfiguration.h" @interface PerforceConfiguration (PrivateMethods) @end // // Implementation // @implementation PerforceConfiguration - (id) initWithName:(NSString*) name perforcePort:(NSString*) perforcePort perforceHost:(NSString*) perforceHost perforceUser:(NSString*) perforceUser perforceClient:(NSString*) perforceClient perforcePasswd:(NSString*) perforcePasswd { self = [super init]; fConfigurationName = [name copy]; fPerforcePort = [perforcePort copy]; fPerforceHost = [perforceHost copy]; fPerforceUser = [perforceUser copy]; fPerforceClient = [perforceClient copy]; fPerforcePasswd = [perforcePasswd copy]; return self; } - (void) dealloc { [fConfigurationName release]; [fPerforcePort release]; [fPerforceHost release]; [fPerforceUser release]; [fPerforceClient release]; [fPerforcePasswd release]; [super dealloc]; } - (id)initWithCoder:(NSCoder*)coder { self = [super init]; fConfigurationName = [[coder decodeObject] retain]; fPerforcePort = [[coder decodeObject] retain]; fPerforceHost = [[coder decodeObject] retain]; fPerforceUser = [[coder decodeObject] retain]; fPerforceClient = [[coder decodeObject] retain]; fPerforcePasswd = [[coder decodeObject] retain]; return self; } - (void) encodeWithCoder:(NSCoder*)coder { [coder encodeObject:fConfigurationName]; [coder encodeObject:fPerforcePort]; [coder encodeObject:fPerforceHost]; [coder encodeObject:fPerforceUser]; [coder encodeObject:fPerforceClient]; [coder encodeObject:fPerforcePasswd]; } - (id) copyWithZone:(NSZone*)zone { PerforceConfiguration* newConfig = [[PerforceConfiguration alloc] initWithName:fConfigurationName perforcePort:fPerforcePort perforceHost:fPerforceHost perforceUser:fPerforceUser perforceClient:fPerforceClient perforcePasswd:fPerforcePasswd]; return newConfig; } - (NSString*) configurationName { return fConfigurationName; } - (NSString*) perforcePort { return fPerforcePort; } - (NSString*) perforceHost { return fPerforceHost; } - (NSString*) perforceUser { return fPerforceUser; } - (NSString*) perforceClient { return fPerforceClient; } - (NSString*) perforcePasswd { return fPerforcePasswd; } - (void) setConfigurationName:(NSString*)newName { [fConfigurationName release]; fConfigurationName = [newName copy]; } - (void) setPerforcePort:(NSString*)newPort { [fPerforcePort release]; fPerforcePort = [newPort copy]; } - (void) setPerforceHost:(NSString*)newHost { [fPerforceHost release]; fPerforceHost = [newHost copy]; } - (void) setPerforceUser:(NSString*)newUser { [fPerforceUser release]; fPerforceUser = [newUser copy]; } - (void) setPerforceClient:(NSString*)newClient { [fPerforceClient release]; fPerforceClient = [newClient copy]; } - (void) setPerforcePasswd:(NSString*)newPasswd { [fPerforcePasswd release]; fPerforcePasswd = [newPasswd copy]; } @end // // // PRIVATE METHODS // // @implementation PerforceConfiguration (PrivateMethods) @end