winhttp: Implement WINHTTP_OPTION_CONNECTION_INFO.
[wine] / include / pstore.idl
1 /*
2  * Copyright (C) 2004 Mike McCormack
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 "wtypes.idl";
20 import "oaidl.idl";
21
22 cpp_quote("#define PST_KEY_CURRENT_USER    0")
23 cpp_quote("#define PST_KEY_LOCAL_MACHINE   1")
24
25 cpp_quote("#define PST_E_OK          0x00000000L")
26 cpp_quote("#define PST_E_TYPE_EXISTS 0x800C0004L")
27
28 cpp_quote("#define PST_AUTHENTICODE        1")
29 cpp_quote("#define PST_BINARY_CHECK        2")
30 cpp_quote("#define PST_SECURITY_DESCRIPTOR 4")
31
32 typedef DWORD PST_ACCESSMODE;
33 typedef DWORD PST_ACCESSCLAUSETYPE;
34 typedef DWORD PST_KEY;
35 typedef DWORD PST_PROVIDERCAPABILITIES;
36 typedef GUID PST_PROVIDERID, *PPST_PROVIDERID;
37
38 /*****************************************************************************
39  * PSTOREC library
40  */
41 [
42     uuid(5a6f1ebd-2db1-11d0-8c39-00c04fd9126b),
43     version(1.0),
44     helpstring("PStore 1.0 Type Library")
45 ]
46 library PSTORECLib
47 {
48     importlib("stdole2.tlb");
49
50 typedef struct _PST_PROVIDERINFO
51 {
52     DWORD cbSize;
53     PST_PROVIDERID ID;
54     PST_PROVIDERCAPABILITIES Capabilities;
55     LPWSTR szProviderName;
56 } PST_PROVIDERINFO, *PPST_PROVIDERINFO;
57
58 typedef struct _PST_PROMPTINFO
59 {
60     DWORD cbSize;
61     DWORD dwPromptFlags;
62     HWND hwndApp;
63     LPCWSTR szPrompt;
64 } PST_PROMPTINFO, *PPST_PROMPTINFO;
65
66 typedef struct _PST_ACCESSCLAUSE {
67     DWORD cbSize;
68     PST_ACCESSCLAUSETYPE ClauseType;
69     DWORD cbClauseData;
70     BYTE* pbClauseData;
71 } PST_ACCESSCLAUSE, *PPST_ACCESSCLAUSE;
72
73 typedef struct _PST_ACCESSRULE {
74     DWORD cbSize;
75     PST_ACCESSMODE AccessModeFlags;
76     DWORD cClauses;
77     PST_ACCESSCLAUSE* rgClauses;
78 } PST_ACCESSRULE, *PPST_ACCESSRULE;
79
80 typedef struct _PST_ACCESSRULESET {
81     DWORD cbSize;
82     DWORD cClause;
83     PST_ACCESSRULE* rgRules;
84 } PST_ACCESSRULESET, *PPST_ACCESSRULESET;
85
86 typedef struct _PST_TYPEINFO {
87     DWORD cbSize;
88     LPWSTR szDisplayName;
89 } PST_TYPEINFO, *PPST_TYPEINFO;
90
91 [
92   object,
93   uuid(5a6f1ec1-2db1-11d0-8c39-00c04fd9126b),
94   pointer_default(unique)
95 ]
96 interface IEnumPStoreItems : IUnknown
97 {
98     HRESULT Clone(
99         [in] IEnumPStoreItems** ppenum );
100
101     HRESULT Next(
102         [in] DWORD celt,
103         [in] LPWSTR* rgelt,
104         [in] DWORD* pceltFetched );
105
106     HRESULT Reset();
107
108     HRESULT Skip(
109         [in] DWORD celt );
110 }
111
112 [
113   object,
114   uuid(789c1cbf-31ee-11d0-8c39-00c04fd9126b),
115   pointer_default(unique)
116 ]
117 interface IEnumPStoreTypes : IUnknown
118 {
119     HRESULT Clone(
120         [in] IEnumPStoreTypes** ppenum );
121
122     HRESULT Next(
123         [in] DWORD celt,
124         [in] LPWSTR* rgelt,
125         [in] DWORD* pceltFetched );
126
127     HRESULT Reset();
128
129     HRESULT Skip(
130         [in] DWORD celt );
131 }
132
133 /*****************************************************************************
134  * IPStore interface
135  */
136 [
137   object,
138   uuid(5a6f1ec0-2db1-11d0-8c39-00c04fd9126b),
139   pointer_default(unique)
140 ]
141 interface IPStore : IUnknown
142 {
143     HRESULT GetInfo(
144         [in] PPST_PROVIDERINFO* ppProperties );
145
146     HRESULT GetProvParam(
147         [in] DWORD dwParam,
148         [out] DWORD* pcbData,
149         [out] BYTE** ppbData,
150         [in] DWORD dwFlags );
151
152     HRESULT SetProvParam(
153         [in] DWORD dwParam,
154         [in] DWORD cbData,
155         [in] BYTE* pbData,
156         [in] DWORD* dwFlags );
157
158     HRESULT CreateType(
159         [in] PST_KEY Key,
160         [in] const GUID* pType,
161         [in] PPST_TYPEINFO pInfo,
162         [in] DWORD dwFlags );
163
164     HRESULT GetTypeInfo(
165         [in] PST_KEY Key,
166         [in] const GUID* pType,
167         [in] PPST_TYPEINFO** ppInfo,
168         [in] DWORD dwFlags );
169
170     HRESULT DeleteType(
171         [in] PST_KEY Key,
172         [in] const GUID* pType,
173         [in] DWORD dwFlags );
174
175     HRESULT CreateSubtype(
176         [in] PST_KEY Key,
177         [in] const GUID* pType,
178         [in] const GUID* pSubtype,
179         [in] PPST_TYPEINFO pInfo,
180         [in] PPST_ACCESSRULESET pRules,
181         [in] DWORD dwFlags );
182
183     HRESULT GetSubtypeInfo(
184         [in] PST_KEY Key,
185         [in] const GUID* pType,
186         [in] const GUID* pSubtype,
187         [in] PPST_TYPEINFO** ppInfo,
188         [in] DWORD dwFlags );
189
190     HRESULT DeleteSubtype(
191         [in] PST_KEY Key,
192         [in] const GUID* pType,
193         [in] const GUID* pSubtype,
194         [in] DWORD dwFlags );
195
196     HRESULT ReadAccessRuleset(
197         [in] PST_KEY Key,
198         [in] const GUID* pType,
199         [in] const GUID* pSubtype,
200         [in] PPST_TYPEINFO pInfo,
201         [in] PPST_ACCESSRULESET** ppRules,
202         [in] DWORD dwFlags );
203
204     HRESULT WriteAccessRuleset(
205         [in] PST_KEY Key,
206         [in] const GUID* pType,
207         [in] const GUID* pSubtype,
208         [in] PPST_TYPEINFO pInfo,
209         [in] PPST_ACCESSRULESET pRules,
210         [in] DWORD dwFlags );
211
212     HRESULT EnumTypes(
213         [in] PST_KEY Key,
214         [in] DWORD dwFlags,
215         [in] IEnumPStoreTypes** ppenum );
216
217     HRESULT EnumSubtypes(
218         [in] PST_KEY Key,
219         [in] const GUID* pType,
220         [in] DWORD dwFlags,
221         [in] IEnumPStoreTypes** ppenum );
222
223     HRESULT DeleteItem(
224         [in] PST_KEY Key,
225         [in] const GUID* pItemType,
226         [in] const GUID* pItemSubType,
227         [in] LPCWSTR szItemName,
228         [in] PPST_PROMPTINFO pPromptInfo,
229         [in] DWORD dwFlags );
230
231     HRESULT ReadItem(
232         [in] PST_KEY Key,
233         [in] const GUID* pItemType,
234         [in] const GUID* pItemSubtype,
235         [in] LPCWSTR szItemName,
236         [in] DWORD *cbData,
237         [in] BYTE** pbData,
238         [in] PPST_PROMPTINFO pPromptInfo,
239         [in] DWORD dwFlags );
240
241     HRESULT WriteItem(
242         [in] PST_KEY Key,
243         [in] const GUID* pItemType,
244         [in] const GUID* pItemSubtype,
245         [in] LPCWSTR szItemName,
246         [in] DWORD cbData,
247         [in,size_is(cbData)] BYTE *ppbData,
248         [in] PPST_PROMPTINFO pPromptInfo,
249         [in] DWORD dwDefaultConfirmationStyle,
250         [in] DWORD dwFlags);
251
252     HRESULT OpenItem(
253         [in] PST_KEY Key,
254         [in] const GUID* pItemType,
255         [in] const GUID* pItemSubtype,
256         [in] LPCWSTR szItemName,
257         [in] PST_ACCESSMODE ModeFlags,
258         [in] PPST_PROMPTINFO pProomptInfo,
259         [in] DWORD dwFlags );
260
261     HRESULT CloseItem( 
262         [in] PST_KEY Key, 
263         [in] const GUID* pItemType, 
264         [in] const GUID* pItemSubtype,
265         [in] LPCWSTR* szItemName,
266         [in] DWORD dwFlags );
267
268     HRESULT EnumItems(
269         [in] PST_KEY Key,
270         [in] const GUID* pItemType,
271         [in] const GUID* pItemSubtype,
272         [in] DWORD dwFlags,
273         [in] IEnumPStoreItems** ppenum );
274 }
275
276 };