зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1114937 - Part 1: Define new IDL for IccContacts. r=echen
This commit is contained in:
Родитель
08645287bd
Коммит
c65efc9f00
|
@ -5,6 +5,7 @@
|
||||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
XPIDL_SOURCES += [
|
XPIDL_SOURCES += [
|
||||||
|
'nsIIccContact.idl',
|
||||||
'nsIIccInfo.idl',
|
'nsIIccInfo.idl',
|
||||||
'nsIIccProvider.idl', # TODO: Bug 815526, deprecate RILContentHelper.
|
'nsIIccProvider.idl', # TODO: Bug 815526, deprecate RILContentHelper.
|
||||||
'nsIIccService.idl',
|
'nsIIccService.idl',
|
||||||
|
|
|
@ -0,0 +1,60 @@
|
||||||
|
/* 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(0f3dbcd1-9f7b-40a8-aa3c-b5701978ec53)]
|
||||||
|
interface nsIIccContact : nsISupports
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The unique identifier of this ICC Contact.
|
||||||
|
*
|
||||||
|
* Note: This id is composed of the iccid and its record index of EF_ADN.
|
||||||
|
*/
|
||||||
|
readonly attribute DOMString id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name list.
|
||||||
|
*
|
||||||
|
* The container of Alpha-Id in EF_ADN and Second Name in EF_SNE of this contact,
|
||||||
|
* where EF_SNE provides the possibility to store a name in different language.
|
||||||
|
*
|
||||||
|
* @see 10.2.1 Support of two name fields per entry, 3GPP TS 21.111.
|
||||||
|
*
|
||||||
|
* @param aCount
|
||||||
|
* The number of names.
|
||||||
|
*
|
||||||
|
* @returns the array of names.
|
||||||
|
*/
|
||||||
|
void getNames([optional] out unsigned long aCount,
|
||||||
|
[array, size_is(aCount), retval] out wstring aNames);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Phone number list.
|
||||||
|
*
|
||||||
|
* The container of the dialing numbers of this contact in EF_ADN and EF_ANR.
|
||||||
|
*
|
||||||
|
* @see 10.2.2 Support of multiple phone numbers per entry, 3GPP TS 21.111.
|
||||||
|
*
|
||||||
|
* @param aCount
|
||||||
|
* The number of phone numbers.
|
||||||
|
*
|
||||||
|
* @returns the array of phone numbers.
|
||||||
|
*/
|
||||||
|
void getNumbers([optional] out unsigned long aCount,
|
||||||
|
[array, size_is(aCount), retval] out wstring aNumbers);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Email list.
|
||||||
|
*
|
||||||
|
* The container of the emails of this contact in EF_EMAIL.
|
||||||
|
*
|
||||||
|
* @param aCount
|
||||||
|
* The number of emails.
|
||||||
|
*
|
||||||
|
* @returns the array of emails.
|
||||||
|
*/
|
||||||
|
void getEmails([optional] out unsigned long aCount,
|
||||||
|
[array, size_is(aCount), retval] out wstring aEmails);
|
||||||
|
};
|
|
@ -5,6 +5,7 @@
|
||||||
#include "nsISupports.idl"
|
#include "nsISupports.idl"
|
||||||
|
|
||||||
interface nsIIcc;
|
interface nsIIcc;
|
||||||
|
interface nsIIccContact;
|
||||||
interface nsIIccInfo;
|
interface nsIIccInfo;
|
||||||
interface nsIStkDownloadEvent;
|
interface nsIStkDownloadEvent;
|
||||||
interface nsIStkProactiveCmd;
|
interface nsIStkProactiveCmd;
|
||||||
|
@ -22,7 +23,7 @@ interface nsIIccListener : nsISupports
|
||||||
/**
|
/**
|
||||||
* A callback interface for handling asynchronous response.
|
* A callback interface for handling asynchronous response.
|
||||||
*/
|
*/
|
||||||
[scriptable, uuid(b0e2899a-adc3-11e4-89cf-1b60eaa35b06)]
|
[scriptable, uuid(b7b0623f-fb2c-4cec-b0dc-00ac2fe7b296)]
|
||||||
interface nsIIccCallback : nsISupports
|
interface nsIIccCallback : nsISupports
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -45,9 +46,28 @@ interface nsIIccCallback : nsISupports
|
||||||
*/
|
*/
|
||||||
void notifyGetCardLockRetryCount(in long aCount);
|
void notifyGetCardLockRetryCount(in long aCount);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The success callback of |readContacts|.
|
||||||
|
*
|
||||||
|
* @param aContacts
|
||||||
|
* The list of contacts retrieved from ICC.
|
||||||
|
* @param aCount
|
||||||
|
* The number of contacts retrieved from ICC.
|
||||||
|
*/
|
||||||
|
void notifyRetrievedIccContacts([array, size_is(aCount)] in nsIIccContact aContacts,
|
||||||
|
in uint32_t aCount);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The success callback of |updateContact|.
|
||||||
|
*
|
||||||
|
* @param aContact
|
||||||
|
* The contact with the updated result.
|
||||||
|
*/
|
||||||
|
void notifyUpdatedIccContact(in nsIIccContact aContact);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The error callback of |getCardLockEnabled|, |getCardLockRetryCount|,
|
* The error callback of |getCardLockEnabled|, |getCardLockRetryCount|,
|
||||||
* |matchMvno|, and |getServiceStateEnabled|.
|
* |matchMvno|, |getServiceStateEnabled|, |readContacts| and |updateContact|.
|
||||||
*
|
*
|
||||||
* @param aErrorMsg
|
* @param aErrorMsg
|
||||||
* The error message.
|
* The error message.
|
||||||
|
@ -138,7 +158,7 @@ NS_CreateIccService();
|
||||||
/**
|
/**
|
||||||
* XPCOM component that provides the access to the selected ICC.
|
* XPCOM component that provides the access to the selected ICC.
|
||||||
*/
|
*/
|
||||||
[scriptable, uuid(6ded322c-fadd-11e4-9cb6-3f4fc3f241d3)]
|
[scriptable, uuid(1791f102-b081-4435-8555-37eb035fa4e2)]
|
||||||
interface nsIIcc : nsISupports
|
interface nsIIcc : nsISupports
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -235,6 +255,15 @@ interface nsIIcc : nsISupports
|
||||||
*/
|
*/
|
||||||
const unsigned long CARD_SERVICE_FDN = 0;
|
const unsigned long CARD_SERVICE_FDN = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Icc Contact Type Constants
|
||||||
|
*
|
||||||
|
* Note: MUST be matched with enum IccContactType in MozIcc.webidl!
|
||||||
|
*/
|
||||||
|
const unsigned long CONTACT_TYPE_ADN = 0;
|
||||||
|
const unsigned long CONTACT_TYPE_FDN = 1;
|
||||||
|
const unsigned long CONTACT_TYPE_SDN = 2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called to register icc-related changes.
|
* Called to register icc-related changes.
|
||||||
*
|
*
|
||||||
|
@ -472,4 +501,38 @@ interface nsIIcc : nsISupports
|
||||||
* The event that ICC listening to in STK_CMD_SET_UP_EVENT_LIST.
|
* The event that ICC listening to in STK_CMD_SET_UP_EVENT_LIST.
|
||||||
*/
|
*/
|
||||||
void sendStkEventDownload(in nsIStkDownloadEvent aEvent);
|
void sendStkEventDownload(in nsIStkDownloadEvent aEvent);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read Specified type of Contact from ICC.
|
||||||
|
*
|
||||||
|
* @param aContactType
|
||||||
|
* One of CONTACT_TYPE_*.
|
||||||
|
*
|
||||||
|
* @param aCallback
|
||||||
|
* An instance of nsIIccCallback:
|
||||||
|
* nsIIccCallback::notifyRetrievedIccContacts() if success.
|
||||||
|
* nsIIccCallback::notifyError(), otherwise.
|
||||||
|
*/
|
||||||
|
void readContacts(in unsigned long aContactType,
|
||||||
|
in nsIIccCallback aCallback);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update Specified type of Contact in ICC.
|
||||||
|
*
|
||||||
|
* @param aContactType
|
||||||
|
* One of CONTACT_TYPE_*.
|
||||||
|
* @param aContact
|
||||||
|
* an nsIIccContact instance with information to be updated.
|
||||||
|
* @param aPin2 (Optional)
|
||||||
|
* The PIN2 required to update FDN contact.
|
||||||
|
*
|
||||||
|
* @param aCallback
|
||||||
|
* An instance of nsIIccCallback:
|
||||||
|
* nsIIccCallback::notifyUpdatedIccContact() if success.
|
||||||
|
* nsIIccCallback::notifyError(), otherwise.
|
||||||
|
*/
|
||||||
|
void updateContact(in unsigned long aContactType,
|
||||||
|
in nsIIccContact aContact,
|
||||||
|
in DOMString aPin2,
|
||||||
|
in nsIIccCallback aCallback);
|
||||||
};
|
};
|
||||||
|
|
Загрузка…
Ссылка в новой задаче