📄 wbemexeccommand.h
字号:
//%2006//////////////////////////////////////////////////////////////////////////// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;// IBM Corp.; EMC Corporation, The Open Group.// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;// EMC Corporation; VERITAS Software Corporation; The Open Group.// Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;// EMC Corporation; Symantec Corporation; The Open Group.//// Permission is hereby granted, free of charge, to any person obtaining a copy// of this software and associated documentation files (the "Software"), to// deal in the Software without restriction, including without limitation the// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or// sell copies of the Software, and to permit persons to whom the Software is// furnished to do so, subject to the following conditions:// // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN// ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED// "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT// LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.////==============================================================================//// Author: Carol Ann Krug Graves, Hewlett-Packard Company // (carolann_graves@hp.com)//// Modified By:// Warren Otsuka (warren_otsuka@hp.com)// David Eger (dteger@us.ibm.com)// Alagaraja Ramasubramanian, IBM (alags_raj@in.ibm.com) - PEP-167// David Dillard, VERITAS Software Corp.// (david.dillard@veritas.com)////%/////////////////////////////////////////////////////////////////////////////#ifndef Pegasus_WbemExecCommand_h#define Pegasus_WbemExecCommand_h#include <Pegasus/Common/String.h>#include <Clients/cliutils/Command.h>#include <Clients/cliutils/CommandException.h>#include "WbemExecException.h"#include "WbemExecClient.h"PEGASUS_NAMESPACE_BEGIN/** WbemExecCommand provides a command line interface to the CIM Server. The input to the command consists of a CIM request encoded in XML. The request is submitted to the CIM Server for execution. The result of the operation is returned to stdout, and consists of the CIM response encoded in XML. @author Hewlett-Packard Company */class WbemExecCommand : public Command {public: /** Constructs a WbemExecCommand and initializes instance variables. */ WbemExecCommand (); /** Parses the command line, validates the options, and sets instance variables based on the option arguments. @param argc the number of command line arguments @param argv the string vector of command line arguments @exception CommandFormatException if an error is encountered in parsing the command line */ void setCommand (Uint32 argc, char* argv []); /** Executes the command and writes the results to the PrintWriters. @param outPrintWriter the ostream to which output should be written @param errPrintWriter the ostream to which error output should be written @return 0 if the command is successful 1 if an error occurs in executing the command */ Uint32 execute (ostream& outPrintWriter, ostream& errPrintWriter); /** The command name. */ static const char COMMAND_NAME []; private: /** Connect to cimserver. @param outPrintWriter the ostream to which error output should be written @return the Channel created @exception Exception if an error is encountered in creating the connection */ void _connectToServer( WbemExecClient& client, ostream& outPrintWriter); void _printContent( ostream& oStream, Buffer& responseMessage, Uint32 contentOffset);/** Prompt for password. @param estream the ostream to which errors should be written @return String value of the user entered password */ String _promptForPassword( ostream& eStream );/** Check the HTTP response message for authentication challenge or data. Sample Local authentication request/response Challenge: ---------- HTTP/1.1 401 Unauthorized WWW-Authenticate: LocalPrivileged "filePath" Challenge response: --------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -