1 karl 1.1 //%LICENSE////////////////////////////////////////////////////////////////
2 //
3 // 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 //
10 // 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 //
17 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
19 //
20 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 karl 1.1 // 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 //
28 //////////////////////////////////////////////////////////////////////////
29 //
30 //%/////////////////////////////////////////////////////////////////////////////
31
32 #ifndef Pegasus_WsmFilter_h
33 #define Pegasus_WsmFilter_h
34
35 #include <Pegasus/Common/Config.h>
36 #include <Pegasus/Common/XmlParser.h>
37 #include <Pegasus/Common/AcceptLanguageList.h>
38 #include <Pegasus/Common/SharedPtr.h>
39 #include <Pegasus/WsmServer/WsmInstance.h>
40 #include <Pegasus/WsmServer/WsmSelectorSet.h>
41 #include <Pegasus/WsmServer/WsmEndpointReference.h>
42 #include <Pegasus/WsmServer/WsmUtils.h>
43 karl 1.1 #include <Pegasus/WQL/WQLParser.h>
44
45 /*
46 Define the enumeration Filter Dialects and information associated
47 with each filter dialect in a single place.
48 */
49
50 PEGASUS_NAMESPACE_BEGIN
51
52 class PEGASUS_WSMSERVER_LINKAGE WsmFilter
53 {
54 public:
55 // Define each of the implemented Filter dialects. NONE is the
56 // default where there is no filter
57 enum wsmFilterDialect
58 {
59 NONE, // No Filter
60 WQL, // Microsoft defined WQL filter.
61 ASSOCIATION // Association filter per DSP0227 sect 8.2
62 };
63
64 karl 1.1 // Define possible association filter types. Since there are
65 // only two types and no possibility of error, only the two types
66 // are defined. ASSOCIATED_INSTANCES corresponds to CIM/XML
67 // associatiors operation and ASSOCIATION_INSTANCES to references operation
68 enum AssocFilterType
69 {
70 ASSOCIATED_INSTANCES,
71 ASSOCIATION_INSTANCES
72 };
73
74 WsmFilter();
75
76 ~WsmFilter();
77
78 // Dialect for this filter. The legal dialects are defined by
79 // the wsmFilterDialect enum (ex. WQL and Association
80 wsmFilterDialect filterDialect;
81
82 // Parameters for WQL filter dialect
83 struct
84 {
85 karl 1.1 String queryLanguage;
86 String query;
87 SharedPtr<WQLSelectStatement> selectStatement;
88 } WQLFilter;
89
90 // Parameters for AssociationFilter dialect defined in DSP0227 Section 8.2.
91 // AssociatedInstances and associationInstances use this
92 // common structure.
93 struct
94 {
95 // Type of association filter received,
96 AssocFilterType assocFilterType;
97
98 // object reference for the association call. Must be an object
99 // path (not just class) and include the namespace element
100 WsmEndpointReference object;
101 CIMName assocClassName;
102 CIMName resultClassName;
103 String role;
104 String resultRole;
105
106 karl 1.1 // FUTURE: Only needed when we support fragments. Until then
107 // this will be rejected.
108 CIMPropertyList propertyList;
109 }AssocFilter;
110
111 private:
112 // Copy and assign not used.
113 };
114
115 PEGASUS_NAMESPACE_END
116
117 #endif /* Pegasus_WsmFilter_h */
|