Device Representation
Previous | Next |
Device Representation
Devices have two main behaviors that need to be addressed by the WPD architecture:
- Accessing and Storing content. For example, applications need to be able to add music files to a portable music player.
- Programming the device. This includes simple operations such as changing settings and preparing the device for data capture, or more complex operations such as uploading firmware. Examples include issuing a "Take Picture" command to a digital still camera.
In WPD, these behaviors are described by representing the device as a hierarchy of objects. The following illustration shows an example of a WPD object representation for a multi-function device (in this case a mobile phone).
The features in the mobile phone device represented in the previous illustration correspond to two classes of objects: functional and data objects.
Functional Objects
The functionality found on the mobile phone device corresponds to three objects as described in the following table.
Object | Description |
Storage | Stores contact, image, and music data. |
Still Image Capture | Captures still images. |
SMS | Supports transmission and reception of SMS messages. |
Functional objects exist to identify or logically group feature capabilities of a device (for example, an application can see that a device supports SMS by looking for the SMS functional object, or similarly, the application can see that a device has camera capabilities by looking for the Still Image Capture functional object).
This flexible object representation helps enable easy support for devices with multi-function capabilities. Drivers can simply expose whatever functional objects that represent their device, which is more granular than using traditional device classes. It is also useful in isolation of overlapping functional pieces (for example, some phones may have two cameras, four storage media, and so on).
Data Objects
Data objects represent the data found on a device. For example, the mobile phone device contains three types of objects as described in the following table.
Object | Description |
Contacts | Contact information (such as name, phone number, address, and so on). |
Images | Image files in JPEG, GIF, TIFF, or other formats. |
Music | Music files in WMA, MP3, WAV, or other formats. |
Some data objects are stored in a file.
See Also
Previous | Next |