1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_TVListeners_h
8 #define mozilla_dom_TVListeners_h
10 #include "mozilla/dom/TVSource.h"
11 #include "nsCycleCollectionParticipant.h"
12 #include "nsITVService.h"
18 class TVSourceListener MOZ_FINAL
: public nsITVSourceListener
21 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
22 NS_DECL_CYCLE_COLLECTION_CLASS(TVSourceListener
)
23 NS_DECL_NSITVSOURCELISTENER
25 void RegisterSource(TVSource
* aSource
);
27 void UnregisterSource(TVSource
* aSource
);
30 ~TVSourceListener() {}
32 already_AddRefed
<TVSource
> GetSource(const nsAString
& aTunerId
,
33 const nsAString
& aSourceType
);
35 nsTArray
<nsRefPtr
<TVSource
>> mSources
;
39 } // namespace mozilla
41 #endif // mozilla_dom_TVListeners_h