00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00035 #ifndef OW_PROVIDERPROXIES_HPP_INCLUDE_GUARD_
00036 #define OW_PROVIDERPROXIES_HPP_INCLUDE_GUARD_
00037
00038 #ifdef OW_THREADS_RUN_AS_USER
00039
00040 #include "OW_config.h"
00041 #include "OW_InstanceProviderIFC.hpp"
00042 #include "OW_AssociatorProviderIFC.hpp"
00043 #include "OW_MethodProviderIFC.hpp"
00044 #include "OW_SecondaryInstanceProviderIFC.hpp"
00045 #ifdef OW_NETWARE
00046 #include "OW_NetwareIdentity.hpp"
00047 #endif
00048 #include <sys/types.h>
00049 #include <unistd.h>
00050
00051 namespace OW_NAMESPACE
00052 {
00053
00054 class OW_CIMOMCOMMON_API InstanceProviderProxy : public InstanceProviderIFC
00055 {
00056 public:
00057 InstanceProviderProxy(InstanceProviderIFCRef pProv,
00058 const ProviderEnvironmentIFCRef& env);
00059
00060 virtual void enumInstanceNames(
00061 const ProviderEnvironmentIFCRef& env,
00062 const String& ns,
00063 const String& className,
00064 CIMObjectPathResultHandlerIFC& result,
00065 const CIMClass& cimClass );
00066
00067 virtual void enumInstances(
00068 const ProviderEnvironmentIFCRef& env,
00069 const String& ns,
00070 const String& className,
00071 CIMInstanceResultHandlerIFC& result,
00072 WBEMFlags::ELocalOnlyFlag localOnly,
00073 WBEMFlags::EDeepFlag deep,
00074 WBEMFlags::EIncludeQualifiersFlag includeQualifiers,
00075 WBEMFlags::EIncludeClassOriginFlag includeClassOrigin,
00076 const StringArray* propertyList,
00077 const CIMClass& requestedClass,
00078 const CIMClass& cimClass );
00079
00080 virtual CIMInstance getInstance(
00081 const ProviderEnvironmentIFCRef& env,
00082 const String& ns,
00083 const CIMObjectPath& instanceName,
00084 WBEMFlags::ELocalOnlyFlag localOnly,
00085 WBEMFlags::EIncludeQualifiersFlag includeQualifiers,
00086 WBEMFlags::EIncludeClassOriginFlag includeClassOrigin,
00087 const StringArray* propertyList,
00088 const CIMClass& cimClass );
00089
00090 #ifndef OW_DISABLE_INSTANCE_MANIPULATION
00091
00092 virtual CIMObjectPath createInstance(
00093 const ProviderEnvironmentIFCRef& env,
00094 const String& ns,
00095 const CIMInstance& cimInstance );
00096
00097 virtual void modifyInstance(
00098 const ProviderEnvironmentIFCRef& env,
00099 const String& ns,
00100 const CIMInstance& modifiedInstance,
00101 const CIMInstance& previousInstance,
00102 WBEMFlags::EIncludeQualifiersFlag includeQualifiers,
00103 const StringArray* propertyList,
00104 const CIMClass& theClass);
00105
00106 virtual void deleteInstance(
00107 const ProviderEnvironmentIFCRef& env,
00108 const String& ns,
00109 const CIMObjectPath& cop);
00110
00111 #endif // #ifndef OW_DISABLE_INSTANCE_MANIPULATION
00112
00113 private:
00114 InstanceProviderIFCRef m_pProv;
00115 #if defined(OW_GNU_LINUX)
00116 uid_t m_cimomuid;
00117 uid_t m_useruid;
00118 #elif defined(OW_NETWARE)
00119 NetwareIdentityRef m_nwi;
00120 #endif
00121 };
00122
00123 class OW_CIMOMCOMMON_API SecondaryInstanceProviderProxy : public SecondaryInstanceProviderIFC
00124 {
00125 public:
00126 SecondaryInstanceProviderProxy(SecondaryInstanceProviderIFCRef pProv,
00127 const ProviderEnvironmentIFCRef& env);
00128 virtual void filterInstances(const ProviderEnvironmentIFCRef &env, const String &ns, const String &className, CIMInstanceArray &instances, WBEMFlags:: ELocalOnlyFlag localOnly, WBEMFlags:: EDeepFlag deep, WBEMFlags:: EIncludeQualifiersFlag includeQualifiers, WBEMFlags:: EIncludeClassOriginFlag includeClassOrigin, const StringArray *propertyList, const CIMClass &requestedClass, const CIMClass &cimClass);
00129 #ifndef OW_DISABLE_INSTANCE_MANIPULATION
00130 virtual void createInstance(const ProviderEnvironmentIFCRef &env, const String &ns, const CIMInstance &cimInstance);
00131 virtual void modifyInstance(const ProviderEnvironmentIFCRef &env, const String &ns, const CIMInstance &modifiedInstance, const CIMInstance &previousInstance, WBEMFlags:: EIncludeQualifiersFlag includeQualifiers, const StringArray *propertyList, const CIMClass &theClass);
00132 virtual void deleteInstance(const ProviderEnvironmentIFCRef &env, const String &ns, const CIMObjectPath &cop);
00133 #endif // #ifndef OW_DISABLE_INSTANCE_MANIPULATION
00134
00135 private:
00136 SecondaryInstanceProviderIFCRef m_pProv;
00137 #if defined(OW_GNU_LINUX)
00138 uid_t m_cimomuid;
00139 uid_t m_useruid;
00140 #elif defined(OW_NETWARE)
00141 NetwareIdentityRef m_nwi;
00142 #endif
00143 };
00144
00145 class OW_CIMOMCOMMON_API MethodProviderProxy : public MethodProviderIFC
00146 {
00147 public:
00148 MethodProviderProxy(MethodProviderIFCRef pProv,
00149 const ProviderEnvironmentIFCRef& env);
00150
00151 virtual CIMValue invokeMethod(
00152 const ProviderEnvironmentIFCRef& env,
00153 const String& ns,
00154 const CIMObjectPath& path,
00155 const String& methodName,
00156 const CIMParamValueArray& in,
00157 CIMParamValueArray& out );
00158
00159 private:
00160 MethodProviderIFCRef m_pProv;
00161 #if defined(OW_GNU_LINUX)
00162 uid_t m_cimomuid;
00163 uid_t m_useruid;
00164 #elif defined(OW_NETWARE)
00165 NetwareIdentityRef m_nwi;
00166 #endif
00167 };
00168
00169 #ifndef OW_DISABLE_ASSOCIATION_TRAVERSAL
00170 class OW_CIMOMCOMMON_API AssociatorProviderProxy : public AssociatorProviderIFC
00171 {
00172 public:
00173 AssociatorProviderProxy(AssociatorProviderIFCRef pProv,
00174 const ProviderEnvironmentIFCRef& env);
00175
00176 virtual void associators(
00177 const ProviderEnvironmentIFCRef& env,
00178 CIMInstanceResultHandlerIFC& result,
00179 const String& ns,
00180 const CIMObjectPath& objectName,
00181 const String& assocClass,
00182 const String& resultClass,
00183 const String& role,
00184 const String& resultRole,
00185 WBEMFlags::EIncludeQualifiersFlag includeQualifiers,
00186 WBEMFlags::EIncludeClassOriginFlag includeClassOrigin,
00187 const StringArray* propertyList);
00188
00189 virtual void associatorNames(
00190 const ProviderEnvironmentIFCRef& env,
00191 CIMObjectPathResultHandlerIFC& result,
00192 const String& ns,
00193 const CIMObjectPath& objectName,
00194 const String& assocClass,
00195 const String& resultClass,
00196 const String& role,
00197 const String& resultRole );
00198
00199 virtual void references(
00200 const ProviderEnvironmentIFCRef& env,
00201 CIMInstanceResultHandlerIFC& result,
00202 const String& ns,
00203 const CIMObjectPath& objectName,
00204 const String& resultClass,
00205 const String& role,
00206 WBEMFlags::EIncludeQualifiersFlag includeQualifiers,
00207 WBEMFlags::EIncludeClassOriginFlag includeClassOrigin,
00208 const StringArray* propertyList);
00209
00210 virtual void referenceNames(
00211 const ProviderEnvironmentIFCRef& env,
00212 CIMObjectPathResultHandlerIFC& result,
00213 const String& ns,
00214 const CIMObjectPath& objectName,
00215 const String& resultClass,
00216 const String& role );
00217 private:
00218
00219 AssociatorProviderIFCRef m_pProv;
00220 #if defined(OW_GNU_LINUX)
00221 uid_t m_cimomuid;
00222 uid_t m_useruid;
00223 #elif defined(OW_NETWARE)
00224 NetwareIdentityRef m_nwi;
00225 #endif
00226 };
00227 #endif // OW_DISABLE_ASSOCIATION_TRAVERSAL
00228
00229 }
00230
00231 #endif // OW_THREADS_RUN_AS_USER
00232
00233 #endif