| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 public: | 56 public: |
| 57 WebRTCSessionDescription() { } | 57 WebRTCSessionDescription() { } |
| 58 WebRTCSessionDescription(const WebRTCSessionDescription& other) { assign(oth
er); } | 58 WebRTCSessionDescription(const WebRTCSessionDescription& other) { assign(oth
er); } |
| 59 ~WebRTCSessionDescription() { reset(); } | 59 ~WebRTCSessionDescription() { reset(); } |
| 60 | 60 |
| 61 WebRTCSessionDescription& operator=(const WebRTCSessionDescription& other) | 61 WebRTCSessionDescription& operator=(const WebRTCSessionDescription& other) |
| 62 { | 62 { |
| 63 assign(other); | 63 assign(other); |
| 64 return *this; | 64 return *this; |
| 65 } | 65 } |
| 66 bool operator==(const WebRTCSessionDescription& other) |
| 67 { |
| 68 return sdp() == other.sdp() && type() == other.type(); |
| 69 } |
| 70 bool operator!=(const WebRTCSessionDescription& other) |
| 71 { |
| 72 return !(*this == other); |
| 73 } |
| 66 | 74 |
| 67 BLINK_PLATFORM_EXPORT void assign(const WebRTCSessionDescription&); | 75 BLINK_PLATFORM_EXPORT void assign(const WebRTCSessionDescription&); |
| 68 | 76 |
| 69 BLINK_PLATFORM_EXPORT void initialize(const WebString& type, const WebString
& sdp); | 77 BLINK_PLATFORM_EXPORT void initialize(const WebString& type, const WebString
& sdp); |
| 70 BLINK_PLATFORM_EXPORT void reset(); | 78 BLINK_PLATFORM_EXPORT void reset(); |
| 71 bool isNull() const { return m_private.isNull(); } | 79 bool isNull() const { return m_private.isNull(); } |
| 72 | 80 |
| 73 BLINK_PLATFORM_EXPORT WebString type() const; | 81 BLINK_PLATFORM_EXPORT WebString type() const; |
| 74 BLINK_PLATFORM_EXPORT void setType(const WebString&); | 82 BLINK_PLATFORM_EXPORT void setType(const WebString&); |
| 75 BLINK_PLATFORM_EXPORT WebString sdp() const; | 83 BLINK_PLATFORM_EXPORT WebString sdp() const; |
| 76 BLINK_PLATFORM_EXPORT void setSDP(const WebString&); | 84 BLINK_PLATFORM_EXPORT void setSDP(const WebString&); |
| 77 | 85 |
| 78 #if BLINK_IMPLEMENTATION | 86 #if BLINK_IMPLEMENTATION |
| 79 WebRTCSessionDescription(WebString type, WebString sdp) | 87 WebRTCSessionDescription(WebString type, WebString sdp) |
| 80 { | 88 { |
| 81 this->initialize(type, sdp); | 89 this->initialize(type, sdp); |
| 82 } | 90 } |
| 83 #endif | 91 #endif |
| 84 | 92 |
| 85 private: | 93 private: |
| 86 WebPrivatePtr<WebRTCSessionDescriptionPrivate> m_private; | 94 WebPrivatePtr<WebRTCSessionDescriptionPrivate> m_private; |
| 87 }; | 95 }; |
| 88 | 96 |
| 89 } // namespace blink | 97 } // namespace blink |
| 90 | 98 |
| 91 #endif // WebRTCSessionDescription_h | 99 #endif // WebRTCSessionDescription_h |
| OLD | NEW |