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

Side by Side Diff: third_party/libjingle/overrides/talk/xmllite/qname.h

Issue 2255007: New libjingle integrated to chrome. (Closed)
Patch Set: - Created 10 years, 6 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 (c) 2010 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 #ifndef TALK_XMLLITE_QNAME_H_
6 #define TALK_XMLLITE_QNAME_H_
7
8 #include <string>
9
10 namespace buzz {
11
12 // Default libjingle's implementation of QName class is not threadsafe. This
13 // one is.
14 class QName
15 {
16 public:
17 QName();
18 QName(const std::string & ns, const std::string & local);
19 QName(bool add, const std::string & ns, const std::string & local);
20 explicit QName(const std::string & mergedOrLocal);
21
22 const std::string & Namespace() const { return namespace_; }
23 const std::string & LocalPart() const { return local_part_; }
24 std::string Merged() const;
25 int Compare(const QName & other) const;
26 bool operator==(const QName & other) const;
27 bool operator!=(const QName & other) const { return !operator==(other); }
28 bool operator<(const QName & other) const { return Compare(other) < 0; }
29
30 private:
31 std::string namespace_;
32 std::string local_part_;
33 };
34
35 } // namespace buzz
36
37 #endif // TALK_XMLLITE_QNAME_H_
OLDNEW
« no previous file with comments | « third_party/libjingle/overrides/talk/base/win32socketinit.cc ('k') | third_party/libjingle/overrides/talk/xmllite/qname.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698