API Guide
1-16 Getting Started 601355 Rev A
Functions Function names used in the VolServ API also follow a specific set
of rules. All function names exist in the format of the VS prefix,
followed by the object name, and ending with a condensed
description of the function. The following example shows the
overall form of function names:
VS_objectname_functiondescription()
The function descriptions also follow a naming convention, with the
description coming from the following list: “GetFields”, “SetFields”,
“Create”, and “Destroy.” Refer to the following example:
VS_Drive_Create();
VS_Drive_Destroy(VS_DRIVE_HANDLE);
VS_Drive_GetFields(VS_DRIVE_HANDLE, ... )
VS_Drive_SetFields(VS_DRIVE_HANDLE, ... )
The “GetFields” and “SetFields” functions each take a
variable argument list beginning with a handle. After the
handle, the client specifies identifier-parameter pairs (or
triples in some cases). These identifiers tell the function what
field is to be accessed. The parameter tells the function either
the value to be assigned to the field or the location where the
filed value is to be retrieved. The identifier VSID_ENDFIELD
must appear at the end of the variable argument list. Refer to
the following example:
mount_status ( VST_COMMAND_HANDLE
cmdh )
{VST_STATUS_HANDLE statush;
VST_ERROR_HANDLE errorh
VST_STATUS_CODE satcode;
VST_MEDIA_ID media;
VST_DRIVE_ID drive;
Item Description