67 WARN(
"parse error\n");
93 if (
This->type == POP3CMD_GET_POPID)
97 while (*
p ==
' ')
p++;
98 sscanf(
p,
"%lu", &uidl->dwPopId);
101 while (*
p ==
' ')
p++;
113 if (
This->response[0] ==
'.' && !
This->response[1])
119 sscanf(
This->response,
"%lu", &uidl->dwPopId);
122 while (*
p ==
' ')
p++;
129 WARN(
"parse error\n");
140 stat->cbMessages = 0;
146 while (*
p ==
' ')
p++;
154 WARN(
"parse error\n");
169 if (
This->type == POP3CMD_GET_POPID)
173 while (*
p ==
' ')
p++;
184 if (
This->response[0] ==
'.' && !
This->response[1])
193 while (*
p ==
' ')
p++;
200 WARN(
"parse error\n");
216 WARN(
"parse error\n");
227 retr->fHeader =
FALSE;
229 retr->dwPopId =
This->msgid;
231 retr->pszLines =
This->response;
242 if (
This->response[0] ==
'.' && !
This->response[1])
244 retr->cbLines = retr->cbSoFar;
248 retr->fHeader =
TRUE;
249 if (!
This->response[0]) retr->fBody =
TRUE;
252 retr->cbSoFar +=
len;
253 retr->pszLines =
This->response;
261 WARN(
"parse error\n");
275 top->cPreviewLines =
This->preview_lines;
277 top->pszLines =
This->response;
288 if (
This->response[0] ==
'.' && !
This->response[1])
290 top->cbLines =
top->cbSoFar;
299 top->pszLines =
This->response;
307 WARN(
"parse error\n");
325 This->response = pszResponse;
331 switch (
This->command)
344 pResponse->command =
This->command;
346 pResponse->fValidInfo =
This->valid_info;
347 pResponse->rIxpResult.hrResult =
hr;
348 pResponse->rIxpResult.pszResponse = pszResponse;
349 pResponse->rIxpResult.uiServerError = 0;
350 pResponse->rIxpResult.hrServerError = pResponse->rIxpResult.hrResult;
352 pResponse->rIxpResult.pszProblem =
NULL;
355 if (
This->InetTransport.pCallback &&
This->InetTransport.fCommandLogging)
357 ITransportCallback_OnCommand(
This->InetTransport.pCallback, CMD_RESP,
358 pResponse->rIxpResult.pszResponse, pResponse->rIxpResult.hrServerError,
367 POP3RESPONSE response;
379 IPOP3Callback_OnResponse((
IPOP3Callback *)
This->InetTransport.pCallback, &response);
393 POP3RESPONSE response;
405 IPOP3Callback_OnResponse((
IPOP3Callback *)
This->InetTransport.pCallback, &response);
419 POP3RESPONSE response;
431 IPOP3Callback_OnResponse((
IPOP3Callback *)
This->InetTransport.pCallback, &response);
445 POP3RESPONSE response;
457 IPOP3Callback_OnResponse((
IPOP3Callback *)
This->InetTransport.pCallback, &response);
465 IPOP3Callback_OnResponse((
IPOP3Callback *)
This->InetTransport.pCallback, &response);
479 POP3RESPONSE response;
491 IPOP3Callback_OnResponse((
IPOP3Callback *)
This->InetTransport.pCallback, &response);
499 IPOP3Callback_OnResponse((
IPOP3Callback *)
This->InetTransport.pCallback, &response);
513 POP3RESPONSE response;
525 IPOP3Callback_OnResponse((
IPOP3Callback *)
This->InetTransport.pCallback, &response);
533 IPOP3Callback_OnResponse((
IPOP3Callback *)
This->InetTransport.pCallback, &response);
547 POP3RESPONSE response;
559 IPOP3Callback_OnResponse((
IPOP3Callback *)
This->InetTransport.pCallback, &response);
567 IPOP3Callback_OnResponse((
IPOP3Callback *)
This->InetTransport.pCallback, &response);
581 POP3RESPONSE response;
593 IPOP3Callback_OnResponse((
IPOP3Callback *)
This->InetTransport.pCallback, &response);
607 POP3RESPONSE response;
622 IPOP3Callback_OnResponse((
IPOP3Callback *)
This->InetTransport.pCallback, &response);
635 static const char pass[] =
"PASS ";
637 POP3RESPONSE response;
651 IPOP3Callback_OnResponse((
IPOP3Callback *)
This->InetTransport.pCallback, &response);
676 static const char user[] =
"USER ";
697 POP3RESPONSE response;
709 IPOP3Callback_OnResponse((
IPOP3Callback *)
This->InetTransport.pCallback, &response);
730 IPOP3Transport_AddRef(iface);
753 if (
This->InetTransport.pCallback) ITransportCallback_Release(
This->InetTransport.pCallback);
764 TRACE(
"(%p)\n", pInetServer);
776 FIXME(
"(%u)\n", isstate);
785 TRACE(
"(%p, %p)\n", pAccount, pInetServer);
790 LPINETSERVER pInetServer,
boolean fAuthenticate,
boolean fCommandLogging)
795 TRACE(
"(%p, %s, %s)\n", pInetServer, fAuthenticate ?
"TRUE" :
"FALSE", fCommandLogging ?
"TRUE" :
"FALSE");
816 return IPOP3Transport_CommandQUIT(iface);
847 FIXME(
"not using log file of %s, use Wine debug logging instead\n",
852 This->InetTransport.fInitialised =
TRUE;
858 DWORD dwPopId,
boolean fMarked)
860 FIXME(
"(%u, %lu, %d)\n", marktype, dwPopId, fMarked);
866 FIXME(
"(%s)\n", pszAuthType);
872 static const char user[] =
"USER ";
895 static const char pass[] =
"PASS ";
919 static const char list[] =
"LIST %lu\r\n";
920 static char list_all[] =
"LIST\r\n";
925 TRACE(
"(%u, %lu)\n", cmdtype, dwPopId);
936 This->type = cmdtype;
946 static const char top[] =
"TOP %lu %lu\r\n";
951 TRACE(
"(%u, %lu, %lu)\n", cmdtype, dwPopId, cPreviewLines);
953 len =
sizeof(
top) + 20 + 2;
957 This->preview_lines = cPreviewLines;
959 This->type = cmdtype;
968 static const char command[] =
"QUIT\r\n";
981 static const char stat[] =
"STAT\r\n";
993 static const char noop[] =
"NOOP\r\n";
1005 static const char rset[] =
"RSET\r\n";
1018 static const char uidl[] =
"UIDL %lu\r\n";
1019 static char uidl_all[] =
"UIDL\r\n";
1024 TRACE(
"(%u, %lu)\n", cmdtype, dwPopId);
1028 len =
sizeof(uidl) + 10 + 2;
1035 This->type = cmdtype;
1045 static const char dele[] =
"DELE %lu\r\n";
1050 TRACE(
"(%u, %lu)\n", cmdtype, dwPopId);
1052 len =
sizeof(dele) + 10 + 2;
1057 This->type = cmdtype;
1067 static const char retr[] =
"RETR %lu\r\n";
1072 TRACE(
"(%u, %lu)\n", cmdtype, dwPopId);
1074 len =
sizeof(retr) + 10 + 2;
1079 This->type = cmdtype;
1133 IPOP3Transport_AddRef(*ppTransport);
1145 IClassFactory_AddRef(iface);
1178 hr = IPOP3Transport_QueryInterface(pPop3Transport,
riid,
ppv);
1179 IPOP3Transport_Release(pPop3Transport);
1186 FIXME(
"(%d)\n",fLock);
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
void user(int argc, const char *argv[])
const GUID IID_IClassFactory
static __inline const char * debugstr_an(const char *s, int n)
#define HeapFree(x, y, z)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
_ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl sscanf(const char *, const char *,...) __WINE_CRT_SCANF_ATTR(2
_ACRTIMP char *__cdecl strchr(const char *, int)
_ACRTIMP size_t __cdecl strlen(const char *)
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
FxPnpStateCallbackInfo * pCallback
GLdouble GLdouble GLdouble GLdouble top
enum tagIXPSTATUS IXPSTATUS
HRESULT InternetTransport_Connect(InternetTransport *This, LPINETSERVER pInetServer, boolean fAuthenticate, boolean fCommandLogging)
HRESULT InternetTransport_Init(InternetTransport *This)
HRESULT InternetTransport_ChangeStatus(InternetTransport *This, IXPSTATUS Status)
HRESULT InternetTransport_DoCommand(InternetTransport *This, LPCSTR pszCommand, INETXPORT_COMPLETION_FUNCTION fnCompletion)
HRESULT InternetTransport_GetServerInfo(InternetTransport *This, LPINETSERVER pInetServer)
HRESULT InternetTransport_InetServerFromAccount(InternetTransport *This, IImnAccount *pAccount, LPINETSERVER pInetServer)
HRESULT InternetTransport_ReadLine(InternetTransport *This, INETXPORT_COMPLETION_FUNCTION fnCompletion)
HRESULT InternetTransport_DropConnection(InternetTransport *This)
HRESULT InternetTransport_HandsOffCallback(InternetTransport *This)
HRESULT InternetTransport_GetStatus(InternetTransport *This, IXPSTATUS *pCurrentStatus)
static void init_parser(POP3Transport *This, POP3COMMAND command)
static void POP3Transport_CallbackRecvQUITResp(IInternetTransport *iface, char *pBuffer, int cbBuffer)
static void POP3Transport_CallbackProcessUIDLResp(IInternetTransport *iface, char *pBuffer, int cbBuffer)
static void POP3Transport_CallbackProcessQUITResponse(IInternetTransport *iface, char *pBuffer, int cbBuffer)
static HRESULT WINAPI POP3Transport_CommandUIDL(IPOP3Transport *iface, POP3CMDTYPE cmdtype, DWORD dwPopId)
static HRESULT parse_dele_response(POP3Transport *This, DWORD *dwPopId)
static ULONG WINAPI POP3Transport_Release(IPOP3Transport *iface)
static HRESULT WINAPI POP3Transport_QueryInterface(IPOP3Transport *iface, REFIID riid, void **ppv)
static const IPOP3TransportVtbl POP3TransportVtbl
static void POP3Transport_CallbackRecvRETRResp(IInternetTransport *iface, char *pBuffer, int cbBuffer)
static HRESULT parse_uidl_response(POP3Transport *This, POP3UIDL *uidl)
static ULONG WINAPI POP3TransportCF_AddRef(LPCLASSFACTORY iface)
HRESULT WINAPI CreatePOP3Transport(IPOP3Transport **ppTransport)
static HRESULT WINAPI POP3Transport_CommandQUIT(IPOP3Transport *iface)
static void POP3Transport_CallbackRecvDELEResp(IInternetTransport *iface, char *pBuffer, int cbBuffer)
static HRESULT WINAPI POP3Transport_MarkItem(IPOP3Transport *iface, POP3MARKTYPE marktype, DWORD dwPopId, boolean fMarked)
static void POP3Transport_CallbackRecvPASSResp(IInternetTransport *iface, char *pBuffer, int cbBuffer)
static HRESULT POP3Transport_ParseResponse(POP3Transport *This, char *pszResponse, POP3RESPONSE *pResponse)
static HRESULT WINAPI POP3Transport_CommandPASS(IPOP3Transport *iface, LPSTR password)
static HRESULT WINAPI POP3Transport_DropConnection(IPOP3Transport *iface)
static void POP3Transport_CallbackProcessDELEResp(IInternetTransport *iface, char *pBuffer, int cbBuffer)
static HRESULT parse_top_response(POP3Transport *This, POP3TOP *top)
static void POP3Transport_CallbackProcessNOOPResp(IInternetTransport *iface, char *pBuffer, int cbBuffer)
static void POP3Transport_CallbackSendUSERCmd(IInternetTransport *iface, char *pBuffer, int cbBuffer)
static void POP3Transport_CallbackRecvRSETResp(IInternetTransport *iface, char *pBuffer, int cbBuffer)
static HRESULT WINAPI POP3Transport_CommandAUTH(IPOP3Transport *iface, LPSTR pszAuthType)
static HRESULT WINAPI POP3TransportCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pUnk, REFIID riid, LPVOID *ppv)
static void POP3Transport_CallbackRecvUIDLResp(IInternetTransport *iface, char *pBuffer, int cbBuffer)
static HRESULT WINAPI POP3Transport_InitNew(IPOP3Transport *iface, LPSTR pszLogFilePath, IPOP3Callback *pCallback)
static void POP3Transport_CallbackProcessTOPResp(IInternetTransport *iface, char *pBuffer, int cbBuffer)
static HRESULT WINAPI POP3Transport_Disconnect(IPOP3Transport *iface)
static HRESULT parse_retr_response(POP3Transport *This, POP3RETR *retr)
static HRESULT WINAPI POP3Transport_HandsOffCallback(IPOP3Transport *iface)
static HRESULT parse_list_response(POP3Transport *This, POP3LIST *list)
static HRESULT WINAPI POP3Transport_InetServerFromAccount(IPOP3Transport *iface, IImnAccount *pAccount, LPINETSERVER pInetServer)
static HRESULT WINAPI POP3Transport_GetServerInfo(IPOP3Transport *iface, LPINETSERVER pInetServer)
static void POP3Transport_CallbackRecvUSERResp(IInternetTransport *iface, char *pBuffer, int cbBuffer)
static HRESULT WINAPI POP3TransportCF_LockServer(LPCLASSFACTORY iface, BOOL fLock)
static HRESULT WINAPI POP3Transport_IsState(IPOP3Transport *iface, IXPISSTATE isstate)
static ULONG WINAPI POP3TransportCF_Release(LPCLASSFACTORY iface)
HRESULT POP3TransportCF_Create(REFIID riid, LPVOID *ppv)
static void POP3Transport_CallbackProcessSTATResp(IInternetTransport *iface, char *pBuffer, int cbBuffer)
static HRESULT WINAPI POP3TransportCF_QueryInterface(LPCLASSFACTORY iface, REFIID riid, LPVOID *ppv)
static void POP3Transport_CallbackRecvTOPResp(IInternetTransport *iface, char *pBuffer, int cbBuffer)
static HRESULT WINAPI POP3Transport_CommandTOP(IPOP3Transport *iface, POP3CMDTYPE cmdtype, DWORD dwPopId, DWORD cPreviewLines)
static HRESULT parse_response(POP3Transport *This)
static void POP3Transport_CallbackProcessRSETResp(IInternetTransport *iface, char *pBuffer, int cbBuffer)
static HRESULT WINAPI POP3Transport_CommandRSET(IPOP3Transport *iface)
static HRESULT WINAPI POP3Transport_CommandNOOP(IPOP3Transport *iface)
static void POP3Transport_CallbackProcessPASSResp(IInternetTransport *iface, char *pBuffer, int cbBuffer)
static ULONG WINAPI POP3Transport_AddRef(IPOP3Transport *iface)
static HRESULT WINAPI POP3Transport_Connect(IPOP3Transport *iface, LPINETSERVER pInetServer, boolean fAuthenticate, boolean fCommandLogging)
static HRESULT WINAPI POP3Transport_CommandDELE(IPOP3Transport *iface, POP3CMDTYPE cmdtype, DWORD dwPopId)
static IXPTYPE WINAPI POP3Transport_GetIXPType(IPOP3Transport *iface)
static void POP3Transport_CallbackRecvLISTResp(IInternetTransport *iface, char *pBuffer, int cbBuffer)
static const IClassFactoryVtbl * POP3TransportCF
static HRESULT WINAPI POP3Transport_CommandRETR(IPOP3Transport *iface, POP3CMDTYPE cmdtype, DWORD dwPopId)
static void POP3Transport_CallbackProcessRETRResp(IInternetTransport *iface, char *pBuffer, int cbBuffer)
static HRESULT WINAPI POP3Transport_CommandUSER(IPOP3Transport *iface, LPSTR username)
static void POP3Transport_CallbackRecvSTATResp(IInternetTransport *iface, char *pBuffer, int cbBuffer)
static void POP3Transport_CallbackProcessUSERResp(IInternetTransport *iface, char *pBuffer, int cbBuffer)
static const IClassFactoryVtbl POP3TransportCFVtbl
static void POP3Transport_CallbackRecvNOOPResp(IInternetTransport *iface, char *pBuffer, int cbBuffer)
static HRESULT WINAPI POP3Transport_CommandLIST(IPOP3Transport *iface, POP3CMDTYPE cmdtype, DWORD dwPopId)
static HRESULT WINAPI POP3Transport_GetStatus(IPOP3Transport *iface, IXPSTATUS *pCurrentStatus)
static HRESULT WINAPI POP3Transport_CommandSTAT(IPOP3Transport *iface)
static HRESULT parse_stat_response(POP3Transport *This, POP3STAT *stat)
static void POP3Transport_CallbackProcessLISTResp(IInternetTransport *iface, char *pBuffer, int cbBuffer)
#define IsEqualIID(riid1, riid2)
InternetTransport InetTransport
#define CLASS_E_NOAGGREGATION
int PASCAL FAR WSAGetLastError(void)