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

Side by Side 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: Resolve review comments Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « remoting/protocol/errors.cc ('k') | remoting/protocol/jingle_messages.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_PROTOCOL_JINGLE_MESSAGES_H_ 5 #ifndef REMOTING_PROTOCOL_JINGLE_MESSAGES_H_
6 #define REMOTING_PROTOCOL_JINGLE_MESSAGES_H_ 6 #define REMOTING_PROTOCOL_JINGLE_MESSAGES_H_
7 7
8 #include <list> 8 #include <list>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
11 11
12 #include "remoting/protocol/errors.h"
12 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" 13 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h"
13 #include "third_party/webrtc/p2p/base/candidate.h" 14 #include "third_party/webrtc/p2p/base/candidate.h"
14 15
15 namespace remoting { 16 namespace remoting {
16 namespace protocol { 17 namespace protocol {
17 18
18 class ContentDescription; 19 class ContentDescription;
19 20
20 // Represents an address of a Chromoting endpoint and its routing channel. 21 // Represents an address of a Chromoting endpoint and its routing channel.
21 // TODO(kelvinp): Move the struct to remoting/signaling. Potentially we could 22 // TODO(kelvinp): Move the struct to remoting/signaling. Potentially we could
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 61
61 enum Reason { 62 enum Reason {
62 UNKNOWN_REASON, 63 UNKNOWN_REASON,
63 SUCCESS, 64 SUCCESS,
64 DECLINE, 65 DECLINE,
65 CANCEL, 66 CANCEL,
66 EXPIRED, 67 EXPIRED,
67 GENERAL_ERROR, 68 GENERAL_ERROR,
68 FAILED_APPLICATION, 69 FAILED_APPLICATION,
69 INCOMPATIBLE_PARAMETERS, 70 INCOMPATIBLE_PARAMETERS,
70 SECURITY_ERROR,
71 }; 71 };
72 72
73 73
74 JingleMessage(); 74 JingleMessage();
75 JingleMessage(const SignalingAddress& to, 75 JingleMessage(const SignalingAddress& to,
76 ActionType action_value, 76 ActionType action_value,
77 const std::string& sid_value); 77 const std::string& sid_value);
78 ~JingleMessage(); 78 ~JingleMessage();
79 79
80 // Caller keeps ownership of |stanza|. 80 // Caller keeps ownership of |stanza|.
(...skipping 17 matching lines...) Expand all
98 98
99 std::unique_ptr<buzz::XmlElement> transport_info; 99 std::unique_ptr<buzz::XmlElement> transport_info;
100 100
101 // Content of session-info messages. 101 // Content of session-info messages.
102 std::unique_ptr<buzz::XmlElement> info; 102 std::unique_ptr<buzz::XmlElement> info;
103 103
104 // Value from the <reason> tag if it is present in the 104 // Value from the <reason> tag if it is present in the
105 // message. Useful mainly for session-terminate messages, but Jingle 105 // message. Useful mainly for session-terminate messages, but Jingle
106 // spec allows it in any message. 106 // spec allows it in any message.
107 Reason reason = UNKNOWN_REASON; 107 Reason reason = UNKNOWN_REASON;
108
109 // Value from the <google:remoting:error-code> tag if it is present in the
110 // message. Useful mainly for session-terminate messages. If it's UNKNOWN,
111 // or reason is UNKNOWN_REASON, this field will be ignored in the xml output.
112 ErrorCode error_code = UNKNOWN_ERROR;
108 }; 113 };
109 114
110 struct JingleMessageReply { 115 struct JingleMessageReply {
111 enum ReplyType { 116 enum ReplyType {
112 REPLY_RESULT, 117 REPLY_RESULT,
113 REPLY_ERROR, 118 REPLY_ERROR,
114 }; 119 };
115 enum ErrorType { 120 enum ErrorType {
116 NONE, 121 NONE,
117 BAD_REQUEST, 122 BAD_REQUEST,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 std::unique_ptr<buzz::XmlElement> ToXml() const; 171 std::unique_ptr<buzz::XmlElement> ToXml() const;
167 172
168 std::list<IceCredentials> ice_credentials; 173 std::list<IceCredentials> ice_credentials;
169 std::list<NamedCandidate> candidates; 174 std::list<NamedCandidate> candidates;
170 }; 175 };
171 176
172 } // protocol 177 } // protocol
173 } // remoting 178 } // remoting
174 179
175 #endif // REMOTING_PROTOCOL_JINGLE_MESSAGES_H_ 180 #endif // REMOTING_PROTOCOL_JINGLE_MESSAGES_H_
OLDNEW
« no previous file with comments | « remoting/protocol/errors.cc ('k') | remoting/protocol/jingle_messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698