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

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
Index: remoting/protocol/jingle_messages.h
diff --git a/remoting/protocol/jingle_messages.h b/remoting/protocol/jingle_messages.h
index 0d20cd34ef3bea13ede98adc2bf2a0df88c5dd35..ad6267d41a884f814f72eb45dc44b1f8b0a89a2e 100644
--- a/remoting/protocol/jingle_messages.h
+++ b/remoting/protocol/jingle_messages.h
@@ -29,11 +29,19 @@ struct JingleMessage {
UNKNOWN_ACTION,
SESSION_INITIATE,
SESSION_ACCEPT,
- SESSION_REJECT,
SESSION_TERMINATE,
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,
+ DECLINED,
+ INCOMPATIBLE_PARAMETERS,
+ };
+
JingleMessage();
JingleMessage(const std::string& to_value,
ActionType action_value,
@@ -57,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 {

Powered by Google App Engine
This is Rietveld 408576698