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_TVProgram_h
8 #define mozilla_dom_TVProgram_h
10 #include "nsWrapperCache.h"
12 class nsITVProgramData
;
19 class TVProgram MOZ_FINAL
: public nsISupports
20 , public nsWrapperCache
23 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
24 NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(TVProgram
)
26 TVProgram(nsISupports
* aOwner
,
28 nsITVProgramData
* aData
);
30 // WebIDL (internal functions)
32 nsISupports
* GetParentObject() const
37 virtual JSObject
* WrapObject(JSContext
*aCx
) MOZ_OVERRIDE
;
39 // WebIDL (public APIs)
41 void GetAudioLanguages(nsTArray
<nsString
>& aLanguages
) const;
43 void GetSubtitleLanguages(nsTArray
<nsString
>& aLanguages
) const;
45 void GetEventId(nsAString
& aEventId
) const;
47 already_AddRefed
<TVChannel
> Channel() const;
49 void GetTitle(nsAString
& aTitle
) const;
51 uint64_t StartTime() const;
53 uint64_t Duration() const;
55 void GetDescription(nsAString
& aDescription
) const;
57 void GetRating(nsAString
& aRating
) const;
62 void SetLanguages(uint32_t aCount
,
64 nsTArray
<nsString
>& aLanguageList
);
66 nsCOMPtr
<nsISupports
> mOwner
;
67 nsRefPtr
<TVChannel
> mChannel
;
72 nsString mDescription
;
74 nsTArray
<nsString
> mAudioLanguages
;
75 nsTArray
<nsString
> mSubtitleLanguages
;
79 } // namespace mozilla
81 #endif // mozilla_dom_TVProgram_h__