1 | /*
|
---|
2 | * Copyright 2006 Robert Shearman for CodeWeavers
|
---|
3 | *
|
---|
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.
|
---|
8 | *
|
---|
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.
|
---|
13 | *
|
---|
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
|
---|
17 | */
|
---|
18 |
|
---|
19 | /*
|
---|
20 | * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
21 | * other than GPL or LGPL is available it will apply instead, Sun elects to use only
|
---|
22 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
23 | * a choice of LGPL license versions is made available with the language indicating
|
---|
24 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
25 | * of the LGPL is applied is otherwise unspecified.
|
---|
26 | */
|
---|
27 |
|
---|
28 | import "objidl.idl";
|
---|
29 |
|
---|
30 | interface IImnAccount;
|
---|
31 |
|
---|
32 | cpp_quote("#ifndef HR_E")
|
---|
33 | cpp_quote("#define HR_E(n) MAKE_SCODE(SEVERITY_ERROR, FACILITY_INTERNET, n)")
|
---|
34 | cpp_quote("#endif")
|
---|
35 | cpp_quote("#ifndef HR_S")
|
---|
36 | cpp_quote("#define HR_S(n) MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_INTERNET, n)")
|
---|
37 | cpp_quote("#endif")
|
---|
38 |
|
---|
39 | typedef enum tagSMTPAUTHTYPE
|
---|
40 | {
|
---|
41 | SMTP_AUTH_NONE,
|
---|
42 | SMTP_AUTH_SICILY,
|
---|
43 | SMTP_AUTH_USE_POP3ORIMAP_SETTINGS,
|
---|
44 | SMTP_AUTH_USE_SMTP_SETTINGS,
|
---|
45 | } SMTPAUTHTYPE;
|
---|
46 |
|
---|
47 | const SHORT CCHMAX_ORG_NAME = 256;
|
---|
48 | const SHORT CCHMAX_DISPLAY_NAME = 256;
|
---|
49 | const SHORT CCHMAX_ACCOUNT_NAME = 256;
|
---|
50 | const SHORT CCHMAX_SERVER_NAME = 256;
|
---|
51 | const SHORT CCHMAX_PASSWORD = 256;
|
---|
52 | const SHORT CCHMAX_USERNAME = 256;
|
---|
53 | const SHORT CCHMAX_EMAIL_ADDRESS = 256;
|
---|
54 | const SHORT CCHMAX_CONNECTOID = 256;
|
---|
55 | const SHORT CCHMAX_SEARCH_BASE = 256;
|
---|
56 | const SHORT CCHMAX_ROOT_FOLDER = 256;
|
---|
57 | const SHORT CCHMAX_SIGNATURE = 16;
|
---|
58 | const SHORT CCHMAX_SERVICE = 256;
|
---|
59 |
|
---|
60 | [
|
---|
61 | object,
|
---|
62 | uuid(0A06BD31-166F-11D0-81B9-00C04FD85AB4),
|
---|
63 | pointer_default(unique)
|
---|
64 | ]
|
---|
65 | interface IImnAdviseAccount : IUnknown
|
---|
66 | {
|
---|
67 | typedef enum
|
---|
68 | {
|
---|
69 | ACCT_NEWS,
|
---|
70 | ACCT_MAIL,
|
---|
71 | ACCT_DIR_SERV,
|
---|
72 | ACCT_LAST
|
---|
73 | } ACCTTYPE;
|
---|
74 |
|
---|
75 | typedef struct tagAccountContext
|
---|
76 | {
|
---|
77 | ACCTTYPE AcctType;
|
---|
78 | LPSTR pszAccountID;
|
---|
79 | LPSTR pszOldName;
|
---|
80 | DWORD dwServerType;
|
---|
81 | } ACTX;
|
---|
82 |
|
---|
83 | HRESULT AdviseAccount(
|
---|
84 | [in] DWORD dwAdviseType,
|
---|
85 | [in] ACTX *pAcctCtx);
|
---|
86 | }
|
---|
87 |
|
---|
88 | [
|
---|
89 | object,
|
---|
90 | uuid(8D0AED11-1638-11D0-81B9-00C04FD85AB4),
|
---|
91 | pointer_default(unique)
|
---|
92 | ]
|
---|
93 | interface IImnAdviseMigrateServer : IUnknown
|
---|
94 | {
|
---|
95 | HRESULT MigrateServer(
|
---|
96 | [in] DWORD dwSrvType,
|
---|
97 | [in] IImnAccount *pAccount);
|
---|
98 | }
|
---|
99 |
|
---|
100 | [
|
---|
101 | object,
|
---|
102 | uuid(FD465483-1384-11D0-ABBD-0020AFDFD10A),
|
---|
103 | pointer_default(unique)
|
---|
104 | ]
|
---|
105 | interface IImnEnumAccounts : IUnknown
|
---|
106 | {
|
---|
107 | HRESULT GetCount(
|
---|
108 | [out] ULONG *pcItems);
|
---|
109 |
|
---|
110 | HRESULT SortByAccountName();
|
---|
111 |
|
---|
112 | HRESULT GetNext(
|
---|
113 | [out] IImnAccount **ppAccount);
|
---|
114 |
|
---|
115 | HRESULT Reset();
|
---|
116 | }
|
---|
117 |
|
---|
118 | [
|
---|
119 | object,
|
---|
120 | uuid(FD465481-1384-11D0-ABBD-0020AFDFD10A),
|
---|
121 | pointer_default(unique)
|
---|
122 | ]
|
---|
123 | interface IImnAccountManager : IUnknown
|
---|
124 | {
|
---|
125 | typedef struct tagACCTLISTINFO
|
---|
126 | {
|
---|
127 | DWORD cbSize;
|
---|
128 | ACCTTYPE AcctTypeInit;
|
---|
129 | DWORD dwAcctFlags;
|
---|
130 | DWORD dwFlags;
|
---|
131 | } ACCTLISTINFO;
|
---|
132 |
|
---|
133 | HRESULT Init(
|
---|
134 | [in] IImnAdviseMigrateServer *pAdviseMigrateServer);
|
---|
135 |
|
---|
136 | HRESULT CreateAccountObject(
|
---|
137 | [in] ACCTTYPE AcctType,
|
---|
138 | [out] IImnAccount **ppAccount);
|
---|
139 |
|
---|
140 | HRESULT Enumerate(
|
---|
141 | [in] DWORD dwSrvTypes,
|
---|
142 | [out] IImnEnumAccounts **ppEnumAccounts);
|
---|
143 |
|
---|
144 | HRESULT GetAccountCount(
|
---|
145 | [in] ACCTTYPE AcctType,
|
---|
146 | [out] ULONG *pcServers);
|
---|
147 |
|
---|
148 | HRESULT FindAccount(
|
---|
149 | [in] DWORD dwPropTag,
|
---|
150 | [in] LPCSTR pszSearchData,
|
---|
151 | [out] IImnAccount **ppAccount);
|
---|
152 |
|
---|
153 | HRESULT GetDefaultAccountName(
|
---|
154 | [in] ACCTTYPE AcctType,
|
---|
155 | [in,ref] LPSTR pszAccount,
|
---|
156 | [in] ULONG cchMax);
|
---|
157 |
|
---|
158 | HRESULT ProcessNotification(
|
---|
159 | [in] UINT uMsg,
|
---|
160 | [in] WPARAM wParam,
|
---|
161 | [in] LPARAM lParam);
|
---|
162 |
|
---|
163 | HRESULT ValidateDefaultSendAccount();
|
---|
164 |
|
---|
165 | HRESULT AccountListDialog(
|
---|
166 | [in] HWND hwnd,
|
---|
167 | [in] ACCTLISTINFO *pinfo);
|
---|
168 |
|
---|
169 | HRESULT Advise(
|
---|
170 | [in] IImnAdviseAccount *pAdviseAccount,
|
---|
171 | [out] DWORD *pdwConnection);
|
---|
172 |
|
---|
173 | HRESULT Unadvise(
|
---|
174 | [in] DWORD dwConnection);
|
---|
175 |
|
---|
176 | HRESULT GetUniqueAccountName(
|
---|
177 | [in] LPSTR szName,
|
---|
178 | [in] UINT cch);
|
---|
179 |
|
---|
180 | HRESULT InitEx(
|
---|
181 | [in] IImnAdviseMigrateServer *pAdviseMigrateServer,
|
---|
182 | [in] DWORD dwFlags);
|
---|
183 | }
|
---|
184 |
|
---|
185 | [
|
---|
186 | object,
|
---|
187 | uuid(C43DFC6F-62BB-11D2-A727-00C04F79E7C8),
|
---|
188 | pointer_default(unique)
|
---|
189 | ]
|
---|
190 | interface IImnAccountManager2 : IImnAccountManager
|
---|
191 | {
|
---|
192 | HRESULT InitUser(
|
---|
193 | [in] IImnAdviseMigrateServer *pAdviseMigrateServer,
|
---|
194 | [in] REFGUID rguidID,
|
---|
195 | [in] DWORD dwFlags);
|
---|
196 |
|
---|
197 | HRESULT GetIncompleteAccount(
|
---|
198 | [in] ACCTTYPE AcctType,
|
---|
199 | [in,ref] LPSTR pszAccountId,
|
---|
200 | [in] ULONG cchMax);
|
---|
201 |
|
---|
202 | HRESULT SetIncompleteAccount(
|
---|
203 | [in] ACCTTYPE AcctType,
|
---|
204 | [in] LPCSTR pszAccountId);
|
---|
205 | }
|
---|
206 |
|
---|
207 | [
|
---|
208 | object,
|
---|
209 | uuid(FD465484-1384-11D0-ABBD-0020AFDFD10A),
|
---|
210 | pointer_default(unique)
|
---|
211 | ]
|
---|
212 | interface IPropertyContainer : IUnknown
|
---|
213 | {
|
---|
214 | typedef enum
|
---|
215 | {
|
---|
216 | TYPE_ERROR = 1000,
|
---|
217 | TYPE_DWORD,
|
---|
218 | TYPE_LONG,
|
---|
219 | TYPE_WORD,
|
---|
220 | TYPE_SHORT,
|
---|
221 | TYPE_BYTE,
|
---|
222 | TYPE_CHAR,
|
---|
223 | TYPE_FILETIME,
|
---|
224 | TYPE_STRING,
|
---|
225 | TYPE_BINARY,
|
---|
226 | TYPE_FLAGS,
|
---|
227 | TYPE_STREAM,
|
---|
228 | TYPE_WSTRING,
|
---|
229 | TYPE_BOOL,
|
---|
230 | TYPE_PASS,
|
---|
231 | TYPE_LAST
|
---|
232 | } PROPTYPE;
|
---|
233 |
|
---|
234 | cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
|
---|
235 | cpp_quote("#undef GetProp")
|
---|
236 | cpp_quote("#undef SetProp")
|
---|
237 | cpp_quote("#endif")
|
---|
238 |
|
---|
239 | HRESULT GetProp(
|
---|
240 | [in] DWORD dwPropTag,
|
---|
241 | [in,size_is(*pcb),ref] BYTE *pb,
|
---|
242 | [in] ULONG *pcb);
|
---|
243 |
|
---|
244 | HRESULT GetPropDw(
|
---|
245 | [in] DWORD dwPropTag,
|
---|
246 | [out] DWORD *pdw);
|
---|
247 |
|
---|
248 | HRESULT GetPropSz(
|
---|
249 | [in] DWORD dwPropTag,
|
---|
250 | [in,ref] LPSTR psz,
|
---|
251 | [in] ULONG cchMax);
|
---|
252 |
|
---|
253 | HRESULT SetProp(
|
---|
254 | [in] DWORD dwPropTag,
|
---|
255 | [in,size_is(cb)] BYTE *pb,
|
---|
256 | [in] ULONG cb);
|
---|
257 |
|
---|
258 | HRESULT SetPropDw(
|
---|
259 | [in] DWORD dwPropTag,
|
---|
260 | [in] DWORD dw);
|
---|
261 |
|
---|
262 | HRESULT SetPropSz(
|
---|
263 | [in] DWORD dwPropTag,
|
---|
264 | [in] LPSTR psz);
|
---|
265 | }
|
---|
266 |
|
---|
267 | [
|
---|
268 | object,
|
---|
269 | uuid(FD465482-1384-11D0-ABBD-0020AFDFD10A),
|
---|
270 | pointer_default(unique)
|
---|
271 | ]
|
---|
272 | interface IImnAccount : IPropertyContainer
|
---|
273 | {
|
---|
274 | HRESULT Exist();
|
---|
275 |
|
---|
276 | HRESULT SetAsDefault();
|
---|
277 |
|
---|
278 | HRESULT Delete();
|
---|
279 |
|
---|
280 | HRESULT SaveChanges();
|
---|
281 |
|
---|
282 | HRESULT GetAccountType(
|
---|
283 | [out] ACCTTYPE *pAcctType);
|
---|
284 |
|
---|
285 | HRESULT GetServerTypes(
|
---|
286 | [out] DWORD *pdwSrvTypes);
|
---|
287 |
|
---|
288 | HRESULT ShowProperties(
|
---|
289 | [in] HWND hwnd,
|
---|
290 | [in] DWORD dwFlags);
|
---|
291 |
|
---|
292 | HRESULT ValidateProperty(
|
---|
293 | [in] DWORD dwPropTag,
|
---|
294 | [in,size_is(cb)] BYTE *pb,
|
---|
295 | [in] ULONG cb);
|
---|
296 |
|
---|
297 | HRESULT DoWizard(
|
---|
298 | [in] HWND hwnd,
|
---|
299 | [in] DWORD dwFlags);
|
---|
300 |
|
---|
301 | HRESULT DoImportWizard(
|
---|
302 | [in] HWND hwnd,
|
---|
303 | [in] CLSID clsid,
|
---|
304 | [in] DWORD dwFlags);
|
---|
305 | }
|
---|
306 |
|
---|
307 | cpp_quote("HRESULT WINAPI HrCreateAccountManager(IImnAccountManager **ppAccountManager);")
|
---|
308 | cpp_quote("HRESULT WINAPI ValidEmailAddress(LPSTR lpAddress);")
|
---|