2008-05-06 09:16:21 +00:00
|
|
|
/*
|
|
|
|
* Internet Messaging APIs
|
|
|
|
*
|
|
|
|
* Copyright 2006 Robert Shearman for CodeWeavers
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
2014-02-08 16:22:49 +00:00
|
|
|
#ifndef _INETCOMM_PRIVATE_H_
|
|
|
|
#define _INETCOMM_PRIVATE_H_
|
|
|
|
|
2013-12-24 21:14:27 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#define WIN32_NO_STATUS
|
|
|
|
#define _INC_WINDOWS
|
|
|
|
#define COM_NO_WINDOWS_H
|
|
|
|
|
|
|
|
#define COBJMACROS
|
|
|
|
#define NONAMELESSUNION
|
|
|
|
|
|
|
|
#include <windef.h>
|
|
|
|
#include <winbase.h>
|
|
|
|
#include <ole2.h>
|
|
|
|
#include <mimeole.h>
|
2013-01-24 23:00:42 +00:00
|
|
|
#include <winsock2.h>
|
|
|
|
#include <imnxport.h>
|
2008-05-06 09:16:21 +00:00
|
|
|
|
2013-12-24 21:14:27 +00:00
|
|
|
#include <wine/list.h>
|
2017-03-05 21:33:13 +00:00
|
|
|
#include <wine/unicode.h>
|
2013-12-24 21:14:27 +00:00
|
|
|
|
|
|
|
#include <wine/debug.h>
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(inetcomm);
|
|
|
|
|
2008-05-06 09:16:21 +00:00
|
|
|
typedef struct InternetTransport InternetTransport;
|
|
|
|
|
|
|
|
typedef void (*INETXPORT_COMPLETION_FUNCTION)(IInternetTransport *, char *, int);
|
|
|
|
|
|
|
|
struct InternetTransport
|
|
|
|
{
|
|
|
|
union
|
|
|
|
{
|
|
|
|
const IInternetTransportVtbl *vtbl;
|
2008-11-08 07:14:34 +00:00
|
|
|
const ISMTPTransport2Vtbl *vtblSMTP2;
|
|
|
|
const IIMAPTransportVtbl *vtblIMAP;
|
|
|
|
const IPOP3TransportVtbl *vtblPOP3;
|
2008-05-06 09:16:21 +00:00
|
|
|
} u;
|
|
|
|
|
|
|
|
ITransportCallback *pCallback;
|
|
|
|
IXPSTATUS Status;
|
|
|
|
INETSERVER ServerInfo;
|
|
|
|
SOCKET Socket;
|
|
|
|
boolean fCommandLogging;
|
|
|
|
boolean fInitialised;
|
|
|
|
INETXPORT_COMPLETION_FUNCTION fnCompletion;
|
|
|
|
char *pBuffer;
|
|
|
|
int cbBuffer;
|
|
|
|
int iCurrentBufferOffset;
|
|
|
|
HWND hwnd;
|
|
|
|
};
|
|
|
|
|
2012-01-27 14:39:25 +00:00
|
|
|
HRESULT InternetTransport_Init(InternetTransport *This) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT InternetTransport_GetServerInfo(InternetTransport *This, LPINETSERVER pInetServer) DECLSPEC_HIDDEN;
|
2008-05-06 09:16:21 +00:00
|
|
|
HRESULT InternetTransport_InetServerFromAccount(InternetTransport *This,
|
2012-01-27 14:39:25 +00:00
|
|
|
IImnAccount *pAccount, LPINETSERVER pInetServer) DECLSPEC_HIDDEN;
|
2008-05-06 09:16:21 +00:00
|
|
|
HRESULT InternetTransport_Connect(InternetTransport *This,
|
2012-01-27 14:39:25 +00:00
|
|
|
LPINETSERVER pInetServer, boolean fAuthenticate, boolean fCommandLogging) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT InternetTransport_HandsOffCallback(InternetTransport *This) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT InternetTransport_DropConnection(InternetTransport *This) DECLSPEC_HIDDEN;
|
2008-05-06 09:16:21 +00:00
|
|
|
HRESULT InternetTransport_GetStatus(InternetTransport *This,
|
2012-01-27 14:39:25 +00:00
|
|
|
IXPSTATUS *pCurrentStatus) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT InternetTransport_ChangeStatus(InternetTransport *This, IXPSTATUS Status) DECLSPEC_HIDDEN;
|
2008-05-06 09:16:21 +00:00
|
|
|
HRESULT InternetTransport_ReadLine(InternetTransport *This,
|
2012-01-27 14:39:25 +00:00
|
|
|
INETXPORT_COMPLETION_FUNCTION fnCompletion) DECLSPEC_HIDDEN;
|
2008-05-06 09:16:21 +00:00
|
|
|
HRESULT InternetTransport_Write(InternetTransport *This, const char *pvData,
|
2012-01-27 14:39:25 +00:00
|
|
|
int cbSize, INETXPORT_COMPLETION_FUNCTION fnCompletion) DECLSPEC_HIDDEN;
|
2008-11-08 07:14:34 +00:00
|
|
|
HRESULT InternetTransport_DoCommand(InternetTransport *This,
|
2012-01-27 14:39:25 +00:00
|
|
|
LPCSTR pszCommand, INETXPORT_COMPLETION_FUNCTION fnCompletion) DECLSPEC_HIDDEN;
|
2008-05-06 09:16:21 +00:00
|
|
|
|
2012-01-27 14:39:25 +00:00
|
|
|
BOOL InternetTransport_RegisterClass(HINSTANCE hInstance) DECLSPEC_HIDDEN;
|
|
|
|
void InternetTransport_UnregisterClass(HINSTANCE hInstance) DECLSPEC_HIDDEN;
|
2008-05-06 09:16:21 +00:00
|
|
|
|
2012-01-27 14:39:25 +00:00
|
|
|
HRESULT MimeBody_create(IUnknown *outer, void **obj) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT MimeAllocator_create(IUnknown *outer, void **obj) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT MimeMessage_create(IUnknown *outer, void **obj) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT MimeSecurity_create(IUnknown *outer, void **obj) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT VirtualStream_create(IUnknown *outer, void **obj) DECLSPEC_HIDDEN;
|
2017-03-05 21:33:13 +00:00
|
|
|
HRESULT MimeHtmlProtocol_create(IUnknown *outer, void **obj) DECLSPEC_HIDDEN;
|
2008-11-08 07:14:34 +00:00
|
|
|
|
2012-01-27 14:39:25 +00:00
|
|
|
HRESULT MimeInternational_Construct(IMimeInternational **internat) DECLSPEC_HIDDEN;
|
2008-11-08 07:14:34 +00:00
|
|
|
|
2012-01-27 14:39:25 +00:00
|
|
|
HRESULT SMTPTransportCF_Create(REFIID riid, LPVOID *ppv) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT IMAPTransportCF_Create(REFIID riid, LPVOID *ppv) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT POP3TransportCF_Create(REFIID riid, LPVOID *ppv) DECLSPEC_HIDDEN;
|
2014-02-08 16:22:49 +00:00
|
|
|
|
2017-03-05 21:33:13 +00:00
|
|
|
static inline void * __WINE_ALLOC_SIZE(1) heap_alloc(size_t len)
|
|
|
|
{
|
|
|
|
return HeapAlloc(GetProcessHeap(), 0, len);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline BOOL heap_free(void *mem)
|
|
|
|
{
|
|
|
|
return HeapFree(GetProcessHeap(), 0, mem);
|
|
|
|
}
|
|
|
|
|
2014-02-08 16:22:49 +00:00
|
|
|
#endif /* _INETCOMM_PRIVATE_H_ */
|