Bumping manifests a=b2g-bump
[gecko.git] / dom / icc / IccListener.h
blobc152678d3dbce21b334db58205b4fa9fabab749c
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_IccListener_h
6 #define mozilla_dom_IccListener_h
8 #include "nsAutoPtr.h"
9 #include "nsIIccProvider.h"
11 namespace mozilla {
12 namespace dom {
14 class IccManager;
15 class Icc;
17 class IccListener MOZ_FINAL : public nsIIccListener
19 public:
20 NS_DECL_ISUPPORTS
21 NS_DECL_NSIICCLISTENER
23 IccListener(IccManager* aIccManager, uint32_t aClientId);
25 void
26 Shutdown();
28 Icc*
29 GetIcc()
31 return mIcc;
34 private:
35 ~IccListener();
37 private:
38 uint32_t mClientId;
39 // We did not setup 'mIcc' and 'mIccManager' being a participant of cycle
40 // collection is because in Navigator->Invalidate() it will call
41 // mIccManager->Shutdown(), then IccManager will call Shutdown() of each
42 // IccListener, this will release the reference and break the cycle.
43 nsRefPtr<Icc> mIcc;
44 nsRefPtr<IccManager> mIccManager;
45 // mProvider is a xpcom service and will be released at shutdown, so it
46 // doesn't need to be cycle collected.
47 nsCOMPtr<nsIIccProvider> mProvider;
50 } // namespace dom
51 } // namespace mozilla
53 #endif // mozilla_dom_IccListener_h