1 martin 1.8 //%LICENSE////////////////////////////////////////////////////////////////
|
2 martin 1.9 //
|
3 martin 1.8 // Licensed to The Open Group (TOG) under one or more contributor license
4 // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
5 // this work for additional information regarding copyright ownership.
6 // Each contributor licenses this file to you under the OpenPegasus Open
7 // Source License; you may not use this file except in compliance with the
8 // License.
|
9 martin 1.9 //
|
10 martin 1.8 // Permission is hereby granted, free of charge, to any person obtaining a
11 // copy of this software and associated documentation files (the "Software"),
12 // to deal in the Software without restriction, including without limitation
13 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 // and/or sell copies of the Software, and to permit persons to whom the
15 // Software is furnished to do so, subject to the following conditions:
|
16 martin 1.9 //
|
17 martin 1.8 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
|
19 martin 1.9 //
|
20 martin 1.8 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
21 martin 1.9 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22 martin 1.8 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
27 martin 1.9 //
|
28 martin 1.8 //////////////////////////////////////////////////////////////////////////
|
29 kumpf 1.4 //
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
40 PEGASUS_NAMESPACE_BEGIN
41
42 class PEGASUS_COMMON_LINKAGE CIMServerDescription
43 {
44 public:
45
46 /** Constructor for a CIMServerDescription object.
47 */
48 CIMServerDescription();
49
50 kumpf 1.4 /** Constructor for a CIMServerDescription object.
51 @param url Url that identifies this connection description.
52 */
53 CIMServerDescription(const String& url);
54
55 /** Destructor for a CIMServerDescription object.
56 */
57 ~CIMServerDescription();
58
59 /** Returns the URL for this description.
60 @return String that contains the Url for this connection description.
61 */
62 String getUrl();
63
64 /** Returns an attribute value as a string.
65 @param attributeName Attribute name of attribute.
66 @param defaultValue Default attribute value to return if empty or
67 malformed.
68 @return String that contains an attribute value.
69 */
70 String getValue(
|
71 kumpf 1.7 const String& attributeName,
|
72 kumpf 1.4 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 True if attributeName was found, false otherwise.
78 Note, a true return value with an empty attributeValues array
79 indicates the tag had no attribute values (ie a keyword).
80 */
81 Boolean getValues(
82 const String& attributeName,
83 Array<String>& attributeValues) const;
84
85 /** Returns an array of attribute.
86 @return Array that contains contains attributes for this connection
87 description.
88 */
89 Array<Attribute> getAttributes() const;
90
91 /** Sets an array of attributes for this description.
92 @param attributes Array that contains attributes for this connection
93 kumpf 1.4 description.
94 */
95 void setAttributes(const Array<Attribute>& attributes);
96
97 private:
98 String _serviceLocationTcp;
99 String _host;
100 Uint32 _port;
101 Array<Attribute> _attributes;
102 };
103
104 #define PEGASUS_ARRAY_T CIMServerDescription
105 #include <Pegasus/Common/ArrayInter.h>
106 #undef PEGASUS_ARRAY_T
107
108 PEGASUS_NAMESPACE_END
109
110 #endif /* Pegasus_CIMServerDescription_h */
|