2 * system property interfaces
4 * Copyright 2009 Maarten Lankhorst
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
27 import
"structuredquerycondition.idl";
29 cpp_quote
("#ifndef PSSTDAPI")
30 cpp_quote
("#ifdef _PROPSYS_")
31 cpp_quote
("#define PSSTDAPI STDAPI")
32 cpp_quote
("#define PSSTDAPI_(type) STDAPI_(type)")
34 cpp_quote
("#define PSSTDAPI DECLSPEC_IMPORT STDAPI")
35 cpp_quote
("#define PSSTDAPI_(type) DECLSPEC_IMPORT STDAPI_(type)")
40 typedef PROPERTYKEY
*REFPROPERTYKEY
;
42 cpp_quote
("#include <propkeydef.h>")
45 uuid(b7d14566
-0509-4cce
-a71f
-0a554233bd9b
),
47 pointer_default(unique)
49 interface IInitializeWithFile
: IUnknown
52 [in,string] LPCWSTR pszFilePath
,
58 uuid(b824b49d
-22ac
-4161-ac8a
-9916e8fa3f7f
),
60 pointer_default(unique)
62 interface IInitializeWithStream
: IUnknown
64 [local] HRESULT Initialize
(
65 [in] IStream
*pstream
,
71 uuid(886d8eeb
-8cf2
-4446-8d02
-cdba1dbdcf99
),
73 pointer_default(unique)
75 interface IPropertyStore
: IUnknown
82 [out] PROPERTYKEY
*pkey
85 [in] REFPROPERTYKEY key
,
89 [in] REFPROPERTYKEY key
,
90 [in] REFPROPVARIANT propvar
95 typedef IPropertyStore
*LPPROPERTYSTORE
;
98 uuid(71604b0f
-97b0
-4764-8577-2f13e98a1422
),
100 pointer_default(unique)
102 interface INamedPropertyStore
: IUnknown
104 HRESULT GetNamedValue
(
105 [in,string] LPCWSTR pszName
,
106 [out] PROPVARIANT
*ppropvar
108 HRESULT SetNamedValue
(
109 [in,string] LPCWSTR pszName
,
110 [in] REFPROPVARIANT propvar
112 HRESULT GetNameCount
(
113 [out] DWORD
*pdwCount
117 [out] BSTR *pbstrName
121 typedef [v1_enum] enum GETPROPERTYSTOREFLAGS
124 GPS_HANDLERPROPERTIESONLY
= 0x01,
125 GPS_READWRITE
= 0x02,
126 GPS_TEMPORARY
= 0x04,
127 GPS_FASTPROPERTIESONLY
= 0x08,
128 GPS_OPENSLOWITEM
= 0x10,
129 GPS_DELAYCREATION
= 0x20,
130 GPS_BESTEFFORT
= 0x40,
131 GPS_NO_OPLOCK
= 0x80,
132 GPS_MASK_VALID
= 0xff
133 } GETPROPERTYSTOREFLAGS
;
135 cpp_quote
("DEFINE_ENUM_FLAG_OPERATORS(GETPROPERTYSTOREFLAGS)")
138 uuid(fc0ca0a7
-c316
-4fd2
-9031-3e628e6d4f23
),
141 interface IObjectWithPropertyKey
: IUnknown
143 HRESULT SetPropertyKey
(
144 [in] REFPROPERTYKEY key
146 HRESULT GetPropertyKey
(
147 [out] PROPERTYKEY
*key
151 typedef [v1_enum] enum PKA_FLAGS
159 uuid(f917bc8a
-1bba
-4478-a245
-1bde03eb9431
),
161 pointer_default(unique)
163 interface IPropertyChange
: IObjectWithPropertyKey
165 HRESULT ApplyToPropVariant
([in] REFPROPVARIANT propvarin
, [out] PROPVARIANT
*propvarout
);
169 uuid(380f5cad
-1b5e
-42f2
-805d
-637fd392d31e
),
171 pointer_default(unique)
173 interface IPropertyChangeArray
: IUnknown
176 [out] UINT
*pcOperations
181 [out, iid_is(riid
)] void **ppv
185 [in] IPropertyChange
*ppropChange
188 [in] IPropertyChange
*ppropChange
190 HRESULT AppendOrReplace
(
191 [in] IPropertyChange
*ppropChange
196 HRESULT IsKeyInArray
(
197 [in] REFPROPERTYKEY key
202 uuid(c8e2d566
-186e-4d49
-bf41
-6909ead56acc
),
204 pointer_default(unique)
206 interface IPropertyStoreCapabilities
: IUnknown
208 HRESULT IsPropertyWritable
(
209 [in] REFPROPERTYKEY key
214 uuid(3017056d
-9a91
-4e90
-937d
-746c72abbf4f
),
216 pointer_default(unique)
218 interface IPropertyStoreCache
: IPropertyStore
220 typedef [v1_enum] enum PSC_STATE
229 [in] REFPROPERTYKEY key
,
230 [out] PSC_STATE
*pstate
232 HRESULT GetValueAndState
(
233 [in] REFPROPERTYKEY key
,
234 [out] PROPVARIANT
*ppropvar
,
235 [out] PSC_STATE
*pstate
238 [in] REFPROPERTYKEY key
,
239 [in] PSC_STATE pstate
241 HRESULT SetValueAndState
(
242 [in] REFPROPERTYKEY key
,
243 [in, unique] const PROPVARIANT
*ppropvar
,
249 uuid(11e1fbf9
-2d56
-4a6b
-8db3
-7cd193a471f2
),
251 pointer_default(unique)
253 interface IPropertyEnumType
: IUnknown
255 typedef [v1_enum] enum PROPENUMTYPE
257 PET_DISCRETEVALUE
= 0,
264 [out] PROPENUMTYPE
*penumtype
267 [out] PROPVARIANT
*ppropvar
269 HRESULT GetRangeMinValue
(
270 [out] PROPVARIANT
*ppropvar
272 HRESULT GetRangeSetValue
(
273 [out] PROPVARIANT
*ppropvar
275 HRESULT GetDisplayText
(
276 [out] LPWSTR
*ppszDisplay
281 uuid(9b6e051c
-5ddd
-4321-9070-fe2acb55e974
),
283 pointer_default(unique)
285 interface IPropertyEnumType2
: IPropertyEnumType
287 HRESULT GetImageReference
(
288 [out] LPWSTR
*ppszImageRes
293 uuid(a99400f4
-3d84
-4557-94ba
-1242fb2cc9a6
),
295 pointer_default(unique)
297 interface IPropertyEnumTypeList
: IUnknown
305 [out, iid_is(riid
)] void **ppv
307 HRESULT GetConditionAt
(
310 [out, iid_is(riid
)] void **ppv
312 HRESULT FindMatchingIndex
(
313 [in] REFPROPVARIANT propvarCmp
,
319 uuid(6f79d558
-3e96
-4549-a1d1
-7d75d2288814
),
321 pointer_default(unique)
323 interface IPropertyDescription
: IUnknown
325 typedef [v1_enum] enum PROPDESC_TYPE_FLAGS
328 PDTF_MULTIPLEVALUES
= 0x001,
329 PDTF_ISINNATE
= 0x002,
330 PDTF_ISGROUP
= 0x004,
331 PDTF_CANGROUPBY
= 0x008,
332 PDTF_CANSTACKBY
= 0x010,
333 PDTF_ISTREEPROPERTY
= 0x020,
334 PDTF_INCLUDEINFULLTEXTQUERY
= 0x040,
335 PDTF_ISVIEWABLE
= 0x080,
336 PDTF_ISQUERYABLE
= 0x100,
337 PDTF_CANBEPURGED
= 0x200,
338 PDTF_SEARCHRAWVALUE
= 0x400,
339 PDTF_ISSYSTEMPROPERTY
= 0x80000000,
340 PDTF_MASK_ALL
= 0x800007ff
341 } PROPDESC_TYPE_FLAGS
;
342 cpp_quote
("DEFINE_ENUM_FLAG_OPERATORS(PROPDESC_TYPE_FLAGS)")
344 typedef [v1_enum] enum PROPDESC_VIEW_FLAGS
346 PDVF_DEFAULT
= 0x0000,
347 PDVF_CENTERALIGN
= 0x0001,
348 PDVF_RIGHTALIGN
= 0x0002,
349 PDVF_BEGINNEWGROUP
= 0x0004,
350 PDVF_FILLAREA
= 0x0008,
351 PDVF_SORTDESCENDING
= 0x0010,
352 PDVF_SHOWONLYIFPRESENT
= 0x0020,
353 PDVF_SHOWBYDEFAULT
= 0x0040,
354 PDVF_SHOWINPRIMARYLIST
= 0x0080,
355 PDVF_SHOWINSECONDARYLIST
= 0x0100,
356 PDVF_HIDELABEL
= 0x0200,
357 PDVF_HIDDEN
= 0x0800,
358 PDVF_CANWRAP
= 0x1000,
359 PDVF_MASK_ALL
= 0x1bff
360 } PROPDESC_VIEW_FLAGS
;
361 cpp_quote
("DEFINE_ENUM_FLAG_OPERATORS(PROPDESC_VIEW_FLAGS)")
363 typedef [v1_enum] enum PROPDESC_DISPLAYTYPE
370 } PROPDESC_DISPLAYTYPE
;
372 typedef [v1_enum] enum PROPDESC_GROUPING_RANGE
381 } PROPDESC_GROUPING_RANGE
;
383 typedef [v1_enum] enum PROPDESC_FORMAT_FLAGS
385 PDFF_DEFAULT
= 0x0000,
386 PDFF_PREFIXNAME
= 0x0001,
387 PDFF_FILENAME
= 0x0002,
388 PDFF_ALWAYSKB
= 0x0004,
389 PDFF_RESERVED_RIGHTTOLEFT
= 0x0008,
390 PDFF_SHORTTIME
= 0x0010,
391 PDFF_LONGTIME
= 0x0020,
392 PDFF_HIDETIME
= 0x0040,
393 PDFF_SHORTDATE
= 0x0080,
394 PDFF_LONGDATE
= 0x0100,
395 PDFF_HIDEDATE
= 0x0200,
396 PDFF_RELATIVEDATE
= 0x0400,
397 PDFF_USEEDITINVITATION
= 0x0800,
398 PDFF_READONLY
= 0x1000,
399 PDFF_NOAUTOREADINGORDER
= 0x2000
400 } PROPDESC_FORMAT_FLAGS
;
401 cpp_quote
("DEFINE_ENUM_FLAG_OPERATORS(PROPDESC_FORMAT_FLAGS)")
403 typedef [v1_enum] enum PROPDESC_SORTDESCRIPTION
408 PDSD_SMALLEST_BIGGEST
,
410 } PROPDESC_SORTDESCRIPTION
;
412 typedef [v1_enum] enum PROPDESC_RELATIVEDESCRIPTION_TYPE
425 } PROPDESC_RELATIVEDESCRIPTION_TYPE
;
427 typedef [v1_enum] enum PROPDESC_AGGREGATION_TYPE
437 } PROPDESC_AGGREGATION_TYPE
;
439 typedef [v1_enum] enum PROPDESC_CONDITION_TYPE
447 } PROPDESC_CONDITION_TYPE
;
449 HRESULT GetPropertyKey
(
450 [out] PROPERTYKEY
*pkey
452 HRESULT GetCanonicalName
(
453 [out, string] LPWSTR
*ppszName
455 HRESULT GetPropertyType
(
456 [out] VARTYPE
*pvartype
458 HRESULT GetDisplayName
(
459 [out, string] LPWSTR
*ppszName
461 HRESULT GetEditInvitation
(
462 [out, string] LPWSTR
*ppszName
464 HRESULT GetTypeFlags
(
465 [in] PROPDESC_TYPE_FLAGS mask
,
466 [out] PROPDESC_TYPE_FLAGS
*ppdtFlags
468 HRESULT GetViewFlags
(
469 [out] PROPDESC_VIEW_FLAGS
*ppdvFlags
471 HRESULT GetDefaultColumnWidth
(
474 HRESULT GetDisplayType
(
475 [out] PROPDESC_DISPLAYTYPE
*pdisplaytype
477 HRESULT GetColumnState
(
478 [out] SHCOLSTATEF
*pcsFlags
480 HRESULT GetGroupingRange
(
481 [out] PROPDESC_GROUPING_RANGE
*psd
483 HRESULT GetRelativeDescriptionType
(
484 [out] PROPDESC_RELATIVEDESCRIPTION_TYPE
*prdt
486 HRESULT GetRelativeDescription
(
487 [in] REFPROPVARIANT propvar1
,
488 [in] REFPROPVARIANT propvar2
,
489 [out,string] LPWSTR
*ppszDesc1
,
490 [out,string] LPWSTR
*ppszDesc2
492 HRESULT GetSortDescription
(
493 [out] PROPDESC_SORTDESCRIPTION
*psd
495 HRESULT GetSortDescriptionLabel
(
496 [in] BOOL fDescending
,
497 [out,string] LPWSTR
*ppszDescription
499 HRESULT GetAggregationType
(
500 [out] PROPDESC_AGGREGATION_TYPE
*paggtype
502 HRESULT GetConditionType
(
503 [out] PROPDESC_CONDITION_TYPE
*pcontype
,
504 [out] CONDITION_OPERATION
*popDefault
506 HRESULT GetEnumTypeList
(
508 [out,iid_is(riid
)] void **ppv
510 [local] HRESULT CoerceToCanonicalValue
(
511 [in,out] PROPVARIANT
*propvar
513 [call_as
(CoerceToCanonicalValue
)] HRESULT RemoteCoerceToCanonicalValue
(
514 [in] REFPROPVARIANT propvar
,
515 [out] PROPVARIANT
*ppropvar
517 HRESULT FormatForDisplay
(
518 [in] REFPROPVARIANT propvar
,
519 [in] PROPDESC_FORMAT_FLAGS flags
,
520 [out,string] LPWSTR
*ppszDisplay
522 HRESULT IsValueCanonical
(
523 [in] REFPROPVARIANT propvar
528 uuid(57d2eded
-5062-400e
-b107
-5dae79fe57a6
),
530 pointer_default(unique)
532 interface IPropertyDescription2
: IPropertyDescription
534 HRESULT GetImageReferenceForValue
(
535 [in] REFPROPVARIANT propvar
,
536 [out,string] LPWSTR
*ppszImageRes
541 uuid(f67104fc
-2af9
-46fd
-b32d
-243c1404f3d1
),
543 pointer_default(unique)
545 interface IPropertyDescriptionAliasInfo
: IPropertyDescription
547 HRESULT GetSortByAlias
(
549 [out,iid_is(riid
)] void **ppv
551 HRESULT GetAdditionalSortByAliases
(
553 [out,iid_is(riid
)] void **ppv
558 uuid(078f91bd
-29a2
-440f
-924e-46a291524520
),
560 pointer_default(unique)
562 interface IPropertyDescriptionSearchInfo
: IPropertyDescription
564 typedef [v1_enum] enum PROPDESC_SEARCHINFO_FLAGS
567 PDSIF_ININVERTEDINDEX
= 0x1,
568 PDSIF_ISCOLUMN
= 0x2,
569 PDSIF_ISCOLUMNSPARSE
= 0x4,
570 PDSIF_ALWAYSINCLUDE
= 0x8,
571 } PROPDESC_SEARCHINFO_FLAGS
;
572 cpp_quote
("DEFINE_ENUM_FLAG_OPERATORS(PROPDESC_SEARCHINFO_FLAGS)")
574 typedef [v1_enum] enum PROPDESC_COLUMNINDEX_TYPE
582 } PROPDESC_COLUMNINDEX_TYPE
;
584 HRESULT GetSearchInfoFlags
(
585 [out] PROPDESC_SEARCHINFO_FLAGS
*ppdsiFlags
587 HRESULT GetColumnIndexType
(
588 [out] PROPDESC_COLUMNINDEX_TYPE
*ppdciType
590 HRESULT GetProjectionString
(
591 [out] LPWSTR
*ppszProjection
594 [out] UINT
*pcbMaxSize
599 uuid(507393f4
-2a3d
-4a60
-b59e
-d9c75716c2dd
),
601 pointer_default(unique)
603 interface IPropertyDescriptionRelatedPropertyInfo
: IPropertyDescription
605 HRESULT GetRelatedProperty
(
606 [in] LPCWSTR ppszRelationshipName
,
608 [out,iid_is(riid
)] void **ppv
612 typedef [v1_enum] enum PROPDESC_ENUMFILTER
619 PDEF_INFULLTEXTQUERY
,
621 } PROPDESC_ENUMFILTER
;
624 uuid(ca724e8a
-c3e6
-442b
-88a4
-6fb0db8035a3
),
626 pointer_default(unique)
628 interface IPropertySystem
: IUnknown
630 HRESULT GetPropertyDescription
(
631 [in] REFPROPERTYKEY propkey
,
633 [out,iid_is(riid
)] void **ppv
635 HRESULT GetPropertyDescriptionByName
(
636 [in,string] LPCWSTR pszCanonicalName
,
638 [out,iid_is(riid
)] void **ppv
640 HRESULT GetPropertyDescriptionListFromString
(
641 [in,string] LPCWSTR pszPropList
,
643 [out,iid_is(riid
)] void **ppv
645 HRESULT EnumeratePropertyDescriptions
(
646 [in] PROPDESC_ENUMFILTER filterOn
,
648 [out,iid_is(riid
)] void **ppv
650 HRESULT FormatForDisplay
(
651 [in] REFPROPERTYKEY key
,
652 [in] REFPROPVARIANT propvar
,
653 [in] PROPDESC_FORMAT_FLAGS pdff
,
654 [out,string,size_is(cchText
)] LPWSTR pszText
,
657 HRESULT FormatForDisplayAlloc
(
658 [in] REFPROPERTYKEY key
,
659 [in] REFPROPVARIANT propvar
,
660 [in] PROPDESC_FORMAT_FLAGS pdff
,
661 [out,string] LPWSTR
*pszText
663 HRESULT RegisterPropertySchema
(
664 [in,string] LPCWSTR pszPath
666 HRESULT UnregisterPropertySchema
(
667 [in,string] LPCWSTR pszPath
669 HRESULT RefreshPropertySchema
(void);
673 uuid(1f9fc1d0
-c39b
-4b26
-817f
-011967d3440e
),
675 pointer_default(unique)
677 interface IPropertyDescriptionList
: IUnknown
685 [out,iid_is(riid
)] void **ppv
690 uuid(bc110b6d
-57e8
-4148-a9c6
-91015ab2f3a5
),
692 pointer_default(unique)
694 interface IPropertyStoreFactory
: IUnknown
696 HRESULT GetPropertyStore
(
697 [in] GETPROPERTYSTOREFLAGS flags
,
698 [in,unique] IUnknown
*pUnkFactory
,
700 [out,iid_is(riid
)] void **ppv
702 HRESULT GetPropertyStoreForKeys
(
703 [in,unique] const PROPERTYKEY
*rgKeys
,
705 [in] GETPROPERTYSTOREFLAGS flags
,
707 [out,iid_is(riid
)] void **ppv
712 uuid(40d4577f
-e237
-4bdb
-bd69
-58f089431b6a
),
714 pointer_default(unique)
716 interface IDelayedPropertyStoreFactory
: IPropertyStoreFactory
718 HRESULT GetDelayedPropertyStore
(
719 [in] GETPROPERTYSTOREFLAGS flags
,
720 [in] DWORD dwStoreId
,
722 [out,iid_is(riid
)] void **ppv
726 [v1_enum] enum _PERSIST_SPROPSTORE_FLAGS
731 typedef int PERSIST_SPROPSTORE_FLAGS
;
733 typedef struct tagSERIALIZEDROPSTORAGE SERIALIZEDPROPSTORAGE
;
735 cpp_quote
("#if 0") /* Wine doesn't have __unaligned builtin, hack */
736 typedef SERIALIZEDPROPSTORAGE
*PUSERIALIZEDPROPSTORAGE
;
737 typedef const SERIALIZEDPROPSTORAGE
*PCUSERIALIZEDPROPSTORAGE
;
739 cpp_quote
("typedef SERIALIZEDPROPSTORAGE UNALIGNED *PUSERIALIZEDPROPSTORAGE;")
740 cpp_quote
("typedef const SERIALIZEDPROPSTORAGE UNALIGNED *PCUSERIALIZEDPROPSTORAGE;")
743 uuid(e318ad57
-0aa0
-450f
-aca5
-6fab7103d917
),
744 pointer_default(unique),
747 interface IPersistSerializedPropStorage
: IUnknown
750 [in] PERSIST_SPROPSTORE_FLAGS flags
752 HRESULT SetPropertyStorage
(
753 [in] PCUSERIALIZEDPROPSTORAGE psps
,
756 HRESULT GetPropertyStorage
(
757 [out] SERIALIZEDPROPSTORAGE
**psps
,
763 uuid(77effa68
-4f98
-4366-ba72
-573b3d880571
),
764 pointer_default(unique),
767 interface IPersistSerializedPropStorage2
: IPersistSerializedPropStorage
769 HRESULT GetpropertyStorageSize
(
772 HRESULT GetPropertyStorageBuffer
(
773 [out] SERIALIZEDPROPSTORAGE
*psps
,
775 [out] DWORD
*pcbWritten
780 uuid(fa955fd9
-38be
-4879-a6ce
-824cf52d609f
),
782 pointer_default(unique)
784 interface IPropertySystemChangeNotify
: IUnknown
786 HRESULT SchemaRefreshed
(void);
789 /* Interface for CoCreateInstance? */
791 uuid(75121952-e0d0
-43e5
-9380-1d80483acf72
),
792 pointer_default(unique)
794 interface ICreateObject
: IUnknown
796 HRESULT CreateObject
(
798 [in,unique] IUnknown
*pUnkOuter
,
800 [out,iid_is(riid
)] void **ppv
804 cpp_quote
("#define PKEY_PIDSTR_MAX 10")
805 cpp_quote
("#define GUIDSTRING_MAX 39")
806 cpp_quote
("#define PKEYSTR_MAX (GUIDSTRING_MAX + 1 + PKEY_PIDSTR_MAX)")
808 cpp_quote
("PSSTDAPI PSCreateMemoryPropertyStore(REFIID,void **);")
809 cpp_quote
("PSSTDAPI PSCreatePropertyStoreFromObject(IUnknown*,DWORD,REFIID,void **);")
810 cpp_quote
("PSSTDAPI PSStringFromPropertyKey(REFPROPERTYKEY,LPWSTR,UINT);")
811 cpp_quote
("PSSTDAPI PSPropertyKeyFromString(LPCWSTR,PROPERTYKEY*);")
812 cpp_quote
("PSSTDAPI PSGetPropertyDescription(REFPROPERTYKEY,REFIID,void **);")
813 cpp_quote
("PSSTDAPI PSGetPropertyDescriptionListFromString(LPCWSTR,REFIID,void **);")
814 cpp_quote
("PSSTDAPI PSRefreshPropertySchema(void);")
815 cpp_quote
("PSSTDAPI PSRegisterPropertySchema(LPCWSTR);")
816 cpp_quote
("PSSTDAPI PSUnregisterPropertySchema(LPCWSTR);")
818 /* TODO: Add remainder of the C api here */
821 uuid(2cda3294
-6c4f
-4020-b161
-27c530c81fa6
),
825 library PropSysObjects
827 [uuid(9a02e012
-6303-4e1e
-b9a1
-630f802592c5
)] coclass InMemoryPropertyStore
829 interface IPropertyStore
;
831 [uuid(b8967f86
-58ae
-4f96
-9fb2
-5d7904798f4b
)] coclass PropertySystem
833 interface IPropertySystem
;