# Class Signage#setUsagePermission

Signage

- Defined in: signage.js

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| Signage#setUsagePermission(successCallback, errorCallback, options) Sets usage policy.

## Class Detail

Signage#setUsagePermission(successCallback, errorCallback, options)

Sets usage policy. It is used to limit monitor functions.

    function setUsagePermission() {
       var options = {
         policy: {
            remoteKeyOperationMode: Signage.KeyOperationMode.POWER_ONLY,
            localKeyOperationMode: Signage.KeyOperationMode.POWER_ONLY,
         }
      };

       var successCb = function (){
         console.log("successfully Set");
       };

       var failureCb = function(cbObject){
         var errorCode = cbObject.errorCode;
         var errorText = cbObject.errorText;
            console.log( " Error Code [" + errorCode + "]: " + errorText);
          };

       var signage = new Signage();
       signage.setUsagePermission(successCb, failureCb, options);

    }

Parameters:
{Function} successCallback
  success callback function.
{Function} errorCallback
  failure callback function.
{Object} options
  parameter list.
{Object} options.policy
  Policy object. Only attributes that exist will be set.

  Property | Type | Description | Required
  --- | --- | --- | ---
  remoteKeyOperationMode | KeyOperationMode | Remote Key operation mode | optional
  localKeyOperationMode | KeyOperationMode | Built-in key operation mode | optional

Since:
  1.0
Returns:

  After the method is successfully executed, successCallback is called without any parameter. If an error occurs, errorCallback is called with errorCode and errorText.