RDK Documentation (Open Sourced RDK Components)
XUPnP XCal-Device Functions

Description

Describe the details about XCal-Device functional specifications.

Functions

gboolean readDevFile (const char *deviceFile)
 This function is used to get partner ID. More...
 
gboolean is_num (const gchar *str)
 Supporting function for checking the content of given string is numeric or not. More...
 
unsigned char check_empty (char *str)
 This function is used to get the IP address based on IPv6 or IPv4 is enabled. More...
 
unsigned char getBaseUrl (char *outValue)
 This function is used to get the IP address based on IPv6 or IPv4 is enabled. More...
 
unsigned char getFogTsbUrl (char *outValue)
 This function is used to get the IP address based on IPv6 or IPv4 is enabled. More...
 
unsigned char getDeviceName (char *outValue)
 This function is used to get the IP address based on IPv6 or IPv4 is enabled. More...
 
unsigned char getDeviceType (char *outValue)
 This function is used to get the IP address based on IPv6 or IPv4 is enabled. More...
 
unsigned char getBcastMacAddress (char *outValue)
 This function is used to get the IP address based on IPv6 or IPv4 is enabled. More...
 
unsigned char getGatewayStbIp (char *outValue)
 This function is used to get the IP address based on IPv6 or IPv4 is enabled. More...
 
unsigned char getGatewayIpv6 (char *outValue)
 This function is used to get the IP address based on IPv6 or IPv4 is enabled. More...
 
unsigned char getGatewayIp (char *outValue)
 This function is used to get the IP address based on IPv6 or IPv4 is enabled. More...
 
unsigned char getRecvDevType (char *outValue)
 This function is used to get the IP address based on IPv6 or IPv4 is enabled. More...
 
gboolean is_alphanum (const gchar *str)
 Supporting function for checking the given string is alphanumeric. More...
 
GString * getID (const gchar *id)
 This function is used to get the Receiver Id & Partner Id. More...
 
gboolean updatesystemids (void)
 This function is used to update the system Ids such as channelMapId, controllerId, plantId and vodServerId. More...
 
gboolean parsedevicename (void)
 This function is used to get the device name from /devicename/devicename file. More...
 
gboolean parseipv6prefix (void)
 This function is used to retrieve the IPv6 prefix information from dibblers file. More...
 
gboolean readconffile (const char *configfile)
 This function is used to retrieve the data from the device configuration file. More...
 
GString * get_eSTBMAC (void)
 This function is used to get the MAC address of the eSTB. It uses global hostmacaddress GString to get the address value. More...
 
gboolean getetchosts (void)
 This function is used to get the hosts IP information from hosts configuration file "/etc/hosts". More...
 
gboolean parseserialnum (GString *serial_num)
 This function is used to get the serial number of the device from the vendor specific file. More...
 
unsigned long getidfromdiagfile (const gchar *diagparam, const gchar *diagfilecontents)
 This function is used to get the system Id information from the diagnostic file. More...
 
gboolean parsednsconfig (void)
 This function is used to get the DNS value from DNS mask configuration file. More...
 
gchar * getmacaddress (const gchar *ifname)
 This function is used to get the mac address of the target device. More...
 
int getipaddress (const char *ifname, char *ipAddressBuffer, gboolean ipv6Enabled)
 This function is used to get the IP address based on IPv6 or IPv4 is enabled. More...
 
void xupnp_logger (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data)
 This function is used to log the messages of XUPnP applications. Each Log message will be written to a file along with the timestamp formated in ISO8601 format. More...
 
G_MODULE_EXPORT void get_url_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data)
 Callback function which is invoked when getBaseURL action is invoked and this sets the state variable for base url. More...
 
G_MODULE_EXPORT void get_trm_url_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data)
 Callback function which is invoked when getBaseTrmUrl action is invoked and this sets the state variable for base TRM Url. More...
 
G_MODULE_EXPORT void get_playback_url_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data)
 Callback function which is invoked when getPlaybackUrl action is invoked and this sets the state variable for Playback Url. More...
 
G_MODULE_EXPORT void get_gwyip_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data)
 Callback function which is invoked when getGatewayIP action is invoked and this sets the state variable for Gateway IP. More...
 
G_MODULE_EXPORT void get_gwyipv6_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data)
 Callback function which is invoked when getGatewayIPv6 action is invoked and this sets the state variable for Gateway IPv6. More...
 
G_MODULE_EXPORT void get_gwystbip_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data)
 Callback function which is invoked when getGatewayStbIP action is invoked and this sets the state variable for Gateway STB IP. More...
 
G_MODULE_EXPORT void get_ipv6prefix_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data)
 Callback function which is invoked when getIpv6Prefix action is invoked and this sets the state variable for IPv6 Prefix. More...
 
G_MODULE_EXPORT void get_hostmacaddress_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data)
 Callback function which is invoked when getHostMacAddress action is invoked and this sets the state variable for Host MAC Address. More...
 
G_MODULE_EXPORT void get_bcastmacaddress_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data)
 Callback function which is invoked when getBcastMacAddress action is invoked and this sets the state variable for Broadcast MAC Address. More...
 
G_MODULE_EXPORT void get_recvdevtype_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data)
 Callback function which is invoked when getRecvDevType action is invoked and this sets the state variable for Receive Device Type. More...
 
G_MODULE_EXPORT void get_buildversion_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data)
 Callback function which is invoked when getBuildVersion action is invoked and this sets the state variable for Build Version. More...
 
G_MODULE_EXPORT void get_dnsconfig_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data)
 Callback function which is invoked when getDnsConfig action is invoked and this sets the state variable for DNS Config. More...
 
G_MODULE_EXPORT void get_systemids_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data)
 Callback function which is invoked when getSystemIds action is invoked and this sets the state variable for System Id. More...
 
G_MODULE_EXPORT void get_dataGatewayIPaddress_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data)
 Callback function which is invoked when getdataGatewayIPaddress action is invoked and this sets the state variable for DataGatewayIPaddress. More...
 
G_MODULE_EXPORT void get_timezone_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data)
 Callback function which is invoked when TimeZone action is invoked and this sets the state variable for Time Zone. More...
 
G_MODULE_EXPORT void get_rawoffset_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data)
 Callback function which is invoked when getRawOffSet action is invoked and this sets the state variable for Raw Offset. More...
 
G_MODULE_EXPORT void get_dstsavings_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data)
 Callback function which is invoked when getDSTSavings action is invoked and this sets the state variable for DST Savings. More...
 
G_MODULE_EXPORT void get_usesdaylighttime_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data)
 Callback function which is invoked when getUsesDaylightTime action is invoked and this sets the state variable for Uses Daylight Time. More...
 
G_MODULE_EXPORT void get_devicename_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data)
 Callback function which is invoked when getDeviceName action is invoked and this sets the state variable for Uses Service Name. More...
 
G_MODULE_EXPORT void get_dstoffset_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data)
 Callback function which is invoked when getDSTOffset action is invoked and this sets the state variable for DST Offset. More...
 
G_MODULE_EXPORT void get_hosts_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data)
 Callback function which is invoked when getHosts action is invoked and this sets the state variable for Hosts. More...
 
G_MODULE_EXPORT void get_isgateway_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data)
 Callback function which is invoked when getIsGateway action is invoked and this sets the state variable for Gatway is active or not. More...
 
G_MODULE_EXPORT void get_requirestrm_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data)
 Callback function which is invoked when getRequiresTRM action is invoked and this sets the state variable for Requiring TRM. More...
 
G_MODULE_EXPORT void get_rui_url_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data)
 Callback function which is invoked when GetCompatibleUIs action is invoked and this sets the state variable for InputDeviceProfile, UIFilter and UIListing. More...
 
G_MODULE_EXPORT void query_url_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data)
 Callback function which is invoked when getUrl action is invoked. More...
 
G_MODULE_EXPORT void query_trm_url_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data)
 Callback function which is invoked when TrmUrl action is invoked and this sets the state variable with a new TRM Url value. More...
 
G_MODULE_EXPORT void query_playback_url_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data)
 Callback function which is invoked when PlaybackUrl action is invoked and this sets the state variable with a new playback url. More...
 
G_MODULE_EXPORT void query_dataGatewayIPaddress_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data)
 Callback function which is invoked when DataGatewayIPaddress action is invoked and this sets the state variable with a new DataGatewayIPaddress. More...
 
G_MODULE_EXPORT void query_devicename_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data)
 Callback function which is invoked when DeviceName action is invoked and this sets the state variable with a new device name. More...
 
G_MODULE_EXPORT void query_gwyip_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data)
 Callback function which is invoked when GatewayIP action is invoked and this sets the state variable with a new Gateway IP. More...
 
G_MODULE_EXPORT void query_gwyipv6_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data)
 Callback function which is invoked when Ipv6Prefix action is invoked and this sets the state variable with a new value. More...
 
G_MODULE_EXPORT void query_gwystbip_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data)
 Callback function which is invoked when GatewayStbIP action is invoked and this sets the state variable with a new value. More...
 
G_MODULE_EXPORT void query_ipv6prefix_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data)
 Callback function which is invoked when Ipv6Prefix action is invoked and this sets the state variable with a new value. More...
 
G_MODULE_EXPORT void query_hostmacaddress_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data)
 Callback function which is invoked when HostMacAddress action is invoked and this sets the state variable with a new value. More...
 
G_MODULE_EXPORT void query_bcastmacaddress_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data)
 Callback function which is invoked when BcastMacAddress action is invoked and this sets the state variable with a new value. More...
 
G_MODULE_EXPORT void query_recvdevtype_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data)
 Callback function which is invoked when RecvDevType action is invoked and this sets the state variable with a new value. More...
 
G_MODULE_EXPORT void query_buildversion_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data)
 Callback function which is invoked when BuildVersion action is invoked and this sets the state variable with a new value. More...
 
G_MODULE_EXPORT void query_dnsconfig_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data)
 Callback function which is invoked when DnsConfig action is invoked and this sets the state variable with a new value. More...
 
G_MODULE_EXPORT void query_systemids_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data)
 Callback function which is invoked when SystemIds action is invoked and this sets the state variable with a new value. More...
 
G_MODULE_EXPORT void query_timezone_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data)
 Callback function which is invoked when TimeZone action is invoked and this sets the state variable with a new value. More...
 
G_MODULE_EXPORT void query_hosts_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data)
 Callback function which is invoked when Hosts action is invoked and this sets the state variable with a new value. More...
 
G_MODULE_EXPORT void query_isgateway_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data)
 Callback function which is invoked when IsGateway action is invoked and this sets the state variable with a new value. More...
 
G_MODULE_EXPORT void query_requirestrm_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data)
 Callback function which is invoked when RequiresTRM action is invoked and this sets the state variable with a new value. More...
 
G_MODULE_EXPORT void query_rui_url_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data)
 Callback function which is invoked when RuiUrl action is invoked and this sets the state variable with a new value. More...
 
G_MODULE_EXPORT void query_rawoffset_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data)
 Callback function which is invoked when RawOffSet action is invoked and this sets the state variable with a new value. More...
 
G_MODULE_EXPORT void query_dstoffset_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data)
 Callback function which is invoked when DSTOffset action is invoked and this sets the state variable with a new value. More...
 
G_MODULE_EXPORT void query_dstsavings_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data)
 Callback function which is invoked when DSTSavings action is invoked and this sets the state variable with a new value. More...
 
G_MODULE_EXPORT void query_usesdaylighttime_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data)
 Callback function which is invoked when UsesDaylightTime action is invoked and this sets the state variable with a new value. More...
 
gboolean getdnsconfig (void)
 This function is used to get the DNS value from DNS mask configuration file. More...
 
gboolean gettimezone (void)
 This function is used to get the time zone. It gets the time zone information from the device configuration. More...
 
gboolean getserialnum (GString *serial_num)
 This function is used to get the serial number of the device from the vendor specific file. More...
 
gboolean getruiurl ()
 This function is used to get the RUI(Remote user interface) Url. It uses xdevice.conf file to get the RUI Url. If the xdevice.conf file is not present then create the the RUI url string. More...
 
int set_content (xmlDoc *doc, const char *node_name, const char *new_value)
 This function is used to set new value to the given node from the xml file. More...
 
char * get_content (xmlDoc *doc, const char *node_name)
 This function is used to get the value of the node from the xml file. More...
 
xmlDoc * open_document (const char *file_name)
 Supporting function for reading the XML file. More...
 
gboolean updatexmldata (const char *xmlfilename, const char *struuid, const char *serialno, const char *friendlyName)
 This function is used to update the xml node values UDN, serialNumber and friendlyName. More...
 
void notify_value_change (const char *varname, const char *strvalue)
 A generic function to notify all the clients whenever there is a change found in the service variable values. More...
 
void notify_value_change_int (const char *varname, int intvalue)
 Generic function to notify the change in the node value which are of integers type from the XML service file. More...
 
void notify_timezone (void)
 Generic function to notify the change in the time zone.
 
gboolean getipv6prefix (void)
 This function is used to retrieve the IPv6 prefix information from dibblers file. More...
 
gboolean getdevicename (void)
 This function is used to get the device name from /devicename/devicename file. More...
 
static char * getStrValueFromMap (char *pszKey, int nPairs, STRING_MAP map[])
 This function is used to get the IP address based on IPv6 or IPv4 is enabled. More...
 
BOOL getIpv6Prefix (char *outValue)
 This function is used to get the IP address based on IPv6 or IPv4 is enabled. More...
 
G_MODULE_EXPORT void get_ipsubnet_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data)
 Callback function which is invoked when IPSubNet action is invoked and this sets the state variable for IPSubNet. More...
 
G_MODULE_EXPORT void get_client_ip_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data)
 Callback function which is invoked when getClientIP action is invoked and this sets the state variable for Client IP. More...
 
G_MODULE_EXPORT void query_ipsubnet_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data)
 Callback function which is invoked when IPSubNet action is invoked and this sets the state variable with a new value. More...
 
G_MODULE_EXPORT void query_client_ip_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data)
 Callback function which is invoked when ClientIP action is invoked and this sets the state variable with a new Gateway IP. More...
 

Function Documentation

◆ readDevFile()

gboolean readDevFile ( const char *  deviceFile)

This function is used to get partner ID.

This function is used to retrieve the information from the device file.

Returns
Returns partner ID.

This function is used to retrieve the information from the device file.

Parameters
[in]deviceFileName of the device configuration file.
Returns
Returns TRUE if successfully reads the device file else returns FALSE.
Parameters
[in]deviceFileName of the device configuration file.
Returns
Returns TRUE if successfully reads the device file else returns FALSE.

Definition at line 385 of file xcal-device-library.c.

◆ is_num()

gboolean is_num ( const gchar *  str)

Supporting function for checking the content of given string is numeric or not.

Parameters
[in]strString for which the contents need to be verified.
Returns
Returns TRUE if successfully checks the string is numeric else returns FALSE.

Definition at line 522 of file xcal-device-library.c.

◆ check_empty()

unsigned char check_empty ( char *  str)

This function is used to get the IP address based on IPv6 or IPv4 is enabled.

Parameters
[in]ifnameName of the network interface.
[out]ipAddressBufferCharacter buffer to hold the IP address.
[in]ipv6EnabledFlag to check whether IPV6 is enabled
Returns
Returns an integer value '1' if successfully gets the IP address else returns '0'.

Definition at line 546 of file xcal-device-library.c.

◆ getBaseUrl()

unsigned char getBaseUrl ( char *  outValue)

This function is used to get the IP address based on IPv6 or IPv4 is enabled.

Parameters
[in]ifnameName of the network interface.
[out]ipAddressBufferCharacter buffer to hold the IP address.
[in]ipv6EnabledFlag to check whether IPV6 is enabled
Returns
Returns an integer value '1' if successfully gets the IP address else returns '0'.

Definition at line 571 of file xcal-device-library.c.

◆ getFogTsbUrl()

unsigned char getFogTsbUrl ( char *  outValue)

This function is used to get the IP address based on IPv6 or IPv4 is enabled.

Parameters
[in]ifnameName of the network interface.
[out]ipAddressBufferCharacter buffer to hold the IP address.
[in]ipv6EnabledFlag to check whether IPV6 is enabled
Returns
Returns an integer value '1' if successfully gets the IP address else returns '0'.

Definition at line 600 of file xcal-device-library.c.

◆ getDeviceName()

unsigned char getDeviceName ( char *  outValue)

This function is used to get the IP address based on IPv6 or IPv4 is enabled.

Parameters
[in]ifnameName of the network interface.
[out]ipAddressBufferCharacter buffer to hold the IP address.
[in]ipv6EnabledFlag to check whether IPV6 is enabled
Returns
Returns an integer value '1' if successfully gets the IP address else returns '0'.

Definition at line 633 of file xcal-device-library.c.

◆ getDeviceType()

unsigned char getDeviceType ( char *  outValue)

This function is used to get the IP address based on IPv6 or IPv4 is enabled.

Parameters
[in]ifnameName of the network interface.
[out]ipAddressBufferCharacter buffer to hold the IP address.
[in]ipv6EnabledFlag to check whether IPV6 is enabled
Returns
Returns an integer value '1' if successfully gets the IP address else returns '0'.

Definition at line 666 of file xcal-device-library.c.

◆ getBcastMacAddress()

unsigned char getBcastMacAddress ( char *  outValue)

This function is used to get the IP address based on IPv6 or IPv4 is enabled.

Parameters
[in]ifnameName of the network interface.
[out]ipAddressBufferCharacter buffer to hold the IP address.
[in]ipv6EnabledFlag to check whether IPV6 is enabled
Returns
Returns an integer value '1' if successfully gets the IP address else returns '0'.

Definition at line 701 of file xcal-device-library.c.

◆ getGatewayStbIp()

unsigned char getGatewayStbIp ( char *  outValue)

This function is used to get the IP address based on IPv6 or IPv4 is enabled.

Parameters
[in]ifnameName of the network interface.
[out]ipAddressBufferCharacter buffer to hold the IP address.
[in]ipv6EnabledFlag to check whether IPV6 is enabled
Returns
Returns an integer value '1' if successfully gets the IP address else returns '0'.

Definition at line 747 of file xcal-device-library.c.

◆ getGatewayIpv6()

unsigned char getGatewayIpv6 ( char *  outValue)

This function is used to get the IP address based on IPv6 or IPv4 is enabled.

Parameters
[in]ifnameName of the network interface.
[out]ipAddressBufferCharacter buffer to hold the IP address.
[in]ipv6EnabledFlag to check whether IPV6 is enabled
Returns
Returns an integer value '1' if successfully gets the IP address else returns '0'.

Definition at line 780 of file xcal-device-library.c.

◆ getGatewayIp()

unsigned char getGatewayIp ( char *  outValue)

This function is used to get the IP address based on IPv6 or IPv4 is enabled.

Parameters
[in]ifnameName of the network interface.
[out]ipAddressBufferCharacter buffer to hold the IP address.
[in]ipv6EnabledFlag to check whether IPV6 is enabled
Returns
Returns an integer value '1' if successfully gets the IP address else returns '0'.

Definition at line 813 of file xcal-device-library.c.

◆ getRecvDevType()

unsigned char getRecvDevType ( char *  outValue)

This function is used to get the IP address based on IPv6 or IPv4 is enabled.

Parameters
[in]ifnameName of the network interface.
[out]ipAddressBufferCharacter buffer to hold the IP address.
[in]ipv6EnabledFlag to check whether IPV6 is enabled
Returns
Returns an integer value '1' if successfully gets the IP address else returns '0'.

Definition at line 848 of file xcal-device-library.c.

◆ is_alphanum()

gboolean is_alphanum ( const gchar *  str)

Supporting function for checking the given string is alphanumeric.

Parameters
[in]strString to be verified.
Returns
Returns TRUE if successfully checks the string is alphanumeric else returns FALSE.

Definition at line 1177 of file xcal-device-library.c.

◆ getID()

GString* getID ( const gchar *  id)

This function is used to get the Receiver Id & Partner Id.

When box in warehouse mode, the box does not have the receiver Id so the box need to be put the broadcast MAC address as receiver Id.

Parameters
[in]idThe Device ID node for which the value need to be retrieved. It is also used for getting Partner Id.
Returns
Returns Value of the Device Id on success else NULL.

Definition at line 2074 of file xcal-device-library.c.

◆ updatesystemids()

gboolean updatesystemids ( void  )

This function is used to update the system Ids such as channelMapId, controllerId, plantId and vodServerId.

Returns
Returns TRUE if successfully updates the system ids, else returns FALSE.

Definition at line 2147 of file xcal-device-library.c.

◆ parsedevicename()

gboolean parsedevicename ( void  )

This function is used to get the device name from /devicename/devicename file.

Returns
Returns TRUE if successfully gets the device name string else returns FALSE.

Definition at line 2192 of file xcal-device-library.c.

◆ parseipv6prefix()

gboolean parseipv6prefix ( void  )

This function is used to retrieve the IPv6 prefix information from dibblers file.

Returns
Returns TRUE if successfully gets the ipv6 prefix value else returns FALSE.

Definition at line 2241 of file xcal-device-library.c.

◆ readconffile()

gboolean readconffile ( const char *  configfile)

This function is used to retrieve the data from the device configuration file.

Parameters
[in]configfileDevice configuration file name.
Returns
Returns TRUE if successfully reads the configuration else returns FALSE.

Definition at line 2328 of file xcal-device-library.c.

◆ get_eSTBMAC()

GString * get_eSTBMAC ( void  )

This function is used to get the MAC address of the eSTB. It uses global hostmacaddress GString to get the address value.

Returns
Returned string must be g_string_free() if not NULL.

Definition at line 2519 of file xcal-device-library.c.

◆ getetchosts()

gboolean getetchosts ( void  )

This function is used to get the hosts IP information from hosts configuration file "/etc/hosts".

Returns
Returns TRUE if successfully gets the hosts else returns FALSE.

Definition at line 2718 of file xcal-device-library.c.

◆ parseserialnum()

gboolean parseserialnum ( GString *  serial_num)

This function is used to get the serial number of the device from the vendor specific file.

Parameters
[out]serial_numManufacturer serial number
Returns
Returns TRUE if successfully gets the serial number else, returns FALSE.

Definition at line 2777 of file xcal-device-library.c.

◆ getidfromdiagfile()

unsigned long getidfromdiagfile ( const gchar *  diagparam,
const gchar *  diagfilecontents 
)

This function is used to get the system Id information from the diagnostic file.

Parameters
[in]diagparamParameter for which value(system Id) need to be retrieved from the diagnostic file.
[in]diagfilecontentsThe diagnostic filename
Returns
Returns value of the system Id.

Definition at line 2846 of file xcal-device-library.c.

◆ parsednsconfig()

gboolean parsednsconfig ( void  )

This function is used to get the DNS value from DNS mask configuration file.

Returns
Returns TRUE if successfully gets the DNS configuration, else returns FALSE.

Definition at line 2869 of file xcal-device-library.c.

◆ getmacaddress()

gchar* getmacaddress ( const gchar *  ifname)

This function is used to get the mac address of the target device.

Parameters
[in]ifnameName of the network interface.
Returns
Returns the mac address of the interface given.

Definition at line 2920 of file xcal-device-library.c.

◆ getipaddress()

int getipaddress ( const char *  ifname,
char *  ipAddressBuffer,
gboolean  ipv6Enabled 
)

This function is used to get the IP address based on IPv6 or IPv4 is enabled.

Parameters
[in]ifnameName of the network interface.
[out]ipAddressBufferCharacter buffer to hold the IP address.
[in]ipv6EnabledFlag to check whether IPV6 is enabled
Returns
Returns an integer value '1' if successfully gets the IP address else returns '0'.

Definition at line 2951 of file xcal-device-library.c.

◆ xupnp_logger()

void xupnp_logger ( const gchar *  log_domain,
GLogLevelFlags  log_level,
const gchar *  message,
gpointer  user_data 
)

This function is used to log the messages of XUPnP applications. Each Log message will be written to a file along with the timestamp formated in ISO8601 format.

Parameters
[in]log_domainCharacter pointer variable for domain name.
[in]log_levelVariable of glib log level enum.
[in]messageCharacter pointer for the log message string.
[in]user_dataVoid pointer variable.

Definition at line 659 of file xcal-device.c.

◆ get_url_cb()

G_MODULE_EXPORT void get_url_cb ( GUPnPService *  service,
GUPnPServiceAction *  action,
gpointer  user_data 
)

Callback function which is invoked when getBaseURL action is invoked and this sets the state variable for base url.

Parameters
[in]serviceName of the service.
[out]actionAction to be invoked.
[in]user_dataUsually null will be passed.

Definition at line 689 of file xcal-device.c.

◆ get_trm_url_cb()

G_MODULE_EXPORT void get_trm_url_cb ( GUPnPService *  service,
GUPnPServiceAction *  action,
gpointer  user_data 
)

Callback function which is invoked when getBaseTrmUrl action is invoked and this sets the state variable for base TRM Url.

Parameters
[in]serviceName of the service.
[out]actionAction to be invoked.
[in]user_dataUsually null will be passed.

Definition at line 710 of file xcal-device.c.

◆ get_playback_url_cb()

G_MODULE_EXPORT void get_playback_url_cb ( GUPnPService *  service,
GUPnPServiceAction *  action,
gpointer  user_data 
)

Callback function which is invoked when getPlaybackUrl action is invoked and this sets the state variable for Playback Url.

Parameters
[in]serviceName of the service.
[out]actionAction to be invoked.
[in]user_dataUsually null will be passed.

Definition at line 728 of file xcal-device.c.

◆ get_gwyip_cb()

G_MODULE_EXPORT void get_gwyip_cb ( GUPnPService *  service,
GUPnPServiceAction *  action,
gpointer  user_data 
)

Callback function which is invoked when getGatewayIP action is invoked and this sets the state variable for Gateway IP.

Parameters
[in]serviceName of the service.
[out]actionAction to be invoked.
[in]user_dataUsually null will be passed.

Definition at line 756 of file xcal-device.c.

◆ get_gwyipv6_cb()

G_MODULE_EXPORT void get_gwyipv6_cb ( GUPnPService *  service,
GUPnPServiceAction *  action,
gpointer  user_data 
)

Callback function which is invoked when getGatewayIPv6 action is invoked and this sets the state variable for Gateway IPv6.

Parameters
[in]serviceName of the service.
[out]actionAction to be invoked.
[in]user_dataUsually null will be passed.

Definition at line 774 of file xcal-device.c.

◆ get_gwystbip_cb()

G_MODULE_EXPORT void get_gwystbip_cb ( GUPnPService *  service,
GUPnPServiceAction *  action,
gpointer  user_data 
)

Callback function which is invoked when getGatewayStbIP action is invoked and this sets the state variable for Gateway STB IP.

Parameters
[in]serviceName of the service.
[out]actionAction to be invoked.
[in]user_dataUsually null will be passed.

Definition at line 793 of file xcal-device.c.

◆ get_ipv6prefix_cb()

G_MODULE_EXPORT void get_ipv6prefix_cb ( GUPnPService *  service,
GUPnPServiceAction *  action,
gpointer  user_data 
)

Callback function which is invoked when getIpv6Prefix action is invoked and this sets the state variable for IPv6 Prefix.

Parameters
[in]serviceName of the service.
[out]actionAction to be invoked.
[in]user_dataUsually null will be passed.

Definition at line 812 of file xcal-device.c.

◆ get_hostmacaddress_cb()

G_MODULE_EXPORT void get_hostmacaddress_cb ( GUPnPService *  service,
GUPnPServiceAction *  action,
gpointer  user_data 
)

Callback function which is invoked when getHostMacAddress action is invoked and this sets the state variable for Host MAC Address.

Parameters
[in]serviceName of the service.
[out]actionAction to be invoked.
[in]user_dataUsually null will be passed.

Definition at line 830 of file xcal-device.c.

◆ get_bcastmacaddress_cb()

G_MODULE_EXPORT void get_bcastmacaddress_cb ( GUPnPService *  service,
GUPnPServiceAction *  action,
gpointer  user_data 
)

Callback function which is invoked when getBcastMacAddress action is invoked and this sets the state variable for Broadcast MAC Address.

Parameters
[in]serviceName of the service.
[out]actionAction to be invoked.
[in]user_dataUsually null will be passed.

Definition at line 848 of file xcal-device.c.

◆ get_recvdevtype_cb()

G_MODULE_EXPORT void get_recvdevtype_cb ( GUPnPService *  service,
GUPnPServiceAction *  action,
gpointer  user_data 
)

Callback function which is invoked when getRecvDevType action is invoked and this sets the state variable for Receive Device Type.

Parameters
[in]serviceName of the service.
[out]actionAction to be invoked.
[in]user_dataUsually null will be passed.

Definition at line 866 of file xcal-device.c.

◆ get_buildversion_cb()

G_MODULE_EXPORT void get_buildversion_cb ( GUPnPService *  service,
GUPnPServiceAction *  action,
gpointer  user_data 
)

Callback function which is invoked when getBuildVersion action is invoked and this sets the state variable for Build Version.

Parameters
[in]serviceName of the service.
[out]actionAction to be invoked.
[in]user_dataUsually null will be passed.

Definition at line 892 of file xcal-device.c.

◆ get_dnsconfig_cb()

G_MODULE_EXPORT void get_dnsconfig_cb ( GUPnPService *  service,
GUPnPServiceAction *  action,
gpointer  user_data 
)

Callback function which is invoked when getDnsConfig action is invoked and this sets the state variable for DNS Config.

Parameters
[in]serviceName of the service.
[out]actionAction to be invoked.
[in]user_dataUsually null will be passed.

Definition at line 910 of file xcal-device.c.

◆ get_systemids_cb()

G_MODULE_EXPORT void get_systemids_cb ( GUPnPService *  service,
GUPnPServiceAction *  action,
gpointer  user_data 
)

Callback function which is invoked when getSystemIds action is invoked and this sets the state variable for System Id.

Parameters
[in]serviceName of the service.
[out]actionAction to be invoked.
[in]user_dataUsually null will be passed.

Definition at line 928 of file xcal-device.c.

◆ get_dataGatewayIPaddress_cb()

G_MODULE_EXPORT void get_dataGatewayIPaddress_cb ( GUPnPService *  service,
GUPnPServiceAction *  action,
gpointer  user_data 
)

Callback function which is invoked when getdataGatewayIPaddress action is invoked and this sets the state variable for DataGatewayIPaddress.

Parameters
[in]serviceName of the service.
[out]actionAction to be invoked.
[in]user_dataUsually null will be passed.

Definition at line 947 of file xcal-device.c.

◆ get_timezone_cb()

G_MODULE_EXPORT void get_timezone_cb ( GUPnPService *  service,
GUPnPServiceAction *  action,
gpointer  user_data 
)

Callback function which is invoked when TimeZone action is invoked and this sets the state variable for Time Zone.

Parameters
[in]serviceName of the service.
[out]actionAction to be invoked.
[in]user_dataUsually null will be passed.

Definition at line 964 of file xcal-device.c.

◆ get_rawoffset_cb()

G_MODULE_EXPORT void get_rawoffset_cb ( GUPnPService *  service,
GUPnPServiceAction *  action,
gpointer  user_data 
)

Callback function which is invoked when getRawOffSet action is invoked and this sets the state variable for Raw Offset.

Parameters
[in]serviceName of the service.
[out]actionAction to be invoked.
[in]user_dataUsually null will be passed.

Definition at line 984 of file xcal-device.c.

◆ get_dstsavings_cb()

G_MODULE_EXPORT void get_dstsavings_cb ( GUPnPService *  service,
GUPnPServiceAction *  action,
gpointer  user_data 
)

Callback function which is invoked when getDSTSavings action is invoked and this sets the state variable for DST Savings.

Parameters
[in]serviceName of the service.
[out]actionAction to be invoked.
[in]user_dataUsually null will be passed.

Definition at line 1001 of file xcal-device.c.

◆ get_usesdaylighttime_cb()

G_MODULE_EXPORT void get_usesdaylighttime_cb ( GUPnPService *  service,
GUPnPServiceAction *  action,
gpointer  user_data 
)

Callback function which is invoked when getUsesDaylightTime action is invoked and this sets the state variable for Uses Daylight Time.

Parameters
[in]serviceName of the service.
[out]actionAction to be invoked.
[in]user_dataUsually null will be passed.

Definition at line 1018 of file xcal-device.c.

◆ get_devicename_cb()

G_MODULE_EXPORT void get_devicename_cb ( GUPnPService *  service,
GUPnPServiceAction *  action,
gpointer  user_data 
)

Callback function which is invoked when getDeviceName action is invoked and this sets the state variable for Uses Service Name.

Parameters
[in]serviceName of the service.
[out]actionAction to be invoked.
[in]user_dataUsually null will be passed.

Definition at line 1035 of file xcal-device.c.

◆ get_dstoffset_cb()

G_MODULE_EXPORT void get_dstoffset_cb ( GUPnPService *  service,
GUPnPServiceAction *  action,
gpointer  user_data 
)

Callback function which is invoked when getDSTOffset action is invoked and this sets the state variable for DST Offset.

Parameters
[in]serviceName of the service.
[out]actionAction to be invoked.
[in]user_dataUsually null will be passed.

Definition at line 1053 of file xcal-device.c.

◆ get_hosts_cb()

G_MODULE_EXPORT void get_hosts_cb ( GUPnPService *  service,
GUPnPServiceAction *  action,
gpointer  user_data 
)

Callback function which is invoked when getHosts action is invoked and this sets the state variable for Hosts.

Parameters
[in]serviceName of the service.
[out]actionAction to be invoked.
[in]user_dataUsually null will be passed.

Definition at line 1070 of file xcal-device.c.

◆ get_isgateway_cb()

G_MODULE_EXPORT void get_isgateway_cb ( GUPnPService *  service,
GUPnPServiceAction *  action,
gpointer  user_data 
)

Callback function which is invoked when getIsGateway action is invoked and this sets the state variable for Gatway is active or not.

Parameters
[in]serviceName of the service.
[out]actionAction to be invoked.
[in]user_dataUsually null will be passed.

Definition at line 1089 of file xcal-device.c.

◆ get_requirestrm_cb()

G_MODULE_EXPORT void get_requirestrm_cb ( GUPnPService *  service,
GUPnPServiceAction *  action,
gpointer  user_data 
)

Callback function which is invoked when getRequiresTRM action is invoked and this sets the state variable for Requiring TRM.

Parameters
[in]serviceName of the service.
[out]actionAction to be invoked.
[in]user_dataUsually null will be passed.

Definition at line 1107 of file xcal-device.c.

◆ get_rui_url_cb()

G_MODULE_EXPORT void get_rui_url_cb ( GUPnPService *  service,
GUPnPServiceAction *  action,
gpointer  user_data 
)

Callback function which is invoked when GetCompatibleUIs action is invoked and this sets the state variable for InputDeviceProfile, UIFilter and UIListing.

Parameters
[in]serviceName of the service.
[out]actionAction to be invoked.
[in]user_dataUsually null will be passed.

Definition at line 1124 of file xcal-device.c.

◆ query_url_cb()

G_MODULE_EXPORT void query_url_cb ( GUPnPService *  service,
char *  variable,
GValue *  value,
gpointer  user_data 
)

Callback function which is invoked when getUrl action is invoked.

Parameters
[in]serviceName of the service.
[in]variableState(Query)variable.
[in]valueNew value to be assigned.
[in]user_dataUsually null will be passed.

Definition at line 1154 of file xcal-device.c.

◆ query_trm_url_cb()

G_MODULE_EXPORT void query_trm_url_cb ( GUPnPService *  service,
char *  variable,
GValue *  value,
gpointer  user_data 
)

Callback function which is invoked when TrmUrl action is invoked and this sets the state variable with a new TRM Url value.

Parameters
[in]serviceName of the service.
[in]variableState(Query) variable.
[in]valueNew value to be assigned.
[in]user_dataUsually null will be passed.

Definition at line 1172 of file xcal-device.c.

◆ query_playback_url_cb()

G_MODULE_EXPORT void query_playback_url_cb ( GUPnPService *  service,
char *  variable,
GValue *  value,
gpointer  user_data 
)

Callback function which is invoked when PlaybackUrl action is invoked and this sets the state variable with a new playback url.

Parameters
[in]serviceName of the service.
[in]variableState(Query) variable.
[in]valueNew value to be assigned.
[in]user_dataUsually null will be passed.

Definition at line 1190 of file xcal-device.c.

◆ query_dataGatewayIPaddress_cb()

G_MODULE_EXPORT void query_dataGatewayIPaddress_cb ( GUPnPService *  service,
char *  variable,
GValue *  value,
gpointer  user_data 
)

Callback function which is invoked when DataGatewayIPaddress action is invoked and this sets the state variable with a new DataGatewayIPaddress.

Parameters
[in]serviceName of the service.
[in]variableState(Query) variable.
[in]valueNew value to be assigned.
[in]user_dataUsually null will be passed.

Definition at line 1219 of file xcal-device.c.

◆ query_devicename_cb()

G_MODULE_EXPORT void query_devicename_cb ( GUPnPService *  service,
char *  variable,
GValue *  value,
gpointer  user_data 
)

Callback function which is invoked when DeviceName action is invoked and this sets the state variable with a new device name.

Parameters
[in]serviceName of the service.
[in]variableState(Query) variable.
[in]valueNew value to be assigned.
[in]user_dataUsually null will be passed.

Definition at line 1239 of file xcal-device.c.

◆ query_gwyip_cb()

G_MODULE_EXPORT void query_gwyip_cb ( GUPnPService *  service,
char *  variable,
GValue *  value,
gpointer  user_data 
)

Callback function which is invoked when GatewayIP action is invoked and this sets the state variable with a new Gateway IP.

Parameters
[in]serviceName of the service.
[in]variableState(Query) variable.
[in]valueNew value to be assigned.
[in]user_dataUsually null will be passed.

Definition at line 1257 of file xcal-device.c.

◆ query_gwyipv6_cb()

G_MODULE_EXPORT void query_gwyipv6_cb ( GUPnPService *  service,
char *  variable,
GValue *  value,
gpointer  user_data 
)

Callback function which is invoked when Ipv6Prefix action is invoked and this sets the state variable with a new value.

Parameters
[in]serviceName of the service.
[in]variableState(Query) variable.
[in]valueNew value to be assigned.
[in]user_dataUsually null will be passed.

Definition at line 1275 of file xcal-device.c.

◆ query_gwystbip_cb()

G_MODULE_EXPORT void query_gwystbip_cb ( GUPnPService *  service,
char *  variable,
GValue *  value,
gpointer  user_data 
)

Callback function which is invoked when GatewayStbIP action is invoked and this sets the state variable with a new value.

Parameters
[in]serviceName of the service.
[in]variableState(Query) variable.
[in]valueNew value to be assigned.
[in]user_dataUsually null will be passed.

Definition at line 1293 of file xcal-device.c.

◆ query_ipv6prefix_cb()

G_MODULE_EXPORT void query_ipv6prefix_cb ( GUPnPService *  service,
char *  variable,
GValue *  value,
gpointer  user_data 
)

Callback function which is invoked when Ipv6Prefix action is invoked and this sets the state variable with a new value.

Parameters
[in]serviceName of the service.
[in]variableState(Query) variable.
[in]valueNew value to be assigned.
[in]user_dataUsually null will be passed.

Definition at line 1311 of file xcal-device.c.

◆ query_hostmacaddress_cb()

G_MODULE_EXPORT void query_hostmacaddress_cb ( GUPnPService *  service,
char *  variable,
GValue *  value,
gpointer  user_data 
)

Callback function which is invoked when HostMacAddress action is invoked and this sets the state variable with a new value.

Parameters
[in]serviceName of the service.
[in]variableState(Query) variable.
[in]valueNew value to be assigned.
[in]user_dataUsually null will be passed.

Definition at line 1329 of file xcal-device.c.

◆ query_bcastmacaddress_cb()

G_MODULE_EXPORT void query_bcastmacaddress_cb ( GUPnPService *  service,
char *  variable,
GValue *  value,
gpointer  user_data 
)

Callback function which is invoked when BcastMacAddress action is invoked and this sets the state variable with a new value.

Parameters
[in]serviceName of the service.
[in]variableState(Query) variable.
[in]valueNew value to be assigned.
[in]user_dataUsually null will be passed.

Definition at line 1347 of file xcal-device.c.

◆ query_recvdevtype_cb()

G_MODULE_EXPORT void query_recvdevtype_cb ( GUPnPService *  service,
char *  variable,
GValue *  value,
gpointer  user_data 
)

Callback function which is invoked when RecvDevType action is invoked and this sets the state variable with a new value.

Parameters
[in]serviceName of the service.
[in]variableState(Query) variable.
[in]valueNew value to be assigned.
[in]user_dataUsually null will be passed.

Definition at line 1365 of file xcal-device.c.

◆ query_buildversion_cb()

G_MODULE_EXPORT void query_buildversion_cb ( GUPnPService *  service,
char *  variable,
GValue *  value,
gpointer  user_data 
)

Callback function which is invoked when BuildVersion action is invoked and this sets the state variable with a new value.

Parameters
[in]serviceName of the service.
[in]variableState(Query) variable.
[in]valueNew value to be assigned.
[in]user_dataUsually null will be passed.

Definition at line 1391 of file xcal-device.c.

◆ query_dnsconfig_cb()

G_MODULE_EXPORT void query_dnsconfig_cb ( GUPnPService *  service,
char *  variable,
GValue *  value,
gpointer  user_data 
)

Callback function which is invoked when DnsConfig action is invoked and this sets the state variable with a new value.

Parameters
[in]serviceName of the service.
[in]variableState(Query) variable.
[in]valueNew value to be assigned.
[in]user_dataUsually null will be passed.

Definition at line 1409 of file xcal-device.c.

◆ query_systemids_cb()

G_MODULE_EXPORT void query_systemids_cb ( GUPnPService *  service,
char *  variable,
GValue *  value,
gpointer  user_data 
)

Callback function which is invoked when SystemIds action is invoked and this sets the state variable with a new value.

Parameters
[in]serviceName of the service.
[in]variableState(Query) variable.
[in]valueNew value to be assigned.
[in]user_dataUsually null will be passed.

Definition at line 1427 of file xcal-device.c.

◆ query_timezone_cb()

G_MODULE_EXPORT void query_timezone_cb ( GUPnPService *  service,
char *  variable,
GValue *  value,
gpointer  user_data 
)

Callback function which is invoked when TimeZone action is invoked and this sets the state variable with a new value.

Parameters
[in]serviceName of the service.
[in]variableState(Query) variable.
[in]valueNew value to be assigned.
[in]user_dataUsually null will be passed.

Definition at line 1446 of file xcal-device.c.

◆ query_hosts_cb()

G_MODULE_EXPORT void query_hosts_cb ( GUPnPService *  service,
char *  variable,
GValue *  value,
gpointer  user_data 
)

Callback function which is invoked when Hosts action is invoked and this sets the state variable with a new value.

Parameters
[in]serviceName of the service.
[in]variableState(Query) variable.
[in]valueNew value to be assigned.
[in]user_dataUsually null will be passed.

Definition at line 1466 of file xcal-device.c.

◆ query_isgateway_cb()

G_MODULE_EXPORT void query_isgateway_cb ( GUPnPService *  service,
char *  variable,
GValue *  value,
gpointer  user_data 
)

Callback function which is invoked when IsGateway action is invoked and this sets the state variable with a new value.

Parameters
[in]serviceName of the service.
[in]variableState(Query) variable.
[in]valueNew value to be assigned.
[in]user_dataUsually null will be passed.

Definition at line 1485 of file xcal-device.c.

◆ query_requirestrm_cb()

G_MODULE_EXPORT void query_requirestrm_cb ( GUPnPService *  service,
char *  variable,
GValue *  value,
gpointer  user_data 
)

Callback function which is invoked when RequiresTRM action is invoked and this sets the state variable with a new value.

Parameters
[in]serviceName of the service.
[in]variableState(Query) variable.
[in]valueNew value to be assigned.
[in]user_dataUsually null will be passed.

Definition at line 1504 of file xcal-device.c.

◆ query_rui_url_cb()

G_MODULE_EXPORT void query_rui_url_cb ( GUPnPService *  service,
char *  variable,
GValue *  value,
gpointer  user_data 
)

Callback function which is invoked when RuiUrl action is invoked and this sets the state variable with a new value.

Parameters
[in]serviceName of the service.
[in]variableState(Query) variable.
[in]valueNew value to be assigned.
[in]user_dataUsually null will be passed.

Definition at line 1523 of file xcal-device.c.

◆ query_rawoffset_cb()

G_MODULE_EXPORT void query_rawoffset_cb ( GUPnPService *  service,
char *  variable,
GValue *  value,
gpointer  user_data 
)

Callback function which is invoked when RawOffSet action is invoked and this sets the state variable with a new value.

Parameters
[in]serviceName of the service.
[in]variableState(Query) variable.
[in]valueNew value to be assigned.
[in]user_dataUsually null will be passed.

Definition at line 1541 of file xcal-device.c.

◆ query_dstoffset_cb()

G_MODULE_EXPORT void query_dstoffset_cb ( GUPnPService *  service,
char *  variable,
GValue *  value,
gpointer  user_data 
)

Callback function which is invoked when DSTOffset action is invoked and this sets the state variable with a new value.

Parameters
[in]serviceName of the service.
[in]variableState(Query) variable.
[in]valueNew value to be assigned.
[in]user_dataUsually null will be passed.

Definition at line 1559 of file xcal-device.c.

◆ query_dstsavings_cb()

G_MODULE_EXPORT void query_dstsavings_cb ( GUPnPService *  service,
char *  variable,
GValue *  value,
gpointer  user_data 
)

Callback function which is invoked when DSTSavings action is invoked and this sets the state variable with a new value.

Parameters
[in]serviceName of the service.
[in]variableState(Query) variable.
[in]valueNew value to be assigned.
[in]user_dataUsually null will be passed.

Definition at line 1577 of file xcal-device.c.

◆ query_usesdaylighttime_cb()

G_MODULE_EXPORT void query_usesdaylighttime_cb ( GUPnPService *  service,
char *  variable,
GValue *  value,
gpointer  user_data 
)

Callback function which is invoked when UsesDaylightTime action is invoked and this sets the state variable with a new value.

Parameters
[in]serviceName of the service.
[in]variableState(Query) variable.
[in]valueNew value to be assigned.
[in]user_dataUsually null will be passed.

Definition at line 1595 of file xcal-device.c.

◆ getdnsconfig()

gboolean getdnsconfig ( void  )

This function is used to get the DNS value from DNS mask configuration file.

Returns
Returns TRUE if successfully gets the DNS configuration, else returns FALSE.

Definition at line 2287 of file xcal-device.c.

◆ gettimezone()

gboolean gettimezone ( void  )

This function is used to get the time zone. It gets the time zone information from the device configuration.

Returns
Returns TRUE if successfully gets the time zone value else, returns FALSE.

Definition at line 2436 of file xcal-device.c.

◆ getserialnum()

gboolean getserialnum ( GString *  serial_num)

This function is used to get the serial number of the device from the vendor specific file.

Parameters
[out]serial_numManufacturer serial number
Returns
Returns TRUE if successfully gets the serial number else, returns FALSE.

Definition at line 2493 of file xcal-device.c.

◆ getruiurl()

gboolean getruiurl ( )

This function is used to get the RUI(Remote user interface) Url. It uses xdevice.conf file to get the RUI Url. If the xdevice.conf file is not present then create the the RUI url string.

Returns
Returns TRUE if successfully gets the RUI url.

Definition at line 2942 of file xcal-device.c.

◆ set_content()

int set_content ( xmlDoc *  doc,
const char *  node_name,
const char *  new_value 
)

This function is used to set new value to the given node from the xml file.

Parameters
[in]docXml document.
[in]node_nameThe name of the node to be updated.
[in]new_valueNew value to be set for the node.
Returns
Returns Integer value '0' if successfully sets the new node value else returns '1'.

Definition at line 3026 of file xcal-device.c.

◆ get_content()

char* get_content ( xmlDoc *  doc,
const char *  node_name 
)

This function is used to get the value of the node from the xml file.

Parameters
[in]docXml document.
[in]node_nameName of the node for which value has to be retrieved.
Returns
Returns the Node value string else returns NULL.

Definition at line 3054 of file xcal-device.c.

◆ open_document()

xmlDoc* open_document ( const char *  file_name)

Supporting function for reading the XML file.

Parameters
[in]file_nameName of the xml file
Returns
Returns the resulting document tree.

Definition at line 3076 of file xcal-device.c.

◆ updatexmldata()

unsigned char updatexmldata ( const char *  xmlfilename,
const char *  struuid,
const char *  serialno,
const char *  friendlyName 
)

This function is used to update the xml node values UDN, serialNumber and friendlyName.

Parameters
[in]xmlfilenameName of the XML file.
[in]struuidUnique device Id .
[in]serialnoSerial number.
[in]friendlyNameFriendly name.
Returns
Returns TRUE if successfully updated the xml data else returns FALSE.

Definition at line 3260 of file xcal-device.c.

◆ notify_value_change()

void notify_value_change ( const char *  varname,
const char *  strvalue 
)

A generic function to notify all the clients whenever there is a change found in the service variable values.

Parameters
[in]varnameNode name to be notified.
[in]strvalueNew value to be notified.

Definition at line 3324 of file xcal-device.c.

◆ notify_value_change_int()

void notify_value_change_int ( const char *  varname,
int  intvalue 
)

Generic function to notify the change in the node value which are of integers type from the XML service file.

Parameters
[in]varnameNode name to be notified.
[in]strvalueNew value to be notified.

Definition at line 3351 of file xcal-device.c.

◆ getipv6prefix()

gboolean getipv6prefix ( void  )

This function is used to retrieve the IPv6 prefix information from dibblers file.

Returns
Returns TRUE if successfully gets the ipv6 prefix value else returns FALSE.

Definition at line 3666 of file xcal-device.c.

◆ getdevicename()

gboolean getdevicename ( void  )

This function is used to get the device name from /devicename/devicename file.

Returns
Returns TRUE if successfully gets the device name string else returns FALSE.

Definition at line 3748 of file xcal-device.c.

◆ getStrValueFromMap()

static char* getStrValueFromMap ( char *  pszKey,
int  nPairs,
STRING_MAP  map[] 
)
static

This function is used to get the IP address based on IPv6 or IPv4 is enabled.

Parameters
[in]ifnameName of the network interface.
[out]ipAddressBufferCharacter buffer to hold the IP address.
[in]ipv6EnabledFlag to check whether IPV6 is enabled
Returns
Returns an integer value '1' if successfully gets the IP address else returns '0'.

Definition at line 288 of file xcal_device_library.c.

◆ getIpv6Prefix()

BOOL getIpv6Prefix ( char *  outValue)

This function is used to get the IP address based on IPv6 or IPv4 is enabled.

Parameters
[in]ifnameName of the network interface.
[out]ipAddressBufferCharacter buffer to hold the IP address.
[in]ipv6EnabledFlag to check whether IPV6 is enabled
Returns
Returns an integer value '1' if successfully gets the IP address else returns '0'.

Definition at line 1094 of file xcal_device_library.c.

◆ get_ipsubnet_cb()

G_MODULE_EXPORT void get_ipsubnet_cb ( GUPnPService *  service,
GUPnPServiceAction *  action,
gpointer  user_data 
)

Callback function which is invoked when IPSubNet action is invoked and this sets the state variable for IPSubNet.

Parameters
[in]serviceName of the service.
[out]actionAction to be invoked.
[in]user_dataUsually null will be passed.

Definition at line 569 of file xcal-device-main.c.

◆ get_client_ip_cb()

G_MODULE_EXPORT void get_client_ip_cb ( GUPnPService *  service,
GUPnPServiceAction *  action,
gpointer  user_data 
)

Callback function which is invoked when getClientIP action is invoked and this sets the state variable for Client IP.

Parameters
[in]serviceName of the service.
[out]actionAction to be invoked.
[in]user_dataUsually null will be passed.

Definition at line 901 of file xcal-device-main.c.

◆ query_ipsubnet_cb()

G_MODULE_EXPORT void query_ipsubnet_cb ( GUPnPService *  service,
char *  variable,
GValue *  value,
gpointer  user_data 
)

Callback function which is invoked when IPSubNet action is invoked and this sets the state variable with a new value.

Parameters
[in]serviceName of the service.
[in]variableState(Query) variable.
[in]valueNew value to be assigned.
[in]user_dataUsually null will be passed.

Definition at line 1200 of file xcal-device-main.c.

◆ query_client_ip_cb()

G_MODULE_EXPORT void query_client_ip_cb ( GUPnPService *  service,
char *  variable,
GValue *  value,
gpointer  user_data 
)

Callback function which is invoked when ClientIP action is invoked and this sets the state variable with a new Gateway IP.

Parameters
[in]serviceName of the service.
[in]variableState(Query) variable.
[in]valueNew value to be assigned.
[in]user_dataUsually null will be passed.

Definition at line 1359 of file xcal-device-main.c.