Applications can query management classes to determine
what management classes are possible for a given node and to determine
what the attributes are within the management class.
You can only bind objects to management classes by using the dsmBindMC call. You
might want your applications to query the management class attributes
and display them to end users. See Querying the IBM Storage Protect system for more information.
In
the example in Figure 1, a switch
statement is used to distinguish between backup and archive operations
when calling dsmBindMC.
The information returned from this call is stored in the MCBindKey structure. Figure 1. An example of associating
a management class with an object
dsUint16_t send_type;
dsUint32_t dsmHandle;
dsmObjName objName; /* structure containing the object name */
mcBindKey MCBindKey; /* management class information */
char *dest; /* save destination value */
switch (send_type)
{
case (Backup_Send) :
rc = dsmBindMC(dsmHandle,&objName,stBackup,&MCBindKey);
dest = MCBindKey.backup_copy_dest;
break;
case (Archive_Send) :
rc = dsmBindMC(dsmHandle,&objName,stArchive,&MCBindKey);
dest = MCBindKey.archive_copy_dest;
break;
default : ;
}
if (rc)
{
printf("*** dsmBindMC failed: ");
rcApiOut(dsmHandle, rc);
rc = (RC_SESSION_FAILED);
return;
}