DmiAddComponent(3X)
NAME
DmiAddComponent, DmiAddGroup, DmiAddLanguage, DmiDeleteComponent, DmiDeleteGroup, DmiDeleteLanguage − Management Interface database administration functions
SYNOPSIS
cc [ flag ... ] file ... −ldmimi −ldmi −lnsl −lrwtool [ library .. ]
#include <server.h>
#include <miapi.h>
bool_t DmiAddComponent(DmiAddComponentIN argin,
DmiAddComponentOUT ∗result, DmiRpcHandle ∗dmi_rpc_handle);
bool_t DmiAddGroup(DmiAddGroupIN argin,
DmiAddGroupOUT ∗result, DmiRpcHandle ∗dmi_rpc_handle);
bool_t DmiAddLanguage(DmiAddLanguageIN argin,
DmiAddLanguageOUT∗result, DmiRpcHandle ∗dmi_rpc_handle);
bool_t DmiDeleteComponent(DmiDeleteComponentIN argin,
DmiDeleteComponentOUT ∗result, DmiRpcHandle ∗dmi_rpc_handle);
bool_t DmiDeleteGroup(DmiDeleteGroupIN argin,
DmiDeleteGroupOUT ∗result, DmiRpcHandle ∗dmi_rpc_handle);
bool_t DmiDeleteLanguage(DmiDeleteLanguageIN argin,
DmiDeleteLanguageOUT ∗result, DmiRpcHandle ∗dmi_rpc_handle);
DESCRIPTION
The database administration functions add a new component to the database or add a new language mapping for an existing component. You may also remove an existing component, remove a specific language mapping, or remove a group from a component.
The DmiAddComponent() function adds a new component to the DMI database. It takes the name of a file, or the address of memory block containing MIF data, checks the data for adherence to the DMI MIF grammar, and installs the MIF in the database. The procedure returns a unique component ID for the newly installed component. The argin parameter is an instance of a DmiAddComponentIN structure containing the following members:
DmiHandle_thandle;/∗ an open session handle ∗/
DmiFileDataList_t∗fileData; /∗ MIF data for component ∗/
The result parameter is a pointer to a DmiAddComponentOUT structure containing the following members:
DmiErrorStatus_terror_status;
DmiId_tcompId;/∗ SP-allocated component ID ∗/
DmiStringList_t∗errors;/∗ installation error messages ∗/
The DmiAddLanguage() function adds a new language mapping for an existing component in the database. It takes the name of a file, or the address of memory block containing translated MIF data, checks the data for adherence to the DMI MIF grammar, and installs the language MIF in the database. The argin parameter is an instance of a DmiAddLanguageIN structure containing the following members:
DmiHandle_thandle;/∗ an open session handle ∗/
DmiFileDataList_t∗fileData; /∗ language mapping file ∗/
DmiId_tcompId;/∗ component to access ∗/
The result parameter is a pointer to a DmiAddLanguageOUT structure containing the following members:
DmiErrorStatus_terror_status;
DmiStringList_t∗errors;/∗ installation error messages ∗/
The DmiAddGroup() function adds a new group to an existing component in the database. It takes the name of a file, or the address of memory block containing the group’s MIF data, checks the data for adherence to the DMI MIF grammar, and installs the group MIF in the database. The argin parameter is an instance of a
DmiAddGroupIN structure containing the following members:
DmiHandle_thandle;/∗ an open session handle ∗/
DmiFileDataList_t∗fileData; /∗ MIF file data for group ∗/
DmiId_tcompId;/∗ component to access ∗/
The result parameter is a pointer to a DmiAddGroupOUT structure containing the following members:
DmiErrorStatus_terror_status;
DmiId_tgroupId;/∗ SP-allocated group ID ∗/
DmiStringList_t∗errors;/∗ installation error messages ∗/
The DmiDeleteComponent() function removes an existing component from the database. The argin parameter is an instance of a DmiDeleteComponentIN structure containing the following members:
DmiHandle_thandle;/∗ an open session handle ∗/
DmiId_tcompId;/∗ component to delete ∗/
The result parameter is a pointer to a DmiDeleteComponentOUT structure containing the following members:
DmiErrorStatus_terror_status;
The DmiDeleteLanguage() function removes a specific language mapping for a component. You specify the language string and component ID. The argin parameter is an instance of a DmiDeleteLanguageIN structure containing the following members:
DmiHandle_thandle;/∗ an open session handle ∗/
DmiString_t∗language;/∗ language to delete ∗/
DmiId_tcompId;/∗ component to access ∗/
The result parameter is a pointer to a DmiDeleteLanguageOUT structure containing the following members:
DmiErrorStatus_terror_status;
The DmiDeleteGroup() function removes a group from a component. The caller specifies the component and group IDs. The argin parameter is an instance of a DmiDeleteGroupIN structure containing the following members:
DmiHandle_thandle;/∗ an open session handle ∗/
DmiId_tcompId;/∗ component containing group ∗/
DmiId_tgroupId;/∗ group to delete ∗/
The result parameter is a pointer to a DmiDeleteGroupOUT structure containing the following members:
DmiErrorStatus_terror_status;
RETURN VALUES
The DmiAddComponent() function returns the following possible values:
DMIERR_NO_ERROR
DMIERR_ILLEGAL_RPC_HANDLE
DMIERR_OUT_OF_MEMORY
DMIERR_ILLEGAL_PARAMETER
DMIERR_SP_INACTIVE
DMIERR_FILE_ERROR
DMIERR_BAD_SCHEMA_DESCRIPTION_FILE
The DmiAddGroup() function returns the following possible values:
DMIERR_NO_ERROR
DMIERR_ILLEGAL_RPC_HANDLE
DMIERR_OUT_OF_MEMORY
DMIERR_ILLEGAL_PARAMETER
DMIERR_SP_INACTIVE
DMIERR_INSUFFICIENT_PRIVILEGES
DMIERR_COMPONENT_NOT_FOUND
DMIERR_FILE_ERROR
DMIERR_BAD_SCHEMA_DESCRIPTION_FILE
The DmiAddLanguage() function returns the following possible values:
DMIERR_NO_ERROR
DMIERR_ILLEGAL_RPC_HANDLE
DMIERR_OUT_OF_MEMORY
DMIERR_ILLEGAL_PARAMETER
DMIERR_SP_INACTIVE
DMIERR_COMPONENT_NOT_FOUND
DMIERR_FILE_ERROR
DMIERR_BAD_SCHEMA_DESCRIPTION_FILE
The DmiDeleteComponent() function returns the following possible values:
DMIERR_NO_ERROR
DMIERR_ILLEGAL_RPC_HANDLE
DMIERR_OUT_OF_MEMORY
DMIERR_ILLEGAL_PARAMETER
DMIERR_SP_INACTIVE
DMIERR_INSUFFICIENT_PRIVILEGES
DMIERR_COMPONENT_NOT_FOUND
DMIERR_FILE_ERROR
THe DmiDeleteGroup() function returns the following possible values:
DMIERR_NO_ERROR
DMIERR_ILLEGAL_RPC_HANDLE
DMIERR_OUT_OF_MEMORY
DMIERR_ILLEGAL_PARAMETER
DMIERR_SP_INACTIVE
DMIERR_INSUFFICIENT_PRIVILEGES
DMIERR_COMPONENT_NOT_FOUND
DMIERR_FILE_ERROR
The DmiDeleteLanguage() function returns the following possible values:
DMIERR_NO_ERROR
DMIERR_ILLEGAL_RPC_HANDLE
DMIERR_OUT_OF_MEMORY
DMIERR_ILLEGAL_PARAMETER
DMIERR_SP_INACTIVE
DMIERR_COMPONENT_NOT_FOUND
DMIERR_FILE_ERROR
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
| MT-level | Unsafe |
SEE ALSO
SunOS 5.6 — Last change: 17 Dec 1996