aftp_extract_data_type

The aftp_extract_data_type call extracts the data type for file transfers. If the aftp_set_data_type call has not been invoked, the AFTP default data type value is returned.

AFTP_ENTRY aftp_extract_data_type(
IN AFTP_HANDLE_TYPE
connection_id,
OUT AFTP_DATA_TYPE_TYPE AFTP_PTR
data_type,
OUT AFTP_RETURN_CODE_TYPE AFTP_PTR
return_code
);

Parameters

connection_id
An AFTP connection object originally created with aftp_create.
data_type
The data type to be used for data transfers.
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.
return_code
The return code issued for this function. See AFTP Return Codes for the list of possible return codes.

Example

{
    AFTP_HANDLE_TYPE        connection_id;
    AFTP_RETURN_CODE_TYPE   aftp_rc;
    AFTP_DATA_TYPE_TYPE     data_type;

    /*
     * Before issuing the example call, you must have:
     *    a connection_id, use:  aftp_create()
     */

    aftp_extract_data_type(
        connection_id,
        &data_type,
        &aftp_rc);
    if (aftp_rc != AFTP_RC_OK) {
        fprintf(stderr, "Error extracting AFTP data type.\n");
    }

}
 

Line Flows

None.