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

Unified Diff: remoting/protocol/jingle_messages.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/fake_session.cc ('k') | remoting/protocol/jingle_messages.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/jingle_messages.h
diff --git a/remoting/protocol/jingle_messages.h b/remoting/protocol/jingle_messages.h
index f997de8ad6e542bc84de2878943f0c3e952979d9..eb1ec5c58a7da94ecd05a6c25cf6d87fc6442032 100644
--- a/remoting/protocol/jingle_messages.h
+++ b/remoting/protocol/jingle_messages.h
@@ -33,6 +33,15 @@ struct JingleMessage {
TRANSPORT_INFO,
};
+ enum Reason {
+ // Currently only termination reasons that can be sent by the host
+ // are understood. All others are converted to UNKNOWN_REASON.
+ UNKNOWN_REASON,
+ SUCCESS,
+ DECLINE,
+ INCOMPATIBLE_PARAMETERS,
+ };
+
JingleMessage();
JingleMessage(const std::string& to_value,
ActionType action_value,
@@ -56,7 +65,10 @@ struct JingleMessage {
scoped_ptr<ContentDescription> description;
std::list<cricket::Candidate> candidates;
- buzz::QName termination_reason;
+ // Value from the <reason> tag if it is present in the
+ // message. Useful mainly for session-terminate messages, but Jingle
+ // spec allows it in any message.
+ Reason reason;
};
struct JingleMessageReply {
« no previous file with comments | « remoting/protocol/fake_session.cc ('k') | remoting/protocol/jingle_messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698