From f136c22b614e18c4d93d6ec751398fe1d6575b3b Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Fri, 31 Oct 2008 13:52:31 +0100 Subject: [PATCH] inetcomm: Add an implementation of IPOP3Transport::CommandSTAT. --- dlls/inetcomm/pop3transport.c | 36 +++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/dlls/inetcomm/pop3transport.c b/dlls/inetcomm/pop3transport.c index 09a60bc3fad..a26a3b96f94 100644 --- a/dlls/inetcomm/pop3transport.c +++ b/dlls/inetcomm/pop3transport.c @@ -97,6 +97,32 @@ static void POP3Transport_CallbackRecvLISTResp(IInternetTransport *iface, char * InternetTransport_ReadLine(&This->InetTransport, POP3Transport_CallbackProcessLISTResp); } +static void POP3Transport_CallbackProcessSTATResp(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_CallbackRecvSTATResp(IInternetTransport *iface, char *pBuffer, int cbBuffer) +{ + POP3Transport *This = (POP3Transport *)iface; + + TRACE("\n"); + InternetTransport_ReadLine(&This->InetTransport, POP3Transport_CallbackProcessSTATResp); +} + static void POP3Transport_CallbackProcessPASSResp(IInternetTransport *iface, char *pBuffer, int cbBuffer) { POP3Transport *This = (POP3Transport *)iface; @@ -407,8 +433,14 @@ static HRESULT WINAPI POP3Transport_CommandQUIT(IPOP3Transport *iface) static HRESULT WINAPI POP3Transport_CommandSTAT(IPOP3Transport *iface) { - FIXME("()\n"); - return E_NOTIMPL; + static char stat[] = "STAT\r\n"; + POP3Transport *This = (POP3Transport *)iface; + + TRACE("\n"); + + This->command = POP3_STAT; + InternetTransport_DoCommand(&This->InetTransport, stat, POP3Transport_CallbackRecvSTATResp); + return S_OK; } static HRESULT WINAPI POP3Transport_CommandNOOP(IPOP3Transport *iface)