Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unable to get any device attributes.
05-07-2012, 09:48 AM (This post was last modified: 05-07-2012 09:49 AM by simonc.)
Post: #2
RE: Unable to get any device attributes.
(05-07-2012 09:22 AM)dough Wrote:  Using the C API, I have tried calling CpDeviceCGetAttribute() function with all of the following keys.


On each call, the function returns 0, which according to comments in CpDevice.h means: " was not available".

Perhaps some of the attributes are genuinely not available for the devices I discovered, but I find it hard to believe that there is no XML device description!

You can query the following attributes:
  • "Upnp.Location"
  • "Upnp.DeviceXml"
  • "Upnp.FriendlyName"
  • "Upnp.PresentationUrl"

(05-07-2012 09:22 AM)dough Wrote:  Is there another way to get a device's attributes using the C API?
Also, is it possible to get other device attributes like Manufacturer, IP Address, Icon etc?

Attributes other than above can be retrieved by getting "Upnp.DeviceXml" then parsing the xml returned. (This may seem odd but is probably more efficient. ohNet uses a pretty rudimentary xml parser; apps targetting a particular platform will typically have access to far more efficient/capable parsers.)
Find all posts by this user

Messages In This Thread
RE: Unable to get any device attributes. - simonc - 05-07-2012 09:48 AM

Forum Jump: