Property System Layers and Extensibility Points

It's easy to get confused about what points of extensibility exist and what layer provide what services. This isn't helped by the fact that we've lumped a bunch of things into the property system, but I'll try to diagram this out here and in future posts.

The coercion layer is topmost. It's job is to ensure that the properties moving through the system are of the right type. Comments is a string. Ratings is a number. IShellItem2::GetPropertyStore creates this layer on behalf of the consumer.

The shell item layer comes next. It performs various mappings over a shell namespace extension. For instance, it provides PKEY_SFGAOFlags by calling IShellFolder::GetAttributesOf on the namespace. IShellItem2::GetPropertyStore creates this layer.

The shell namespace is the first extensibility point. Each extension can provide as few or as many properties as it likes. 

The file system namespace is its own layer. It provides a bunch of properties such as file size, and has an extension point of its own: the property handler. 

A property handler extends the file system namespace properties. It cracks open a file and extracts useful properties like image dimensions and music bitrates.

Putting it together, here's what we get:

[------------- Consumer Application ------------]
[------------- Coercion Layer ------------------]
[------------- Shell Item Layer ----------------]
[ Namespace Extension ] [ File System Namespace ]
[ Property Handler ]

In red are the parts the property system provides.