Release 0.9.14.
[wine/multimedia.git] / include / mapix.h
blob31da13385be12f44bb2eb4982d58a5170c66d598
1 /*
2 * Copyright 2004 Jon Griffiths
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef MAPIX_H
20 #define MAPIX_H
22 #ifndef MAPIDEFS_H
23 #include <mapidefs.h>
24 #endif
25 #ifndef MAPICODE_H
26 #include <mapicode.h>
27 #endif
28 #ifndef MAPIGUID_H
29 #include <mapiguid.h>
30 #endif
31 #ifndef MAPITAGS_H
32 #include <mapitags.h>
33 #endif
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
39 typedef struct IProfAdmin IProfAdmin;
40 typedef IProfAdmin *LPPROFADMIN;
41 typedef struct IMsgServiceAdmin IMsgServiceAdmin;
42 typedef IMsgServiceAdmin *LPSERVICEADMIN;
43 typedef struct IMAPISession *LPMAPISESSION;
45 #ifndef WINE_FLAGS_DEFINED
46 #define WINE_FLAGS_DEFINED
47 typedef unsigned long FLAGS;
48 #endif
50 /* Flags for MAPILogon and MAPILogonEx */
51 #ifndef MAPI_LOGON_UI
52 #define MAPI_LOGON_UI 0x00000001
53 #endif
54 #ifndef MAPI_NEW_SESSION
55 #define MAPI_NEW_SESSION 0x00000002
56 #endif
57 #define MAPI_ALLOW_OTHERS 0x00000008
58 #define MAPI_EXPLICIT_PROFILE 0x00000010
59 #ifndef MAPI_EXTENDED
60 #define MAPI_EXTENDED 0x00000020
61 #endif
62 #ifndef MAPI_FORCE_DOWNLOAD
63 #define MAPI_FORCE_DOWNLOAD 0x00001000
64 #endif
65 #ifndef MAPI_PASSWORD_UI
66 #define MAPI_PASSWORD_UI 0x00020000
67 #endif
68 #define MAPI_SERVICE_UI_ALWAYS 0x00002000
69 #define MAPI_NO_MAIL 0x00008000
70 #define MAPI_NT_SERVICE 0x00010000
71 #define MAPI_TIMEOUT_SHORT 0x00100000
73 #define MAPI_SIMPLE_DEFAULT (MAPI_LOGON_UI|MAPI_ALLOW_OTHERS|MAPI_FORCE_DOWNLOAD)
74 #define MAPI_SIMPLE_EXPLICIT (MAPI_NEW_SESSION|MAPI_EXPLICIT_PROFILE|MAPI_FORCE_DOWNLOAD)
76 typedef struct tagMAPIINIT_0
78 ULONG ulVersion;
79 ULONG ulFlags;
80 } MAPIINIT_0, *LPMAPIINIT_0;
82 typedef MAPIINIT_0 MAPIINIT, *LPMAPIINIT;
84 #define MAPI_INIT_VERSION 0U
86 typedef HRESULT (WINAPI MAPIINITIALIZE)(void*);
87 typedef MAPIINITIALIZE *LPMAPIINITIALIZE;
88 MAPIINITIALIZE MAPIInitialize;
90 typedef void (WINAPI MAPIUNINITIALIZE)(void);
91 typedef MAPIUNINITIALIZE *LPMAPIUNINITIALIZE;
92 MAPIUNINITIALIZE MAPIUninitialize;
94 #if defined (UNICODE) || defined (__WINESRC__)
95 typedef HRESULT (STDMETHODCALLTYPE MAPILOGONEX)(ULONG_PTR,LPWSTR,LPWSTR,ULONG,LPMAPISESSION*);
96 #else
97 typedef HRESULT (STDMETHODCALLTYPE MAPILOGONEX)(ULONG_PTR,LPSTR,LPSTR,ULONG,LPMAPISESSION *);
98 #endif
99 typedef MAPILOGONEX *LPMAPILOGONEX;
100 MAPILOGONEX MAPILogonEx;
102 typedef SCODE (WINAPI MAPIALLOCATEBUFFER)(ULONG,LPVOID*);
103 typedef MAPIALLOCATEBUFFER *LPMAPIALLOCATEBUFFER;
104 MAPIALLOCATEBUFFER MAPIAllocateBuffer;
106 typedef SCODE (WINAPI MAPIALLOCATEMORE)(ULONG,LPVOID,LPVOID*);
107 typedef MAPIALLOCATEMORE *LPMAPIALLOCATEMORE;
108 MAPIALLOCATEMORE MAPIAllocateMore;
110 #ifndef MAPIFREEBUFFER_DEFINED
111 #define MAPIFREEBUFFER_DEFINED
112 typedef ULONG (WINAPI MAPIFREEBUFFER)(LPVOID);
113 typedef MAPIFREEBUFFER *LPMAPIFREEBUFFER;
114 MAPIFREEBUFFER MAPIFreeBuffer;
115 #endif
117 /*****************************************************************************
118 * IMAPISession interface
120 #define INTERFACE IMAPISession
121 DECLARE_INTERFACE_(IMAPISession,IUnknown)
123 /*** IUnknown methods ***/
124 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
125 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
126 STDMETHOD_(ULONG,Release)(THIS) PURE;
127 /*** IMAPISession methods ***/
128 STDMETHOD(GetLastError)(THIS_ HRESULT hResult, ULONG ulFlags, LPMAPIERROR *lppMAPIError) PURE;
129 STDMETHOD(GetMsgStoresTable)(THIS_ ULONG ulFlags, LPMAPITABLE *lppTable) PURE;
130 STDMETHOD(OpenMsgStore)(THIS_ ULONG_PTR ulUIParam, ULONG cbId,
131 LPENTRYID lpId, LPCIID lpIFace, ULONG ulFlags, LPMDB *lppMDB) PURE;
132 STDMETHOD(OpenAddressBook)(THIS_ ULONG_PTR ulUIParam, LPCIID iid, ULONG ulFlags, LPADRBOOK *lppAdrBook) PURE;
133 STDMETHOD(OpenProfileSection)(THIS_ LPMAPIUID lpUID, LPCIID iid, ULONG ulFlags, LPPROFSECT *lppProf) PURE;
134 STDMETHOD(GetStatusTable)(THIS_ ULONG ulFlags, LPMAPITABLE *lppTable) PURE;
135 STDMETHOD(OpenEntry)(THIS_ ULONG cbId, LPENTRYID lpId, LPCIID iid,
136 ULONG ulFlags, ULONG *lpType, LPUNKNOWN *lppUnk) PURE;
137 STDMETHOD(CompareEntryIDs)(THIS_ ULONG cbLID, LPENTRYID lpLID, ULONG cbRID,
138 LPENTRYID lpRID, ULONG ulFlags, ULONG *lpRes) PURE;
139 STDMETHOD(Advise)(THIS_ ULONG cbId, LPENTRYID lpId, ULONG ulMask,
140 LPMAPIADVISESINK lpSink, ULONG *lpCxn) PURE;
141 STDMETHOD(Unadvise)(THIS_ ULONG ulConnection) PURE;
142 STDMETHOD(MessageOptions)(THIS_ ULONG_PTR ulUIParam, ULONG ulFlags, LPSTR lpszAddr, LPMESSAGE lpMsg) PURE;
143 STDMETHOD(QueryDefaultMessageOpt)(THIS_ LPSTR lpszAddr, ULONG ulFlags,
144 ULONG *lpcVals, LPSPropValue *lppOpts) PURE;
145 STDMETHOD(EnumAdrTypes)(THIS_ ULONG ulFlags, ULONG *lpcTypes, LPSTR **lpppszTypes) PURE;
146 STDMETHOD(QueryIdentity)(THIS_ ULONG *lpcbId, LPENTRYID *lppEntryID) PURE;
147 STDMETHOD(Logoff)(THIS_ ULONG_PTR ulUIParam, ULONG ulFlags, ULONG ulReserved) PURE;
148 STDMETHOD(SetDefaultStore)(THIS_ ULONG ulFlags, ULONG cbId, LPENTRYID lpId) PURE;
149 STDMETHOD(AdminServices)(THIS_ ULONG ulFlags, LPSERVICEADMIN *lppAdmin) PURE;
150 STDMETHOD(ShowForm)(THIS_ ULONG_PTR ulUIParam, LPMDB lpStore,
151 LPMAPIFOLDER lpParent, LPCIID iid, ULONG ulToken,
152 LPMESSAGE lpSent, ULONG ulFlags, ULONG ulStatus,
153 ULONG ulMsgFlags, ULONG ulAccess, LPSTR lpszClass) PURE;
154 STDMETHOD(PrepareForm)(THIS_ LPCIID lpIFace, LPMESSAGE lpMsg, ULONG *lpToken) PURE;
156 #undef INTERFACE
158 #if !defined(__cplusplus) || defined(CINTERFACE)
159 /*** IUnknown methods ***/
160 #define IMAPISession_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
161 #define IMAPISession_AddRef(p) (p)->lpVtbl->AddRef(p)
162 #define IMAPISession_Release(p) (p)->lpVtbl->Release(p)
163 /*** IMAPISession methods ***/
164 #define IMAPISession_GetLastError(p,a,b,c) (p)->lpVtbl->GetLastError(p,a,b,c)
165 #define IMAPISession_GetMsgStoresTable(p,a,b) (p)->lpVtbl->GetMsgStoresTable(p,a,b)
166 #define IMAPISession_OpenMsgStore(p,a,b,c,d,e,f) (p)->lpVtbl->OpenMsgStore(p,a,b,c,d,e,f)
167 #define IMAPISession_OpenAddressBook(p,a,b,c,d) (p)->lpVtbl->OpenAddressBook(p,a,b,c,d)
168 #define IMAPISession_OpenProfileSection(p,a,b,c,d) (p)->lpVtbl->OpenProfileSection(p,a,b,c,d)
169 #define IMAPISession_GetStatusTable(p,a,b) (p)->lpVtbl->GetStatusTable(p,a,b)
170 #define IMAPISession_OpenEntry(p,a,b,c,d,e,f) (p)->lpVtbl->OpenEntry(p,a,b,c,d,e,f)
171 #define IMAPISession_CompareEntryIDs(p,a,b,c,d,e,f) (p)->lpVtbl->CompareEntryIDs(p,a,b,c,d,e,f)
172 #define IMAPISession_Advise(p,a,b,c,d,e) (p)->lpVtbl->Advise(p,a,b,c,d,e)
173 #define IMAPISession_Unadvise(p,a) (p)->lpVtbl->Unadvise(p,a)
174 #define IMAPISession_MessageOptions(p,a,b,c,d) (p)->lpVtbl->MessageOptions)(p,a,b,c,d)
175 #define IMAPISession_QueryDefaultMessageOpt(p,a,b,c,d) \
176 (p)->lpVtbl->QueryDefaultMessageOpt(p,a,b,c,d)
177 #define IMAPISession_EnumAdrTypes(p,a,b,c) (p)->lpVtbl->EnumAdrTypes(p,a,b,c)
178 #define IMAPISession_QueryIdentity(p,a,b) (p)->lpVtbl->QueryIdentity(p,a,b)
179 #define IMAPISession_Logoff(p,a,b,c) (p)->lpVtbl->Logoff(p,a,b,c)
180 #define IMAPISession_SetDefaultStore(p,a,b,c) (p)->lpVtbl->SetDefaultStore(p,a,b,c)
181 #define IMAPISession_AdminServices(p,a,b) (p)->lpVtbl->AdminServices(p,a,b)
182 #define IMAPISession_ShowForm(p,a,b,c,d,e,f,g,h,i,j,k) \
183 (p)->lpVtbl->ShowForm(p,a,b,c,d,e,f,g,h,i,j,k)
184 #define IMAPISession_PrepareForm(p,a,b,c) (p)->lpVtbl->PrepareForm(p,a,b,c)
185 #endif
187 #ifdef __cplusplus
189 #endif
191 #endif /* MAPIX_H */