/* 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 "nsIMobileConnectionService.idl" %{C++ #define GONK_MOBILECONNECTION_SERVICE_CONTRACTID \ "@mozilla.org/mobileconnection/gonkmobileconnectionservice;1" %} [scriptable, uuid(eae40ffe-394a-4355-8e0b-07170d3e70f4)] interface nsIGonkMobileConnectionService : nsIMobileConnectionService { void notifyNetworkInfoChanged(in unsigned long clientId, in jsval networkInfo); void notifyVoiceInfoChanged(in unsigned long clientId, in jsval voiceInfo); void notifyDataInfoChanged(in unsigned long clientId, in jsval dataInfo); void notifyDataError(in unsigned long clientId, in DOMString message); void notifySignalStrengthChanged(in unsigned long clientId, in jsval signal); void notifyOperatorChanged(in unsigned long clientId, in jsval info); void notifyOtaStatusChanged(in unsigned long clientId, in DOMString status); void notifyRadioStateChanged(in unsigned long clientId, in long radioState); void notifyUssdReceived(in unsigned long clientId, in DOMString message, in boolean sessionEnded); void notifyEmergencyCallbackModeChanged(in unsigned long clientId, in boolean active, in unsigned long timeoutMs); void notifyIccChanged(in unsigned long clientId, in DOMString iccId); void notifyNetworkSelectModeChanged(in unsigned long clientId, in long mode); void notifySpnAvailable(in unsigned long clientId); void notifyLastHomeNetworkChanged(in unsigned long clientId, in DOMString network); void notifyCFStateChanged(in unsigned long clientId, in unsigned short action, in unsigned short reason, in DOMString number, in unsigned short timeSeconds, in unsigned short serviceClass); /** * Notify Display Info from received Cdma-Info-Record. * See 3.7.4.1 Display in 3GPP2 C.S0005-F. * * @param clientId * The ID of radioInterface where this info is notified from. * @param display The string to be displayed. */ void notifyCdmaInfoRecDisplay(in unsigned long clientId, in DOMString display); /** * Notify Called Party Number from received Cdma-Info-Record. * See 3.7.4.2 Called Party Number in 3GPP2 C.S0005-F. * * @param clientId * The ID of radioInterface where this info is notified from. * @param type * The type of number. (3-bit binary) * See Table 2.7.1.3.2.4-2 in 3GPP2 C.S0005-F. * @param plan * The numbering plan. (4-bit binary) * See Table 2.7.1.3.2.4-3 in 3GPP2 C.S0005-F. * @param number * The string presentation of the number. * @param pi (2-bit binary) * The Presentation indicator of the number. * See Table 2.7.4.4-1 in 3GPP2 C.S0005-F. * @param si (2-bit binary) * The Screening Indicator of the number. * See Table 2.7.4.4-2 in 3GPP2 C.S0005-F. */ void notifyCdmaInfoRecCalledPartyNumber(in unsigned long clientId, in unsigned short type, in unsigned short plan, in DOMString number, in unsigned short pi, in unsigned short si); /** * Notify Calling Party Number from received Cdma-Info-Record. * See 3.7.4.3 Calling Party Number in 3GPP2 C.S0005-F. * * @param clientId * The ID of radioInterface where this info is notified from. * @param type * The type of number. (3-bit binary) * See Table 2.7.1.3.2.4-2 in 3GPP2 C.S0005-F. * @param plan * The numbering plan. (4-bit binary) * See Table 2.7.1.3.2.4-3 in 3GPP2 C.S0005-F. * @param number * The string presentation of the number. * @param pi (2-bit binary) * The Presentation indicator of the number. * See Table 2.7.4.4-1 in 3GPP2 C.S0005-F. * @param si (2-bit binary) * The Screening Indicator of the number. * See Table 2.7.4.4-2 in 3GPP2 C.S0005-F. */ void notifyCdmaInfoRecCallingPartyNumber(in unsigned long clientId, in unsigned short type, in unsigned short plan, in DOMString number, in unsigned short pi, in unsigned short si); /** * Notify Connected Party Number from received Cdma-Info-Record. * See 3.7.4.4 Connected Party Number in 3GPP2 C.S0005-F. * * @param clientId * The ID of radioInterface where this info is notified from. * @param type * The type of number. (3-bit binary) * See Table 2.7.1.3.2.4-2 in 3GPP2 C.S0005-F. * @param plan * The numbering plan. (4-bit binary) * See Table 2.7.1.3.2.4-3 in 3GPP2 C.S0005-F. * @param number * The string presentation of the number. * @param pi (2-bit binary) * The Presentation indicator of the number. * See Table 2.7.4.4-1 in 3GPP2 C.S0005-F. * @param si (2-bit binary) * The Screening Indicator of the number. * See Table 2.7.4.4-2 in 3GPP2 C.S0005-F. */ void notifyCdmaInfoRecConnectedPartyNumber(in unsigned long clientId, in unsigned short type, in unsigned short plan, in DOMString number, in unsigned short pi, in unsigned short si); /** * Notify Signal Info from received Cdma-Info-Record. * See 3.7.4.5 Signal in 3GPP2 C.S0005-F. * * @param clientId * The ID of radioInterface where this info is notified from. * @param type * The signal type. (2-bit binary) * See Table 3.7.5.5-1 in 3GPP2 C.S0005-F. * @param alertPitch * The pitch of the alerting signal. (2-bit binary) * See Table 3.7.5.5-2 in 3GPP2 C.S0005-F. * @param signal * The signal code. (6-bit binary) * See Table 3.7.5.5-3, 3.7.5.5-4, 3.7.5.5-5 in 3GPP2 C.S0005-F. */ void notifyCdmaInfoRecSignal(in unsigned long clientId, in unsigned short type, in unsigned short alertPitch, in unsigned short signal); /** * Notify Redirecting Number from received Cdma-Info-Record. * See 3.7.4.11 Redirecting Number in 3GPP2 C.S0005-F. * * @param clientId * The ID of radioInterface where this info is notified from. * @param type * The type of number. (3-bit binary) * See Table 2.7.1.3.2.4-2 in 3GPP2 C.S0005-F. * @param plan * The numbering plan. (4-bit binary) * See Table 2.7.1.3.2.4-3 in 3GPP2 C.S0005-F. * @param number * The string presentation of the number. * @param pi (2-bit binary) * The Presentation indicator of the number. * See Table 2.7.4.4-1 in 3GPP2 C.S0005-F. * @param si (2-bit binary) * The Screening Indicator of the number. * See Table 2.7.4.4-2 in 3GPP2 C.S0005-F. * @param reason (4-bit binary) * The redirection reason. * See Table 3.7.5.11-1 in 3GPP2 C.S0005-F. */ void notifyCdmaInfoRecRedirectingNumber(in unsigned long clientId, in unsigned short type, in unsigned short plan, in DOMString number, in unsigned short pi, in unsigned short si, in unsigned short reason); /** * Notify Line Control from received Cdma-Info-Record. * See 3.7.4.15 Line Control in 3GPP2 C.S0005-F. * * @param clientId * The ID of radioInterface where this info is notified from. * @param polarityIncluded (1-bit) * Polarity parameter included. * @param toggle (1-bit) * Toggle mode. * @param reverse (1-bit) * Reverse polarity. * @param powerDenial (8-bit) * Power denial timeout. */ void notifyCdmaInfoRecLineControl(in unsigned long clientId, in unsigned short polarityIncluded, in unsigned short toggle, in unsigned short reverse, in unsigned short powerDenial); /** * Notify CLIR from received Cdma-Info-Record. * See 'ANNEX 1 Country-Specific Record Type for Japan' in T53. * http://www.arib.or.jp/english/html/overview/doc/T53v6_5_pdf/5_ANNEX_v6_5.pdf * * @param clientId * The ID of radioInterface where this info is notified from. * @param cause * Reason code. (8-bit binary) * See Table A 1.1-1 in T53. */ void notifyCdmaInfoRecClir(in unsigned long clientId, in unsigned short cause); /** * Notify Audio Control from received Cdma-Info-Record. * * Note: No information from ARIB about Audio Control. * It seems obsolete according to ANNEX 1 in T53. * upLink/downLink are 'byte' value according to ril.h. * Treat them as 'signed short' to preserve the flexibility when needed. * * @param clientId * The ID of radioInterface where this info is notified from. * @param upLink * @param downLink */ void notifyCdmaInfoRecAudioControl(in unsigned long clientId, in short upLink, in short downLink); };