1 // Licensed under the Apache License, Version 2.0
2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
4 // All files in the project carrying such notice may not be copied, modified, or distributed
5 // except according to those terms.
6 //! Mappings for the contents of PortableDeviceTypes.h
7 use shared::guiddef::{GUID, REFGUID};
8 use shared::minwindef::{BOOL, BYTE, DWORD, FLOAT, ULONG};
9 use shared::wtypes::{PROPERTYKEY, VARTYPE};
10 use um::propidl::PROPVARIANT;
11 use um::propkeydef::REFPROPERTYKEY;
12 use um::propsys::IPropertyStore;
13 use um::unknwnbase::{IUnknown, IUnknownVtbl};
14 use um::winnt::{HRESULT, LONG, LONGLONG, LPCWSTR, LPWSTR, ULONGLONG};
15 //330
16 RIDL!{#[uuid(0x6848f6f2, 0x3155, 0x4f86, 0xb6, 0xf5, 0x26, 0x3e, 0xee, 0xab, 0x31, 0x43)]
17 interface IPortableDeviceValues(IPortableDeviceValuesVtbl): IUnknown(IUnknownVtbl) {
18     fn GetCount(
19         pcelt: *mut DWORD,
20     ) -> HRESULT,
21     fn GetAt(
22         index: DWORD,
23         pKey: *mut PROPERTYKEY,
24         pValue: *mut PROPVARIANT,
25     ) -> HRESULT,
26     fn SetValue(
27         key: REFPROPERTYKEY,
28         pValue: *const PROPVARIANT,
29     ) -> HRESULT,
30     fn GetValue(
31         key: REFPROPERTYKEY,
32         pValue: *mut PROPVARIANT,
33     ) -> HRESULT,
34     fn SetStringValue(
35         key: REFPROPERTYKEY,
36         Value: LPCWSTR,
37     ) -> HRESULT,
38     fn GetStringValue(
39         key: REFPROPERTYKEY,
40         pValue: *mut LPWSTR,
41     ) -> HRESULT,
42     fn SetUnsignedIntegerValue(
43         key: REFPROPERTYKEY,
44         Value: ULONG,
45     ) -> HRESULT,
46     fn GetUnsignedIntegerValue(
47         key: REFPROPERTYKEY,
48         pValue: *mut ULONG,
49     ) -> HRESULT,
50     fn SetSignedIntegerValue(
51         key: REFPROPERTYKEY,
52         Value: LONG,
53     ) -> HRESULT,
54     fn GetSignedIntegerValue(
55         key: REFPROPERTYKEY,
56         pValue: *mut LONG,
57     ) -> HRESULT,
58     fn SetUnsignedLargeIntegerValue(
59         key: REFPROPERTYKEY,
60         Value: ULONGLONG,
61     ) -> HRESULT,
62     fn GetUnsignedLargeIntegerValue(
63         key: REFPROPERTYKEY,
64         pValue: *mut ULONGLONG,
65     ) -> HRESULT,
66     fn SetSignedLargeIntegerValue(
67         key: REFPROPERTYKEY,
68         Value: LONGLONG,
69     ) -> HRESULT,
70     fn GetSignedLargeIntegerValue(
71         key: REFPROPERTYKEY,
72         pValue: *mut LONGLONG,
73     ) -> HRESULT,
74     fn SetFloatValue(
75         key: REFPROPERTYKEY,
76         Value: FLOAT,
77     ) -> HRESULT,
78     fn GetFloatValue(
79         key: REFPROPERTYKEY,
80         pValue: *mut FLOAT,
81     ) -> HRESULT,
82     fn SetErrorValue(
83         key: REFPROPERTYKEY,
84         Value: HRESULT,
85     ) -> HRESULT,
86     fn GetErrorValue(
87         key: REFPROPERTYKEY,
88         pValue: *mut HRESULT,
89     ) -> HRESULT,
90     fn SetKeyValue(
91         key: REFPROPERTYKEY,
92         Value: REFPROPERTYKEY,
93     ) -> HRESULT,
94     fn GetKeyValue(
95         key: REFPROPERTYKEY,
96         pValue: *mut PROPERTYKEY,
97     ) -> HRESULT,
98     fn SetBoolValue(
99         key: REFPROPERTYKEY,
100         Value: BOOL,
101     ) -> HRESULT,
102     fn GetBoolValue(
103         key: REFPROPERTYKEY,
104         pValue: *mut BOOL,
105     ) -> HRESULT,
106     fn SetIUnknownValue(
107         key: REFPROPERTYKEY,
108         pValue: *mut IUnknown,
109     ) -> HRESULT,
110     fn GetIUnknownValue(
111         key: REFPROPERTYKEY,
112         ppValue: *mut *mut IUnknown,
113     ) -> HRESULT,
114     fn SetGuidValue(
115         key: REFPROPERTYKEY,
116         Value: REFGUID,
117     ) -> HRESULT,
118     fn GetGuidValue(
119         key: REFPROPERTYKEY,
120         pValue: *mut GUID,
121     ) -> HRESULT,
122     fn SetBufferValue(
123         key: REFPROPERTYKEY,
124         pValue: *mut BYTE,
125         cbValue: DWORD,
126     ) -> HRESULT,
127     fn GetBufferValue(
128         key: REFPROPERTYKEY,
129         ppValue: *mut *mut BYTE,
130         pcbValue: *mut DWORD,
131     ) -> HRESULT,
132     fn SetIPortableDeviceValuesValue(
133         key: REFPROPERTYKEY,
134         pValue: *mut IPortableDeviceValues,
135     ) -> HRESULT,
136     fn GetIPortableDeviceValuesValue(
137         key: REFPROPERTYKEY,
138         ppValue: *mut *mut IPortableDeviceValues,
139     ) -> HRESULT,
140     fn SetIPortableDevicePropVariantCollectionValue(
141         key: REFPROPERTYKEY,
142         pValue: *mut IPortableDevicePropVariantCollection,
143     ) -> HRESULT,
144     fn GetIPortableDevicePropVariantCollectionValue(
145         key: REFPROPERTYKEY,
146         ppValue: *mut *mut IPortableDevicePropVariantCollection,
147     ) -> HRESULT,
148     fn SetIPortableDeviceKeyCollectionValue(
149         key: REFPROPERTYKEY,
150         pValue: *mut IPortableDeviceKeyCollection,
151     ) -> HRESULT,
152     fn GetIPortableDeviceKeyCollectionValue(
153         key: REFPROPERTYKEY,
154          ppValue: *mut *mut IPortableDeviceKeyCollection,
155     ) -> HRESULT,
156     fn SetIPortableDeviceValuesCollectionValue(
157         key: REFPROPERTYKEY,
158         pValue: *mut IPortableDeviceValuesCollection,
159     ) -> HRESULT,
160     fn GetIPortableDeviceValuesCollectionValue(
161         key: REFPROPERTYKEY,
162         ppValue: *mut *mut IPortableDeviceValuesCollection,
163     ) -> HRESULT,
164     fn RemoveValue(
165         key: REFPROPERTYKEY,
166     ) -> HRESULT,
167     fn CopyValuesFromPropertyStore(
168         pStore: *mut IPropertyStore,
169     ) -> HRESULT,
170     fn CopyValuesToPropertyStore(
171         pStore: *mut IPropertyStore,
172     ) -> HRESULT,
173     fn Clear() -> HRESULT,
174 }}
175 RIDL!{#[uuid(0xdada2357, 0xe0ad, 0x492e, 0x98, 0xdb, 0xdd, 0x61, 0xc5, 0x3b, 0xa3, 0x53)]
176 interface IPortableDeviceKeyCollection(IPortableDeviceKeyCollectionVtbl): IUnknown(IUnknownVtbl) {
177     fn GetCount(
178         pcElems: *mut DWORD,
179     ) -> HRESULT,
180     fn GetAt(
181         dwIndex: DWORD,
182         pKey: *mut PROPERTYKEY,
183     ) -> HRESULT,
184     fn Add(
185         Key: REFPROPERTYKEY,
186     ) -> HRESULT,
187     fn Clear() -> HRESULT,
188     fn RemoveAt(
189         dwIndex: DWORD,
190     ) -> HRESULT,
191 }}
192 RIDL!{#[uuid(0x89b2e422, 0x4f1b, 0x4316, 0xbc, 0xef, 0xa4, 0x4a, 0xfe, 0xa8, 0x3e, 0xb3)]
193 interface IPortableDevicePropVariantCollection(IPortableDevicePropVariantCollectionVtbl):
194     IUnknown(IUnknownVtbl) {
195     fn GetCount(
196         pcElems: *mut DWORD,
197     ) -> HRESULT,
198     fn GetAt(
199         dwIndex: DWORD,
200         pValue: *mut PROPVARIANT,
201     ) -> HRESULT,
202     fn Add(
203         pValue: *const PROPVARIANT,
204     ) -> HRESULT,
205     fn GetType(
206         pvt: *mut VARTYPE,
207     ) -> HRESULT,
208     fn ChangeType(
209         vt: VARTYPE,
210     ) -> HRESULT,
211     fn Clear() -> HRESULT,
212     fn RemoveAt(
213         dwIndex: DWORD,
214     ) -> HRESULT,
215 }}
216 RIDL!{#[uuid(0x6e3f2d79, 0x4e07, 0x48c4, 0x82, 0x08, 0xd8, 0xc2, 0xe5, 0xaf, 0x4a, 0x99)]
217 interface IPortableDeviceValuesCollection(IPortableDeviceValuesCollectionVtbl):
218     IUnknown(IUnknownVtbl) {
219     fn GetCount(
220         pcElems: *mut DWORD,
221     ) -> HRESULT,
222     fn GetAt(
223         dwIndex: DWORD,
224         ppValues: *mut *mut IPortableDeviceValues,
225     ) -> HRESULT,
226     fn Add(
227         pValues: *mut IPortableDeviceValues,
228     ) -> HRESULT,
229     fn Clear() -> HRESULT,
230     fn RemoveAt(
231         dwIndex: DWORD,
232     ) -> HRESULT,
233 }}
234 DEFINE_GUID!{LIBID_PortableDeviceTypesLib,
235     0x2B00BA2F, 0xE750, 0x4beb, 0x92, 0x35, 0x97, 0x14, 0x2E, 0xDE, 0x1D, 0x3E}
236 DEFINE_GUID!{CLSID_WpdSerializer,
237     0x0b91a74b, 0xad7c, 0x4a9d, 0xb5, 0x63, 0x29, 0xee, 0xf9, 0x16, 0x71, 0x72}
238 RIDL!{#[uuid(0x0b91a74b, 0xad7c, 0x4a9d, 0xb5, 0x63, 0x29, 0xee, 0xf9, 0x16, 0x71, 0x72)]
239 class WpdSerializer;}
240 DEFINE_GUID!{CLSID_PortableDeviceValues,
241     0x0c15d503, 0xd017, 0x47ce, 0x90, 0x16, 0x7b, 0x3f, 0x97, 0x87, 0x21, 0xcc}
242 RIDL!{#[uuid(0x0c15d503, 0xd017, 0x47ce, 0x90, 0x16, 0x7b, 0x3f, 0x97, 0x87, 0x21, 0xcc)]
243 class PortableDeviceValues;}
244 DEFINE_GUID!{CLSID_PortableDeviceKeyCollection,
245     0xde2d022d, 0x2480, 0x43be, 0x97, 0xf0, 0xd1, 0xfa, 0x2c, 0xf9, 0x8f, 0x4f}
246 RIDL!{#[uuid(0xde2d022d, 0x2480, 0x43be, 0x97, 0xf0, 0xd1, 0xfa, 0x2c, 0xf9, 0x8f, 0x4f)]
247 class PortableDeviceKeyCollection;}
248 DEFINE_GUID!{CLSID_PortableDevicePropVariantCollection,
249     0x08a99e2f, 0x6d6d, 0x4b80, 0xaf, 0x5a, 0xba, 0xf2, 0xbc, 0xbe, 0x4c, 0xb9}
250 RIDL!{#[uuid(0x08a99e2f, 0x6d6d, 0x4b80, 0xaf, 0x5a, 0xba, 0xf2, 0xbc, 0xbe, 0x4c, 0xb9)]
251 class PortableDevicePropVariantCollection;}
252 DEFINE_GUID!{CLSID_PortableDeviceValuesCollection,
253     0x3882134d, 0x14cf, 0x4220, 0x9c, 0xb4, 0x43, 0x5f, 0x86, 0xd8, 0x3f, 0x60}
254 RIDL!{#[uuid(0x3882134d, 0x14cf, 0x4220, 0x9c, 0xb4, 0x43, 0x5f, 0x86, 0xd8, 0x3f, 0x60)]
255 class PortableDeviceValuesCollection;}
256