Bug 963516 - Part 2: DOM changes to support matchMvno(). r=smaug, a=1.3+
authorJessica Jong <jjong@mozilla.com>
Tue, 28 Jan 2014 18:58:00 +0800
changeset 175150 cb146459de2d4f6a81e41779ff7adeb2d5285eaa
parent 175149 13901a449162569f704c643bb67692688b12da99
child 175151 ab15648de793f15237ba126760d33a9d604c6e5b
push id3224
push userlsblakk@mozilla.com
push dateTue, 04 Feb 2014 01:06:49 +0000
treeherdermozilla-beta@60c04d0987f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug, 1
bugs963516
milestone28.0a2
Bug 963516 - Part 2: DOM changes to support matchMvno(). r=smaug, a=1.3+
dom/icc/src/Icc.cpp
dom/icc/src/Icc.h
--- a/dom/icc/src/Icc.cpp
+++ b/dom/icc/src/Icc.cpp
@@ -351,8 +351,30 @@ Icc::IccCloseChannel(int32_t aChannel, E
                                            getter_AddRefs(request));
   if (NS_FAILED(rv)) {
     aRv.Throw(rv);
     return nullptr;
   }
 
   return request.forget();
 }
+
+already_AddRefed<nsISupports>
+Icc::MatchMvno(const nsAString& aMvnoType,
+               const nsAString& aMvnoData,
+               ErrorResult& aRv)
+{
+  if (!mProvider) {
+    aRv.Throw(NS_ERROR_FAILURE);
+    return nullptr;
+  }
+
+  nsRefPtr<nsIDOMDOMRequest> request;
+  nsresult rv = mProvider->MatchMvno(mClientId, GetOwner(),
+                                     aMvnoType, aMvnoData,
+                                     getter_AddRefs(request));
+  if (NS_FAILED(rv)) {
+    aRv.Throw(rv);
+    return nullptr;
+  }
+
+  return request.forget();
+}
--- a/dom/icc/src/Icc.h
+++ b/dom/icc/src/Icc.h
@@ -92,16 +92,20 @@ public:
 
   already_AddRefed<nsISupports>
   IccExchangeAPDU(const JSContext* aCx, int32_t aChannel, const jsval& aApdu,
                   ErrorResult& aRv);
 
   already_AddRefed<nsISupports>
   IccCloseChannel(int32_t aChannel, ErrorResult& aRv);
 
+  already_AddRefed<nsISupports>
+  MatchMvno(const nsAString& aMvnoType, const nsAString& aMatchData,
+            ErrorResult& aRv);
+
   IMPL_EVENT_HANDLER(iccinfochange)
   IMPL_EVENT_HANDLER(cardstatechange)
   IMPL_EVENT_HANDLER(stkcommand)
   IMPL_EVENT_HANDLER(stksessionend)
 
 private:
   bool mLive;
   uint32_t mClientId;