Implementing Device Classes (Windows Embedded CE 6.0)
1/6/2010
The UPnP AV Framework provides functionality that makes building UPnP AV devices easier, but you still must provide the implementation of the actual media server and renderer functionality.
For example, a MediaServer device must be able to manage content it serves to renderers - like a database, a file system, and so on. This functionality is not part of the UPnP AV Framework. To provide this functionality, you must declare your own C++ classes that derive from classes provided with the UPnP AV Framework.
The AV Renderer sample contains derived classes that demonstrate how to create a MediaRenderer device. For more information about this sample, see Windows Embedded CE topic UPnP AV Renderer Sample.
For AVTransport, RenderingControl, and ContentDirectory services, derive your custom classes from IAVTransportImpl, IRenderingControlImpl, and IContentDirectoryImpl. These implementation classes provide do-nothing method overrides for optional actions. In your derived classes, you provide the actual implementation for all required actions and for any optional actions your device implements.
The UPnP AV Framework includes a similar IConnectionManagerImpl class for the ConnectionManager service. However, instead of providing do-nothing methods, IConnectionManagerImpl provides connection and protocol management through fully implemented action methods. This is possible because connection and protocol management does not rely on specific database, hardware, or other design decisions, like do the first three services.
However, connection management requires custom functionality when the connection is being created and terminated. To provide this functionality, implement IConnectionManagerImpl::CreateConnection and IConnectionManagerImpl::EndConnection. These methods are called by the provided implementations of IConnectionManager::PrepareForConnection and IConnectionManager::ConnectionComplete.
To use the UPnP AV Framework to implement a device, you must also connect your custom class implementations to the UPnP AV Framework code. For more information, see Registering Device Implementations.
For information about the control flow and action invocations required when working with ConnectionManager, AVTransport, RenderingControl, and ContentDirectory services, see the documentation referenced in UPnP AV DCP Documentation.
See Also
Concepts
Developing UPnP AV Framework Devices
Registering Device Implementations
UPnP AV Framework Overview