📄 providerregistrationmanager.h
字号:
Array<CIMInstance> enumerateInstancesForClass( const CIMObjectPath & classReference, const Boolean includeQualifiers = false, const Boolean includeClassOrigin = false, const CIMPropertyList & propertyList = CIMPropertyList()); Array<CIMObjectPath> enumerateInstanceNamesForClass( const CIMObjectPath & ref); void modifyInstance(const CIMObjectPath & ref, const CIMInstance & instance, const Boolean includeQualifiers, const Array<CIMName> & propertyList); CIMObjectPath createInstance(const CIMObjectPath & ref, const CIMInstance & instance); void deleteInstance(const CIMObjectPath & ref); Array<Uint16> getProviderModuleStatus(const String & providerModuleName); /** Updates the Provider Module Status. The value of the OperationalStatus property is updated in the Provider Module instance in the repository, and in the provider registration table. If any removeStatus values are specified, each one of the values found in the current OperationalStatus property value is removed from the array. If any appendStatus values are specified, each one of the values not found in the current OperationalStatus property value is appended to the array. The resulting OperationalStatus property value is returned in the output outStatus parameter. @param providerModuleName String specifying name of the provider module whose status is to be updated @param removeStatus Array of Uint16 specifying values to be removed from the status array (may be empty) @param appendStatus Array of Uint16 specifying values to be appended to the status array (may be empty) @param outStatus OUTPUT Array of Uint16 returning the resulting status array after update @return True if provider module status is successfully updated; False, otherwise */ Boolean updateProviderModuleStatus( const String& providerModuleName, const Array<Uint16>& removeStatus, const Array<Uint16>& appendStatus, Array<Uint16>& outStatus); /** Iterate through registration hash table, if AutoStart property is set to true in a PG_Provider instance, send initialize provider request message to Provider Manager Service to load and initialize the provider */ void initializeProviders(); /** send initialize provider request message to Provider Manager Service to load the module and initialize providers in the module */ void initializeProviders(const CIMInstance & providerModule); /** Determines whether specified provider is an indication provider. @param moduleName specifies name of the provider module which the provider is in. @param providerName specifies name of the provider which needs to be determine. @return True if the provider is an indication provider; Otherwise, return false. */ Boolean isIndicationProvider( const String & moduleName, const String & providerName); enum Operation {OP_CREATE = 1, OP_DELETE = 2, OP_MODIFY = 3};protected: CIMRepository * _repository; /** HashTable to store instances of PG_ProviderModule, instances of PG_Provider, and instances of PG_ProviderCapability */ RegistrationTable* _registrationTable; /** A lock used to control access to the _registrationTable. Before accessing the _registrationTable, one must first lock this for read access. Before updating the _registrationTable, one must first lock this for write access. One should never attempt to lock the _registrationTableLock while holding the repository lock. */ ReadWriteSem _registrationTableLock; String _generateKey(const String & name, const String & provider); String _generateKey(const CIMNamespaceName & namespaceName, const CIMName & className, const String & providerType); String _generateKey(const CIMNamespaceName & namespaceName, const CIMName & className, const String & supportedMethod, const String & providerType); MessageQueueService * _getIndicationService(); void _sendMessageToSubscription( CIMNotifyProviderRegistrationRequestMessage * notify); void _sendInitializeProviderMessage( const CIMInstance & provider, const CIMInstance & providerModule);private: /** Initialize the registration table. The caller must first lock _registrationTableLock for write access. */ void _initialRegistrationTable(); /** Adds an entry to the registration table for the specified instances. The caller must first lock _registrationTableLock for write access. */ void _addInstancesToTable(const String & key, Array<CIMInstance> & instances); /** Adds an entry to the registration table for the specified instances. This method is intended for use in the initialization routine. The caller must first lock _registrationTableLock for write access. */ void _addInitialInstancesToTable(const String & key, const Array<CIMInstance> & instances); /** Get the provider instance and module instance corresponding to the specified provider name or provider module name from the registration table. The caller must first lock _registrationTableLock for read (or write) access. */ void _getInstances(const String & providerName, const String & moduleName, CIMInstance & providerInstance, CIMInstance & moduleInstance); void _getPropertyNames(const CIMInstance & instance, CIMPropertyList & propertyNames); /** Notify the subscription service that the specified provider capability instance was deleted. The caller must first lock _registrationTableLock for read (or write) access. */ void _sendDeleteNotifyMessage(const CIMInstance & instance); /** Notify the subscription service that the specified provider capability instance was modified. The caller must first lock _registrationTableLock for read (or write) access. */ void _sendModifyNotifyMessage(const CIMInstance & instance, const CIMInstance & origInstance); /** Register a provider. The caller must first lock _registrationTableLock for write access. */ CIMObjectPath _createInstance(const CIMObjectPath & ref, const CIMInstance & instance, Operation flag); /** Unregister a provider. The caller must first lock _registrationTableLock for write access. */ void _deleteInstance(const CIMObjectPath & ref, Operation flag); /** Set the status of the specified provider module instance and update the repository. The caller must first lock the repository for write access. */ void _setStatus(const Array<Uint16> & status, CIMInstance & moduleInstance); /** Gets the Provider Module Status. The value of the OperationalStatus property is retrieved from the Provider Module instance in the provider registration table. @param providerModuleName String specifying name of the provider module whose status is to be retrieved @exception CIMException(CIM_ERR_FAILED) if the specified provider module is not found. @return Array of Uint16 containing the OperationalStatus property value */ Array<Uint16> _getProviderModuleStatus( const String& providerModuleName);};class PEGASUS_PRM_LINKAGE WildCardNamespaceNames { static Array<String> _nsstr; static Array<CIMNamespaceName> _ns; static Array<Uint32> _nsl; public: static String add(String ns);// static String & check(const String & in); static const CIMNamespaceName & check(const CIMNamespaceName & in); static void remap(CIMRepository *repos, Array<String> & in, Array<CIMNamespaceName> & names); static const Array<String> & getArray();};PEGASUS_NAMESPACE_END#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -