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
00031
00036 #ifndef OW_PROVIDERAGENTCIMOMHANDLE_HPP_INCLUDE_GUARD_
00037 #define OW_PROVIDERAGENTCIMOMHANDLE_HPP_INCLUDE_GUARD_
00038
00039 #include "OW_config.h"
00040 #include "OW_CIMOMHandleIFC.hpp"
00041 #include "OW_CIMClass.hpp"
00042
00043 #include "OW_CppProviderBaseIFC.hpp"
00044 #include "OW_IntrusiveReference.hpp"
00045 #include "OW_ProviderAgentEnvironment.hpp"
00046 #include "OW_Map.hpp"
00047 #include "OW_ProviderAgentLockerIFC.hpp"
00048
00049
00050
00051
00052 namespace OW_NAMESPACE
00053 {
00054
00055 using namespace WBEMFlags;
00056
00057 class OW_PROVIDERAGENT_API ProviderAgentCIMOMHandle : public CIMOMHandleIFC
00058 {
00059 public:
00060 ProviderAgentCIMOMHandle(const Map<String, CppProviderBaseIFCRef>& assocProvs,
00061 const Map<String, CppProviderBaseIFCRef>& instProvs,
00062 const Map<String, CppProviderBaseIFCRef>& secondaryInstProvs,
00063 const Map<String, CppProviderBaseIFCRef>& methodProvs,
00064 Cache<CIMClass>& cimClasses,
00065 const ProviderEnvironmentIFCRef& env,
00066 ProviderAgentEnvironment::EClassRetrievalFlag classRetrieval,
00067 const ProviderAgentLockerIFCRef& locker);
00096 virtual CIMInstance getInstance(const String &ns,
00097 const CIMObjectPath &instanceName,
00098 WBEMFlags:: ELocalOnlyFlag localOnly=WBEMFlags:: E_NOT_LOCAL_ONLY,
00099 WBEMFlags:: EIncludeQualifiersFlag includeQualifiers=WBEMFlags:: E_EXCLUDE_QUALIFIERS,
00100 WBEMFlags:: EIncludeClassOriginFlag includeClassOrigin=WBEMFlags:: E_EXCLUDE_CLASS_ORIGIN,
00101 const StringArray *propertyList=0);
00109 virtual void enumQualifierTypes(const String &ns,
00110 CIMQualifierTypeResultHandlerIFC &result);
00124 virtual CIMValue invokeMethod(const String &ns,
00125 const CIMObjectPath &path,
00126 const String &methodName,
00127 const CIMParamValueArray &inParams,
00128 CIMParamValueArray &outParams);
00136 virtual CIMQualifierType getQualifierType(const String &ns, const String &qualifierName);
00143 virtual void setQualifierType(const String &ns, const CIMQualifierType &qualifierType);
00150 virtual void deleteQualifierType(const String &ns, const String &qualName);
00158 virtual void createClass(const String &ns, const CIMClass &cimClass);
00165 virtual void deleteClass(const String &ns, const String &className);
00172 virtual void modifyClass(const String &ns, const CIMClass &cimClass);
00173 #ifndef OW_DISABLE_INSTANCE_MANIPULATION
00174
00180 virtual void deleteInstance(const String &ns, const CIMObjectPath &path);
00190 virtual void setProperty(const String &ns, const CIMObjectPath &instanceName,
00191 const String &propertyName, const CIMValue &newValue);
00201 virtual void modifyInstance(const String &ns,
00202 const CIMInstance &modifiedInstance,
00203 WBEMFlags:: EIncludeQualifiersFlag includeQualifiers=WBEMFlags:: E_INCLUDE_QUALIFIERS,
00204 const StringArray *propertyList=0);
00213 virtual CIMObjectPath createInstance(const String &ns,
00214 const CIMInstance &instance);
00215 #endif // #ifndef OW_DISABLE_INSTANCE_MANIPULATION
00216
00225 virtual CIMValue getProperty(const String &ns,
00226 const CIMObjectPath &instanceName,
00227 const String &propertyName);
00228 #ifndef OW_DISABLE_ASSOCIATION_TRAVERSAL
00229
00266 virtual void associatorNames(const String &ns,
00267 const CIMObjectPath &objectName,
00268 CIMObjectPathResultHandlerIFC &result,
00269 const String &assocClass=String(),
00270 const String &resultClass=String(),
00271 const String &role=String(),
00272 const String &resultRole=String());
00354 virtual void associatorsClasses(const String &ns, const CIMObjectPath &path,
00355 CIMClassResultHandlerIFC &result,
00356 const String &assocClass=String(),
00357 const String &resultClass=String(),
00358 const String &role=String(),
00359 const String &resultRole=String(),
00360 WBEMFlags:: EIncludeQualifiersFlag includeQualifiers=WBEMFlags:: E_EXCLUDE_QUALIFIERS,
00361 WBEMFlags:: EIncludeClassOriginFlag includeClassOrigin=WBEMFlags:: E_EXCLUDE_CLASS_ORIGIN,
00362 const StringArray *propertyList=0);
00441 virtual void associators(const String &ns, const CIMObjectPath &path,
00442 CIMInstanceResultHandlerIFC &result,
00443 const String &assocClass=String(),
00444 const String &resultClass=String(),
00445 const String &role=String(),
00446 const String &resultRole=String(),
00447 WBEMFlags:: EIncludeQualifiersFlag
00448 includeQualifiers=WBEMFlags:: E_EXCLUDE_QUALIFIERS,
00449 WBEMFlags:: EIncludeClassOriginFlag includeClassOrigin=WBEMFlags:: E_EXCLUDE_CLASS_ORIGIN,
00450 const StringArray *propertyList=0);
00476 virtual void referenceNames(const String &ns, const CIMObjectPath &path,
00477 CIMObjectPathResultHandlerIFC &result,
00478 const String &resultClass=String(),
00479 const String &role=String());
00514 virtual void references(const String &ns, const CIMObjectPath &path,
00515 CIMInstanceResultHandlerIFC &result,
00516 const String &resultClass=String(),
00517 const String &role=String(),
00518 WBEMFlags:: EIncludeQualifiersFlag includeQualifiers=WBEMFlags:: E_EXCLUDE_QUALIFIERS,
00519 WBEMFlags:: EIncludeClassOriginFlag includeClassOrigin=WBEMFlags:: E_EXCLUDE_CLASS_ORIGIN,
00520 const StringArray *propertyList=0);
00529 virtual void referencesClasses(const String &ns, const CIMObjectPath &path,
00530 CIMClassResultHandlerIFC &result,
00531 const String &resultClass=String(),
00532 const String &role=String(),
00533 WBEMFlags:: EIncludeQualifiersFlag includeQualifiers=WBEMFlags:: E_EXCLUDE_QUALIFIERS,
00534 WBEMFlags:: EIncludeClassOriginFlag includeClassOrigin=WBEMFlags:: E_EXCLUDE_CLASS_ORIGIN,
00535 const StringArray *propertyList=0);
00536 #endif // #ifndef OW_DISABLE_ASSOCIATION_TRAVERSAL
00537
00541 virtual void close();
00556 virtual void enumClassNames(const String &ns, const String &className,
00557 StringResultHandlerIFC &result,
00558 WBEMFlags:: EDeepFlag deep=WBEMFlags:: E_DEEP);
00579 virtual void enumClass(const String &ns, const String &className,
00580 CIMClassResultHandlerIFC &result,
00581 WBEMFlags:: EDeepFlag deep=WBEMFlags:: E_SHALLOW,
00582 WBEMFlags:: ELocalOnlyFlag localOnly=WBEMFlags:: E_NOT_LOCAL_ONLY,
00583 WBEMFlags:: EIncludeQualifiersFlag includeQualifiers=WBEMFlags:: E_INCLUDE_QUALIFIERS,
00584 WBEMFlags:: EIncludeClassOriginFlag includeClassOrigin=WBEMFlags:: E_INCLUDE_CLASS_ORIGIN);
00620 virtual void enumInstances(const String &ns, const String &className,
00621 CIMInstanceResultHandlerIFC &result,
00622 WBEMFlags:: EDeepFlag deep=WBEMFlags:: E_DEEP,
00623 WBEMFlags:: ELocalOnlyFlag localOnly=WBEMFlags:: E_NOT_LOCAL_ONLY,
00624 WBEMFlags:: EIncludeQualifiersFlag includeQualifiers=WBEMFlags:: E_EXCLUDE_QUALIFIERS,
00625 WBEMFlags:: EIncludeClassOriginFlag includeClassOrigin=WBEMFlags:: E_EXCLUDE_CLASS_ORIGIN,
00626 const StringArray *propertyList=0);
00639 virtual void enumInstanceNames(const String &ns, const String &className,
00640 CIMObjectPathResultHandlerIFC &result);
00660 virtual CIMClass getClass(const String &ns, const String &className,
00661 WBEMFlags:: ELocalOnlyFlag localOnly=WBEMFlags:: E_NOT_LOCAL_ONLY,
00662 WBEMFlags:: EIncludeQualifiersFlag includeQualifiers=WBEMFlags:: E_INCLUDE_QUALIFIERS,
00663 WBEMFlags:: EIncludeClassOriginFlag includeClassOrigin=WBEMFlags:: E_INCLUDE_CLASS_ORIGIN,
00664 const StringArray *propertyList=0);
00686 virtual void execQuery(const String &ns,
00687 CIMInstanceResultHandlerIFC &result,
00688 const String &query, const String &queryLanguage);
00689
00690 private:
00691
00692 class PAReadLock
00693 {
00694 public:
00695 PAReadLock(const ProviderAgentLockerIFCRef& pl);
00696 ~PAReadLock();
00697 private:
00698 ProviderAgentLockerIFCRef m_locker;
00699 };
00700 class PAWriteLock
00701 {
00702 public:
00703 PAWriteLock(const ProviderAgentLockerIFCRef& pl);
00704 ~PAWriteLock();
00705 private:
00706 ProviderAgentLockerIFCRef m_locker;
00707 };
00708 Map<String, CppProviderBaseIFCRef> m_assocProvs;
00709 Map<String, CppProviderBaseIFCRef> m_instProvs;
00710 Map<String, CppProviderBaseIFCRef> m_secondaryInstProvs;
00711 Map<String, CppProviderBaseIFCRef> m_methodProvs;
00712 Cache<CIMClass>& m_cimClasses;
00713 ProviderEnvironmentIFCRef m_PAEnv;
00714 ProviderAgentLockerIFCRef m_locker;
00715 ProviderAgentEnvironment::EClassRetrievalFlag m_classRetrieval;
00716
00717 CppInstanceProviderIFC* getInstanceProvider(const String& ns,
00718 const String& className) const;
00719 CppSecondaryInstanceProviderIFC* getSecondaryInstanceProvider(const String& ns,
00720 const String& className) const;
00721 #ifndef OW_DISABLE_ASSOCIATION_TRAVERSAL
00722 CppAssociatorProviderIFC* getAssociatorProvider(const String& ns,
00723 const String& className) const;
00724 #endif
00725 CppMethodProviderIFC* getMethodProvider(const String& ns,
00726 const String& className,
00727 const String& methodName) const;
00728 CIMClass helperGetClass(const String& ns, const String& className);
00729
00730 };
00731
00732
00733
00734 }
00735
00736 #endif // #ifndef OW_PROVIDERAGENTCIMOMHANDLE_HPP_INCLUDE_GUARD_