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