aftp_query_local_system_info

The aftp_query_local_system_info call gets information about the AFTP client and the computer it is running on. A connection to the AFTP server is not required before using this call.

AFTP_ENTRY aftp_query_local_system_info(
IN AFTP_HANDLE_TYPE
connection_id,
OUT unsigned char AFTP_PTR
system_info,
IN AFTP_LENGTH_TYPE
system_info_size,
OUT AFTP_LENGTH_TYPE AFTP_PTR
returned_length,
OUT AFTP_RETURN_CODE_TYPE AFTP_PTR
return_code
);

Parameters

connection_id
An AFTP connection object originally created with aftp_create.
system_info
Buffer to store a text string describing the operating system and AFTP client version.

Use the AFTP_SYSTEM_INFO_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.

system_info_size
Size in bytes of the system_info parameter.
returned_length
Number of bytes stored in the system_info parameter.
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;
    unsigned char            system_info[AFTP_FILE_NAME_SIZE+1];
    AFTP_LENGTH_TYPE         system_info_length;

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

    /*
     * Query the AFTP client computer for more information.
     */

    aftp_query_local_system_info(
        connection_id,
        system_info,
        (AFTP_LENGTH_TYPE)sizeof(system_info)-1,
        &system_info_length,
        &aftp_rc);

    if (aftp_rc != AFTP_RC_OK) {
        fprintf(stderr, "Error querying AFTP client system.\n");
    }
}
 

Line Flows

None.