set method

bool set(
  1. String parameter,
  2. dynamic value
)

Allow configuration changes in runtime. Returns true if the parameter could be set.

Implementation

bool set(String parameter, dynamic value) {
  switch (parameter) {
    case 'password':
      {
        _configuration!.password = value.toString();
        break;
      }

    case 'realm':
      {
        _configuration!.realm = value.toString();
        break;
      }

    case 'ha1':
      {
        _configuration!.ha1 = value.toString();
        // Delete the plain SIP password.
        _configuration!.password = null;
        break;
      }

    case 'display_name':
      {
        _configuration!.displayName = value;
        break;
      }

    default:
      logger.error('set() | cannot set "$parameter" parameter in runtime');

      return false;
  }

  return true;
}