OW_ProviderProxies.hpp

Go to the documentation of this file.
00001 /*******************************************************************************
00002 * Copyright (C) 2004 Novell, Inc., Vintela, Inc. All rights reserved.
00003 *
00004 * Redistribution and use in source and binary forms, with or without
00005 * modification, are permitted provided that the following conditions are met:
00006 *
00007 *  - Redistributions of source code must retain the above copyright notice,
00008 *    this list of conditions and the following disclaimer.
00009 *
00010 *  - Redistributions in binary form must reproduce the above copyright notice,
00011 *    this list of conditions and the following disclaimer in the documentation
00012 *    and/or other materials provided with the distribution.
00013 *
00014 *  - Neither the name of Novell nor the names of its
00015 *    contributors may be used to endorse or promote products derived from this
00016 *    software without specific prior written permission.
00017 *
00018 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00019 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00020 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00021 * ARE DISCLAIMED. IN NO EVENT SHALL Novell, Inc OR THE CONTRIBUTORS
00022 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00023 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00024 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00025 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00026 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00027 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00028 * POSSIBILITY OF SUCH DAMAGE.
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 }  // end namespace OW_NAMESPACE
00230 
00231 #endif // OW_THREADS_RUN_AS_USER
00232 
00233 #endif

Generated on Thu Feb 9 08:48:09 2006 for openwbem by  doxygen 1.4.6