michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozilla_dom_IccManager_h michael@0: #define mozilla_dom_IccManager_h michael@0: michael@0: #include "mozilla/DOMEventTargetHelper.h" michael@0: #include "nsCycleCollectionParticipant.h" michael@0: #include "nsIIccProvider.h" michael@0: #include "nsTArrayHelpers.h" michael@0: michael@0: namespace mozilla { michael@0: namespace dom { michael@0: michael@0: class IccListener; michael@0: michael@0: class IccManager MOZ_FINAL : public DOMEventTargetHelper michael@0: { michael@0: public: michael@0: NS_DECL_ISUPPORTS_INHERITED michael@0: michael@0: NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper) michael@0: michael@0: NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(IccManager, DOMEventTargetHelper) michael@0: michael@0: IccManager(nsPIDOMWindow* aWindow); michael@0: ~IccManager(); michael@0: michael@0: void michael@0: Shutdown(); michael@0: michael@0: nsresult michael@0: NotifyIccAdd(const nsAString& aIccId); michael@0: michael@0: nsresult michael@0: NotifyIccRemove(const nsAString& aIccId); michael@0: michael@0: IMPL_EVENT_HANDLER(iccdetected) michael@0: IMPL_EVENT_HANDLER(iccundetected) michael@0: michael@0: void michael@0: GetIccIds(nsTArray& aIccIds); michael@0: michael@0: already_AddRefed michael@0: GetIccById(const nsAString& aIccId) const; michael@0: michael@0: nsPIDOMWindow* michael@0: GetParentObject() const { return GetOwner(); } michael@0: michael@0: virtual JSObject* michael@0: WrapObject(JSContext* aCx) MOZ_OVERRIDE; michael@0: michael@0: private: michael@0: nsTArray> mIccListeners; michael@0: }; michael@0: michael@0: } // namespace dom michael@0: } // namespace mozilla michael@0: michael@0: #endif // mozilla_dom_IccManager_h