Provides access to HMI theming
        
        
        
- Source:
Methods
- 
    <static> cancelWatch(watchId)
- 
    
    
    Stop watching theme changesParameters:Name Type Description watchIdNumber The watch ID returned by car.theme.watchTheme. - Source:
 Examplecar.theme.cancelWatch(watchId);
- 
    <static> getActive(successCallback, errorCallback)
- 
    
    
    Return the current themeParameters:Name Type Argument Description successCallbackFunction The callback that is called on success. errorCallbackFunction <optional> 
 The callback that is called if there is an error. - Source:
 Examples//define your callback function(s) function successCallback(theme) { console.log("theme id = " + theme.id + "; theme name = " + theme.name); } function errorCallback(error) { console.log(error.code, error.msg); } //call the method car.theme.getActive(successCallback, errorCallback);REST Request: http://<car-ip>/car/theme/getActive Success Response: { code: 1, data: { id: 'default', name: 'Default' } } Error Response: { code: -1, msg: "An error has occurred" }
- 
    <static> getList(successCallback, errorCallback)
- 
    
    
    Return a list of available themesParameters:Name Type Argument Description successCallbackFunction The callback that is called on success. errorCallbackFunction <optional> 
 The callback that is called if there is an error. - Source:
 Examples//define your callback function(s) function successCallback(themes) { //iterate through all the themes for (var i=0; i<themes.length; i++) { console.log("theme id = " + themes[i].id + "; theme name = " + themes[i].name); } } function errorCallback(error) { console.log(error.code, error.msg); } //call the method car.theme.getList(successCallback, errorCallback);REST Request: http://<car-ip>/car/theme/getList Success Response: { code: 1, data: [ { id: 'default', name: 'Default' }, { id: 'jeep', name: 'Jeep' } ] } Error Response: { code: -1, msg: "An error has occurred" }
- 
    <static> setActive(themeId, successCallback, errorCallback)
- 
    
    
    Change the current themeParameters:Name Type Argument Description themeIdString The ID of the new theme. successCallbackFunction <optional> 
 The callback that is called on success. errorCallbackFunction <optional> 
 The callback that is called if there is an error. - Source:
 Examples//define your callback function(s) function successCallback() { console.log("theme has been changed"); } function errorCallback(error) { console.log(error.code, error.msg); } //call the method car.theme.setActive('default', successCallback, errorCallback);REST Request: http://<car-ip>/car/theme/setActive?themeId=default Success Response: { code: 1 } Error Response: { code: -1, msg: "An error has occurred" }
- 
    <static> watchTheme(callback) → {Number}
- 
    
    
    Watch for theme changesParameters:Name Type Description callbackFunction The function to be called when a change is detected. - Source:
 Returns:An ID for the added watch.- Type
- Number
 Example//define a callback function function myCallback(theme) { console.log("theme id = " + theme.id + "; theme name = " + theme.name); } var watchId = car.theme.watchTheme(myCallback);