michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* vim: set sw=2 ts=8 et tw=80 : */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef RtspController_h michael@0: #define RtspController_h michael@0: michael@0: #include "nsIStreamingProtocolController.h" michael@0: #include "nsIChannel.h" michael@0: #include "nsCOMPtr.h" michael@0: #include "nsString.h" michael@0: #include "RTSPSource.h" michael@0: michael@0: namespace mozilla { michael@0: namespace net { michael@0: michael@0: class RtspController : public nsIStreamingProtocolController michael@0: , public nsIStreamingProtocolListener michael@0: { michael@0: public: michael@0: NS_DECL_THREADSAFE_ISUPPORTS michael@0: NS_DECL_NSISTREAMINGPROTOCOLCONTROLLER michael@0: NS_DECL_NSISTREAMINGPROTOCOLLISTENER michael@0: michael@0: RtspController(nsIChannel *channel); michael@0: ~RtspController(); michael@0: michael@0: private: michael@0: enum State { michael@0: INIT, michael@0: CONNECTED, michael@0: DISCONNECTED michael@0: }; michael@0: michael@0: // RTSP URL refer to a stream or an aggregate of streams. michael@0: nsCOMPtr mURI; michael@0: // The nsIStreamingProtocolListener implementation. michael@0: nsCOMPtr mListener; michael@0: // ASCII encoded URL spec. michael@0: nsCString mSpec; michael@0: // Indicate the connection state between the michael@0: // media streaming server and the Rtsp client. michael@0: State mState; michael@0: // Rtsp Streaming source. michael@0: android::sp mRtspSource; michael@0: }; michael@0: michael@0: } michael@0: } // namespace mozilla::net michael@0: #endif