Line data Source code
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/. */
6 :
7 : #include "PresentationSessionRequest.h"
8 : #include "nsIPresentationControlChannel.h"
9 : #include "nsIPresentationDevice.h"
10 :
11 : namespace mozilla {
12 : namespace dom {
13 :
14 0 : NS_IMPL_ISUPPORTS(PresentationSessionRequest, nsIPresentationSessionRequest)
15 :
16 0 : PresentationSessionRequest::PresentationSessionRequest(nsIPresentationDevice* aDevice,
17 : const nsAString& aUrl,
18 : const nsAString& aPresentationId,
19 0 : nsIPresentationControlChannel* aControlChannel)
20 : : mUrl(aUrl)
21 : , mPresentationId(aPresentationId)
22 : , mDevice(aDevice)
23 0 : , mControlChannel(aControlChannel)
24 : {
25 0 : }
26 :
27 0 : PresentationSessionRequest::~PresentationSessionRequest()
28 : {
29 0 : }
30 :
31 : // nsIPresentationSessionRequest
32 :
33 : NS_IMETHODIMP
34 0 : PresentationSessionRequest::GetDevice(nsIPresentationDevice** aRetVal)
35 : {
36 0 : NS_ENSURE_ARG_POINTER(aRetVal);
37 :
38 0 : nsCOMPtr<nsIPresentationDevice> device = mDevice;
39 0 : device.forget(aRetVal);
40 :
41 0 : return NS_OK;
42 : }
43 :
44 : NS_IMETHODIMP
45 0 : PresentationSessionRequest::GetUrl(nsAString& aRetVal)
46 : {
47 0 : aRetVal = mUrl;
48 :
49 0 : return NS_OK;
50 : }
51 :
52 : NS_IMETHODIMP
53 0 : PresentationSessionRequest::GetPresentationId(nsAString& aRetVal)
54 : {
55 0 : aRetVal = mPresentationId;
56 :
57 0 : return NS_OK;
58 : }
59 :
60 : NS_IMETHODIMP
61 0 : PresentationSessionRequest::GetControlChannel(nsIPresentationControlChannel** aRetVal)
62 : {
63 0 : NS_ENSURE_ARG_POINTER(aRetVal);
64 :
65 0 : nsCOMPtr<nsIPresentationControlChannel> controlChannel = mControlChannel;
66 0 : controlChannel.forget(aRetVal);
67 :
68 0 : return NS_OK;
69 : }
70 :
71 : } // namespace dom
72 : } // namespace mozilla
|