ct_cmd_props

Description

Set or retrieve command structure properties. For use by applications that resend commands.

Syntax

CS_RETCODE ct_cmd_props(cmd, action, property, buffer,
                buflen, outlen)
 
 CS_COMMAND     *cmd;
 CS_INT                  action;
 CS_INT                  property;
 CS_VOID               *buffer;
 CS_INT                  buflen;
 CS_INT                 *outlen;

Parameters

cmd

A pointer to the CS_COMMAND structure managing a client/server operation.

action

One of the following symbolic values:

Value of action

Meaning

CS_SET

Sets the value of the property.

CS_GET

Retrieves the value of the property.

CS_CLEAR

Clears the value of the property by resetting it to its Client-Library default value.

property

The symbolic name of the property whose value is being set or retrieved. The Properties lists all Client-Library properties. For a summary of the properties that are legal with ct_cmd_props, see Table 3-7.

buffer

If a property value is being set, buffer points to the value to use in setting the property.

If a property value is being retrieved, buffer points to the space in which ct_cmd_props will place the requested information.

buflen

Generally, buflen is the length, in bytes, of *buffer.

If a property value is being set and the value in *buffer is a null-terminated string, pass buflen as CS_NULLTERM.

If *buffer is a fixed-length or symbolic value, pass buflen as CS_UNUSED.

outlen

A pointer to an integer variable.

If a property value is being set, outlen is not used and should be passed as NULL.

If a property value is being retrieved and outlen is supplied, ct_cmd_props sets *outlen to the length, in bytes, of the requested information.

If the information is larger than buflen bytes, the call will fail. The application can use the value of *outlen to determine how many bytes are needed to hold the information.

Returns

ct_cmd_props returns the following values:

Return value

Meaning

CS_SUCCEED

The routine completed successfully.

CS_FAIL

The routine failed.

CS_BUSY

An asynchronous operation is already pending for this connection. See “Asynchronous programming”.

Examples

Example 1

Example for Command-Level User Data

Usage

For information about action, buffer, buflen, and outlen, see Chapter 2, “Understanding Structures, Constants, and Conventions,” in the Open Client Client-Library/C Programmer's Guide.

See also

ct_config, ct_cmd_alloc, ct_con_props, ct_res_info