<< Back


The FVSDK_Session structure is used by the FTP Voyager Software Development Kit to keep track of individual connections to FTP servers and to provide a convenient way of configuring and setting options for a connection.

In most implementations, FVSDK_NewSession() should be used to allocate and initialize the structure variables. The pointer to the allocated structure is then passed to all connection oriented SDK functions. When finished with the structure, call FVSDK_FreeSession() to release the allocated memory.

When allocating an FVSDK_Session object directly within your application use, FVSDK_InitSession() and FVSDK_CloseSession() to initialize and close the session, respectively.

In order to ensure the data integrity of the FVSDK_Session structure, the nSize value must be set to the number of bytes in the structure and the nVersion value must be set to FVSDK_SESSION_CURRENT_VERSION. If these values don't match the expected values, the FTP Voyager SDK returns an error value as found in FVSDK_ErrorCodes.h.

Only one instance of an FVSDK_Session object can be used per connection.

The default value for each member element is found in square brackets [] after the description.

Click on the member name to see additional information about the member. Click on the member type to view details about the type.

Structure & Members

typedef struct FVSDK_SessionStruct
{
// administrative variables
UINT nSize;
UINT nVersion;
FVSDK_SESSION_ID nSessionID;
FVSDK_ERROR_CODE fvecLastError;
 
/////////////////////////////////////////////////////////////////////////////
// FV site profile configuration values
// attributes
HWND hwndMainWnd;
LPCTSTR pszAppName;
LPCTSTR pszAppVersion;
BOOL bPasv;
LPCTSTR pszTempPath;
BOOL bMaintainDownloadFileTime;
BOOL bMaintainUploadFileTime;
BOOL bConvertFutureFiles;
BOOL bUseLocalTimeForAnonymous;
BOOL bConvertFileNamesToUpper;
BOOL bConvertFileNamesToLower;
BOOL bConvertUpperToLower;
BOOL bConvertFileNamesToUFC;
BOOL bThoroughLinkResolution;
BOOL bAsciiMode;
BOOL bAutoASCII;
BOOL bUseMVSUNIXDirListings;
BOOL bChangeLocalDate;
USHORT nAutoUpload;
USHORT nPasswordSecurityMode;
USHORT nSecurityType;
BOOL bConnectionSaver;
BOOL bSupportsResume;
BOOL bSupportsFEAT;
BOOL bUseSimpleListings;
BOOL bClearCommandChannel;
BOOL bClearDataChannel;
BOOL bUseMLST;
BOOL bDisplayErrors;
BOOL bLoginOnly;
 
// filtering options
LPCTSTR pszInclFilter;
LPCTSTR pszExclFilter;
BOOL bFilterIncludeFolders;
BOOL bFilterApplyToUploads;
BOOL bFilterApplyToDownloads;
BOOL bFilterApplyToServerToServer;
BOOL bFilterApplyToSyncFolders;
 
// get and put file tries
UINT nGetFileTries;
UINT nPutFileTries;
 
// XCRC
BOOL bCheckXCRC;
 
// transfer rate
BOOL bLimitUploadRate;
BOOL bLimitDownloadRate;
double dUploadRate;
double dDownloadRate;
 
// compression
USHORT nCompressionMode;
USHORT nZlibCompressionLevel;
 
// auto rename settings
BOOL bUploadAutoRename;
LPCTSTR* ppszUploadRenames;
BOOL bDownloadAutoRename;
LPCTSTR* ppszDownloadRenames;
 
// cleanup temp files
BOOL bCleanupTempFiles;
 
// set the list parameter
LPCTSTR pszListParameter;
 
// GMT conversion
int nMinuteOffsetGMT;
UINT nAdjustServerTimeGMT;
 
// VMS and MVS special flags
BOOL bSkipVMSVersions;
BOOL bStripMVSExtensions;
 
// profile name, used by FTP Voyager for fully qualified site profiles
LPCTSTR pszProfileName;
 
// set the connection settings
DWORD dwConnectionTimeout;
DWORD dwConnectionRetries;
UINT nConnectionAttempts;
DWORD dwReceiveTimeout;
DWORD dwSendTimeout;
BOOL bKeepAlive;
DWORD dwKeepAliveIdleTime;
DWORD dwConnectionDelay;
 
// transfer dialog and animations played in pop-up transfer dialogs
BOOL bShowTransferDialogs;
BOOL bShowTransferAnimations;
LPCTSTR pszSingleUploadAnimationFile;
LPCTSTR pszSingleDownloadAnimationFile;
LPCTSTR pszMultipleUploadAnimationFile;
LPCTSTR pszMultipleDownloadAnimationFile;
 
// WAV files to play for connection and transfer completion, must be NULL or the full path to the .WAV file
LPCTSTR pszConnectSoundFile;
LPCTSTR pszTransferCompleteSoundFile;
 
LPCTSTR pszTextFileExtensions;
 
// access type
UINT nAccessType;
LPCTSTR pszProxyName;
LPCTSTR pszProxyUserID;
UINT nProxyPort;
LPCTSTR pszProxyPassword;
char chUserAtDelim;
 
// confirmations
BOOL bConfirmUploadOverwrite;
BOOL bConfirmDownloadOverwrite;
BOOL bConfirmAutoUploadOverwrite;
BOOL bConfirmFileDelete;
BOOL bConfirmFolderDelete;
BOOL bConfirmFolderShortCutDelete;
BOOL bUploadNewerOnly;
BOOL bDownloadNewerOnly;
BOOL bUsePwdForKeepAlive;
 
// login information
LPCTSTR pszServer;
UINT nPort;
LPCTSTR pszUserID;
LPCTSTR pszPassword;
LPCTSTR pszDefaultDirectory;
LPCTSTR pszAccount;
 
// anonymous password
LPCTSTR pszAnonymousPassword;
 
// show raw directory listings as part of the log?
BOOL bShowRawListings;
 
// SSL settings
LPCTSTR pszSSLCertPath;
LPCTSTR pszSSLPrivateKeyPath;
LPCTSTR pszSSLCertPassword;
 
// SSH settings, contact RhinoSoft.com for SSH support
BOOL bSSHUsePasswordAuth;
BOOL bSSHUsePublicKeyAuth;
BOOL bSSHUseCompression;
LPCTSTR pszSSHPrivateKeyPassword;
LPCTSTR pszSSHPrivateKeyFile;
 
// port ranges
BOOL bUsePortRange;
DWORD dwPortRangeStart;
DWORD dwPortRangeEnd;
LPCTSTR pszPublicIPName;
 
// Dial on Demand (DOD)
LPCTSTR pszDodEntry;
LPCTSTR pszDodUserID;
LPCTSTR pszDodPassword;
LPCTSTR pszDodDomain;
UINT nDodTries;
LPCTSTR pszDodCallBackNumber;
 
// FTP Voyager Add-On support
BOOL bUseAddOns;
LPCTSTR* ppszAddOns;
 
// The following are callback function pointers and their associated
// data pointer that is passed back to the callback function.
// The data pointer is used to help identify the context of the
// callback. The data pointer can be a pointer or other data
// that can help identify the session making the call.
 
// log information callback functions
FVSDK_LOG_TEXT_FUNC pfnLogText;
FVSDK_CALLBACK_DATA pvLogTextData;
 
// password callbacks
FVSDK_ASKPASS_FUNC pfnAskPassword;
FVSDK_CALLBACK_DATA pvAskPasswordData;
FVSDK_ASKPASSC_FUNC pfnAskChangePassword;
FVSDK_CALLBACK_DATA pvAskChangePasswordData;
FVSDK_PASSCHG_FUNC pfnPasswordChanged;
FVSDK_CALLBACK_DATA pvPasswordChangedData;
 
// file transfer callbacks
FVSDK_FLUP_REN_FUNC pfnUploadFileRename;
FVSDK_CALLBACK_DATA pvUploadFileRenameData;
FVSDK_FLUP_FUNC pfnFileUploaded;
FVSDK_CALLBACK_DATA pvFileUploadedData;
FVSDK_FLDOWN_FUNC pfnFileDownloaded;
FVSDK_CALLBACK_DATA pvFileDownloadedData;
FVSDK_FLDNERR_FUNC pfnDownloadError;
FVSDK_CALLBACK_DATA pvDownloadErrorData;
FVSDK_FLUPERR_FUNC pfnUploadError;
FVSDK_CALLBACK_DATA pvUploadErrorData;
 
// creation / deletion / change callbacks
FVSDK_LCDIRCR_FUNC pfnLocalDirCreated;
FVSDK_CALLBACK_DATA pvLocalDirCreatedData;
FVSDK_LCDIRDL_FUNC pfnLocalDeleted;
FVSDK_CALLBACK_DATA pvLocalDeletedData;
FVSDK_LCFLCHG_FUNC pfnLocalFileChanged;
FVSDK_CALLBACK_DATA pvLocalFileChangedData;
FVSDK_RMDIRCR_FUNC pfnRemoteDirectoryCreated;
FVSDK_CALLBACK_DATA pvRemoteDirectoryCreatedData;
FVSDK_RMDIRDEL_FUNC pfnRemoteDirectoryDeleted;
FVSDK_CALLBACK_DATA pvRemoteDirectoryDeletedData;
FVSDK_RMFILEDL_FUNC pfnRemoteFileDeleted;
FVSDK_CALLBACK_DATA pvRemoteFileDeletedData;
 
// help callbacks
FVSDK_HELP_FUNC pfnHelpButtonPressed;
FVSDK_CALLBACK_DATA pvHelpButtonPressedData;
 
// transfer status callback
FVSDK_TRANSTAT_FUNC pfnNotifyTransferStatus;
FVSDK_CALLBACK_DATA pvNotifyTransferStatusData;
 
} FVSDK_Session;