diff options
author | Ben Murdoch <benm@google.com> | 2010-09-13 14:14:40 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2010-09-13 14:15:50 +0100 |
commit | f74420b3285b9fe04a7e00aa3b8c0ab07ea344bc (patch) | |
tree | 38a5a185aef5b39d4880bf65ecbd132e7a3514e9 /third_party/libjingle/source/talk/p2p/base/transportchannelimpl.h | |
parent | d90229595b741bfdb2f8cd50a7eeba55330abf78 (diff) | |
download | external_chromium-f74420b3285b9fe04a7e00aa3b8c0ab07ea344bc.zip external_chromium-f74420b3285b9fe04a7e00aa3b8c0ab07ea344bc.tar.gz external_chromium-f74420b3285b9fe04a7e00aa3b8c0ab07ea344bc.tar.bz2 |
Add libjingle to third_party
AutoFill requires this for it's XML parsing.
Added from chromium src@52593
Change-Id: Ie0b1f600ed3a470f5d7eb4f939eba2f1d71e6fbe
Diffstat (limited to 'third_party/libjingle/source/talk/p2p/base/transportchannelimpl.h')
-rw-r--r-- | third_party/libjingle/source/talk/p2p/base/transportchannelimpl.h | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/third_party/libjingle/source/talk/p2p/base/transportchannelimpl.h b/third_party/libjingle/source/talk/p2p/base/transportchannelimpl.h new file mode 100644 index 0000000..a84b4bf --- /dev/null +++ b/third_party/libjingle/source/talk/p2p/base/transportchannelimpl.h @@ -0,0 +1,81 @@ +/* + * libjingle + * Copyright 2004--2005, Google Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef TALK_P2P_BASE_TRANSPORTCHANNELIMPL_H_ +#define TALK_P2P_BASE_TRANSPORTCHANNELIMPL_H_ + +#include <string> +#include "talk/p2p/base/transportchannel.h" + +namespace buzz { class XmlElement; } + +namespace cricket { + +class Transport; +class Candidate; + +// Base class for real implementations of TransportChannel. This includes some +// methods called only by Transport, which do not need to be exposed to the +// client. +class TransportChannelImpl : public TransportChannel { + public: + TransportChannelImpl(const std::string& name, const std::string& session_type) + : TransportChannel(name, session_type) {} + + // Returns the transport that created this channel. + virtual Transport* GetTransport() = 0; + + // Begins the process of attempting to make a connection to the other client. + virtual void Connect() = 0; + + // Resets this channel back to the initial state (i.e., not connecting). + virtual void Reset() = 0; + + // Allows an individual channel to request signaling and be notified when it + // is ready. This is useful if the individual named channels have need to + // send their own transport-info stanzas. + sigslot::signal0<> SignalRequestSignaling; + virtual void OnSignalingReady() = 0; + + // Handles sending and receiving of candidates. The Transport + // receives the candidates and may forward them to the relevant + // channel. + // + // Note: Since candidates are delivered asynchronously to the + // channel, they cannot return an error if the message is invalid. + // It is assumed that the Transport will have checked validity + // before forwarding. + sigslot::signal2<TransportChannelImpl*, + const Candidate&> SignalCandidateReady; + virtual void OnCandidate(const Candidate& candidate) = 0; + private: + DISALLOW_EVIL_CONSTRUCTORS(TransportChannelImpl); +}; + +} // namespace cricket + +#endif // TALK_P2P_BASE_TRANSPORTCHANNELIMPL_H_ |