CFtp.InternetStatus 方法 |
命名空间: VO
VIRTUAL METHOD InternetStatus( nContext, nStatus, pStatusInfo, nStatusLength ) AS USUAL CLIPPER
1CLASS MyFTP INHERIT CFtp 2 PROTECT oOwner AS OBJECT 3 4 METHOD Init(oParent, cCaption, n, lStat)CLASS MyFtp 5 SUPER:Init(cCaption, n, lStat) 6 SELF:oOwner := oParent 7 RETURN SELF 8 9 METHOD InternetStatus( nContext, nStatus, ; pStatusInfo, nStatusLength ) CLASS MyFTP 10 // 11 // 这个方法接收所有低级FTP 12 // 通知。请保留所有参数,如果你 13 // 想要重写它以满足自己的目的 14 // 15 LOCAL cMsg AS STRING 16 17 DO CASE 18 CASE nStatus == INTERNET_STATUS_RESOLVING_NAME 19 cMsg := "正在解析名称... " 20 CASE nStatus == INTERNET_STATUS_NAME_RESOLVED 21 cMsg := "名称已解析" 22 CASE nStatus == INTERNET_STATUS_CONNECTING_TO_SERVER 23 cMsg := "正在连接到服务器... " 24 CASE nStatus == INTERNET_STATUS_CONNECTED_TO_SERVER 25 cMsg := "已连接到服务器" 26 CASE nStatus == INTERNET_STATUS_SENDING_REQUEST 27 cMsg := "正在发送请求... " 28 CASE nStatus == INTERNET_STATUS_REQUEST_SENT 29 cMsg := "请求已发送" 30 CASE nStatus == INTERNET_STATUS_RECEIVING_RESPONSE 31 cMsg := "正在接收响应..." 32 CASE nStatus == INTERNET_STATUS_RESPONSE_RECEIVED 33 cMsg := "响应已接收" 34 CASE nStatus == INTERNET_STATUS_CTL_RESPONSE_RECEIVED 35 cMsg := "CTL响应已接收" 36 CASE nStatus == INTERNET_STATUS_PREFETCH 37 cMsg := "预取" 38 CASE nStatus == INTERNET_STATUS_CLOSING_CONNECTION 39 cMsg := "正在关闭连接..." 40 CASE nStatus == INTERNET_STATUS_CONNECTION_CLOSED 41 cMsg := "连接已关闭" 42 CASE nStatus == INTERNET_STATUS_HANDLE_CREATED 43 cMsg := "句柄已创建" 44 // _DebOut32( "FTP状态: " + cMsg ) 45 RETURN 46 CASE nStatus == INTERNET_STATUS_HANDLE_CLOSING 47 cMsg := "正在关闭句柄..." 48 CASE nStatus == INTERNET_STATUS_REQUEST_COMPLETE 49 cMsg := "请求完成" 50 CASE nStatus == INTERNET_STATUS_REDIRECT 51 cMsg := "重定向" 52 OTHERWISE 53 cMsg := "未知FTP状态" 54 ENDCASE 55 56 SELF:oOwner:FTPStatus := cMsg 57 58 RETURN NIL