Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
A version of this page is also available for
4/8/2010
To avoid name collisions, the elements of the UPnP AV Framework API are declared in C++ namespaces.
The majority of the classes and other elements exist in the av_upnp namespace. The exceptions to this rule are:
- Parser and object elements, which are declared in
av_upnp::DIDL_Lite
- Many of the string constants, which are declared in individual
namespaces of their own. For example,
AVTransportStateis declared in av_upnp::TransportState.
For specific information about the namespace of any particular API element, see the Requirements section of the API documentation for that element.
The UPnP AV Framework, in the av_upnp.h file, includes the following code to map the av_upnp namespace to the shorter string av.
Copy Code | |
---|---|
#ifndef NO_UPNPAV_AV_ALIAS namespace av = av_upnp; #endif |
Unless you define NO_UPNPAV_AV_ALIAS, your code can refer to items using the shorter av string, like this:
Copy Code | |
---|---|
av::IEventSink |
If your application already includes another namespace called av, define NO_UPNPAV_AV_ALIAS and use the full av_upnp string in your code.