StartTransfer Event
Fired when a file transfer begins.
Syntax
ANSI (Cross Platform) virtual int FireStartTransfer(XMPPStartTransferEventParams *e);
typedef struct {
int Direction;
const char *FileId;
const char *User;
const char *Domain;
const char *Resource;
char *Filename;
const char *Datetime;
int64 Size;
int Accept; int reserved; } XMPPStartTransferEventParams; Unicode (Windows) virtual INT FireStartTransfer(XMPPStartTransferEventParams *e);
typedef struct {
INT Direction;
LPCWSTR FileId;
LPCWSTR User;
LPCWSTR Domain;
LPCWSTR Resource;
LPWSTR Filename;
LPCWSTR Datetime;
LONG64 Size;
BOOL Accept; INT reserved; } XMPPStartTransferEventParams;
- (void)onStartTransfer:(int)direction :(NSString*)fileId :(NSString*)user :(NSString*)domain :(NSString*)resource :(NSString**)filename :(NSString*)datetime :(long long)size :(int*)accept;
#define EID_XMPP_STARTTRANSFER 14 virtual INT IPWORKSIOT_CALL FireStartTransfer(INT &iDirection, LPSTR &lpszFileId, LPSTR &lpszUser, LPSTR &lpszDomain, LPSTR &lpszResource, LPSTR &lpszFilename, LPSTR &lpszDatetime, LONG64 &lSize, BOOL &bAccept);
Remarks
When a file is received, the XMPP component will parse the sender's Jabber ID into the User, Domain, and Resource fields. The FileId and Filename parameters identify the current transfer. Within this event you may override the Filename by setting the Filename parameter. At this time you may also set LocalDirectory if it is not already set.
When a sending a file, the XMPP component will parse the receiver's Jabber ID into the User, Domain, and Resource fields.
The Direction parameter shows whether the client (0) or the server (1) is sending the data.