2.2.1.2.8.2 Restriction

The Restriction structure represents a filter that defines the search criteria in a search folder.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

RestrictionType

RestrictionData (variable)

...

RestrictionType (4 bytes): An integer that specifies the type of structure in the RestrictionData field. It can have one of the following values.

RestrictionType name

RestrictionType value

RestrictionData specification

AndRestriction

0x00000000

Variable size, a 32-bit count of subrestrictions, followed by the subrestrictions in Restriction format. An object satisfies this filter if and only if all subrestrictions are satisfied.

OrRestriction

0x00000001

Variable size, a 32-bit count of subrestrictions, followed by the subrestrictions in Restriction format. An object satisfies this filter if at least one subrestriction is satisfied.

NotRestriction

0x00000002

Variable size, a subrestriction in Restriction format. An object satisfies this filter if and only if the subrestriction is not satisfied.

ContentRestriction

0x00000003

Variable size, a 32-bit ulFuzzyLevel field, a specified in [MS-NSPI], followed by a 32-bit PropertyTag structure ([MS-OXCDATA] section 2.9), followed by the comparand in PropertyValue format (section 2.2.1.2.8.1.1.1). An object satisfies this filter if and only if the given property is equivalent to the given comparand at the specified value of the ulFuzzyLevel field.

PropertyRestriction

0x00000004

Variable size, a 32-bit RelOp field, with the three high-order bytes set to zeroes, followed by a 32-bit PropertyTag structure, followed by the comparand in PropertyValue format. An object satisfies this filter if and only if the RelOp value describes the given property's relationship to the comparand, as specified in [MS-OXCDATA] section 2.12.5.1.

ComparePropertiesRestriction

0x00000005

12 bytes, a 32-bit RelOp field, with the three high-order bytes set to zeroes, followed by two 32-bit PropertyTag structures. An object satisfies this filter if and only if the RelOp value describes the first property's relationship to the second property, as specified in [MS-OXCDATA] section 2.12.6.1.

BitMaskRestriction

0x00000006

12 bytes, a 32-bit BitmapRelOp field, with the three high-order bytes set to zeroes, followed by a 32-bit PropertyTag structure, followed by the comparand as a 32-bit mask. An object satisfies this filter if and only if the bitwise AND of the property with the comparand satisfies the BitmapRelOp value, as specified in [MS-OXCDATA] section 2.12.7.1.

ExistRestriction

0x00000008

4 bytes, a 32-bit PropertyTag structure. An object satisfies this filter if and only if the given property is set on the object.

CommentRestriction

0x0000000A

Variable size, a 32-bit count of annotations, followed by a subrestriction in Restriction format, followed by the annotations in PropertyValue format. An object satisfies this filter if and only if the object satisfies the subrestriction. The annotations SHOULD be left intact and ignored.

CountRestriction

0x0000000B

Variable size, a subrestriction in Restriction format. An object satisfies this filter if and only if the object satisfies the subrestriction.

RestrictionData (variable): The contents of this field depend on the value of the RestrictionType field. It contains data that is formatted as specified in the table in the description of RestrictionType field in this section.