Optionally set entity node when building a GTalk entity caps element.

git-svn-id: http://voip.null.ro/svn/yate@4210 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
marian 2011-03-24 13:45:08 +00:00
parent 1b19d546d8
commit f813c3a37a
2 changed files with 7 additions and 3 deletions

View File

@ -1515,10 +1515,13 @@ XmlElement* XMPPUtils::createEntityCaps(const String& hash, const char* node)
}
// Create a 'c' entity capability element as defined by GTalk
XmlElement* XMPPUtils::createEntityCapsGTalkV1()
XmlElement* XMPPUtils::createEntityCapsGTalkV1(const char* node)
{
XmlElement* c = createElement(XmlTag::EntityCapsTag,XMPPNamespace::EntityCaps);
c->setAttribute("node","http://www.google.com/xmpp/client/caps");
if (node)
c->setAttributeValid("node",node);
else
c->setAttribute("node","http://www.google.com/xmpp/client/caps");
c->setAttribute("ver","1.0");
c->setAttribute("ext","voice-v1");
return c;

View File

@ -1664,9 +1664,10 @@ public:
/**
* Create a 'c' entity capability element as defined by GTalk
* @param node Optional node attribute, defaults to GTalk's node
* @return A valid XmlElement pointer
*/
static XmlElement* createEntityCapsGTalkV1();
static XmlElement* createEntityCapsGTalkV1(const char* node = 0);
/**
* Create an 'presence' element