From 90976cb1fe7f5c15e319d8c04813492e2e629437 Mon Sep 17 00:00:00 2001 From: Jose Antonio Olivera Ortega Date: Wed, 17 Jul 2013 23:18:24 +0200 Subject: [PATCH] Bug 888904 - Part 2: MobileConnection.cpp additions for supporting CLIR. r=smaug --- dom/network/src/MobileConnection.cpp | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/dom/network/src/MobileConnection.cpp b/dom/network/src/MobileConnection.cpp index cecd10614593..bf7eb8b51ae8 100644 --- a/dom/network/src/MobileConnection.cpp +++ b/dom/network/src/MobileConnection.cpp @@ -382,6 +382,39 @@ MobileConnection::SetCallWaitingOption(bool aEnabled, return mProvider->SetCallWaitingOption(GetOwner(), aEnabled, aRequest); } +NS_IMETHODIMP +MobileConnection::GetCallingLineIdRestriction(nsIDOMDOMRequest** aRequest) +{ + *aRequest = nullptr; + + if (!CheckPermission("mobileconnection")) { + return NS_OK; + } + + if (!mProvider) { + return NS_ERROR_FAILURE; + } + + return mProvider->GetCallingLineIdRestriction(GetOwner(), aRequest); +} + +NS_IMETHODIMP +MobileConnection::SetCallingLineIdRestriction(unsigned short aClirMode, + nsIDOMDOMRequest** aRequest) +{ + *aRequest = nullptr; + + if (!CheckPermission("mobileconnection")) { + return NS_OK; + } + + if (!mProvider) { + return NS_ERROR_FAILURE; + } + + return mProvider->SetCallingLineIdRestriction(GetOwner(), aClirMode, aRequest); +} + // nsIMobileConnectionListener NS_IMETHODIMP