mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1114935 - Part 3: Define new IPDL Protocol for nsIIccService. r=echen
This commit is contained in:
parent
029d30b54c
commit
c365bb03ce
111
dom/icc/ipc/PIcc.ipdl
Normal file
111
dom/icc/ipc/PIcc.ipdl
Normal file
@ -0,0 +1,111 @@
|
||||
/* 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 protocol PContent;
|
||||
include protocol PIccRequest;
|
||||
include PIccTypes;
|
||||
|
||||
using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
namespace icc {
|
||||
|
||||
union OptionalIccInfoData
|
||||
{
|
||||
void_t;
|
||||
IccInfoData;
|
||||
};
|
||||
|
||||
struct GetCardLockEnabledRequest
|
||||
{
|
||||
uint32_t lockType;
|
||||
};
|
||||
|
||||
struct UnlockCardLockRequest
|
||||
{
|
||||
uint32_t lockType;
|
||||
nsString password;
|
||||
nsString newPin;
|
||||
};
|
||||
|
||||
struct SetCardLockEnabledRequest
|
||||
{
|
||||
uint32_t lockType;
|
||||
nsString password;
|
||||
bool enabled;
|
||||
};
|
||||
|
||||
struct ChangeCardLockPasswordRequest
|
||||
{
|
||||
uint32_t lockType;
|
||||
nsString password;
|
||||
nsString newPassword;
|
||||
};
|
||||
|
||||
struct GetCardLockRetryCountRequest
|
||||
{
|
||||
uint32_t lockType;
|
||||
};
|
||||
|
||||
struct MatchMvnoRequest
|
||||
{
|
||||
uint32_t mvnoType;
|
||||
nsString mvnoData;
|
||||
};
|
||||
|
||||
struct GetServiceStateEnabledRequest
|
||||
{
|
||||
uint32_t service;
|
||||
};
|
||||
|
||||
union IccRequest
|
||||
{
|
||||
GetCardLockEnabledRequest;
|
||||
UnlockCardLockRequest;
|
||||
SetCardLockEnabledRequest;
|
||||
ChangeCardLockPasswordRequest;
|
||||
GetCardLockRetryCountRequest;
|
||||
MatchMvnoRequest;
|
||||
GetServiceStateEnabledRequest;
|
||||
};
|
||||
|
||||
sync protocol PIcc
|
||||
{
|
||||
manager PContent;
|
||||
manages PIccRequest;
|
||||
|
||||
child:
|
||||
/**
|
||||
* Notify CardStateChanged with updated CardState.
|
||||
*/
|
||||
NotifyCardStateChanged(uint32_t aCardState);
|
||||
|
||||
/**
|
||||
* Notify IccInfoChanged with updated IccInfo.
|
||||
*/
|
||||
NotifyIccInfoChanged(OptionalIccInfoData aInfoData);
|
||||
|
||||
parent:
|
||||
/**
|
||||
* Sent when the child no longer needs to use PIcc.
|
||||
*/
|
||||
__delete__();
|
||||
|
||||
/**
|
||||
* Sent when the child makes an asynchronous request to the parent.
|
||||
*/
|
||||
PIccRequest(IccRequest aRequest);
|
||||
|
||||
/**
|
||||
* Sync call to initialize the updated IccInfo/CardState.
|
||||
*/
|
||||
sync Init()
|
||||
returns (OptionalIccInfoData aInfoData, uint32_t aCardState);
|
||||
|
||||
};
|
||||
|
||||
} // namespace icc
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
61
dom/icc/ipc/PIccRequest.ipdl
Normal file
61
dom/icc/ipc/PIccRequest.ipdl
Normal file
@ -0,0 +1,61 @@
|
||||
/* 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 protocol PIcc;
|
||||
include PIccTypes;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
namespace icc {
|
||||
|
||||
struct IccReplySuccess
|
||||
{
|
||||
};
|
||||
|
||||
struct IccReplySuccessWithBoolean
|
||||
{
|
||||
bool result;
|
||||
};
|
||||
|
||||
struct IccReplyCardLockRetryCount
|
||||
{
|
||||
int32_t count;
|
||||
};
|
||||
|
||||
struct IccReplyError
|
||||
{
|
||||
nsString message;
|
||||
};
|
||||
|
||||
struct IccReplyCardLockError
|
||||
{
|
||||
int32_t retryCount;
|
||||
nsString message;
|
||||
};
|
||||
|
||||
union IccReply
|
||||
{
|
||||
// Success
|
||||
IccReplySuccess;
|
||||
IccReplySuccessWithBoolean;
|
||||
IccReplyCardLockRetryCount;
|
||||
// Error
|
||||
IccReplyError;
|
||||
IccReplyCardLockError;
|
||||
};
|
||||
|
||||
protocol PIccRequest
|
||||
{
|
||||
manager PIcc;
|
||||
|
||||
child:
|
||||
/**
|
||||
* Sent when the asynchronous request has completed.
|
||||
*/
|
||||
__delete__(IccReply response);
|
||||
};
|
||||
|
||||
} // namespace icc
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
24
dom/icc/ipc/PIccTypes.ipdlh
Normal file
24
dom/icc/ipc/PIccTypes.ipdlh
Normal file
@ -0,0 +1,24 @@
|
||||
/* 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/. */
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
namespace icc {
|
||||
|
||||
struct IccInfoData
|
||||
{
|
||||
nsString iccType;
|
||||
nsString iccid;
|
||||
nsString mcc;
|
||||
nsString mnc;
|
||||
nsString spn;
|
||||
bool isDisplayNetworkNameRequired;
|
||||
bool isDisplaySpnRequired;
|
||||
nsString phoneNumber;
|
||||
int32_t prlVersion;
|
||||
};
|
||||
|
||||
} // namespace icc
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
@ -22,6 +22,12 @@ UNIFIED_SOURCES += [
|
||||
'IccManager.cpp',
|
||||
]
|
||||
|
||||
IPDL_SOURCES += [
|
||||
'ipc/PIcc.ipdl',
|
||||
'ipc/PIccRequest.ipdl',
|
||||
'ipc/PIccTypes.ipdlh',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' and CONFIG['MOZ_B2G_RIL']:
|
||||
EXTRA_JS_MODULES += [
|
||||
'gonk/StkProactiveCmdFactory.jsm',
|
||||
|
@ -21,6 +21,7 @@ include protocol PFileDescriptorSet;
|
||||
include protocol PFMRadio;
|
||||
include protocol PFileSystemRequest;
|
||||
include protocol PHal;
|
||||
include protocol PIcc;
|
||||
include protocol PProcessHangMonitor;
|
||||
include protocol PImageBridge;
|
||||
include protocol PMemoryReportRequest;
|
||||
@ -379,6 +380,7 @@ prio(normal upto urgent) sync protocol PContent
|
||||
manages PFileDescriptorSet;
|
||||
manages PFMRadio;
|
||||
manages PHal;
|
||||
manages PIcc;
|
||||
manages PMemoryReportRequest;
|
||||
manages PMobileConnection;
|
||||
manages PNecko;
|
||||
@ -656,6 +658,8 @@ parent:
|
||||
|
||||
PHal();
|
||||
|
||||
PIcc(uint32_t serviceId);
|
||||
|
||||
PMobileConnection(uint32_t clientId);
|
||||
|
||||
PNecko();
|
||||
|
Loading…
Reference in New Issue
Block a user