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