B2G/gecko/dom/mobilemessage/src/ril/MmsService.js
/**
     * Acquire the MMS network connection.
     *
     * @param callback
     *        Callback function when either the connection setup is done,
     *        timeout, or failed. Accepts a boolean value that indicates
     *        whether the connection is ready.
     *
     * @return true if the MMS network connection is already acquired and the
     *              callback is done; false otherwise.
     */
Acquire the MMS network connection.
@param callback
Callback function when either the connection setup is done,
timeout, or failed. Accepts a boolean value that indicates
whether the connection is ready.

@return true if the MMS network connection is already acquired and the
callback is done; false otherwise.
Acquire the MMS network connection . @param callback Callback function when either the connection setup is done timeout or failed . Accepts a boolean value that indicates whether the connection is ready . @return true if the MMS network connection is already acquired and the callback is done ; false otherwise .
function acquire(callback) {
      this.connectTimer.cancel();
      if (!this.connected) {
        if (DEBUG) debug("acquire: buffer the MMS request and setup the MMS data call.");
        this.pendingCallbacks.push(callback);
        gRIL.setupDataCallByType("mms");
        this.connectTimer.
          initWithCallback(this.onConnectTimerTimeout.bind(this),
                           TIME_TO_BUFFER_MMS_REQUESTS,
                           Ci.nsITimer.TYPE_ONE_SHOT);
        return false;
      }
      this.refCount++;
      callback(true);
      return true;
    }
function acquire ( callback ) { this . connectTimer . cancel ( ) ; if ( ! this . connected ) { if ( DEBUG ) debug ( "acquire: buffer the MMS request and setup the MMS data call." ) ; this . pendingCallbacks . push ( callback ) ; gRIL . setupDataCallByType ( "mms" ) ; this . connectTimer . initWithCallback ( this . onConnectTimerTimeout . bind ( this ) , TIME_TO_BUFFER_MMS_REQUESTS , Ci . nsITimer . TYPE_ONE_SHOT ) ; return false ; } this . refCount ++ ; callback ( true ) ; return true ; }
Acquire the MMS network connection.
Acquire the MMS network connection .
// If the MMS network is not yet connected, buffer the // MMS request and try to setup the MMS network first. // Set a timer to clear the buffered MMS requests if the // MMS network fails to be connected within a time period.