Bug 840780 2/3 - DOM changes to IccManager to support Secure Access to the UICC. r=vicamo
authorSiddartha Pothapragada <Siddartha.Pothapragada@telekom.com>
Mon, 25 Feb 2013 17:27:23 +0800
changeset 133273 4b437ca4575b785578f485a82480d7957281d042
parent 133272 7e5295f718b3117853196adead2caa3e08ae1f73
child 133274 47298fca98be4cfa928a39500f1b5e0e3cbd4ee0
push id2452
push userlsblakk@mozilla.com
push dateMon, 13 May 2013 16:59:38 +0000
treeherdermozilla-beta@d4b152d29d8d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvicamo
bugs840780
milestone22.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 840780 2/3 - DOM changes to IccManager to support Secure Access to the UICC. r=vicamo
dom/icc/src/IccManager.cpp
--- a/dom/icc/src/IccManager.cpp
+++ b/dom/icc/src/IccManager.cpp
@@ -152,14 +152,57 @@ IccManager::SendStkEventDownload(const J
   if (!mProvider) {
     return NS_ERROR_FAILURE;
   }
 
   mProvider->SendStkEventDownload(GetOwner(), aEvent);
   return NS_OK;
 }
 
+NS_IMETHODIMP
+IccManager::IccOpenChannel(const nsAString& aAid, nsIDOMDOMRequest** aRequest)
+{
+  *aRequest = nullptr;
+
+  if (!mProvider) {
+    return NS_ERROR_FAILURE;
+  }
+
+  nsresult rv = mProvider->IccOpenChannel(GetOwner(), aAid, aRequest);
+  NS_ENSURE_SUCCESS(rv, rv);
+  return NS_OK;
+}
+
+NS_IMETHODIMP
+IccManager::IccExchangeAPDU(PRInt32 aChannel, const jsval& aApdu, nsIDOMDOMRequest** aRequest)
+{
+  *aRequest = nullptr;
+
+  if (!mProvider) {
+    return NS_ERROR_FAILURE;
+  }
+
+  nsresult rv = mProvider->IccExchangeAPDU(GetOwner(), aChannel, aApdu, aRequest);
+  NS_ENSURE_SUCCESS(rv, rv);
+  return NS_OK;
+}
+
+NS_IMETHODIMP
+IccManager::IccCloseChannel(PRInt32 aChannel, nsIDOMDOMRequest** aRequest)
+{
+  *aRequest = nullptr;
+
+  if (!mProvider) {
+    return NS_ERROR_FAILURE;
+  }
+
+  nsresult rv = mProvider->IccCloseChannel(GetOwner(), aChannel, aRequest);
+  NS_ENSURE_SUCCESS(rv, rv);
+  return NS_OK;
+}
+
+
 NS_IMPL_EVENT_HANDLER(IccManager, stkcommand)
 NS_IMPL_EVENT_HANDLER(IccManager, stksessionend)
 
 } // namespace icc
 } // namespace dom
 } // namespace mozilla