gpSendFiles

GameSpy SDK

gpSendFiles

This function attempts to send one or more files (and/or sub-directory names) to another profile.

GPResult gpSendFiles(
GPConnection * connection,
GPTransfer * transfer,
GPProfile profile,
const gsi_char * message,
gpSendFilesCallback callback,
void * param );
RoutineRequired HeaderDistribution
gpSendFiles<gp.h>SDKZIP

Return Value

This function returns GP_NO_ERROR upon success. Otherwise a valid GPResult is returned.

Parameters

connection
[in] A GP connection interface.
transfer
[out] A pointer to a GPTransfer object.
profile
[in] The profile to send to. Must be a buddy, or we must be his buddy.
message
[in] An optional message to send alone with the request.
callback
[in] This callback will get called repeatedly to get the list of files to send. See below.
param
[in] Pointer to user-defined data. This value will be passed unmodified to the callback function.

Remarks

This function attempts to send files to a remote profile. The profile must be either on the local profile’s buddy list, or the local profile must be on the remote profile’s buddy list. To send the files, a direct connection must be established between the two profiles. If both are behind firewalls, or a direct connection cannot be established for any other reason, the transfer will fail.
A successful call to this function will create a transfer object (which is identified by transfer). This object will not be freed until either the connection is destroyed with gpDestroy(), or the object is explicitly freed with gpFreeTransfer(). The object is not automatically freed when the transfer completes. Information about this transfer will be passed back to the application through the GP_TRANSFER_CALLBACK callback.

Unicode Mappings

RoutineGSI_UNICODE Not DefinedGSI_UNICODE Defined
gpSendFilesgpSendFilesAgpSendFilesW

gpSendFilesW and gpSendFilesA are UNICODE and ANSI mapped versions of gpSendFiles. The arguments of gpSendFilesA are ANSI strings; those of gpSendFilesW are wide-character strings.

Section Reference: Gamespy Presence SDK