DmiAddComponent(3DMI) DMI Library Functions DmiAddComponent(3DMI)NAME
DmiAddComponent, DmiAddGroup, DmiAddLanguage, DmiDeleteComponent,
DmiDeleteGroup, DmiDeleteLanguage - Management Interface database
administration functions
SYNOPSIS
cc [ flag ... ] file ... -ldmimi-ldmi-lnsl-lrwtool [ library ... ]
#include <dmi/server.h>
#include <dmi/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 data‐
base 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 data‐
base. It takes the name of a file, or the address of memory block con‐
taining MIF data, checks the data for adherence to the DMI MIF gram‐
mar, and installs the MIF in the database. The procedure returns a
unique component ID for the newly installed component. The argin param‐
eter is an instance of a DmiAddComponentIN structure containing the
following members:
DmiHandle_t handle; /* 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_t error_status;
DmiId_t compId; /* SP-allocated component ID */
DmiStringList_t *errors; /* installation error messages */
The DmiAddLanguage() function adds a new language mapping for an exist‐
ing 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 DmiAddLan‐
guageIN structure containing the following members:
DmiHandle_t handle; /* an open session handle */
DmiFileDataList_t *fileData; /* language mapping file */
DmiId_t compId; /* component to access */
The result parameter is a pointer to a DmiAddLanguageOUT structure con‐
taining the following members:
DmiErrorStatus_t error_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 con‐
taining the following members:
DmiHandle_t handle; /* an open session handle */
DmiFileDataList_t *fileData; /* MIF file data for group */
DmiId_t compId; /* component to access */
The result parameter is a pointer to a DmiAddGroupOUT structure con‐
taining the following members:
DmiErrorStatus_t error_status;
DmiId_t groupId; /* 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 DmiDeleteCompo‐
nentIN structure containing the following members:
DmiHandle_t handle; /* an open session handle */
DmiId_t compId; /* component to delete */
The result parameter is a pointer to a DmiDeleteComponentOUT structure
containing the following members:
DmiErrorStatus_t error_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 con‐
taining the following members:
DmiHandle_t handle; /* an open session handle */
DmiString_t *language; /* language to delete */
DmiId_t compId; /* component to access */
The result parameter is a pointer to a DmiDeleteLanguageOUT structure
containing the following members:
DmiErrorStatus_t error_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 mem‐
bers:
DmiHandle_t handle; /* an open session handle */
DmiId_t compId; /* component containing group */
DmiId_t groupId; /* group to delete */
The result parameter is a pointer to a DmiDeleteGroupOUT structure con‐
taining the following members:
DmiErrorStatus_t error_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 val‐
ues:
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 │
├─────────────────────────────┼─────────────────────────────┤
│Availability │SUNWsasdk │
├─────────────────────────────┼─────────────────────────────┤
│Interface Stability │Obsolete │
├─────────────────────────────┼─────────────────────────────┤
│MT-level │Unsafe │
└─────────────────────────────┴─────────────────────────────┘
SEE ALSOattributes(5)SunOS 5.10 30 May 2012 DmiAddComponent(3DMI)