gecko/dom/mobileconnection/ipc/PMobileConnection.ipdl

188 lines
3.7 KiB
C++

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set sw=2 ts=8 et ft=cpp : */
/* 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 PMobileConnectionRequest;
include PMobileConnectionTypes;
namespace mozilla {
namespace dom {
namespace mobileconnection {
sync protocol PMobileConnection
{
manager PContent;
manages PMobileConnectionRequest;
child:
NotifyVoiceInfoChanged(nsMobileConnectionInfo aInfo);
NotifyDataInfoChanged(nsMobileConnectionInfo aInfo);
NotifyDataError(nsString aMessage);
NotifyCFStateChanged(uint16_t aAction, uint16_t aReason, nsString aNumber,
uint16_t aTimeSeconds, uint16_t aServiceClass);
NotifyEmergencyCbModeChanged(bool aActive, uint32_t aTimeoutMs);
NotifyOtaStatusChanged(nsString aStatus);
NotifyRadioStateChanged(int32_t aRadioState);
NotifyClirModeChanged(uint32_t aMode);
NotifyLastNetworkChanged(nsString aNetwork);
NotifyLastHomeNetworkChanged(nsString aNetwork);
NotifyNetworkSelectionModeChanged(int32_t aMode);
parent:
/**
* Send when child no longer needs to use PMobileConnection.
*/
__delete__();
/**
* Sent when the child makes an asynchronous request to the parent.
*/
PMobileConnectionRequest(MobileConnectionRequest aRequest);
/**
* Sync call only be called once per child actor for initialization.
*/
sync Init()
returns (nsMobileConnectionInfo aVoice, nsMobileConnectionInfo aData,
nsString aLastKnownNetwork, nsString aLastKnownHomeNetwork,
int32_t aNetworkSelectionMode, int32_t aRadioState,
int32_t[] aSupportedNetworkTypes);
};
/**
* MobileConnectionRequest
*/
struct GetNetworksRequest
{
};
struct SelectNetworkRequest
{
nsMobileNetworkInfo network;
};
struct SelectNetworkAutoRequest
{
};
struct SetPreferredNetworkTypeRequest
{
int32_t type;
};
struct GetPreferredNetworkTypeRequest
{
};
struct SetRoamingPreferenceRequest
{
int32_t mode;
};
struct GetRoamingPreferenceRequest
{
};
struct SetVoicePrivacyModeRequest
{
bool enabled;
};
struct GetVoicePrivacyModeRequest
{
};
struct SetCallForwardingRequest
{
uint16_t action;
uint16_t reason;
nsString number;
uint16_t timeSeconds;
uint16_t serviceClass;
};
struct GetCallForwardingRequest
{
uint16_t reason;
};
struct SetCallBarringRequest
{
uint16_t program;
bool enabled;
nsString password;
uint16_t serviceClass;
};
struct GetCallBarringRequest
{
uint16_t program;
nsString password;
uint16_t serviceClass;
};
struct ChangeCallBarringPasswordRequest
{
nsString pin;
nsString newPin;
};
struct SetCallWaitingRequest
{
bool enabled;
uint16_t serviceClass;
};
struct GetCallWaitingRequest
{
};
struct SetCallingLineIdRestrictionRequest
{
uint16_t mode;
};
struct GetCallingLineIdRestrictionRequest
{
};
struct ExitEmergencyCbModeRequest
{
};
struct SetRadioEnabledRequest
{
bool enabled;
};
union MobileConnectionRequest
{
GetNetworksRequest;
SelectNetworkRequest;
SelectNetworkAutoRequest;
SetPreferredNetworkTypeRequest;
GetPreferredNetworkTypeRequest;
SetRoamingPreferenceRequest;
GetRoamingPreferenceRequest;
SetVoicePrivacyModeRequest;
GetVoicePrivacyModeRequest;
SetCallForwardingRequest;
GetCallForwardingRequest;
SetCallBarringRequest;
GetCallBarringRequest;
ChangeCallBarringPasswordRequest;
SetCallWaitingRequest;
GetCallWaitingRequest;
SetCallingLineIdRestrictionRequest;
GetCallingLineIdRestrictionRequest;
ExitEmergencyCbModeRequest;
SetRadioEnabledRequest;
};
} // namespace mobileconnection
} // namespace dom
} // namespace mozilla