From dcbe1a421492519a508aaa07783ba1155b523566 Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Fri, 7 Nov 2008 15:06:15 +0100 Subject: [PATCH] inetcomm: Add an implementation of IPOP3Transport::CommandRSET. --- 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 c3fe587cb99..36ae1359b21 100644 --- a/dlls/inetcomm/pop3transport.c +++ b/dlls/inetcomm/pop3transport.c @@ -434,6 +434,32 @@ static void POP3Transport_CallbackRecvNOOPResp(IInternetTransport *iface, char * InternetTransport_ReadLine(&This->InetTransport, POP3Transport_CallbackProcessNOOPResp); } +static void POP3Transport_CallbackProcessRSETResp(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_CallbackRecvRSETResp(IInternetTransport *iface, char *pBuffer, int cbBuffer) +{ + POP3Transport *This = (POP3Transport *)iface; + + TRACE("\n"); + InternetTransport_ReadLine(&This->InetTransport, POP3Transport_CallbackProcessRSETResp); +} + static void POP3Transport_CallbackProcessLISTResp(IInternetTransport *iface, char *pBuffer, int cbBuffer) { POP3Transport *This = (POP3Transport *)iface; @@ -883,8 +909,14 @@ static HRESULT WINAPI POP3Transport_CommandNOOP(IPOP3Transport *iface) static HRESULT WINAPI POP3Transport_CommandRSET(IPOP3Transport *iface) { - FIXME("()\n"); - return E_NOTIMPL; + static char rset[] = "RSET\r\n"; + POP3Transport *This = (POP3Transport *)iface; + + TRACE("\n"); + + init_parser(This, POP3_RSET, POP3_NONE); + InternetTransport_DoCommand(&This->InetTransport, rset, POP3Transport_CallbackRecvRSETResp); + return S_OK; } static HRESULT WINAPI POP3Transport_CommandUIDL(