Bumping manifests a=b2g-bump
[gecko.git] / dom / tv / TVProgram.h
blob58978d947ba753f29b1988d86b6dc2689937898f
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;
14 namespace mozilla {
15 namespace dom {
17 class TVChannel;
19 class TVProgram MOZ_FINAL : public nsISupports
20 , public nsWrapperCache
22 public:
23 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
24 NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(TVProgram)
26 TVProgram(nsISupports* aOwner,
27 TVChannel* aChannel,
28 nsITVProgramData* aData);
30 // WebIDL (internal functions)
32 nsISupports* GetParentObject() const
34 return mOwner;
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;
59 private:
60 ~TVProgram();
62 void SetLanguages(uint32_t aCount,
63 char** aLanguages,
64 nsTArray<nsString>& aLanguageList);
66 nsCOMPtr<nsISupports> mOwner;
67 nsRefPtr<TVChannel> mChannel;
68 nsString mEventId;
69 nsString mTitle;
70 uint64_t mStartTime;
71 uint64_t mDuration;
72 nsString mDescription;
73 nsString mRating;
74 nsTArray<nsString> mAudioLanguages;
75 nsTArray<nsString> mSubtitleLanguages;
78 } // namespace dom
79 } // namespace mozilla
81 #endif // mozilla_dom_TVProgram_h__