Module: wine Branch: master Commit: 9b8e2e20d58f87f586e8b8cfb02eb2184402cd51 URL: http://source.winehq.org/git/wine.git/?a=commit;h=9b8e2e20d58f87f586e8b8cfb0...
Author: Hans Leidekker hans@codeweavers.com Date: Fri Oct 31 13:52:11 2008 +0100
inetcomm: Add an implementation of IPOP3Transport::CommandLIST.
---
dlls/inetcomm/pop3transport.c | 36 ++++++++++++++++++++++++++++++++++-- 1 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/dlls/inetcomm/pop3transport.c b/dlls/inetcomm/pop3transport.c index 3a030a1..29f1978 100644 --- a/dlls/inetcomm/pop3transport.c +++ b/dlls/inetcomm/pop3transport.c @@ -71,6 +71,32 @@ static HRESULT POP3Transport_ParseResponse(POP3Transport *This, char *pszRespons return S_OK; }
+static void POP3Transport_CallbackProcessLISTResp(IInternetTransport *iface, char *pBuffer, int cbBuffer) +{ + POP3Transport *This = (POP3Transport *)iface; + POP3RESPONSE response; + HRESULT hr; + + TRACE("\n"); + + hr = POP3Transport_ParseResponse(This, pBuffer, &response); + if (FAILED(hr)) + { + /* FIXME: handle error */ + return; + } + + IPOP3Callback_OnResponse((IPOP3Callback *)This->InetTransport.pCallback, &response); +} + +static void POP3Transport_CallbackRecvLISTResp(IInternetTransport *iface, char *pBuffer, int cbBuffer) +{ + POP3Transport *This = (POP3Transport *)iface; + + TRACE("\n"); + InternetTransport_ReadLine(&This->InetTransport, POP3Transport_CallbackProcessLISTResp); +} + static void POP3Transport_CallbackProcessPASSResp(IInternetTransport *iface, char *pBuffer, int cbBuffer) { POP3Transport *This = (POP3Transport *)iface; @@ -324,8 +350,14 @@ static HRESULT WINAPI POP3Transport_CommandPASS(IPOP3Transport *iface, LPSTR pas static HRESULT WINAPI POP3Transport_CommandLIST( IPOP3Transport *iface, POP3CMDTYPE cmdtype, DWORD dwPopId) { - FIXME("(%u, %u)\n", cmdtype, dwPopId); - return E_NOTIMPL; + static char list[] = "LIST\r\n"; + POP3Transport *This = (POP3Transport *)iface; + + TRACE("(%u, %u)\n", cmdtype, dwPopId); + + This->command = POP3_LIST; + InternetTransport_DoCommand(&This->InetTransport, list, POP3Transport_CallbackRecvLISTResp); + return S_OK; }
static HRESULT WINAPI POP3Transport_CommandTOP(