| Index: remoting/protocol/session.h
|
| diff --git a/remoting/protocol/session.h b/remoting/protocol/session.h
|
| index 7003a1384b93e8aed5470c52393b5603d0b2d418..bef4a84a9a986cc9de77310f3d8eaa83fb5b73c1 100644
|
| --- a/remoting/protocol/session.h
|
| +++ b/remoting/protocol/session.h
|
| @@ -13,6 +13,7 @@
|
| #include "remoting/protocol/session_config.h"
|
|
|
| namespace net {
|
| +class IPEndPoint;
|
| class Socket;
|
| class StreamSocket;
|
| } // namespace net
|
| @@ -68,6 +69,12 @@ class Session : public base::NonThreadSafe {
|
| // handler unless |state| is CLOSED or FAILED.
|
| typedef base::Callback<void(State state)> StateChangeCallback;
|
|
|
| + // TODO(lambroslambrou): Merge this together with StateChangeCallback into a
|
| + // single interface.
|
| + typedef base::Callback<void(
|
| + const std::string& channel_name,
|
| + const net::IPEndPoint& end_point)> RouteChangeCallback;
|
| +
|
| // TODO(sergeyu): Specify connection error code when channel
|
| // connection fails.
|
| typedef base::Callback<void(net::StreamSocket*)> StreamChannelCallback;
|
| @@ -77,9 +84,13 @@ class Session : public base::NonThreadSafe {
|
| virtual ~Session() { }
|
|
|
| // Set callback that is called when state of the connection is changed.
|
| - // Must be called on the jingle thread only.
|
| virtual void SetStateChangeCallback(const StateChangeCallback& callback) = 0;
|
|
|
| + // Set callback that is called when the route for a channel is changed.
|
| + // The callback must be registered immediately after
|
| + // JingleSessionManager::Connect() or from OnIncomingSession() callback.
|
| + virtual void SetRouteChangeCallback(const RouteChangeCallback& callback) = 0;
|
| +
|
| // Returns error code for a failed session.
|
| virtual Error error() = 0;
|
|
|
|
|