| OLD | NEW |
| 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 <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 enum ErrorType { | 91 enum ErrorType { |
| 92 NONE, | 92 NONE, |
| 93 BAD_REQUEST, | 93 BAD_REQUEST, |
| 94 NOT_IMPLEMENTED, | 94 NOT_IMPLEMENTED, |
| 95 INVALID_SID, | 95 INVALID_SID, |
| 96 UNEXPECTED_REQUEST, | 96 UNEXPECTED_REQUEST, |
| 97 UNSUPPORTED_INFO, | 97 UNSUPPORTED_INFO, |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 JingleMessageReply(); | 100 JingleMessageReply(); |
| 101 JingleMessageReply(ErrorType error); | 101 explicit JingleMessageReply(ErrorType error); |
| 102 JingleMessageReply(ErrorType error, const std::string& text); | 102 JingleMessageReply(ErrorType error, const std::string& text); |
| 103 ~JingleMessageReply(); | 103 ~JingleMessageReply(); |
| 104 | 104 |
| 105 // Formats reply stanza for the specified |request_stanza|. Id and | 105 // Formats reply stanza for the specified |request_stanza|. Id and |
| 106 // recepient as well as other information needed to generate a valid | 106 // recepient as well as other information needed to generate a valid |
| 107 // reply are taken from |request_stanza|. | 107 // reply are taken from |request_stanza|. |
| 108 scoped_ptr<buzz::XmlElement> ToXml( | 108 scoped_ptr<buzz::XmlElement> ToXml( |
| 109 const buzz::XmlElement* request_stanza) const; | 109 const buzz::XmlElement* request_stanza) const; |
| 110 | 110 |
| 111 ReplyType type; | 111 ReplyType type; |
| 112 ErrorType error_type; | 112 ErrorType error_type; |
| 113 std::string text; | 113 std::string text; |
| 114 }; | 114 }; |
| 115 | 115 |
| 116 } // protocol | 116 } // protocol |
| 117 } // remoting | 117 } // remoting |
| 118 | 118 |
| 119 #endif // REMOTING_PROTOCOL_JINGLE_MESSAGES_H_ | 119 #endif // REMOTING_PROTOCOL_JINGLE_MESSAGES_H_ |
| OLD | NEW |