CFtp.InternetStatus Method |
Namespace: VO
VIRTUAL METHOD InternetStatus( nContext, nStatus, pStatusInfo, nStatusLength ) AS USUAL CLIPPER
1CLASS MyFTP INHERIT CFtp 2 PROTECT oOwner AS OBJECT 3METHOD Init(oParent, cCaption, n, lStat)CLASS MyFtp 4 SUPER:Init(cCaption, n, lStat) 5 SELF:oOwner := oParent 6 RETURN SELF 7METHOD InternetStatus( nContext, nStatus, ; pStatusInfo, nStatusLength ) CLASS MyFTP 8// 9// This method receives all Low Level FTP 10// notification. Please keep all parameters if you 11// want to overwrite it for your own purpose 12// 13LOCAL cMsg AS STRING 14DO CASE 15CASE nStatus == INTERNET_STATUS_RESOLVING_NAME 16 cMsg := "Resolving Name ... " 17CASE nStatus == INTERNET_STATUS_NAME_RESOLVED 18 cMsg := "Name resolved" 19CASE nStatus == INTERNET_STATUS_CONNECTING_TO_SERVER 20 cMsg := "Connecting to Server ... " 21CASE nStatus == INTERNET_STATUS_CONNECTED_TO_SERVER 22 cMsg := "Connected to Server" 23CASE nStatus == INTERNET_STATUS_SENDING_REQUEST 24 cMsg := "Sending Request ... " 25CASE nStatus == INTERNET_STATUS_REQUEST_SENT 26 cMsg := "Request sent" 27CASE nStatus == INTERNET_STATUS_RECEIVING_RESPONSE 28 cMsg := "Receiving response ..." 29CASE nStatus == INTERNET_STATUS_RESPONSE_RECEIVED 30 cMsg := "Response received" 31CASE nStatus == INTERNET_STATUS_CTL_RESPONSE_RECEIVED 32 cMsg := "CTL Response received" 33CASE nStatus == INTERNET_STATUS_PREFETCH 34 cMsg := "Prefetch" 35CASE nStatus == INTERNET_STATUS_CLOSING_CONNECTION 36 cMsg := "Closing Connection ..." 37CASE nStatus == INTERNET_STATUS_CONNECTION_CLOSED 38 cMsg := "Connection closed" 39CASE nStatus == INTERNET_STATUS_HANDLE_CREATED 40 cMsg := "Handle created" 41 // _DebOut32( "FTP Status : " + cMsg ) 42 RETURN 43CASE nStatus == INTERNET_STATUS_HANDLE_CLOSING 44 cMsg := "Closing handle ..." 45CASE nStatus == INTERNET_STATUS_REQUEST_COMPLETE 46 cMsg := "Request complete" 47CASE nStatus == INTERNET_STATUS_REDIRECT 48 cMsg := "Redirect" 49OTHERWISE 50 cMsg := "Unkown FTP Status" 51ENDCASE 52SELF:oOwner:FTPStatus := cMsg 53RETURN NIL