CMPI 2.1.0 API
|
Macros | |
#define | CMInstanceMIStub(pfx, miname, mbvar, hook) |
Generate function table and factory function for an instance MI written in plain C. More... | |
#define | CMAssociationMIStub(pfx, miname, mbvar, hook) |
Generate function table and factory function for an association MI written in plain C. More... | |
#define | CMMethodMIStub(pfx, miname, mbvar, hook) |
Generate function table and factory function for a method MI written in plain C. More... | |
#define | CMPropertyMIStub(pfx, miname, mbvar, hook) |
Generate function table and factory function for a property MI written in plain C (Deprecated). More... | |
#define | CMIndicationMIStub(pfx, miname, mbvar, hook) |
Generate function table and factory function for an indication MI written in plain C. More... | |
#define | CMInitHook(pfx, mitype) |
MI factory stub hook statement specifying additional initialization. More... | |
#define | CMNoHook |
MI factory stub hook statement specifying no additional initialization. More... | |
#define | CMInstanceMIFactory(cn, miname) |
Generate function table and factory function for an instance MI written in C++. More... | |
#define | CMAssociationMIFactory(cn, miname) |
Generate function table and factory function for an association MI written in C++. More... | |
#define | CMMethodMIFactory(cn, miname) |
Generate function table and factory function for a method MI written in C++. More... | |
#define | CMPropertyMIFactory(cn, miname) |
Generate function table and factory function for a property MI written in C++ (Deprecated). More... | |
#define | CMIndicationMIFactory(cn, miname) |
Generate function table and factory function for an indication MI written in C++. More... | |
#define | CMProviderBase(miname) |
CMProviderBase macro. More... | |
MI Factory Stubs.
The MI factory stubs are macros that generate the the MI factory functions and function tables.
#define CMInstanceMIStub | ( | pfx, | |
miname, | |||
mbvar, | |||
hook | |||
) |
Generate function table and factory function for an instance MI written in plain C.
The CMInstanceMIStub() macro generates the function table and factory function for an instance MI (also known as instance provider)
This macro is for CMPI MIs written in plain C. The code can be compiled with C or C++.
The generated factory function is an MI-specific factory function named \<miname\>_Create_InstanceMI()
. It is exported by the MI load library and is called when the libary is loaded by the MB.
The generated MI function table contains pointers to all functions for instance MIs as defined in the CMPI version that is implemented (see CMPI_VERSION). The user of this macro needs to provide all of these functions. Those functions that are not going to be implemented, still need to be provided and implemented by returning CMPI_RC_ERR_NOT_SUPPORTED.
While the generated function table is a global variable in the MI file calling this macro, it should not be accessed directly by any MI code or in the code specified by the hook
argument. Instead, the CMInitHook() macro should be used.
Because the name of the global variable for the generated function table does not include the MI name, there is a limitation of one generated instance MI per source file; that is, this macro can be called at most once in a particular compile unit.
The function names are fixed, and are generated with a prefix specified using the pfx
argument of the macro:
Function name | Description | CMPI version |
---|---|---|
<pfx>Cleanup() | CMPIInstanceMIFT.cleanup() | 1.0 |
<pfx>EnumInstanceNames() | CMPIInstanceMIFT.enumerateInstanceNames() | 1.0 |
<pfx>EnumInstances() | CMPIInstanceMIFT.enumerateInstances() | 1.0 |
<pfx>GetInstance() | CMPIInstanceMIFT.getInstance() | 1.0 |
<pfx>CreateInstance() | CMPIInstanceMIFT.createInstance() | 1.0 |
<pfx>ModifyInstance() | CMPIInstanceMIFT.modifyInstance() | 1.0 |
<pfx>DeleteInstance() | CMPIInstanceMIFT.deleteInstance() | 1.0 |
<pfx>ExecQuery() | CMPIInstanceMIFT.execQuery() | 1.0 |
<pfx>EnumInstancesFiltered() | CMPIInstanceMIFT.enumerateInstancesFiltered() | 2.1 |
pfx | The prefix for all functions in the MI function table. This is a character string without quotes. |
miname | The MI name for this MI. This is a character string without quotes. |
mbvar | The name of a variable that upon return of the macro will have been updated with the CMPIBroker pointer passed by the MB to the factory function. This is a character string without quotes. |
hook | A single C statement that is executed in the generated factory function, after the CMPIInstanceMI structure has been created. This is a character string without quotes, and without a trailing semicolon. This enables you to perform additional initialization functions and is normally a function call like While that C statement is executed in the local scope of the factory function, it should not access the arguments or local variables of the factory function. Instead, the CMInitHook() macro should be used. |
#define CMAssociationMIStub | ( | pfx, | |
miname, | |||
mbvar, | |||
hook | |||
) |
Generate function table and factory function for an association MI written in plain C.
The CMAssociationMIStub() macro generates the function table and factory function for an association MI (also known as association provider)
This macro is for CMPI MIs written in plain C. The code can be compiled with C or C++.
The generated factory function is an MI-specific factory function named \<miname\>_Create_AssociationMI()
. It is exported by the MI load library and is called when the libary is loaded by the MB.
The generated MI function table contains pointers to all functions for association MIs as defined in the CMPI version that is implemented (see CMPI_VERSION). The user of this macro needs to provide all of these functions. Those functions that are not going to be implemented, still need to be provided and implemented by returning CMPI_RC_ERR_NOT_SUPPORTED.
While the gtenerated function table is a global variable in the MI file calling this macro, it should not be accessed directly by any MI code or in the code specified by the hook
argument. Instead, the CMInitHook() macro should be used.
Because the name of the global variable for the generated function table does not include the MI name, there is a limitation of one generated association MI per source file; that is, this macro can be called at most once in a particular compile unit.
The function names are fixed, and are generated with a prefix specified using the pfx
argument of the macro:
Function name | Description | CMPI version |
---|---|---|
<pfx>AssociationCleanup() | CMPIAssociationMIFT.cleanup() | 1.0 |
<pfx>Associators() | CMPIAssociationMIFT.associators() | 1.0 |
<pfx>AssociatorNames() | CMPIAssociationMIFT.associatorNames() | 1.0 |
<pfx>References() | CMPIAssociationMIFT.references() | 1.0 |
<pfx>ReferenceNames() | CMPIAssociationMIFT.referenceNames() | 1.0 |
<pfx>AssociatorsFiltered() | CMPIAssociationMIFT.associatorsFiltered() | 2.1 |
<pfx>ReferencesFiltered() | CMPIAssociationMIFT.referencesFiltered() | 2.1 |
pfx | The prefix for all functions in the MI function table. This is a character string without quotes. |
miname | The MI name for this MI. This is a character string without quotes. |
mbvar | The name of a variable that upon return of the macro will have been updated with the CMPIBroker pointer passed by the MB to the factory function. This is a character string without quotes. |
hook | A single C statement that is executed in the generated factory function, after the CMPIInstanceMI structure has been created. This is a character string without quotes, and without a trailing semicolon. This enables you to perform additional initialization functions and is normally a function call like While that C statement is executed in the local scope of the factory function, it should not access the arguments or local variables of the factory function. Instead, the CMInitHook() macro should be used. |
#define CMMethodMIStub | ( | pfx, | |
miname, | |||
mbvar, | |||
hook | |||
) |
Generate function table and factory function for a method MI written in plain C.
The CMMethodMIStub() macro generates the function table and factory function for a method MI (also known as method provider)
This macro is for CMPI MIs written in plain C. The code can be compiled with C or C++.
The generated factory function is an MI-specific factory function named \<miname\>_Create_MethodMI()
. It is exported by the MI load library and is called when the libary is loaded by the MB.
The generated MI function table contains pointers to all functions for method MIs as defined in the CMPI version that is implemented (see CMPI_VERSION). The user of this macro needs to provide all of these functions. Those functions that are not going to be implemented, still need to be provided and implemented by returning CMPI_RC_ERR_NOT_SUPPORTED.
While the generated function table is a global variable in the MI file calling this macro, it should not be accessed directly by any MI code or in the code specified by the hook
argument. Instead, the CMInitHook() macro should be used.
Because the name of the global variable for the generated function table does not include the MI name, there is a limitation of one generated method MI per source file; that is, this macro can be called at most once in a particular compile unit.
The function names are fixed, and are generated with a prefix specified using the pfx
argument of the macro:
Function name | Description | CMPI version |
---|---|---|
<pfx>MethodCleanup() | CMPIMethodMIFT.cleanup() | 1.0 |
<pfx>InvokeMethod() | CMPIMethodMIFT.invokeMethod() | 1.0 |
pfx | The prefix for all functions in the MI function table. This is a character string without quotes. |
miname | The MI name for this MI. This is a character string without quotes. |
mbvar | The name of a variable that upon return of the macro will have been updated with the CMPIBroker pointer passed by the MB to the factory function. This is a character string without quotes. |
hook | A single C statement that is executed in the generated factory function, after the CMPIInstanceMI structure has been created. This is a character string without quotes, and without a trailing semicolon. This enables you to perform additional initialization functions and is normally a function call like While that C statement is executed in the local scope of the factory function, it should not access the arguments or local variables of the factory function. Instead, the CMInitHook() macro should be used. |
#define CMPropertyMIStub | ( | pfx, | |
miname, | |||
mbvar, | |||
hook | |||
) |
Generate function table and factory function for a property MI written in plain C (Deprecated).
The CMPropertyMIStub() macro generates the function table and factory function for a property MI (also known as property provider)
This macro is for CMPI MIs written in plain C. The code can be compiled with C or C++.
The generated factory function is an MI-specific factory function named \<miname\>_Create_PropertyMI()
. It is exported by the MI load library and is called when the libary is loaded by the MB.
The generated MI function table contains pointers to all functions for property MIs as defined in the CMPI version that is implemented (see CMPI_VERSION). The user of this macro needs to provide all of these functions. Those functions that are not going to be implemented, still need to be provided and implemented by returning CMPI_RC_ERR_NOT_SUPPORTED.
While the generated function table is a global variable in the MI file calling this macro, it should not be accessed directly by any MI code or in the code specified by the hook
argument. Instead, the CMInitHook() macro should be used.
Because the name of the global variable for the generated function table does not include the MI name, there is a limitation of one generated property MI per source file; that is, this macro can be called at most once in a particular compile unit.
The function names are fixed, and are generated with a prefix specified using the pfx
argument of the macro:
Function name | Description | CMPI version |
---|---|---|
<pfx>PropertyCleanup() | CMPIPropertyMIFT.cleanup() | 1.0 |
<pfx>SetProperty() | CMPIPropertyMIFT.setProperty() | 1.0 |
<pfx>GetProperty() | CMPIPropertyMIFT.getProperty() | 1.0 |
<pfx>SetPropertyWithOrigin() | CMPIPropertyMIFT.setPropertyWithOrigin() | 2.0 |
pfx | The prefix for all functions in the MI function table. This is a character string without quotes. |
miname | The MI name for this MI. This is a character string without quotes. |
mbvar | The name of a variable that upon return of the macro will have been updated with the CMPIBroker pointer passed by the MB to the factory function. This is a character string without quotes. |
hook | A single C statement that is executed in the generated factory function, after the CMPIInstanceMI structure has been created. This is a character string without quotes, and without a trailing semicolon. This enables you to perform additional initialization functions and is normally a function call like While that C statement is executed in the local scope of the factory function, it should not access the arguments or local variables of the factory function. Instead, the CMInitHook() macro should be used. |
#define CMIndicationMIStub | ( | pfx, | |
miname, | |||
mbvar, | |||
hook | |||
) |
Generate function table and factory function for an indication MI written in plain C.
The CMIndicationMIStub() macro generates the function table and factory function for an indication MI (also known as indication provider)
This macro is for CMPI MIs written in plain C. The code can be compiled with C or C++.
The generated factory function is an MI-specific factory function named \<miname\>_Create_IndicationMI()
. It is exported by the MI load library and is called when the libary is loaded by the MB.
The generated MI function table contains pointers to all functions for indication MIs as defined in the CMPI version that is implemented (see CMPI_VERSION). The user of this macro needs to provide all of these functions. Those functions that are not going to be implemented, still need to be provided and implemented by returning CMPI_RC_ERR_NOT_SUPPORTED.
While the generated function table is a global variable in the MI file calling this macro, it should not be accessed directly by any MI code or in the code specified by the hook
argument. Instead, the CMInitHook() macro should be used.
Because the name of the global variable for the generated function table does not include the MI name, there is a limitation of one generated indication MI per source file; that is, this macro can be called at most once in a particular compile unit.
The function names are fixed, and are generated with a prefix specified using the pfx
argument of the macro:
Function name | Description | CMPI version |
---|---|---|
<pfx>IndicationCleanup() | CMPIIndicationMIFT.cleanup() | 1.0 |
<pfx>AuthorizeFilter() | CMPIIndicationMIFT.authorizeFilter() | 1.0 |
<pfx>MustPoll() | CMPIIndicationMIFT.mustPoll() | 1.0 |
<pfx>ActivateFilter() | CMPIIndicationMIFT.activateFilter() | 1.0 |
<pfx>DeActivateFilter() | CMPIIndicationMIFT.deActivateFilter() | 1.0 |
<pfx>EnableIndications() | CMPIIndicationMIFT.enableIndications() | 1.0 |
<pfx>DisableIndications() | CMPIIndicationMIFT.disableIndications() | 1.0 |
<pfx>AuthorizeFilterCollection() | CMPIIndicationMIFT.authorizeFilterCollection() | 2.1 |
<pfx>ActivateFilterCollection() | CMPIIndicationMIFT.activateFilterCollection() | 2.1 |
<pfx>DeActivateFilterCollection() | CMPIIndicationMIFT.deActivateFilterCollection() | 2.1 |
pfx | The prefix for all functions in the MI function table. This is a character string without quotes. |
miname | The MI name for this MI. This is a character string without quotes. |
mbvar | The name of a variable that upon return of the macro will have been updated with the CMPIBroker pointer passed by the MB to the factory function. This is a character string without quotes. |
hook | A single C statement that is executed in the generated factory function, after the CMPIInstanceMI structure has been created. This is a character string without quotes, and without a trailing semicolon. This enables you to perform additional initialization functions and is normally a function call like While that C statement is executed in the local scope of the factory function, it should not access the arguments or local variables of the factory function. Instead, the CMInitHook() macro should be used. |
#define CMInitHook | ( | pfx, | |
mitype | |||
) |
MI factory stub hook statement specifying additional initialization.
CMInitHook() is used as a value for the hook
argument of MI factory stub macros for plain C, for specifying that the generated factory function is to execute an MI initialization function with the following name and signature:
pfx | The prefix for all functions in the MI function table. This is a character string without quotes. |
mitype | The MI type. This is a character string without quotes and can be one of:
|
#define CMNoHook |
MI factory stub hook statement specifying no additional initialization.
CMNoHook is used as a value for the hook
argument of MI factory stub macros for plain C, for specifying that the generated factory function is not going to execute any additional initialization code.
#define CMInstanceMIFactory | ( | cn, | |
miname | |||
) |
Generate function table and factory function for an instance MI written in C++.
The CMInstanceMIFactory() macro generates the function table and factory function for an instance MI (also known as instance provider)
This macro is for CMPI MIs written in C++. The generated code uses some common C++ classes (named Cmpi*) that are not defined in the CMPI header files.
cn | The C++ class name of this instance provider (a subclass of CmpiInstanceMI). This is a character string without quotes. |
miname | The provider name under which this provider is registered. This is a character string without quotes. |
#define CMAssociationMIFactory | ( | cn, | |
miname | |||
) |
Generate function table and factory function for an association MI written in C++.
The CMAssociationMIFactory() macro generates the function table and factory function for an association MI (also known as association provider)
This macro is for CMPI MIs written in C++. The generated code uses some common C++ classes (named Cmpi*) that are not defined in the CMPI header files.
cn | The C++ class name of this association provider (a subclass of CmpiAssociationMI). This is a character string without quotes. |
miname | The provider name under which this provider is registered. This is a character string without quotes. |
#define CMMethodMIFactory | ( | cn, | |
miname | |||
) |
Generate function table and factory function for a method MI written in C++.
The CMMethodMIFactory() macro generates the function table and factory function for an method MI (also known as method provider)
This macro is for CMPI MIs written in C++. The generated code uses some common C++ classes (named Cmpi*) that are not defined in the CMPI header files.
cn | The C++ class name of this method provider (a subclass of CmpiMethodMI). This is a character string without quotes. |
miname | The provider name under which this provider is registered. This is a character string without quotes. |
#define CMPropertyMIFactory | ( | cn, | |
miname | |||
) |
Generate function table and factory function for a property MI written in C++ (Deprecated).
The CMPropertyMIFactory() macro generates the function table and factory function for an property MI (also known as property provider)
This macro is for CMPI MIs written in C++. The generated code uses some common C++ classes (named Cmpi*) that are not defined in the CMPI header files.
cn | The C++ class name of this method provider (a subclass of CmpiPropertyMI). This is a character string without quotes. |
miname | The provider name under which this provider is registered. This is a character string without quotes. |
#define CMIndicationMIFactory | ( | cn, | |
miname | |||
) |
Generate function table and factory function for an indication MI written in C++.
The CMIndicationMIFactory() macro generates the function table and factory function for an indication MI (also known as indication provider)
This macro is for CMPI MIs written in C++. The generated code uses some common C++ classes (named Cmpi*) that are not defined in the CMPI header files.
cn | The C++ class name of this indication provider (a subclass of CmpiIndicationMI). This is a character string without quotes. |
miname | The provider name under which this provider is registered. This is a character string without quotes. |
#define CMProviderBase | ( | miname | ) |