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