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

Unified Diff: remoting/protocol/jingle_messages.h

Issue 2026123002: [Chromoting] Use google:remoting namespace to export remoting specific error codes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | remoting/protocol/jingle_messages.cc » ('j') | remoting/protocol/jingle_messages.cc » ('J')
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 5dfe5124fbb8f2cec49262ecc53ceb185c676771..1b614ac03a3060cd67d1991cb88aa5f833bc4810 100644
--- a/remoting/protocol/jingle_messages.h
+++ b/remoting/protocol/jingle_messages.h
@@ -67,7 +67,15 @@ struct JingleMessage {
GENERAL_ERROR,
FAILED_APPLICATION,
INCOMPATIBLE_PARAMETERS,
- SECURITY_ERROR,
+ };
+
+ // Remoting specific error codes to fill the gap between Jingle errors and CRD
+ // errors.
+ enum struct ErrorCode {
Sergey Ulanov 2016/06/01 08:52:47 I don't think we want to add another enum to repre
Hzj_jie 2016/06/01 23:56:13 Done.
+ UNKNOWN,
+ SESSION_REJECTED,
+ AUTHENTICATION_FAILED,
+ INVALID_ACCOUNT,
};
@@ -105,6 +113,11 @@ struct JingleMessage {
// message. Useful mainly for session-terminate messages, but Jingle
// spec allows it in any message.
Reason reason = UNKNOWN_REASON;
+
+ // Value from the <google:remoting:error-code> tag if it is present in the
+ // message. Useful mainly for session-terminate messages. If it's UNKNOWN,
+ // or reason is UNKNOWN_REASON, this field will be ignored in the xml output.
+ ErrorCode error_code = ErrorCode::UNKNOWN;
};
struct JingleMessageReply {
« no previous file with comments | « no previous file | remoting/protocol/jingle_messages.cc » ('j') | remoting/protocol/jingle_messages.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698