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"
19 class IccManager MOZ_FINAL
: public DOMEventTargetHelper
22 NS_DECL_ISUPPORTS_INHERITED
24 NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper
)
26 NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(IccManager
, DOMEventTargetHelper
)
28 IccManager(nsPIDOMWindow
* aWindow
);
34 NotifyIccAdd(const nsAString
& aIccId
);
37 NotifyIccRemove(const nsAString
& aIccId
);
39 IMPL_EVENT_HANDLER(iccdetected
)
40 IMPL_EVENT_HANDLER(iccundetected
)
43 GetIccIds(nsTArray
<nsString
>& aIccIds
);
46 GetIccById(const nsAString
& aIccId
) const;
49 GetParentObject() const { return GetOwner(); }
52 WrapObject(JSContext
* aCx
) MOZ_OVERRIDE
;
58 nsTArray
<nsRefPtr
<IccListener
>> mIccListeners
;
62 } // namespace mozilla
64 #endif // mozilla_dom_IccManager_h