Bumping manifests a=b2g-bump
[gecko.git] / dom / icc / IccManager.h
blob7f43b62a1f44c6604d5bb90a1b16fafe850305c8
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef mozilla_dom_IccManager_h
6 #define mozilla_dom_IccManager_h
8 #include "mozilla/DOMEventTargetHelper.h"
9 #include "nsCycleCollectionParticipant.h"
10 #include "nsIIccProvider.h"
11 #include "nsTArrayHelpers.h"
13 namespace mozilla {
14 namespace dom {
16 class Icc;
17 class IccListener;
19 class IccManager MOZ_FINAL : public DOMEventTargetHelper
21 public:
22 NS_DECL_ISUPPORTS_INHERITED
24 NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper)
26 NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(IccManager, DOMEventTargetHelper)
28 IccManager(nsPIDOMWindow* aWindow);
30 void
31 Shutdown();
33 nsresult
34 NotifyIccAdd(const nsAString& aIccId);
36 nsresult
37 NotifyIccRemove(const nsAString& aIccId);
39 IMPL_EVENT_HANDLER(iccdetected)
40 IMPL_EVENT_HANDLER(iccundetected)
42 void
43 GetIccIds(nsTArray<nsString>& aIccIds);
45 Icc*
46 GetIccById(const nsAString& aIccId) const;
48 nsPIDOMWindow*
49 GetParentObject() const { return GetOwner(); }
51 virtual JSObject*
52 WrapObject(JSContext* aCx) MOZ_OVERRIDE;
54 private:
55 ~IccManager();
57 private:
58 nsTArray<nsRefPtr<IccListener>> mIccListeners;
61 } // namespace dom
62 } // namespace mozilla
64 #endif // mozilla_dom_IccManager_h