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.
|
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 david.dillard 1.1 //
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 david.dillard 1.1
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 david.dillard 1.1 @param defaultValue Default attribute value to return if empty or mal-formed.
72 @return String that contains an attribute value.
73 */
74 String getValue(const String & attributeName, const String & defaultValue) const;
75
76 /** Returns an attribute value Array
77 @param attributeName Attribute name of attribute.
78 @param attributeValues - <Array>String into which results are copied
79 @return Boolean - true if attributeName was found.
80 Note, an true return and an empty Value array indicates the tag had
81 no attribute values (ie a keyword).
82 */
83 Boolean getValues(const String & attributeName, Array <String> & attributeValues) const;
84
85 /** Returns an array of attribute.
86 @return Array that contains contains attributes for this connection description.
87 */
88 Array<Attribute> getAttributes() const;
89
90 /** Sets an array of attributes for this description.
91 param Array that contains attributes for this connection description.
92 david.dillard 1.1 */
93 void setAttributes(const Array<Attribute> & attributes);
94
95 private:
96 String _serviceLocationTcp;
97 String _host;
98 Uint32 _port;
99 Array<Attribute> _attributes;
100 };
101
102 #define PEGASUS_ARRAY_T CIMServerDescription
103 #include <Pegasus/Common/ArrayInter.h>
104 #undef PEGASUS_ARRAY_T
105
106 PEGASUS_NAMESPACE_END
107
108 #endif /* Pegasus_CIMServerDescription_h */
|