1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/netwerk/protocol/rtsp/controller/RtspControllerParent.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,58 @@ 1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* vim: set sw=2 ts=8 et tw=80 : */ 1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +#ifndef RtspControllerParent_h 1.11 +#define RtspControllerParent_h 1.12 + 1.13 +#include "mozilla/net/PRtspControllerParent.h" 1.14 +#include "mozilla/net/NeckoParent.h" 1.15 +#include "nsIStreamingProtocolController.h" 1.16 +#include "nsIInterfaceRequestor.h" 1.17 +#include "nsILoadContext.h" 1.18 +#include "nsIURI.h" 1.19 +#include "nsCOMPtr.h" 1.20 +#include "nsString.h" 1.21 + 1.22 +class nsIAuthPromptProvider; 1.23 + 1.24 +namespace mozilla { 1.25 +namespace net { 1.26 + 1.27 +class RtspControllerParent : public PRtspControllerParent 1.28 + , public nsIInterfaceRequestor 1.29 + , public nsIStreamingProtocolListener 1.30 +{ 1.31 + public: 1.32 + NS_DECL_THREADSAFE_ISUPPORTS 1.33 + NS_DECL_NSIINTERFACEREQUESTOR 1.34 + NS_DECL_NSISTREAMINGPROTOCOLLISTENER 1.35 + 1.36 + RtspControllerParent(); 1.37 + ~RtspControllerParent(); 1.38 + 1.39 + bool RecvAsyncOpen(const URIParams& aURI); 1.40 + bool RecvPlay(); 1.41 + bool RecvPause(); 1.42 + bool RecvResume(); 1.43 + bool RecvSuspend(); 1.44 + bool RecvSeek(const uint64_t& offset); 1.45 + bool RecvStop(); 1.46 + 1.47 + private: 1.48 + bool mIPCOpen; 1.49 + void ActorDestroy(ActorDestroyReason why); 1.50 + // RTSP URL refer to a stream or an aggregate of streams. 1.51 + nsCOMPtr<nsIURI> mURI; 1.52 + // The nsIStreamingProtocolController implementation. 1.53 + nsCOMPtr<nsIStreamingProtocolController> mController; 1.54 + uint32_t mTotalTracks; 1.55 + // Ensure we are destroyed on the main thread. 1.56 + void Destroy(); 1.57 +}; 1.58 + 1.59 +} // namespace net 1.60 +} // namespace mozilla 1.61 +#endif // RtspControllerParent_h