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

Unified Diff: third_party/libjingle/overrides/talk/xmllite/qname.h

Issue 2255007: New libjingle integrated to chrome. (Closed)
Patch Set: - Created 10 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/libjingle/overrides/talk/xmllite/qname.h
diff --git a/third_party/libjingle/overrides/talk/xmllite/qname.h b/third_party/libjingle/overrides/talk/xmllite/qname.h
new file mode 100644
index 0000000000000000000000000000000000000000..db80efbca6694459b5720005602557b36bdf91b0
--- /dev/null
+++ b/third_party/libjingle/overrides/talk/xmllite/qname.h
@@ -0,0 +1,37 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef TALK_XMLLITE_QNAME_H_
+#define TALK_XMLLITE_QNAME_H_
+
+#include <string>
+
+namespace buzz {
+
+// Default libjingle's implementation of QName class is not threadsafe. This
+// one is.
+class QName
+{
+public:
+ QName();
+ QName(const std::string & ns, const std::string & local);
+ QName(bool add, const std::string & ns, const std::string & local);
+ explicit QName(const std::string & mergedOrLocal);
+
+ const std::string & Namespace() const { return namespace_; }
+ const std::string & LocalPart() const { return local_part_; }
+ std::string Merged() const;
+ int Compare(const QName & other) const;
+ bool operator==(const QName & other) const;
+ bool operator!=(const QName & other) const { return !operator==(other); }
+ bool operator<(const QName & other) const { return Compare(other) < 0; }
+
+private:
+ std::string namespace_;
+ std::string local_part_;
+};
+
+} // namespace buzz
+
+#endif // TALK_XMLLITE_QNAME_H_
« 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