Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(345)

Side by Side Diff: third_party/libjingle_xmpp/xmpp/presencestatus.cc

Issue 2443903004: Add xmllite and xmpp sources to third_party/ (Closed)
Patch Set: Fix GN and sort includes Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698