| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 JingleMessage(); | 47 JingleMessage(); |
| 48 JingleMessage(const std::string& to_value, | 48 JingleMessage(const std::string& to_value, |
| 49 ActionType action_value, | 49 ActionType action_value, |
| 50 const std::string& sid_value); | 50 const std::string& sid_value); |
| 51 ~JingleMessage(); | 51 ~JingleMessage(); |
| 52 | 52 |
| 53 // Caller keeps ownership of |stanza|. | 53 // Caller keeps ownership of |stanza|. |
| 54 static bool IsJingleMessage(const buzz::XmlElement* stanza); | 54 static bool IsJingleMessage(const buzz::XmlElement* stanza); |
| 55 static std::string GetActionName(ActionType action); |
| 55 | 56 |
| 56 // Caller keeps ownership of |stanza|. |error| is set to debug error | 57 // Caller keeps ownership of |stanza|. |error| is set to debug error |
| 57 // message when parsing fails. | 58 // message when parsing fails. |
| 58 bool ParseXml(const buzz::XmlElement* stanza, std::string* error); | 59 bool ParseXml(const buzz::XmlElement* stanza, std::string* error); |
| 59 | 60 |
| 60 scoped_ptr<buzz::XmlElement> ToXml(); | 61 scoped_ptr<buzz::XmlElement> ToXml() const; |
| 61 | 62 |
| 62 std::string from; | 63 std::string from; |
| 63 std::string to; | 64 std::string to; |
| 64 ActionType action; | 65 ActionType action; |
| 65 std::string sid; | 66 std::string sid; |
| 66 | 67 |
| 67 scoped_ptr<ContentDescription> description; | 68 scoped_ptr<ContentDescription> description; |
| 68 std::list<cricket::Candidate> candidates; | 69 std::list<cricket::Candidate> candidates; |
| 69 | 70 |
| 70 // Content of session-info messages. | 71 // Content of session-info messages. |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 104 |
| 104 ReplyType type; | 105 ReplyType type; |
| 105 ErrorType error_type; | 106 ErrorType error_type; |
| 106 std::string text; | 107 std::string text; |
| 107 }; | 108 }; |
| 108 | 109 |
| 109 } // protocol | 110 } // protocol |
| 110 } // remoting | 111 } // remoting |
| 111 | 112 |
| 112 #endif // REMOTING_PROTOCOL_JINGLE_MESSAGES_H_ | 113 #endif // REMOTING_PROTOCOL_JINGLE_MESSAGES_H_ |
| OLD | NEW |