Posted: March 20, 2013 23:23 by neha_shanbhag
To support the DLNA LPE feature, the implementation must be able to get wakeOnPattern, wakeSupportedTransport, maxWakeOnDelay, dozeDuration and networkInterfaceMode. Since there is no platform independent way to do this it is necessary to add MPEOS apis.
Details are below:
Changes to mpeos_socket.h
mpeos_getDLNANetworkInterfaceInfo mpeos call will write to an mpeos structure which looks like this:
typedef struct _mpeos_LpeDlnaNetworkInterfaceInfo
* Gets the DLNA LPE NetworkInterface information, after providing the interfaceName.
* Interface name can be eth0, eth1, en1 etc.
* @return Upon successful completion, returns the structure of the DLNA LPE networkInterface. Otherwise return mpe_Error as appropriate.
* Attributes contain values of :
* WakeOnPattern: A Wake-on Pattern Signaler which is a pattern of hexadecimal digits.
* WakeSupportedTransport: A string value whose value can be either UDP_BROADCAST ,UDP_UNICAST, TCP_UNICAST or OTHER
* MaxWakeOnDelay: An integer which returns the estimate of maximum time in seconds it would take from time WakeOnPattern is received until ssdp messages are sent. A value of 0 (zero) indicates that no estimate is provided and the value is unknown.
* DozeDuration : An integer value of time in milliseconds that the interface is configured to doze. A 0 (zero) value means this parameter is not set.
mpe_Error mpeos_getDLNANetworkInterfaceInfo(char* interfaceName, mpeos_LpeDlnaNetworkInterfaceInfo* dlnaNetworkIfInfo);
* Gets the DLNA LPE NetworkInterfaceMode information, after providing the interfaceName
* Interface name can be eth0, eth1, em1 etc.
* NetworkInterfaceMode can be: :Unimplemented", "IP-up", "IP-up-Periodic", "IP-down-no-Wake",
* "IP-down-with-WakeOn", "IP-down-with-WakeAuto", "IP-down-with-WakeOnAuto"
* @return Upon successful completion, returns the string which describes the NetworkInterfaceMode currently. Otherwise return mpe_Error as appropriate.
mpe_Error mpeos_getDLNANetworkInterfaceMode(char* interfaceName, char** lpeDlnaNetworkInterfaceModeInfo);