This API is available on Firefox OS for internal applications 仅。

摘要

getCallForwardingOption method is used to query current options for call forwarding.

句法

var request = navigator.mozMobileConnection.getCallForwardingOption(reason);
					

参数

reason
This parameter is a number that indicates the reason the call is being forwarded. It is one of:
  • 0 : unconditional
  • 1 : mobile busy
  • 2 : no reply
  • 3 : not reachable
  • 4 : forwarding all calls
  • 5 : conditionally forwarding all calls
All these values are available as constants in the MozMobileCFInfo 接口。

返回

A DOMRequest object to handle the success or failure of the method call.

If the request is successful, the request's result 是数组化的 MozMobileCFInfo 对象。

Otherwise, the request's error is one of:

  • RadioNotAvailable
  • RequestNotSupported
  • GenericFailure

范例

var request = navigator.mozMobileConnection.getCallForwardingOption(MozMobileCFInfo.CALL_FORWARD_REASON_NO_REPLY);
request.onsuccess = function () {
  this.result.forEach(function (CFInfo) {
    console.log(CFInfo);
  });
}
request.onerror = function () {
  console.log('operation failed: ' + this.error.name);
}
					

规范

Not part of any specification.

另请参阅

元数据

  • 最后修改: