netwerk/protocol/rtsp/controller/RtspController.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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 RtspController_h
     8 #define RtspController_h
    10 #include "nsIStreamingProtocolController.h"
    11 #include "nsIChannel.h"
    12 #include "nsCOMPtr.h"
    13 #include "nsString.h"
    14 #include "RTSPSource.h"
    16 namespace mozilla {
    17 namespace net {
    19 class RtspController : public nsIStreamingProtocolController
    20                      , public nsIStreamingProtocolListener
    21 {
    22 public:
    23   NS_DECL_THREADSAFE_ISUPPORTS
    24   NS_DECL_NSISTREAMINGPROTOCOLCONTROLLER
    25   NS_DECL_NSISTREAMINGPROTOCOLLISTENER
    27   RtspController(nsIChannel *channel);
    28   ~RtspController();
    30 private:
    31   enum State {
    32     INIT,
    33     CONNECTED,
    34     DISCONNECTED
    35   };
    37   // RTSP URL refer to a stream or an aggregate of streams.
    38   nsCOMPtr<nsIURI> mURI;
    39   // The nsIStreamingProtocolListener implementation.
    40   nsCOMPtr<nsIStreamingProtocolListener> mListener;
    41   // ASCII encoded URL spec.
    42   nsCString mSpec;
    43   // Indicate the connection state between the
    44   // media streaming server and the Rtsp client.
    45   State mState;
    46   // Rtsp Streaming source.
    47   android::sp<android::RTSPSource> mRtspSource;
    48 };
    50 }
    51 } // namespace mozilla::net
    52 #endif

mercurial