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