📄 repositoryupgrade.h
字号:
// processing classes. // static const char* _CLASS_ONLY; // // Indicates that the Special Processing Module is interested in // processing qualifiers. // static const char* _QUALIFIER_ONLY; // // Indicates that the Special Processing Module is interested in processing // instances. // static const char* _INSTANCE_ONLY; // // Indicates that the Special Processing Module is interested in // processing classes, qualifiers and instances. // static const char* _ALL; // // Special Processing Module entry point. // typedef SchemaSpecialProcessModule * (*CREATE_SSPMODULE_FUNCTION)(); // // Contains the handles to Special Processing Modules. // SchemaSpecialProcessModule* _sspModule[SSPModuleTable::NUM_MODULES];#endif // // Contains the PEGASUS_HOME environment variable value used in // locating the Special Processing shared libraries. // String _pegasusHome; // // Compares the namespaces passed and returns namespaces that are present // in the old but not in the new repository. // // @param oldNamespaces a list of namespaces in old repository // @param newNamespaces a list of namespaces in new repository // // @return a list of missing namespaces // Array<CIMNamespaceName> _compareNamespaces( const Array<CIMNamespaceName>& oldNamespaces , const Array<CIMNamespaceName>& newNamespaces); // // Creates namespaces in the new repository. Also adds the classes, // qualifiers from the namespaces into the new repository. Any instances // that exist in the given namespaces will be created by the _addInstances // method. // // @param namespaces a list of namespaces to be added. // void _addNamespaces(const Array<CIMNamespaceName>& namespaces); // // Identifies the missing classes and existing classes and // passes them to the _processNewClasses and _processExistingClasses // methods. // // @param namespaceName namespace that is getting compared. // // @param oldClasses classes in the old repository. // // @param newClasses classes in the new repository. // void _processClasses( const CIMNamespaceName& namespaceName, const Array<CIMName>& oldClasses, Array<CIMName>& newClasses); // // Processes the new classes in the hierarchical order and passes them to // _addClassToRepository. // // @param namespaceName namespace that is getting compared. // @param oldClasses classes in the old repository. // @param newClasses classes in the new repository. // void _processNewClasses( const CIMNamespaceName& namespaceName, Array<CIMName>& oldClasses, Array<CIMName>& newClasses); // // Performs a version comparison with the existing classes in the new // repository. The following lists the behavior: // // 1. The version number existed in the old but not the new class. // A warning message is displayed. The class is not imported to the // new repository. // 2. Both classes contain versions and the old version is greater // than the new version. A warning message is displayed. The class // is not imported to the new repository. // // If the new Repository contains a class with a higher version number // then no messages are displayed. // // @param namespaceName namespacename // @param existingClasses list of classes already existing in the new // repository // void _processExistingClasses (const CIMNamespaceName& namespaceName, const Array<CIMName>& existingClasses); // // Adds a class to the new repository. // // @param namespaceName namespace to which the class belongs // // @param className name of the class to be added // // @param existingClasses list of classes that are already existing // in the new repository // @return 0 if the class was added successfully // // 1 if the class addition failed because a // dependent class did not exist. In this case // the class creation will be retried. // Uint32 _addClassToRepository (const CIMNamespaceName& namespaceName, const CIMName& className, const Array<CIMName> existingClasses); // // Adds instances from the old repository into the new repository. // If an instance already exists in the new repository then it // is not imported from the old repository. // void _addInstances (); // // Adds qualifiers from the old repository into the new repository. // If a qualifier already exists in the new repository then it // is not imported. // // @param CIMNamespaceName contains the Namespace name. // void _addQualifiers (const CIMNamespaceName namespaceName); // // Logs a failed CIM/XML request in to an output file. // // @param outputFile output filename. // void _logRequestToFile ( const String& outputFile ); // // Logs an error message to indicate an error while adding a class. // // @param CIMNamespaceName contains the Namespace name. // // @param CIMClass contains the class. // // @param message contains the error message if available, // otherwise set to String::EMPTY // // @exception logs the request and propagates the // error encountered during create class. // void _logCreateClassError( const CIMNamespaceName& namespaceName, const CIMClass& oldClass, const String& message); // // Logs an error message to indicate an error while adding an instance. // // @param CIMNamespaceName contains the Namespace name. // // @param CIMInstance contains the instance. // // @param message contains the error message if available // otherwise set to String::EMPTY // // @exception logs the request and propagates the // error encountered during create instance. // void _logCreateInstanceError( const CIMNamespaceName& namespaceName, const CIMInstance& instance, const String& message); // // Logs an error message to indicate an error while adding an qualifier. // // @param CIMNamespaceName contains the Namespace name. // // @param CIMQualifierDecl contains the qualifier. // // @param message contains the error message if available // otherwise set to String::EMPTY // // @exception logs the request and propagates the // error encountered during set qualifier. // void _logSetQualifierError( const CIMNamespaceName& namespaceName, const CIMQualifierDecl& qualifier, const String& message);#ifdef ENABLE_MODULE_PROCESSING // // Initializes the Special Processing Modules. // void _initSSPModule(); // // Unloads the Special Processing Modules. // void _cleanupSSPModule(); // // Loads the Special Processing shared library module. // DynamicLibrary _loadSSPModule(const String& moduleName); // // Invokes the Qualifier Special Processing Modules. // // @param oldQualifier input qualifier to be processed // // @param newQualifier processed qualifier to be returned // // @return true if the qualifier must be created // false if the qualifier must be ignored // Boolean _invokeModules( CIMQualifierDecl& oldQualifier, CIMQualifierDecl& newQualifir); // // Invokes the Class Special Processing Modules. // // @param oldClass input class to be processed // // @param newClass processed class to be returned // // @return true if the class must be created // false if the class must be ignored // Boolean _invokeModules( CIMClass& oldClass, CIMClass& newClass); // // Invokes the Instance Special Processing Modules. // // @param oldInstance input instance to be processed // // @param newInstance processed instance to be returned // // @return true if the instance must be created // false if the instance must be ignored // Boolean _invokeModules( CIMInstance& oldInstance, CIMInstance& newInstance); // // Creates a Special Processing Module. // // @param library handle to the shared library // // @return SchemaSpecialProcessModule handle to the Special Processing // library // SchemaSpecialProcessModule * _createSSPModule(DynamicLibrary& library);#endif // // Compares two version strings. // // @param oldVersion version number of the old class // // @param newVersion version number of the new class // // @return true if the old class has a higher version number // // false if the old class has a lower or the same // version number // Boolean _compareVersion( const String& oldVersion, const String& newVersion ); // // Parses a version string into major, minor and update components. // // @param version the version string to be parsed // // @param iMajor major number to be returned // // @param iMinor minor number to be returned // // @param iUpdate update number to be returned // // @return true if the version number is valid // // false if the version number is invalid // Boolean _parseVersion(const String& version, Sint32& iMajor, Sint32& iMinor, Sint32& iUpdate);};PEGASUS_NAMESPACE_END#endif // Pegasus_RepositoryUpgrade_h
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -