| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | |
| 3 * | |
| 4 * Use of this source code is governed by a BSD-style license | |
| 5 * that can be found in the LICENSE file in the root of the source | |
| 6 * tree. An additional intellectual property rights grant can be found | |
| 7 * in the file PATENTS. All contributing project authors may | |
| 8 * be found in the AUTHORS file in the root of the source tree. | |
| 9 */ | |
| 10 | |
| 11 #include "webrtc/libjingle/xmpp/presencestatus.h" | |
| 12 | |
| 13 namespace buzz { | |
| 14 PresenceStatus::PresenceStatus() | |
| 15 : pri_(0), | |
| 16 show_(SHOW_NONE), | |
| 17 available_(false), | |
| 18 e_code_(0), | |
| 19 feedback_probation_(false), | |
| 20 know_capabilities_(false), | |
| 21 voice_capability_(false), | |
| 22 pmuc_capability_(false), | |
| 23 video_capability_(false), | |
| 24 camera_capability_(false) { | |
| 25 } | |
| 26 | |
| 27 void PresenceStatus::UpdateWith(const PresenceStatus& new_value) { | |
| 28 if (!new_value.know_capabilities()) { | |
| 29 bool k = know_capabilities(); | |
| 30 bool p = voice_capability(); | |
| 31 std::string node = caps_node(); | |
| 32 std::string v = version(); | |
| 33 | |
| 34 *this = new_value; | |
| 35 | |
| 36 set_know_capabilities(k); | |
| 37 set_caps_node(node); | |
| 38 set_voice_capability(p); | |
| 39 set_version(v); | |
| 40 } else { | |
| 41 *this = new_value; | |
| 42 } | |
| 43 } | |
| 44 | |
| 45 } // namespace buzz | |
| OLD | NEW |