Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set sw=2 ts=8 et 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 RtspControllerParent_h
8 #define RtspControllerParent_h
10 #include "mozilla/net/PRtspControllerParent.h"
11 #include "mozilla/net/NeckoParent.h"
12 #include "nsIStreamingProtocolController.h"
13 #include "nsIInterfaceRequestor.h"
14 #include "nsILoadContext.h"
15 #include "nsIURI.h"
16 #include "nsCOMPtr.h"
17 #include "nsString.h"
19 class nsIAuthPromptProvider;
21 namespace mozilla {
22 namespace net {
24 class RtspControllerParent : public PRtspControllerParent
25 , public nsIInterfaceRequestor
26 , public nsIStreamingProtocolListener
27 {
28 public:
29 NS_DECL_THREADSAFE_ISUPPORTS
30 NS_DECL_NSIINTERFACEREQUESTOR
31 NS_DECL_NSISTREAMINGPROTOCOLLISTENER
33 RtspControllerParent();
34 ~RtspControllerParent();
36 bool RecvAsyncOpen(const URIParams& aURI);
37 bool RecvPlay();
38 bool RecvPause();
39 bool RecvResume();
40 bool RecvSuspend();
41 bool RecvSeek(const uint64_t& offset);
42 bool RecvStop();
44 private:
45 bool mIPCOpen;
46 void ActorDestroy(ActorDestroyReason why);
47 // RTSP URL refer to a stream or an aggregate of streams.
48 nsCOMPtr<nsIURI> mURI;
49 // The nsIStreamingProtocolController implementation.
50 nsCOMPtr<nsIStreamingProtocolController> mController;
51 uint32_t mTotalTracks;
52 // Ensure we are destroyed on the main thread.
53 void Destroy();
54 };
56 } // namespace net
57 } // namespace mozilla
58 #endif // RtspControllerParent_h