version 1.25, 2003/10/22 14:26:01
|
version 1.26, 2003/11/04 13:10:22
|
|
|
*/ | */ |
CIMUserCommand (); | CIMUserCommand (); |
| |
|
/** |
|
Destructs a CIMUserCommand. |
|
*/ |
|
~CIMUserCommand (); |
|
|
// | // |
// Overrides the virtual function setCommand from Command class | // Overrides the virtual function setCommand from Command class |
// This is defined as an empty function. | // This is defined as an empty function. |
|
|
_passwordSet = false; | _passwordSet = false; |
_newpasswordSet = false; | _newpasswordSet = false; |
_userNameSet = false; | _userNameSet = false; |
|
_client = NULL; |
| |
/** | /** |
Build the usage string for the config command. | Build the usage string for the config command. |
|
|
setUsage (usage); | setUsage (usage); |
} | } |
| |
|
/** |
|
Destructs a CIMUserCommand |
|
*/ |
|
CIMUserCommand::~CIMUserCommand () |
|
{ |
|
if (_client != NULL) |
|
delete _client; |
|
} |
| |
/** | /** |
Parses the command line, validates the options, and sets instance | Parses the command line, validates the options, and sets instance |
|
|
| |
try | try |
{ | { |
|
// Construct the CIMClient and set to request server messages |
|
// in the default language of this client process. |
|
_client = new CIMClient; |
|
_client->setRequestDefaultLanguages(); //l10n |
|
} |
|
catch (Exception & e) |
|
{ |
|
errPrintWriter << e.getMessage() << endl; |
|
return ( RC_ERROR ); |
|
} |
|
|
|
try |
|
{ |
// | // |
// Open connection with CIMSever | // Open connection with CIMSever |
// | // |
_client = new CIMClient; |
|
_client->setRequestDefaultLanguages(); |
|
_client->connectLocal(); | _client->connectLocal(); |
} | } |
catch(Exception& e) | catch(Exception& e) |
|
|
| |
retCode = command->execute (cout, cerr); | retCode = command->execute (cout, cerr); |
| |
|
delete command; // Needed to destruct the CIMClient used by the command |
|
|
return (retCode); | return (retCode); |
} | } |
| |