top

ProductInfo API

To use Samsung Product API, 

<script type="text/javascript" src="$WEBAPIS/webapis/webapis.js"></script>

Should be loaded in index.html

The module defines the functionalities of getting product information that are provides as the Samsung TV for Tizen Platform Product API.

Since : 1.0

Table of Contents

  1. 1. Interfaces
    1. 1.1. ProductInfoManagerObject
    2. 1.2. ProductInfoManager
    3. 1.3. ProductInfoConfigChangeCallback
    4. 1.4. ProductInfoConfigKey
    5. 1.5. ProductInfoNoGlass3dSupport
    6. 1.6. ProductInfoSiServerType
  2. 2. Full WebIDL

Summary of Interfaces and Methods

Interface Method
ProductInfoManagerObject  
ProductInfoManager DOMString getVersion ()
DOMString getFirmware ()
DOMString getDuid ()
DOMString getModelCode ()
DOMString getModel ()
unsigned short getSmartTVServerType ()
DOMString getSmartTVServerVersion ()
DOMString getTunerEpop ()
boolean isSoccerModeEnabled ()
boolean isTtvSupported ()
boolean isUdPanelSupported ()
DOMString getRealModel ()
ProductInfoNoClass3dSupport getNoGlass3dSupport ()
DOMString getLocalSet ()
DOMString getSystemConfig (unsigned int key)
void setSystemConfig(unsigned int key, DOMString value, optional SuccessCallback ? onsuccess, optional ErrorCallback ? onerror);
unsigned long addSystemConfigChangeListener(ProductInfoConfigChangeCallback listener, unsigned int key);
void removeSystemConfigChangeListener(unsigned long listenerId);
ProductInfoConfigChangeCallback void onchange (unsigned int key)
ProductInfoConfigKey  
ProductInfoNoGlass3dSupport  
ProductInfoSiServerType  

1. Interfaces

1.1. ProductInfoManagerObject

The interface defines what is instantiated by the WebApi object of Samsung TV for Tizen Platform Product API.
There will be a webapis.productinfo object that allows access to the functionality of the ProductInfo API

  [NoInterfaceObject]interface ProductInfoManagerObject {
      readonly attribute ProductInfoManager productinfo;
  };

  WebApi implements ProductInfoManagerObject;

Since : 1.0

Attributes

1.2. ProductInfoManager

This interface provides methods to use the ProductInfo functionalities.

  [NoInterfaceObject]interface ProductInfoManager {
      attribute ProductInfoConfigKey ProductInfoConfigKey;
      attribute ProductInfoNoGlass3dSupport ProductInfoNoGlass3dSupport;
      attribute ProductInfoSiServerType ProductInfoSiServerType;

      DOMString getVersion();
      DOMString getFirmware();
      DOMString getDuid();
      DOMString getModelCode();
      DOMString getModel();
      unsigned short getSmartTVServerType();
      DOMString getSmartTVServerVersion(); 
      DOMString getTunerEpop();
      boolean isSoccerModeEnabled();
      boolean isTtvSupported();
      boolean isUdPanelSupported();
      DOMString getModel();
      unsigned short getNoGlass3dSupport();
      DOMString getLocalSet();        
      DOMString getSystemConfig(unsigned short key);
      void setSystemConfig(unsigned short key, DOMString value, optional SuccessCallback ? onsuccess, optional ErrorCallback ? onerror);
      unsigned long addSystemConfigChangeListener(ProductInfoConfigChangeCallback listener, unsigned short key);
      void removeSystemConfigChangeListener(unsigned long listenerId);        
  };

Since : 1.0

Attributes

  • ProductInfoConfigKey ProductInfoConfigKey
    This attribute defines the key of each Product Info config.

    Since : 1.0

  • ProductInfoNoGlass3dSupport ProductInfoNoGlass3dSupport
    This attribute defines the state of the No Glass 3D support.

    Since : 1.0

  • ProductInfoSiServerType ProductInfoSiServerType
    This attribute defines the infolink server type.

    Since : 1.0

Methods

getVersion
This method get the plugin's version number.

	  DOMString getVersion();

Since : 1.0

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Return value:

DOMString return value of plugin's version

Code example:


  try {
      var value = webapis.productinfo.getVersion();
      console.log(" version value = " + value);
  } catch (error) {
      console.log(" error code = " + error.code); 
  } 
getFirmware
This method get Firmware's information

	  DOMString getFirmware();

Since : 1.0

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Return value:

DOMString return value of Firmware's version

Code example:


  try {
      var value = webapis.productinfo.getFirmware();
      console.log(" Firmware value = " + value);
  } catch (error) {
      console.log(" error code = " + error.code);
  }
getDuid
This method get DUID.

	  DOMString getDuid();

Since : 1.0

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Return value:

DOMString return value of DUID

Code example:


  try {
      var value = webapis.productinfo.getDuid();
      console.log(" Duid value = " + value);
  } catch (error) {
      console.log(" error code = " + error.code);
  }
getModelCode
This method get Modelcode. (e.g: 15_HAWKP)

	  DOMString getModelCode();

Since : 1.0

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Return value:

DOMString return value of Model code

Code example:


  try {
      var value = webapis.productinfo.getModelCode();
      console.log(" ModelCode value = " + value);
  } catch (error) {
      console.log(" error code = " + error.code);
  }
getModel
This method get real model. (e.g: UJS9500)

	  DOMString getModel();             

Since : 1.0

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Return value:

DOMString return value of Model information

Code example:


  try {
      var value = webapis.productinfo.getModel();
      console.log(" ModelName value = " + value);
  } catch (error) {
      console.log(" error code = " + error.code);
  }
getSmartTVServerType
This method get the infolink server type.

  unsigned short getSmartTVServerType();        

Since : 1.0

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Return value:

unsigned  return value of infolink server  type
  • const unsigned short SI_TYPE_OPERATIING_SERVER = 0
  • const unsigned short SI_TYPE_DEVELOPMENT_SERVER = 1
  • const unsigned short SI_TYPE_DEVELOPING_SERVER = 2

Code example:


  try {
      var value = webapis.productinfo.getSmartTVServerType();
      console.log(" smart tv server type = " + value);
  } catch (error) {
      console.log(" error code = " + error.code);
  }
getSmartTVServerVersion
This method get the infolink server version, like T-INFOLINK2014-1002

  DOMString getSmartTVServerVersion();           

Since : 1.0

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Return value:

DOMString return value of infolink's server version

Code example:


  try {
      var value = webapis.productinfo.getSmartTVServerVersion();
      console.log(" smart tv server version = " + value);
  } catch (error) {
      console.log(" error code = " + error.code);
  }
getTunerEpop
This method get the tuner value via factory info.

  DOMString getTunerEpop();         

Since : 1.0

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Return value:

DOMString return value of facory's tuner

Code example:


  try {
      var value = webapis.productinfo.getTunerEpop();
      console.log(" Tuner Epop = " + value);
  } catch (error) {
      console.log(" error code = " + error.code);
  }
isSoccerModeEnabled
This method check whether TV is on Soccer Mode.

  boolean isSoccerModeEnabled();       

Since : 1.0

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Return value:

DOMString return value of soccer mode
  • true is soccer mode
  • false is non soccer mode

Code example:


  try {
      var value = webapis.productinfo.isSoccerModeEnabled();
      console.log(" SoccerMode = " + value);
  } catch (error) {
      console.log(" error code = " + error.code);
  }
isTtvSupported
This method check whether Ttv is supported.

  boolean isTtvSupported();      

Since : 1.0

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Return value:

DOMString return value of soccer mode
  • true is support
  • false is not support

Code example:


  try {
      var value = webapis.productinfo.isTtvSupported();
      console.log(" support = " + value);
  } catch (error) {
      console.log(" error code = " + error.code);
  }
isUdPanelSupported
This method check whether 4K UHD Panel is supported.

  boolean isUdPanelSupported();       

Since : 1.0

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Return value:

DOMString return value of UdPanel
  • true is support
  • false is not support

Code example:


  try {
      var value = webapis.productinfo.isUdPanelSupported();
      console.log(" support = " + value);
  } catch (error) {
      console.log(" error code = " + error.code);
  }
getRealModel
This method get real model name (e.g: UN65JS9500)

	  DOMString getRealModel();             

Since : 1.0

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Return value:

DOMString return value of Model name

Code example:


  try {
      var value = webapis.productinfo.getRealModel();
      console.log(" ModelName value = " + value);
  } catch (error) {
      console.log(" error code = " + error.code);
  }
getNoGlass3dSupport
This method check whether support Noglass 3d.

 unsigned short getNoGlass3dSupport();

Since : 1.0

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Return value:

unsisnged short returned value of ProductInfoNoGlass3dSupport
  - NO_GLASS_3D_NOT_SUPPORTED = 0
  - NO_GLASS_3D_SUPPORTED = 1

Code example:


  try {
      var value = webapis.productinfo.getNoGlass3dSupport();
      console.log(" 3dSupport value = " + value);
  } catch (error) {
      console.log(" error code = " + error.code);
  }
getLocalSet
This method get local set.

  DOMString getLocalSet();             

Since : 1.0

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Return value:

DOMString return value of localset

Code example:


  try {
      var value = webapis.productinfo.getLocalSet();
      console.log(" LocalSet value = " + value);
  } catch (error) {
      console.log(" error code = " + error.code);
  }
getSystemConfig
This method get system config which is specified by input parameter (e.g: service country code).

  DOMString getSystemConfig(unsigned short key);        

Since : 1.0

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Parameters:

  • key: Key of each Product Info config

Return value:

DOMString return value of system config

Exceptions:

  • WebAPIException
    • with error type TypeMismatchError, if invalid ProductInfoConfigKey type passed for 'key' parameter

Code example:


  try {    
      var value = webapis.productinfo.getSystemConfig(webapis.productinfo.ProductInfoConfigKey.CONFIG_KEY_DATA_SERVICE);   
      console.log("SystemConfig value = " + value); 
  } catch (error) {    
      console.log(" error code = " + error.code);  
  } 
setSystemConfig
This method set system config which is specified by input parameter.

  void setSystemConfig(unsigned short key, DOMString value, optional SuccessCallback ? onsuccess, optional ErrorCallback ? onerror);   

Since : 1.0

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Parameters:

  • key: Key of each Product Info config
  • value: set value
  • onsuccess [optional]: SuccessCallback
  • onerror [optional]: ErrorCallback

Exceptions:

  • WebAPIException
    • with error type TypeMismatchError, if invalid ProductInfoConfigKey type passed for 'key' parameter

    • with error type TypeMismatchError, if invalid DOMString type passed for 'value' parameter

    • with error type TypeMismatchError, if invalid SuccessCallback type passed for 'onsuccess' parameter

    • with error type TypeMismatchError, if invalid ErrorCallback type passed for 'onerror' parameter

    • with error type NotSupportedError, if VCONF_KEY_SERVICE_COUNTRY' is readonly

    • with error type NotSupportedError, if CONFIG_KEY_SHOPLOGO' is readonly

Code example:


  function onsuccess(data)  {   
    console.log("SystemConfig data = " + data); 
} 
function onerror(error)  {   
    console.log("error code : " + error.code); 
}
try {        webapis.productinfo.setSystemConfig(webapis.productinfo.ProductInfoConfigKey.CONFIG_KEY_DATA_SERVICE, value, onsuccess, onerror);  
} catch (error) {    
    console.log(" error code = " + error.code);  
}
addSystemConfigChangeListener
This method add callback to listen the change of system config.

  unsigned long addSystemConfigChangeListener(ProductInfoConfigChangeCallback listener, unsigned short key);

Since : 1.0

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Parameters:

  • listener: Listener of ProductInfoConfigChangeCallback
  • key: Key of each Product Info config

Return value:

unsigned long return value of listener id

Exceptions:

  • WebAPIException
    • with error type TypeMismatchError, if invalid TvInfoMenuKey type passed for 'key' parameter

    • with error type TypeMismatchError, if invalid ChangeCallback type passed for 'onchange' parameter

Code example:


  try {    
    var value = webapis.productinfo.addSystemConfigChangeListener(listener, webapis.productinfo.ProductInfoConfigKey.CONFIG_KEY_DATA_SERVICE);    
    console.log(" add Listener value = " + value); 
} catch (error) {    
    console.log(" error code = " + error.code);  
}
removeSystemConfigChangeListener
This method remove callback which was added to listen the change of system config.

  void removeSystemConfigChangeListener(unsigned long listenerId);         

Since : 1.0

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Parameters:

  • listenerId: Id of ProductInfoConfigChangeCallback

Exceptions:

  • WebAPIException
    • with error type TypeMismatchError, if invalid DOMString type passed for 'a' parameter

Code example:


  try {        webapis.productinfo.removeSystemConfigChangeListener(listenerId);    
    console.log(" removedListener value "); 
} catch (error) {    
    console.log(" error code = " + error.code);  
} 

1.3. ProductInfoConfigChangeCallback

This callback interface defines listener for notification of changes in the Productinfo Config.

  [Callback = FunctionOnly, NoInterfaceObject]interface ProductInfoConfigChangeListener {
      void onchange(unsigned short key);
  };

Since : 1.0

Methods

onchange
This method defines listener for notification of changes in the Productinfo Config.

  void onchange(unsigned short key);             

Since : 1.0

Parameters:

  • key: unsigned short

1.4. ProductInfoConfigKey

This enumeration defines the key of each Product Info config

  [NoInterfaceObject] interface ProductInfoConfigKey {
      const unsigned short CONFIG_KEY_DATA_SERVICE = 0;
      const unsigned short CONFIG_KEY_SERVICE_COUNTRY = 1;
      const unsigned short CONFIG_KEY_SHOPLOGO = 2;
      const unsigned short CONFIG_KEY_CHANNELBOUND_APPS_TICKER = 3;
      const unsigned short CONFIG_KEY_SUPPORT_SOCCER_PANEL = 4;
      const unsigned short CONFIG_KEY_SUPPORT_ONTV_PANEL = 5;
      const unsigned short CONFIG_KEY_SUPPORT_NEWSON_PANEL = 6;
      const unsigned short CONFIG_KEY_SUPPORT_MYCONTENTS_PANEL = 7;
      const unsigned short CONFIG_KEY_SUPPORT_GAME_PANEL = 8;
      const unsigned short CONFIG_KEY_SUPPORT_CLIPS_PANEL = 9;
      const unsigned short CONFIG_KEY_SUPPORT_APPS_PANEL = 10;
      const unsigned short CONFIG_KEY_SYSTEM_PNP_COUNTRY = 11;
  };

Since : 1.0

Constants

  • CONFIG_KEY_DATA_SERVICE
    Data service configuration

    Since : 2.0

  • CONFIG_KEY_SERVICE_COUNTRY
    Service country , readonly

    Since : 1.0

  • CONFIG_KEY_SHOPLOGO
    Shoplogo , readonly

    Since : 1.0

  • CONFIG_KEY_CHANNELBOUND_APPS_TICKER
    Channel Bound Apps ticker

    Since : 2.0

  • CONFIG_KEY_SUPPORT_SOCCER_PANEL
    Support Soccer panel , readonly

    Since : 1.0

  • CONFIG_KEY_SUPPORT_ONTV_PANEL
    Support OnTV panel , readonly

    Since : 1.0

  • CONFIG_KEY_SUPPORT_NEWSON_PANEL
    Support NewsOn panel , readonly

    Since : 2.0

  • CONFIG_KEY_SUPPORT_MYCONTENTS_PANEL
    Support Mycontents panel , readonly

    Since : 1.0

  • CONFIG_KEY_SUPPORT_GAME_PANEL
    Support Game panel , readonly 

    Since : 1.0

  • CONFIG_KEY_SUPPORT_CLIPS_PANEL
    Support Clips panel , readonly

    Since : 2.0

  • CONFIG_KEY_SUPPORT_APPS_PANEL
    Support Apps panel , readonly

    Since : 1.0

  • CONFIG_KEY_SYSTEM_PNP_COUNTRY
    Support system pnp country panel , readonly

    Since : 1.0

1.5. ProductInfoNoGlass3dSupport

This attribute defines the state of the No Glass 3D support.

  [NoInterfaceObject] interface ProductInfoNoGlass3dSupport {
      const unsigned short NO_GLASS_3D_NOT_SUPPORTED = 0;
      const unsigned short NO_GLASS_3D_SUPPORTED = 1;
  };

Since : 1.0

Constants

  • NO_GLASS_3D_NOT_SUPPORTED
    No glass 3d is not supported

    Since : 2.0

  • NO_GLASS_3D_SUPPORTED
    No glass 3d is supported

    Since : 1.0

1.6. ProductInfoSiServerType

This attribute defines the infolink server type.

  [NoInterfaceObject] interface ProductInfoSiServerType {
      const unsigned short SI_TYPE_OPERATIING_SERVER = 0;
      const unsigned short SI_TYPE_DEVELOPMENT_SERVER = 1;
      const unsigned short SI_TYPE_DEVELOPING_SERVER = 2;
  };

Since : 1.0

Constants

  • SI_TYPE_OPERATIING_SERVER
    Operating

    Since : 2.0

  • SI_TYPE_DEVELOPMENT_SERVER
    Development

    Since : 1.0

  • SI_TYPE_DEVELOPING_SERVER
    Developing

    Since : 1.0

2. Full WebIDL


  module ProductInfo {
      [NoInterfaceObject]interface ProductInfoManagerObject {
          readonly attribute ProductInfoManager productinfo;
      };
      WebApi implements ProductInfoManagerObject;
      [NoInterfaceObject]interface ProductInfoManager {
          attribute ProductInfoConfigKey ProductInfoConfigKey;
          attribute ProductInfoNoGlass3dSupport ProductInfoNoGlass3dSupport;
          attribute ProductInfoSiServerType ProductInfoSiServerType;
          DOMString getVersion();
          DOMString getFirmware();
          DOMString getDuid();
          DOMString getModelCode();
          DOMString getModel();
          unsigned short getSmartTVServerType();
          DOMString getSmartTVServerVersion(); 
          DOMString getTunerEpop();
          boolean isSoccerModeEnabled();
          boolean isTtvSupported();
          boolean isUdPanelSupported();
          DOMString getRealModel();
          unsigned short getNoGlass3dSupport();
          DOMString getLocalSet();        
          DOMString getSystemConfig(unsigned short key);
          void setSystemConfig(unsigned short key, DOMString value, optional SuccessCallback ? onsuccess, optional ErrorCallback ? onerror);
          unsigned long addSystemConfigChangeListener(ProductInfoConfigChangeCallback listener, unsigned short key);
          void removeSystemConfigChangeListener(unsigned long listenerId);        
      };

      [Callback = FunctionOnly, NoInterfaceObject]interface ProductInfoConfigChangeCallback {
          void onchange(unsigned short key);
      };

      [NoInterfaceObject] interface ProductInfoConfigKey {
          const unsigned short CONFIG_KEY_DATA_SERVICE = 0;
          const unsigned short CONFIG_KEY_SERVICE_COUNTRY = 1;
          const unsigned short CONFIG_KEY_SHOPLOGO = 2;
          const unsigned short CONFIG_KEY_CHANNELBOUND_APPS_TICKER = 3;
          const unsigned short CONFIG_KEY_SUPPORT_SOCCER_PANEL = 4;
          const unsigned short CONFIG_KEY_SUPPORT_ONTV_PANEL = 5;
          const unsigned short CONFIG_KEY_SUPPORT_NEWSON_PANEL = 6;
          const unsigned short CONFIG_KEY_SUPPORT_MYCONTENTS_PANEL = 7;
          const unsigned short CONFIG_KEY_SUPPORT_GAME_PANEL = 8;
          const unsigned short CONFIG_KEY_SUPPORT_CLIPS_PANEL = 9;
          const unsigned short CONFIG_KEY_SUPPORT_APPS_PANEL = 10;
          const unsigned short CONFIG_KEY_SYSTEM_PNP_COUNTRY = 11;
      };

      [NoInterfaceObject] interface ProductInfoNoGlass3dSupport {
          const unsigned short NO_GLASS_3D_NOT_SUPPORTED = 0;
          const unsigned short NO_GLASS_3D_SUPPORTED = 1;
      };

      [NoInterfaceObject] interface ProductInfoSiServerType {
          const unsigned short SI_TYPE_OPERATIING_SERVER = 0;
          const unsigned short SI_TYPE_DEVELOPMENT_SERVER = 1;
          const unsigned short SI_TYPE_DEVELOPING_SERVER = 2;
      }; 
  };