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