oamGetQualifier

Retrieves a keyword qualifier for a keyword in the specified managed object.

Prototype

DWORD oamGetQualifier ( HMOBJ hObject, const char *szKeyword, const char *szQualifier, char *szValue, DWORD dwValueSize )

Argument

Description

hObject

[in] Managed object to get keyword qualifier from (returned by oamOpenObject).

szKeyword

[in] Pointer to the name of keyword.

szQualifier

[in] Pointer to the name of the qualifier for the keyword.

szValue

[out] Pointer to a buffer to receive keyword qualifier value.

dwValueSize

[in] Size of szValue (maximum number of bytes to return, including final null character).


Return values

Return value

Description

SUCCESS

 

CTAERR_BAD_ARGUMENT

szKeyword, szQualifier, or szValue is NULL or 0.

CTAERR_INVALID_HANDLE

hObject is invalid.

CTAERR_SVR_COMM

Natural Access Server is not running.

OAMERR_ACCESS_DENIED

hObject is not open.

OAMERR_NOT_ENOUGH_MEMORY

Specified buffer size dwValueSize is too small.

OAMERR_NOT_FOUND

szKeyword or szQualifier not found.

OAMERR_SERVER_NOT_RUNNING

Supervisor is shut down.


Details

oamGetQualifier retrieves the keyword qualifier for a specified keyword for the managed object with the specified handle (returned by oamOpenObject). The object must be open.

For more information about keywords and qualifiers, see Accessing configuration data.

See also

oamGetKeyword, oamSetKeyword

Example

DWORD getType( CTAHD ctahd, HMOBJ objHd, char *pKeyword, char *qualText )
{
    DWORD ret;

    /* Get the "Type" attribute of the passed in keyword. The managed
    *  object has previously been opened and a handle to it (objHd)
    *  is being provided.
    */
    ret = oamGetQualifier( objHd, pKeyword, "Type", 
                           qualText, sizeof(qualText) );
   
    if ( ret != SUCCESS )
    {
        char errMsg[ 100 ];

        ctaGetText( ctahd, ret, errMsg, sizeof(errMsg) );
        printf("oamGetQualifier failed: %s\n", errMsg );
    }

    return ret;
}