2014-08-22 07:44:39 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_dom_TVListeners_h
|
|
|
|
#define mozilla_dom_TVListeners_h
|
|
|
|
|
2014-10-22 19:15:24 +04:00
|
|
|
#include "mozilla/dom/TVSource.h"
|
|
|
|
#include "nsCycleCollectionParticipant.h"
|
2014-08-22 07:44:39 +04:00
|
|
|
#include "nsITVService.h"
|
2014-10-22 19:15:24 +04:00
|
|
|
#include "nsTArray.h"
|
2014-08-22 07:44:39 +04:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class TVSourceListener final : public nsITVSourceListener
|
2014-08-22 07:44:39 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-10-22 19:15:24 +04:00
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
|
|
NS_DECL_CYCLE_COLLECTION_CLASS(TVSourceListener)
|
2014-08-22 07:44:39 +04:00
|
|
|
NS_DECL_NSITVSOURCELISTENER
|
|
|
|
|
|
|
|
void RegisterSource(TVSource* aSource);
|
|
|
|
|
|
|
|
void UnregisterSource(TVSource* aSource);
|
|
|
|
|
|
|
|
private:
|
|
|
|
~TVSourceListener() {}
|
|
|
|
|
|
|
|
already_AddRefed<TVSource> GetSource(const nsAString& aTunerId,
|
|
|
|
const nsAString& aSourceType);
|
|
|
|
|
2014-10-22 19:15:24 +04:00
|
|
|
nsTArray<nsRefPtr<TVSource>> mSources;
|
2014-08-22 07:44:39 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_dom_TVListeners_h
|