1 martin 1.13 //%LICENSE////////////////////////////////////////////////////////////////
|
2 martin 1.14 //
|
3 martin 1.13 // 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.14 //
|
10 martin 1.13 // 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.14 //
|
17 martin 1.13 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
|
19 martin 1.14 //
|
20 martin 1.13 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
21 martin 1.14 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22 martin 1.13 // 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.14 //
|
28 martin 1.13 //////////////////////////////////////////////////////////////////////////
|
29 mday 1.1 //
30 //%/////////////////////////////////////////////////////////////////////////////
31
32 #ifndef SLPProv_H
33 #define SLPProv_H
34
35 #include <Pegasus/Common/Config.h>
36 #include <Pegasus/Provider/CIMInstanceProvider.h>
|
37 tony 1.4 #include <Pegasus/Provider/CIMMethodProvider.h>
38 #include <Pegasus/../slp/slp_agent/peg_slp_agent.h>
|
39 mday 1.1
40 PEGASUS_NAMESPACE_BEGIN
41
42 Boolean initFlag = false;
43
|
44 tony 1.4 class SLPProvider: public CIMInstanceProvider, public CIMMethodProvider
|
45 mday 1.1 {
|
46 marek 1.11 public:
|
47 tony 1.4 SLPProvider(void);
|
48 marek 1.11 ~SLPProvider(void);
|
49 kumpf 1.15
|
50 marek 1.11 void initialize(CIMOMHandle & cimom);
51 void terminate(void);
52
53 void getInstance(
54 const OperationContext & context,
55 const CIMObjectPath & ref,
56 const Boolean includeQualifiers,
57 const Boolean includeClassOrigin,
58 const CIMPropertyList & propertyList,
59 InstanceResponseHandler & handler);
|
60 mday 1.1
|
61 marek 1.11 void enumerateInstances(
62 const OperationContext & context,
|
63 mday 1.1 const CIMObjectPath & ref,
64 const Boolean includeQualifiers,
|
65 marek 1.11 const Boolean includeClassOrigin,
66 const CIMPropertyList & propertyList,
67 InstanceResponseHandler & handler);
68
69 void enumerateInstanceNames(
70 const OperationContext & context,
71 const CIMObjectPath & ref,
72 ObjectPathResponseHandler & handler);
|
73 mday 1.1
|
74 marek 1.11 void modifyInstance(
|
75 mday 1.1 const OperationContext & context,
|
76 marek 1.11 const CIMObjectPath & ref,
77 const CIMInstance & obj,
78 const Boolean includeQualifiers,
79 const CIMPropertyList & propertyList,
80 ResponseHandler & handler);
81
82 void createInstance(
83 const OperationContext & context,
84 const CIMObjectPath & ref,
85 const CIMInstance & obj,
86 ObjectPathResponseHandler & handler);
87
88 void deleteInstance(
89 const OperationContext & context,
90 const CIMObjectPath & ref,
91 ResponseHandler & handler);
|
92 mday 1.1
|
93 marek 1.11 //Boolean tryterminate(void);
|
94 mday 1.1
|
95 tony 1.4 virtual void invokeMethod(
96 const OperationContext & context,
97 const CIMObjectPath & objectReference,
98 const CIMName & methodName,
99 const Array<CIMParamValue> & inParameters,
100 MethodResultResponseHandler & handler);
|
101 kumpf 1.15
|
102 venkat.puvvada 1.12 static void updateProfileRegistration();
|
103 marek 1.11 protected:
|
104 marek 1.7 CIMInstance _buildInstanceSkeleton(const CIMName& className);
|
105 mday 1.1
|
106 tony 1.4 void deregisterSLP();
|
107 karl 1.3
|
108 tony 1.4 Boolean populateRegistrationData(const String &protocol,
109 const String& IPAddress,
110 const CIMInstance& instance_ObjMgr,
|
111 karl 1.9 const CIMInstance& instance_ObjMgrComm,
|
112 venkat.puvvada 1.16 const CIMClass& commMechClass,
|
113 thilo.boehm 1.17 const String& registeredProfiles,
114 const OperationContext & context);
|
115 tony 1.4
|
116 thilo.boehm 1.17 Boolean issueSLPRegistrations(const OperationContext & context);
117 Uint32 populateSLPRegistrations(const OperationContext & context);
|
118 marek 1.11 String getNameSpaceInfo(
119 const CIMNamespaceName& nameSpace,
|
120 thilo.boehm 1.17 String& classInfo,
121 const OperationContext & context );
|
122 tony 1.4
|
123 kumpf 1.15 void populateTemplateField(CIMInstance& instance,
|
124 karl 1.5 const String& attributeFieldName,
125 const String& value,
126 const String& instancePropertyName = String::EMPTY);
127
|
128 kumpf 1.15 void populateTemplateField(CIMInstance& instance,
|
129 karl 1.5 const String& attributeFieldName,
130 const Array<String>& value,
131 const String& instancePropertyName);
|
132 tony 1.4
|
133 thilo.boehm 1.17 String getRegisteredProfileList(const OperationContext & context);
|
134 tony 1.4 private:
|
135 dev.meetei 1.18 void _processLinkLocalAddress(String &ip6add2check);
|
136 dev.meetei 1.19 Boolean _checkProfileToAdvertise(const CIMInstance &, const Uint32 &);
|
137 tony 1.4
|
138 kumpf 1.15 // Save instances of registration class
|
139 tony 1.4 // that have been registered.
140 Array<CIMObjectPath> _instanceNames;
141 Array<CIMInstance> _instances;
142 CIMNamespaceName _nameSpace;
143
144 slp_service_agent slp_agent;
145
|
146 venkat.puvvada 1.12 static SLPProvider* _this;
147
|
148 tony 1.4 // Save CIMOMHandle from initialization
149 CIMOMHandle _cimomHandle;
150
151 CIMNamespaceName _interopNamespace;
|
152 karl 1.3
|
153 karl 1.5 // Workspace for building the SLP Template String
154 String _currentSLPTemplateString;
155 CIMInstance _currentSLPTemplateCIMInstance;
|
156 mday 1.1 };
157
158 PEGASUS_NAMESPACE_END
159
160 #endif
|