Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(544)

Unified Diff: remoting/protocol/session.h

Issue 8046018: Parse termination reason and propagate the error to the Session interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/protocol/protocol_mock_objects.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/session.h
diff --git a/remoting/protocol/session.h b/remoting/protocol/session.h
index 920a681d685b5647776681d07baf19b51b610397..0697b16ebb632cbaafcbbc391bb668b0e10acc44 100644
--- a/remoting/protocol/session.h
+++ b/remoting/protocol/session.h
@@ -49,6 +49,14 @@ class Session : public base::NonThreadSafe {
FAILED,
};
+ enum Error {
+ OK = 0,
+ PEER_IS_OFFLINE,
+ SESSION_REJECTED,
+ INCOMPATIBLE_PROTOCOL,
+ CHANNEL_CONNECTION_ERROR,
+ };
+
typedef Callback1<State>::Type StateChangeCallback;
typedef base::Callback<void(net::StreamSocket*)> StreamChannelCallback;
typedef base::Callback<void(net::Socket*)> DatagramChannelCallback;
@@ -60,6 +68,9 @@ class Session : public base::NonThreadSafe {
// Must be called on the jingle thread only.
virtual void SetStateChangeCallback(StateChangeCallback* callback) = 0;
+ // Returns error code for a failed session.
+ virtual Error error() = 0;
+
// Creates new channels for this connection. The specified callback
// is called when then new channel is created and connected. The
// callback is called with NULL if connection failed for any reason.
« no previous file with comments | « remoting/protocol/protocol_mock_objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698