summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/jabber/jingle/libjingle/talk/xmllite
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/protocols/jabber/jingle/libjingle/talk/xmllite')
-rw-r--r--kopete/protocols/jabber/jingle/libjingle/talk/xmllite/qname.cc48
-rw-r--r--kopete/protocols/jabber/jingle/libjingle/talk/xmllite/qname.h26
-rw-r--r--kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlbuilder.cc10
-rw-r--r--kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlelement.cc38
-rw-r--r--kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlelement.h46
-rw-r--r--kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlnsstack.cc4
-rw-r--r--kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlnsstack.h4
-rw-r--r--kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlparser.cc14
-rw-r--r--kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlparser.h4
-rw-r--r--kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlprinter.cc10
10 files changed, 102 insertions, 102 deletions
diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/qname.cc b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/qname.cc
index 626cfa96..ccb08884 100644
--- a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/qname.cc
+++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/qname.cc
@@ -28,14 +28,14 @@
#include <string>
#include "talk/base/common.h"
#include "talk/xmllite/xmlelement.h"
-#include "talk/xmllite/qname.h"
+#include "talk/xmllite/tqname.h"
#include "talk/xmllite/xmlconstants.h"
//#define new TRACK_NEW
namespace buzz {
-static int QName_Hash(const std::string & ns, const char * local) {
+static int TQName_Hash(const std::string & ns, const char * local) {
int result = ns.size() * 101;
while (*local) {
result *= 19;
@@ -46,20 +46,20 @@ static int QName_Hash(const std::string & ns, const char * local) {
}
static const int bits = 9;
-static QName::Data * get_qname_table() {
- static QName::Data qname_table[1 << bits];
+static TQName::Data * get_qname_table() {
+ static TQName::Data qname_table[1 << bits];
return qname_table;
}
-static QName::Data *
+static TQName::Data *
AllocateOrFind(const std::string & ns, const char * local) {
- int index = QName_Hash(ns, local);
+ int index = TQName_Hash(ns, local);
int increment = index >> (bits - 1) | 1;
- QName::Data * qname_table = get_qname_table();
+ TQName::Data * qname_table = get_qname_table();
for (;;) {
index &= ((1 << bits) - 1);
if (!qname_table[index].Occupied()) {
- return new QName::Data(ns, local);
+ return new TQName::Data(ns, local);
}
if (qname_table[index].localPart_ == local &&
qname_table[index].namespace_ == ns) {
@@ -70,11 +70,11 @@ AllocateOrFind(const std::string & ns, const char * local) {
}
}
-static QName::Data *
+static TQName::Data *
Add(const std::string & ns, const char * local) {
- int index = QName_Hash(ns, local);
+ int index = TQName_Hash(ns, local);
int increment = index >> (bits - 1) | 1;
- QName::Data * qname_table = get_qname_table();
+ TQName::Data * qname_table = get_qname_table();
for (;;) {
index &= ((1 << bits) - 1);
if (!qname_table[index].Occupied()) {
@@ -93,25 +93,25 @@ Add(const std::string & ns, const char * local) {
}
}
-QName::~QName() {
+TQName::~TQName() {
data_->Release();
}
-QName::QName() : data_(QN_EMPTY.data_) {
+TQName::TQName() : data_(TQN_EMPTY.data_) {
data_->AddRef();
}
-QName::QName(bool add, const std::string & ns, const char * local) :
+TQName::TQName(bool add, const std::string & ns, const char * local) :
data_(add ? Add(ns, local) : AllocateOrFind(ns, local)) {}
-QName::QName(bool add, const std::string & ns, const std::string & local) :
+TQName::TQName(bool add, const std::string & ns, const std::string & local) :
data_(add ? Add(ns, local.c_str()) : AllocateOrFind(ns, local.c_str())) {}
-QName::QName(const std::string & ns, const char * local) :
+TQName::TQName(const std::string & ns, const char * local) :
data_(AllocateOrFind(ns, local)) {}
static std::string
-QName_LocalPart(const std::string & name) {
+TQName_LocalPart(const std::string & name) {
size_t i = name.rfind(':');
if (i == std::string::npos)
return name;
@@ -119,19 +119,19 @@ QName_LocalPart(const std::string & name) {
}
static std::string
-QName_Namespace(const std::string & name) {
+TQName_Namespace(const std::string & name) {
size_t i = name.rfind(':');
if (i == std::string::npos)
return STR_EMPTY;
return name.substr(0, i);
}
-QName::QName(const std::string & mergedOrLocal) :
- data_(AllocateOrFind(QName_Namespace(mergedOrLocal),
- QName_LocalPart(mergedOrLocal).c_str())) {}
+TQName::TQName(const std::string & mergedOrLocal) :
+ data_(AllocateOrFind(TQName_Namespace(mergedOrLocal),
+ TQName_LocalPart(mergedOrLocal).c_str())) {}
std::string
-QName::Merged() const {
+TQName::Merged() const {
if (data_->namespace_ == STR_EMPTY)
return data_->localPart_;
@@ -143,14 +143,14 @@ QName::Merged() const {
}
bool
-QName::operator==(const QName & other) const {
+TQName::operator==(const TQName & other) const {
return other.data_ == data_ ||
data_->localPart_ == other.data_->localPart_ &&
data_->namespace_ == other.data_->namespace_;
}
int
-QName::Compare(const QName & other) const {
+TQName::Compare(const TQName & other) const {
if (data_ == other.data_)
return 0;
diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/qname.h b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/qname.h
index b1bcec61..dff04cd9 100644
--- a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/qname.h
+++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/qname.h
@@ -33,30 +33,30 @@
namespace buzz {
-class QName
+class TQName
{
public:
- explicit QName();
- QName(const QName & qname) : data_(qname.data_) { data_->AddRef(); }
- explicit QName(bool add, const std::string & ns, const char * local);
- explicit QName(bool add, const std::string & ns, const std::string & local);
- explicit QName(const std::string & ns, const char * local);
- explicit QName(const std::string & mergedOrLocal);
- QName & operator=(const QName & qn) {
+ explicit TQName();
+ TQName(const TQName & qname) : data_(qname.data_) { data_->AddRef(); }
+ explicit TQName(bool add, const std::string & ns, const char * local);
+ explicit TQName(bool add, const std::string & ns, const std::string & local);
+ explicit TQName(const std::string & ns, const char * local);
+ explicit TQName(const std::string & mergedOrLocal);
+ TQName & operator=(const TQName & qn) {
qn.data_->AddRef();
data_->Release();
data_ = qn.data_;
return *this;
}
- ~QName();
+ ~TQName();
const std::string & Namespace() const { return data_->namespace_; }
const std::string & LocalPart() const { return data_->localPart_; }
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; }
+ int Compare(const TQName & other) const;
+ bool operator==(const TQName & other) const;
+ bool operator!=(const TQName & other) const { return !operator==(other); }
+ bool operator<(const TQName & other) const { return Compare(other) < 0; }
class Data {
public:
diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlbuilder.cc b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlbuilder.cc
index 313c4013..7b1b10f0 100644
--- a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlbuilder.cc
+++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlbuilder.cc
@@ -53,8 +53,8 @@ XmlBuilder::Reset() {
XmlElement *
XmlBuilder::BuildElement(XmlParseContext * pctx,
const char * name, const char ** atts) {
- QName tagName(pctx->ResolveQName(name, false));
- if (tagName == QN_EMPTY)
+ TQName tagName(pctx->ResolveTQName(name, false));
+ if (tagName == TQN_EMPTY)
return NULL;
XmlElement * pelNew = new XmlElement(tagName);
@@ -62,11 +62,11 @@ XmlBuilder::BuildElement(XmlParseContext * pctx,
if (!*atts)
return pelNew;
- std::set<QName> seenNonlocalAtts;
+ std::set<TQName> seenNonlocalAtts;
while (*atts) {
- QName attName(pctx->ResolveQName(*atts, true));
- if (attName == QN_EMPTY) {
+ TQName attName(pctx->ResolveTQName(*atts, true));
+ if (attName == TQN_EMPTY) {
delete pelNew;
return NULL;
}
diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlelement.cc b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlelement.cc
index d3619a92..a021f67a 100644
--- a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlelement.cc
+++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlelement.cc
@@ -32,7 +32,7 @@
#include "talk/base/common.h"
#include "talk/xmllite/xmlelement.h"
-#include "talk/xmllite/qname.h"
+#include "talk/xmllite/tqname.h"
#include "talk/xmllite/xmlparser.h"
#include "talk/xmllite/xmlbuilder.h"
#include "talk/xmllite/xmlprinter.h"
@@ -42,8 +42,8 @@
namespace buzz {
-const QName QN_EMPTY(true, STR_EMPTY, STR_EMPTY);
-const QName QN_XMLNS(true, STR_EMPTY, STR_XMLNS);
+const TQName TQN_EMPTY(true, STR_EMPTY, STR_EMPTY);
+const TQName TQN_XMLNS(true, STR_EMPTY, STR_XMLNS);
XmlChild::~XmlChild() {
@@ -82,7 +82,7 @@ XmlText::AddText(const std::string & text) {
XmlText::~XmlText() {
}
-XmlElement::XmlElement(const QName & name) :
+XmlElement::XmlElement(const TQName & name) :
name_(name),
pFirstAttr_(NULL),
pLastAttr_(NULL),
@@ -109,7 +109,7 @@ XmlElement::XmlElement(const XmlElement & elt) :
}
pLastAttr_ = newAttr;
- // copy children
+ // copy tqchildren
XmlChild * pChild;
XmlChild ** ppLast = &pFirstChild_;
XmlChild * newChild = NULL;
@@ -127,9 +127,9 @@ XmlElement::XmlElement(const XmlElement & elt) :
}
-XmlElement::XmlElement(const QName & name, bool useDefaultNs) :
+XmlElement::XmlElement(const TQName & name, bool useDefaultNs) :
name_(name),
- pFirstAttr_(useDefaultNs ? new XmlAttr(QN_XMLNS, name.Namespace()) : NULL),
+ pFirstAttr_(useDefaultNs ? new XmlAttr(TQN_XMLNS, name.Namespace()) : NULL),
pLastAttr_(pFirstAttr_),
pFirstChild_(NULL),
pLastChild_(NULL) {
@@ -173,11 +173,11 @@ XmlElement::SetBodyText(const std::string & text) {
}
}
-const QName &
+const TQName &
XmlElement::FirstElementName() const {
const XmlElement * element = FirstElement();
if (element == NULL)
- return QN_EMPTY;
+ return TQN_EMPTY;
return element->Name();
}
@@ -187,7 +187,7 @@ XmlElement::FirstAttr() {
}
const std::string &
-XmlElement::Attr(const QName & name) const {
+XmlElement::Attr(const TQName & name) const {
XmlAttr * pattr;
for (pattr = pFirstAttr_; pattr; pattr = pattr->pNextAttr_) {
if (pattr->name_ == name)
@@ -197,7 +197,7 @@ XmlElement::Attr(const QName & name) const {
}
bool
-XmlElement::HasAttr(const QName & name) const {
+XmlElement::HasAttr(const TQName & name) const {
XmlAttr * pattr;
for (pattr = pFirstAttr_; pattr; pattr = pattr->pNextAttr_) {
if (pattr->name_ == name)
@@ -207,7 +207,7 @@ XmlElement::HasAttr(const QName & name) const {
}
void
-XmlElement::SetAttr(const QName & name, const std::string & value) {
+XmlElement::SetAttr(const TQName & name, const std::string & value) {
XmlAttr * pattr;
for (pattr = pFirstAttr_; pattr; pattr = pattr->pNextAttr_) {
if (pattr->name_ == name)
@@ -226,7 +226,7 @@ XmlElement::SetAttr(const QName & name, const std::string & value) {
}
void
-XmlElement::ClearAttr(const QName & name) {
+XmlElement::ClearAttr(const TQName & name) {
XmlAttr * pattr;
XmlAttr *pLastAttr = NULL;
for (pattr = pFirstAttr_; pattr; pattr = pattr->pNextAttr_) {
@@ -291,7 +291,7 @@ XmlElement::NextWithNamespace(const std::string & ns) {
}
XmlElement *
-XmlElement::FirstNamed(const QName & name) {
+XmlElement::FirstNamed(const TQName & name) {
XmlChild * pChild;
for (pChild = pFirstChild_; pChild; pChild = pChild->pNextChild_) {
if (!pChild->IsText() && pChild->AsElement()->Name() == name)
@@ -301,7 +301,7 @@ XmlElement::FirstNamed(const QName & name) {
}
XmlElement *
-XmlElement::NextNamed(const QName & name) {
+XmlElement::NextNamed(const TQName & name) {
XmlChild * pChild;
for (pChild = pNextChild_; pChild; pChild = pChild->pNextChild_) {
if (!pChild->IsText() && pChild->AsElement()->Name() == name)
@@ -311,7 +311,7 @@ XmlElement::NextNamed(const QName & name) {
}
const std::string &
-XmlElement::TextNamed(const QName & name) const {
+XmlElement::TextNamed(const TQName & name) const {
XmlChild * pChild;
for (pChild = pFirstChild_; pChild; pChild = pChild->pNextChild_) {
if (!pChild->IsText() && pChild->AsElement()->Name() == name)
@@ -352,7 +352,7 @@ XmlElement::RemoveChildAfter(XmlChild * pPredecessor) {
}
void
-XmlElement::AddAttr(const QName & name, const std::string & value) {
+XmlElement::AddAttr(const TQName & name, const std::string & value) {
ASSERT(!HasAttr(name));
XmlAttr ** pprev = pLastAttr_ ? &(pLastAttr_->pNextAttr_) : &pFirstAttr_;
@@ -360,7 +360,7 @@ XmlElement::AddAttr(const QName & name, const std::string & value) {
}
void
-XmlElement::AddAttr(const QName & name, const std::string & value,
+XmlElement::AddAttr(const TQName & name, const std::string & value,
int depth) {
XmlElement * element = this;
while (depth--) {
@@ -426,7 +426,7 @@ XmlElement::AddElement(XmlElement *pelChild, int depth) {
}
void
-XmlElement::ClearNamedChildren(const QName & name) {
+XmlElement::ClearNamedChildren(const TQName & name) {
XmlChild * prev_child = NULL;
XmlChild * next_child;
XmlChild * child;
diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlelement.h b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlelement.h
index 06545d89..2c9fc860 100644
--- a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlelement.h
+++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlelement.h
@@ -31,12 +31,12 @@
#include <iosfwd>
#include <string>
#include "talk/base/scoped_ptr.h"
-#include "talk/xmllite/qname.h"
+#include "talk/xmllite/tqname.h"
namespace buzz {
-extern const QName QN_EMPTY;
-extern const QName QN_XMLNS;
+extern const TQName TQN_EMPTY;
+extern const TQName TQN_XMLNS;
class XmlChild;
@@ -116,11 +116,11 @@ friend class XmlElement;
public:
XmlAttr * NextAttr() const { return pNextAttr_; }
- const QName & Name() const { return name_; }
+ const TQName & Name() const { return name_; }
const std::string & Value() const { return value_; }
private:
- explicit XmlAttr(const QName & name, const std::string & value) :
+ explicit XmlAttr(const TQName & name, const std::string & value) :
pNextAttr_(NULL),
name_(name),
value_(value) {
@@ -132,24 +132,24 @@ private:
}
XmlAttr * pNextAttr_;
- QName name_;
+ TQName name_;
std::string value_;
};
class XmlElement : public XmlChild {
public:
- explicit XmlElement(const QName & name);
- explicit XmlElement(const QName & name, bool useDefaultNs);
+ explicit XmlElement(const TQName & name);
+ explicit XmlElement(const TQName & name, bool useDefaultNs);
explicit XmlElement(const XmlElement & elt);
virtual ~XmlElement();
- const QName & Name() const { return name_; }
+ const TQName & Name() const { return name_; }
const std::string & BodyText() const;
void SetBodyText(const std::string & text);
- const QName & FirstElementName() const;
+ const TQName & FirstElementName() const;
XmlAttr * FirstAttr();
const XmlAttr * FirstAttr() const
@@ -157,10 +157,10 @@ public:
//! Attr will return STR_EMPTY if the attribute isn't there:
//! use HasAttr to test presence of an attribute.
- const std::string & Attr(const QName & name) const;
- bool HasAttr(const QName & name) const;
- void SetAttr(const QName & name, const std::string & value);
- void ClearAttr(const QName & name);
+ const std::string & Attr(const TQName & name) const;
+ bool HasAttr(const TQName & name) const;
+ void SetAttr(const TQName & name, const std::string & value);
+ void ClearAttr(const TQName & name);
XmlChild * FirstChild();
const XmlChild * FirstChild() const
@@ -182,15 +182,15 @@ public:
const XmlElement * NextWithNamespace(const std::string & ns) const
{ return const_cast<XmlElement *>(this)->NextWithNamespace(ns); }
- XmlElement * FirstNamed(const QName & name);
- const XmlElement * FirstNamed(const QName & name) const
+ XmlElement * FirstNamed(const TQName & name);
+ const XmlElement * FirstNamed(const TQName & name) const
{ return const_cast<XmlElement *>(this)->FirstNamed(name); }
- XmlElement * NextNamed(const QName & name);
- const XmlElement * NextNamed(const QName & name) const
+ XmlElement * NextNamed(const TQName & name);
+ const XmlElement * NextNamed(const TQName & name) const
{ return const_cast<XmlElement *>(this)->NextNamed(name); }
- const std::string & TextNamed(const QName & name) const;
+ const std::string & TextNamed(const TQName & name) const;
void InsertChildAfter(XmlChild * pPredecessor, XmlChild * pNewChild);
void RemoveChildAfter(XmlChild * pPredecessor);
@@ -200,9 +200,9 @@ public:
void AddText(const std::string & text, int depth);
void AddElement(XmlElement * pelChild);
void AddElement(XmlElement * pelChild, int depth);
- void AddAttr(const QName & name, const std::string & value);
- void AddAttr(const QName & name, const std::string & value, int depth);
- void ClearNamedChildren(const QName & name);
+ void AddAttr(const TQName & name, const std::string & value);
+ void AddAttr(const TQName & name, const std::string & value, int depth);
+ void ClearNamedChildren(const TQName & name);
void ClearChildren();
static XmlElement * ForStr(const std::string & str);
@@ -216,7 +216,7 @@ protected:
virtual XmlText * AsTextImpl() const;
private:
- QName name_;
+ TQName name_;
XmlAttr * pFirstAttr_;
XmlAttr * pLastAttr_;
XmlChild * pFirstChild_;
diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlnsstack.cc b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlnsstack.cc
index 4dcb6490..570a8be5 100644
--- a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlnsstack.cc
+++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlnsstack.cc
@@ -116,7 +116,7 @@ XmlnsStack::PrefixForNs(const std::string & ns, bool isattr) {
}
std::string
-XmlnsStack::FormatQName(const QName & name, bool isAttr) {
+XmlnsStack::FormatTQName(const TQName & name, bool isAttr) {
std::string prefix(PrefixForNs(name.Namespace(), isAttr).first);
if (prefix == STR_EMPTY)
return name.LocalPart();
@@ -170,7 +170,7 @@ static std::string SuggestPrefix(const std::string & ns) {
if (last - first > 4)
last = first + 3;
std::string candidate(AsciiLower(ns.substr(first, last - first)));
- if (candidate.find("xml") != 0)
+ if (candidate.tqfind("xml") != 0)
return candidate;
break;
}
diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlnsstack.h b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlnsstack.h
index 299ec1ce..6fd7665c 100644
--- a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlnsstack.h
+++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlnsstack.h
@@ -31,7 +31,7 @@
#include <string>
#include "talk/base/scoped_ptr.h"
#include "talk/base/stl_decl.h"
-#include "talk/xmllite/qname.h"
+#include "talk/xmllite/tqname.h"
namespace buzz {
@@ -50,7 +50,7 @@ public:
bool PrefixMatchesNs(const std::string & prefix, const std::string & ns);
std::pair<std::string, bool> PrefixForNs(const std::string & ns, bool isAttr);
std::pair<std::string, bool> AddNewPrefix(const std::string & ns, bool isAttr);
- std::string FormatQName(const QName & name, bool isAttr);
+ std::string FormatTQName(const TQName & name, bool isAttr);
private:
diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlparser.cc b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlparser.cc
index f2b56778..41cadb84 100644
--- a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlparser.cc
+++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlparser.cc
@@ -212,29 +212,29 @@ XmlParser::ParseContext::EndElement() {
xmlnsstack_.PopFrame();
}
-QName
-XmlParser::ParseContext::ResolveQName(const char *qname, bool isAttr) {
+TQName
+XmlParser::ParseContext::ResolveTQName(const char *qname, bool isAttr) {
const char *c;
for (c = qname; *c; ++c) {
if (*c == ':') {
const std::string * result;
result = xmlnsstack_.NsForPrefix(std::string(qname, c - qname));
if (result == NULL)
- return QN_EMPTY;
+ return TQN_EMPTY;
const char * localname = c + 1;
- return QName(*result, localname);
+ return TQName(*result, localname);
}
}
if (isAttr) {
- return QName(STR_EMPTY, qname);
+ return TQName(STR_EMPTY, qname);
}
const std::string * result;
result = xmlnsstack_.NsForPrefix(STR_EMPTY);
if (result == NULL)
- return QN_EMPTY;
+ return TQN_EMPTY;
- return QName(*result, qname);
+ return TQName(*result, qname);
}
void
diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlparser.h b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlparser.h
index 760802e4..8e2e4b5f 100644
--- a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlparser.h
+++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlparser.h
@@ -43,7 +43,7 @@ class XmlParser;
class XmlParseContext {
public:
- virtual QName ResolveQName(const char * qname, bool isAttr) = 0;
+ virtual TQName ResolveTQName(const char * qname, bool isAttr) = 0;
virtual void RaiseError(XML_Error err) = 0;
};
@@ -80,7 +80,7 @@ private:
public:
ParseContext(XmlParser * parser);
virtual ~ParseContext();
- virtual QName ResolveQName(const char * qname, bool isAttr);
+ virtual TQName ResolveTQName(const char * qname, bool isAttr);
virtual void RaiseError(XML_Error err) { if (!raised_) raised_ = err; }
XML_Error RaisedError() { return raised_; }
void Reset();
diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlprinter.cc b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlprinter.cc
index 892e2ebb..8e36ac02 100644
--- a/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlprinter.cc
+++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmllite/xmlprinter.cc
@@ -79,7 +79,7 @@ XmlPrinterImpl::PrintElement(const XmlElement * element) {
// first go through attrs of pel to add xmlns definitions
const XmlAttr * pattr;
for (pattr = element->FirstAttr(); pattr; pattr = pattr->NextAttr()) {
- if (pattr->Name() == QN_XMLNS)
+ if (pattr->Name() == TQN_XMLNS)
xmlnsStack_.AddXmlns(STR_EMPTY, pattr->Value());
else if (pattr->Name().Namespace() == NS_XMLNS)
xmlnsStack_.AddXmlns(pattr->Name().LocalPart(),
@@ -104,11 +104,11 @@ XmlPrinterImpl::PrintElement(const XmlElement * element) {
}
// print the element name
- *pout_ << '<' << xmlnsStack_.FormatQName(element->Name(), false);
+ *pout_ << '<' << xmlnsStack_.FormatTQName(element->Name(), false);
// and the attributes
for (pattr = element->FirstAttr(); pattr; pattr = pattr->NextAttr()) {
- *pout_ << ' ' << xmlnsStack_.FormatQName(pattr->Name(), true) << "=\"";
+ *pout_ << ' ' << xmlnsStack_.FormatTQName(pattr->Name(), true) << "=\"";
PrintQuotedValue(pattr->Value());
*pout_ << '"';
}
@@ -123,7 +123,7 @@ XmlPrinterImpl::PrintElement(const XmlElement * element) {
i += 2;
}
- // now the children
+ // now the tqchildren
const XmlChild * pchild = element->FirstChild();
if (pchild == NULL)
@@ -137,7 +137,7 @@ XmlPrinterImpl::PrintElement(const XmlElement * element) {
PrintElement(pchild->AsElement());
pchild = pchild->NextChild();
}
- *pout_ << "</" << xmlnsStack_.FormatQName(element->Name(), false) << '>';
+ *pout_ << "</" << xmlnsStack_.FormatTQName(element->Name(), false) << '>';
}
xmlnsStack_.PopFrame();