aftp_get_data_type_string

The aftp_get_data_type_string call gets a string that corresponds to the input AFTP data type value. This string is available to allow all users of the AFTP API to have consistent strings for each data type. It is not necessary to create an AFTP connection object before issuing this call.

AFTP_ENTRY aftp_get_data_type_string(
IN AFTP_DATA_TYPE_TYPE
data_type,
OUT unsigned char AFTP_PTR
data_type_string,
IN AFTP_LENGTH_TYPE
data_type_size,
OUT AFTP_LENGTH_TYPE AFTP_PTR
returned_length,
OUT AFTP_RETURN_CODE_TYPE AFTP_PTR
return_code
);

Parameters

data_type
An AFTP data type value.
AFTP_ASCII
Transfer files as text files in ASCII.
AFTP_BINARY
Transfer files as a binary sequence of bytes without translation.
AFTP_DEFAULT_DATA_TYPE
Use the data transfer type set in the .INI file. If no type is set in the .INI file, use AFTP_ASCII.
data_type_string
The buffer into which the data type string will be written.

Use the AFTP_DATA_TYPE_SIZE constant to define the length of this buffer. Add 1 to the size if you want to be able to add a null terminator to the text in the buffer.

data_type_size
The size of the buffer into which the data type string will be written.
returned_length
The actual length of the data_type_string parameter in bytes.
return_code
The return code issued for this function. See AFTP Return Codes for the list of possible return codes.

Example

{
    AFTP_RETURN_CODE_TYPE         aftp_rc;
    unsigned char                 data_type[AFTP_DATA_TYPE_SIZE+1];
    AFTP_LENGTH_TYPE              returned_length;

    /*
     * There are no prerequisite calls for this call.
     */
    /*
     * Get the data type string.
     */

    aftp_get_data_type_string(
        AFTP_ASCII,
        data_type,
        (AFTP_LENGTH_TYPE)sizeof(data_type)-1,
        &returned_length,
        &aftp_rc);
}
 

Line Flows

None.