diff options
author | Christophe Guiraud <christophe.guiraud@intel.com> | 2013-06-21 11:25:49 +0200 |
---|---|---|
committer | rmerlino <regis.merlino@intel.com> | 2013-12-12 14:49:11 +0100 |
commit | 13951f33b7a854364a05b7b38893261822cd0e83 (patch) | |
tree | 6af12062356f5b531e597dd2d232101b5318ccb7 /test | |
parent | 13b04ba9dd121b8ccc29ea5f0a61188280922091 (diff) | |
download | dleyna-server-13951f33b7a854364a05b7b38893261822cd0e83.tar.gz |
[Device] Add Energy Management features
- Add a Wake method to DBus MediaDevice interface, this method
can be invoked to wake-up a sleeping device by sending the
appropriate WOL magic packet.
Information to be used for the magic packet formatting will be
retrieved from the device context.
- Add a DLS_INTERFACE_PROP_SLEEPING boolean property to DBus
MediaDevice interface, this property reflects the sleeping
state of the MediaServer.
The property is not present if the Energy Management service
isn't supported by the device embedding the MediaServer.
The DLS_INTERFACE_PROP_SLEEPING property is updated based on
the EM service NetworkInterfaceInfo evented state variable.
The DLS_INTERFACE_PROP_SLEEPING property is set to FALSE by
default at the device construction.
NetworkInterfaceInfo information are XML encoded, relevant
information are parsed with the help of libxml2.
dleyna-server has now a direct dependency on libxml2.
a new xml-util.c file with its header provides libxml2 helpers.
XML extracted information are stored into the matching device
context.
The matching device context is selected based on the interface
ip address and the device uuid.
A device is considered as in sleeping state if its network
interface is up.
- Add a DLS_INTERFACE_PROP_ROOT_UDN string property, if present
this property contains the UDN of the root device embedding a
MediaServer sub-device.
- Update the device contruction to allow the usage of a
MediaServer even if it is sub-device, in the same as way if it
was the root device from the application layer perpective.
We ask now to be notified for all upnp:rootdevice and we filter
those who are MediaServer or have a sub device of this type.
(recursive lookup in the device child hierarchy if any).
Only the first MediaServer device found will be considered.
we also retrieve the Energy Management service proxy from the
root device if it is available and else we use the first one
that we found by doing a recursive lookup in the device child
hierarchy. we use it to be notified of its NetworkInterfaceInfo
evented state variable changes.
- As we have now to handle multiple device proxies (CDS, EMS),
we use now a struct dls_service_t to gather cds and ems services
related information (GUPnPServiceProxy *proxy, gboolean subscribed,
guint timeout_id) in the device context.
- Add the Wake Method to the python test application.
- Documentation updated.
Signed-off-by: Christophe Guiraud <christophe.guiraud@intel.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/dbus/mediaconsole.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/dbus/mediaconsole.py b/test/dbus/mediaconsole.py index d54bb84..887c1f1 100644 --- a/test/dbus/mediaconsole.py +++ b/test/dbus/mediaconsole.py @@ -191,6 +191,9 @@ class Device(Container): bytes, mime = self._deviceIF.GetIcon(mime_type, resolution) print "Icon mime type: " + mime + def wake(self): + return self._deviceIF.Wake() + class UPNP(object): def __init__(self): |