Bug 981519 - Number and name presentation - part 2 - internal api. r=vicamo, a=lmandel
authorHsin-Yi Tsai <htsai@mozilla.com>
Wed, 16 Apr 2014 19:07:11 +0800
changeset 209060 4abdb4491e6c5291978622bba6a08796a9762a46
parent 209059 b9ff3addea44359e6e5eed36cb14d27fb322503f
child 209061 40c662631eba9a15b8df108f50bb147c518facb9
push id494
push userraliiev@mozilla.com
push dateMon, 25 Aug 2014 18:42:16 +0000
treeherdermozilla-release@a3cc3e46b571 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvicamo, lmandel
bugs981519
milestone32.0a2
Bug 981519 - Number and name presentation - part 2 - internal api. r=vicamo, a=lmandel
dom/telephony/nsIGonkTelephonyService.idl
dom/telephony/nsITelephonyService.idl
--- a/dom/telephony/nsIGonkTelephonyService.idl
+++ b/dom/telephony/nsIGonkTelephonyService.idl
@@ -5,25 +5,25 @@
 
 #include "nsITelephonyService.idl"
 
 %{C++
 #define GONK_TELEPHONY_SERVICE_CONTRACTID \
         "@mozilla.org/telephony/gonktelephonyservice;1"
 %}
 
-[scriptable, uuid(2ff3dcbb-ae63-443e-9c5d-76811f2f9b42)]
+[scriptable, uuid(8790e2cc-2c68-4ce9-90dc-f68e1b6e4886)]
 interface nsIGonkTelephonyService : nsITelephonyService
 {
   void notifyCallDisconnected(in unsigned long clientId, in jsval call);
 
   void notifyCallRing();
 
   void notifyCallStateChanged(in unsigned long clientId, in jsval call,
                               [optional] in boolean skipStateConversion);
 
-  void notifyCdmaCallWaiting(in unsigned long clientId, in AString number);
+  void notifyCdmaCallWaiting(in unsigned long clientId, in jsval waitingCall);
 
   void notifySupplementaryService(in unsigned long clientId, in long callIndex,
                                   in AString notification);
 
   void notifyConferenceCallStateChanged(in short state);
 };
--- a/dom/telephony/nsITelephonyService.idl
+++ b/dom/telephony/nsITelephonyService.idl
@@ -1,28 +1,36 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsISupports.idl"
 
-[scriptable, uuid(cd83030f-31eb-40c0-8f0e-0edef3527eec)]
+[scriptable, uuid(464d4cf8-454a-4cdb-9329-bfe7ede97103)]
 interface nsITelephonyListener : nsISupports
 {
   /**
    * Notified when a telephony call changes state.
    *
    * @param clientId
             Indicate the RIL client, 0 ~ (number of client - 1).
    * @param callIndex
    *        Call identifier assigned by the RIL.
    * @param callState
    *        One of the nsITelephonyService::CALL_STATE_* values.
    * @param number
    *        Number of the other party.
+   * @param numberPresentation
+   *        Presentation of the call number.
+   *        One of the nsITelephonyProvider::CALL_PRESENTATION_* values.
+   * @param name
+   *        Name of the other party.
+   * @param namePresentation
+   *        Presentation of the call name.
+   *        One of the nsITelephonyProvider::CALL_PRESENTATION_* values.
    * @param isOutgoing
    *        Indicates whether this call is outgoing or incoming.
    * @param isEmergency
    *        Indicates whether this call is an emergency call.
    * @param isConference
    *        Indicates whether this call is a conference call.
    * @param isSwitchable
    *        Indicates whether this call can be switched between states of
@@ -30,16 +38,19 @@ interface nsITelephonyListener : nsISupp
    *        nsITelephonyService::CALL_STATE_HELD.
    * @param isMergeable
    *        Indicates whether this call be be added into a conference.
    */
   void callStateChanged(in unsigned long clientId,
                         in unsigned long callIndex,
                         in unsigned short callState,
                         in AString number,
+                        in unsigned short numberPresentation,
+                        in AString name,
+                        in unsigned short namePresentation,
                         in boolean isOutgoing,
                         in boolean isEmergency,
                         in boolean isConference,
                         in boolean isSwitchable,
                         in boolean isMergeable);
 
   /**
    * Called when participants of a conference call have been updated, and the
@@ -66,31 +77,42 @@ interface nsITelephonyListener : nsISupp
    * @param clientId
             Indicate the RIL client, 0 ~ (number of client - 1).
    * @param callIndex
    *        Call identifier assigned by the RIL.
    * @param callState
    *        One of the nsITelephonyService::CALL_STATE_* values.
    * @param number
    *        Number of the other party.
+   * @param numberPresentation
+   *        Presentation of the call number.
+   *        One of the nsITelephonyProvider::CALL_PRESENTATION_* values.
+   * @param name
+   *        Name of the other party.
+   * @param namePresentation
+   *        Presentation of the call name.
+   *        One of the nsITelephonyProvider::CALL_PRESENTATION_* values.
    * @param isOutgoing
    *        Indicates whether this call is outgoing or incoming.
    * @param isConference
    *        Indicates whether this call is a conference call.
    * @param isSwitchable
    *        Indicates whether this call can be switched between states of
    *        nsITelephonyService::CALL_STATE_CONNECTED and
    *        nsITelephonyService::CALL_STATE_HELD.
    * @param isMergeable
    *        Indicates whether this call be be added into a conference.
    */
   void enumerateCallState(in unsigned long clientId,
                           in unsigned long callIndex,
                           in unsigned short callState,
                           in AString number,
+                          in unsigned short numberPresentation,
+                          in AString name,
+                          in unsigned short namePresentation,
                           in boolean isOutgoing,
                           in boolean isEmergency,
                           in boolean isConference,
                           in boolean isSwitchable,
                           in boolean isMergeable);
 
   /**
    * Notify when RIL receives supplementary service notification.
@@ -122,18 +144,30 @@ interface nsITelephonyListener : nsISupp
 
   /**
    * Called when a waiting call comes in CDMA networks.
    *
    * @param clientId
             Indicate the RIL client, 0 ~ (number of client - 1).
    * @param number
    *        Number of the other party.
+   * @param numberPresentation
+   *        Presentation of the call number.
+   *        One of the nsITelephonyProvider::CALL_PRESENTATION_* values.
+   * @param name
+   *        Name of the other party.
+   * @param namePresentation
+   *        Presentation of the call name.
+   *        One of the nsITelephonyProvider::CALL_PRESENTATION_* values.
    */
-  void notifyCdmaCallWaiting(in unsigned long clientId, in AString number);
+  void notifyCdmaCallWaiting(in unsigned long clientId,
+                             in AString number,
+                             in unsigned short numberPresentation,
+                             in AString name,
+                             in unsigned short namePresentation);
 
   /**
    * Called when RIL error occurs to creating or separating a conference call.
    *
    * @param name
    *        Error name. Possible values are addError and removeError.
    * @param message
    *        Detailed error message from RIL.
@@ -182,16 +216,21 @@ interface nsITelephonyService : nsISuppo
   const unsigned short CALL_STATE_RESUMING = 7;
   const unsigned short CALL_STATE_DISCONNECTING = 8;
   const unsigned short CALL_STATE_DISCONNECTED = 9;
   const unsigned short CALL_STATE_INCOMING = 10;
 
   const unsigned short NOTIFICATION_REMOTE_HELD = 0;
   const unsigned short NOTIFICATION_REMOTE_RESUMED = 1;
 
+  const unsigned short CALL_PRESENTATION_ALLOWED = 0;
+  const unsigned short CALL_PRESENTATION_RESTRICTED = 1;
+  const unsigned short CALL_PRESENTATION_UNKNOWN = 2;
+  const unsigned short CALL_PRESENTATION_PAYPHONE = 3;
+
   readonly attribute unsigned long defaultServiceId;
 
   /**
    * Called when a content process registers receiving unsolicited messages from
    * RadioInterfaceLayer in the chrome process. Only a content process that has
    * the 'telephony' permission is allowed to register.
    */
   void registerListener(in nsITelephonyListener listener);