1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_COMMON_IMPORTER_PSTORE_DECLARATIONS_H_
6 #define CHROME_COMMON_IMPORTER_PSTORE_DECLARATIONS_H_
9 #error Should not include pstore.h and this file simultaneously.
14 // pstore.h is no longer shipped in the Windows 8 SDK. Define a minimal set
17 // These types are referenced in interfaces we use, but our code does not use
18 // refer to these types, so simply make them opaque.
19 class IEnumPStoreTypes
;
20 struct PST_ACCESSRULESET
;
21 struct PST_PROMPTINFO
;
22 struct PST_PROVIDERINFO
;
25 EXTERN_C
const IID IID_IPStore
;
26 EXTERN_C
const IID IID_IEnumPStoreItems
;
28 typedef DWORD PST_KEY
;
29 typedef DWORD PST_ACCESSMODE
;
30 #define PST_E_OK _HRESULT_TYPEDEF_(0x00000000L)
32 interface IEnumPStoreItems
: public IUnknown
35 virtual HRESULT STDMETHODCALLTYPE
Next(
37 LPWSTR __RPC_FAR
*rgelt
,
38 DWORD __RPC_FAR
*pceltFetched
) = 0;
40 virtual HRESULT STDMETHODCALLTYPE
Skip(DWORD celt
) = 0;
42 virtual HRESULT STDMETHODCALLTYPE
Reset(void) = 0;
44 virtual HRESULT STDMETHODCALLTYPE
Clone(
45 IEnumPStoreItems __RPC_FAR
*__RPC_FAR
*ppenum
) = 0;
48 interface IPStore
: public IUnknown
51 virtual HRESULT STDMETHODCALLTYPE
GetInfo(
52 PST_PROVIDERINFO
* __RPC_FAR
*ppProperties
) = 0;
54 virtual HRESULT STDMETHODCALLTYPE
GetProvParam(
56 DWORD __RPC_FAR
*pcbData
,
57 BYTE __RPC_FAR
*__RPC_FAR
*ppbData
,
60 virtual HRESULT STDMETHODCALLTYPE
SetProvParam(
63 BYTE __RPC_FAR
*pbData
,
66 virtual HRESULT STDMETHODCALLTYPE
CreateType(
68 const GUID __RPC_FAR
*pType
,
72 virtual HRESULT STDMETHODCALLTYPE
GetTypeInfo(
74 const GUID __RPC_FAR
*pType
,
75 PST_TYPEINFO
* __RPC_FAR
*ppInfo
,
78 virtual HRESULT STDMETHODCALLTYPE
DeleteType(
80 const GUID __RPC_FAR
*pType
,
83 virtual HRESULT STDMETHODCALLTYPE
CreateSubtype(
85 const GUID __RPC_FAR
*pType
,
86 const GUID __RPC_FAR
*pSubtype
,
88 PST_ACCESSRULESET
* pRules
,
91 virtual HRESULT STDMETHODCALLTYPE
GetSubtypeInfo(
93 const GUID __RPC_FAR
*pType
,
94 const GUID __RPC_FAR
*pSubtype
,
95 PST_TYPEINFO
* __RPC_FAR
*ppInfo
,
98 virtual HRESULT STDMETHODCALLTYPE
DeleteSubtype(
100 const GUID __RPC_FAR
*pType
,
101 const GUID __RPC_FAR
*pSubtype
,
104 virtual HRESULT STDMETHODCALLTYPE
ReadAccessRuleset(
106 const GUID __RPC_FAR
*pType
,
107 const GUID __RPC_FAR
*pSubtype
,
108 PST_ACCESSRULESET
* __RPC_FAR
*ppRules
,
111 virtual HRESULT STDMETHODCALLTYPE
WriteAccessRuleset(
113 const GUID __RPC_FAR
*pType
,
114 const GUID __RPC_FAR
*pSubtype
,
115 PST_ACCESSRULESET
* pRules
,
118 virtual HRESULT STDMETHODCALLTYPE
EnumTypes(
121 IEnumPStoreTypes __RPC_FAR
*__RPC_FAR
*ppenum
) = 0;
123 virtual HRESULT STDMETHODCALLTYPE
EnumSubtypes(
125 const GUID __RPC_FAR
*pType
,
127 IEnumPStoreTypes __RPC_FAR
*__RPC_FAR
*ppenum
) = 0;
129 virtual HRESULT STDMETHODCALLTYPE
DeleteItem(
131 const GUID __RPC_FAR
*pItemType
,
132 const GUID __RPC_FAR
*pItemSubtype
,
134 PST_PROMPTINFO
* pPromptInfo
,
137 virtual HRESULT STDMETHODCALLTYPE
ReadItem(
139 const GUID __RPC_FAR
*pItemType
,
140 const GUID __RPC_FAR
*pItemSubtype
,
142 DWORD __RPC_FAR
*pcbData
,
143 BYTE __RPC_FAR
*__RPC_FAR
*ppbData
,
144 PST_PROMPTINFO
* pPromptInfo
,
147 virtual HRESULT STDMETHODCALLTYPE
WriteItem(
149 const GUID __RPC_FAR
*pItemType
,
150 const GUID __RPC_FAR
*pItemSubtype
,
153 BYTE __RPC_FAR
*pbData
,
154 PST_PROMPTINFO
* pPromptInfo
,
155 DWORD dwDefaultConfirmationStyle
,
158 virtual HRESULT STDMETHODCALLTYPE
OpenItem(
160 const GUID __RPC_FAR
*pItemType
,
161 const GUID __RPC_FAR
*pItemSubtype
,
163 PST_ACCESSMODE ModeFlags
,
164 PST_PROMPTINFO
* pPromptInfo
,
167 virtual HRESULT STDMETHODCALLTYPE
CloseItem(
169 const GUID __RPC_FAR
*pItemType
,
170 const GUID __RPC_FAR
*pItemSubtype
,
174 virtual HRESULT STDMETHODCALLTYPE
EnumItems(
176 const GUID __RPC_FAR
*pItemType
,
177 const GUID __RPC_FAR
*pItemSubtype
,
179 IEnumPStoreItems __RPC_FAR
*__RPC_FAR
*ppenum
) = 0;
182 #endif // CHROME_COMMON_IMPORTER_PSTORE_DECLARATIONS_H_