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