(file) Return to CIMServerDescription.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

  1 karl  1.3 //%2005////////////////////////////////////////////////////////////////////////
  2 karl  1.2 //
  3           // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
  4           // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
  5           // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
  6           // IBM Corp.; EMC Corporation, The Open Group.
  7           // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
  8           // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
  9 karl  1.3 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10           // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 karl  1.2 //
 12           // Permission is hereby granted, free of charge, to any person obtaining a copy
 13           // of this software and associated documentation files (the "Software"), to
 14           // deal in the Software without restriction, including without limitation the
 15           // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 16           // sell copies of the Software, and to permit persons to whom the Software is
 17           // furnished to do so, subject to the following conditions:
 18           // 
 19           // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 20           // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 21           // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 22           // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 23           // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 24           // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 25           // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 26           // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 27           //
 28           //==============================================================================
 29 kumpf 1.4 //
 30           // Author: Tony Fiorentino (fiorentino_tony@emc.com)
 31           //
 32           // Modified By: Keith Petley (keithp@veritas.com)
 33           //
 34           //%/////////////////////////////////////////////////////////////////////////////
 35           
 36           #ifndef Pegasus_CIMServerDescription_h
 37           #define Pegasus_CIMServerDescription_h
 38           
 39           #include <Pegasus/Common/Config.h>
 40           #include <Pegasus/Common/String.h>
 41           #include <Pegasus/Common/Attribute.h>
 42           #include <Pegasus/Common/Linkage.h>
 43           #include <Pegasus/Client/WBEMSLPTemplate.h>
 44           
 45           PEGASUS_NAMESPACE_BEGIN
 46           
 47           class PEGASUS_COMMON_LINKAGE CIMServerDescription
 48           {
 49           public:
 50 kumpf 1.4 
 51               /** Constructor for a CIMServerDescription object.
 52               */
 53               CIMServerDescription();
 54           
 55               /** Constructor for a CIMServerDescription object.
 56                   @param url Url that identifies this connection description.
 57               */
 58               CIMServerDescription(const String& url);
 59           
 60               /** Destructor for a CIMServerDescription object.
 61               */
 62               ~CIMServerDescription();
 63           
 64               /** Returns the URL for this description.
 65                   @return  String that contains the Url for this connection description.
 66               */
 67               String getUrl();
 68           
 69               /** Returns an attribute value as a string.
 70                   @param  attributeName Attribute name of attribute.
 71 kumpf 1.4         @param  defaultValue Default attribute value to return if empty or
 72                   malformed.
 73                   @return String that contains an attribute value.
 74               */
 75               String getValue(
 76                   const String& attributeName, 
 77                   const String& defaultValue) const;
 78           
 79               /** Returns an attribute value Array
 80                   @param  attributeName Attribute name of attribute.
 81                   @param  attributeValues Array<String> into which results are copied
 82                   @return True if attributeName was found, false otherwise.
 83                   Note, a true return value with an empty attributeValues array
 84                   indicates the tag had no attribute values (ie a keyword).
 85               */
 86               Boolean getValues(
 87                   const String& attributeName,
 88                   Array<String>& attributeValues) const;
 89           
 90               /** Returns an array of attribute.
 91                   @return Array that contains contains attributes for this connection
 92 kumpf 1.4         description.
 93               */
 94               Array<Attribute> getAttributes() const;
 95           
 96               /** Sets an array of attributes for this description.
 97                   @param attributes Array that contains attributes for this connection
 98                   description.
 99               */
100               void setAttributes(const Array<Attribute>& attributes);
101           
102           private:
103               String _serviceLocationTcp;
104               String _host;
105               Uint32 _port;
106               Array<Attribute> _attributes;
107           };
108           
109           #define PEGASUS_ARRAY_T CIMServerDescription
110           #include <Pegasus/Common/ArrayInter.h>
111           #undef PEGASUS_ARRAY_T
112           
113 kumpf 1.4 PEGASUS_NAMESPACE_END
114           
115           #endif /* Pegasus_CIMServerDescription_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2