Mercurial > pidgin.yaz
diff libpurple/xmlnode.h @ 26262:b03430dae08e
Add xmlnode_set_attrib_full that enables you to set an attribute with both
a prefix and a namespace. Also, change xmlnode_remove_attribute to remove
all existing attributes that match the name. Otherwise, it would just take
out the first one, and may not do what you want.
Change Bonjour and XMPP to use the new function.
References #7681.
Fixes #8318.
| author | Elliott Sales de Andrade <qulogic@pidgin.im> |
|---|---|
| date | Fri, 13 Mar 2009 04:29:11 +0000 |
| parents | 4b8c4870b13a |
| children | 38238d41923b 7c3baa45c9c4 |
line wrap: on
line diff
--- a/libpurple/xmlnode.h Fri Mar 13 02:21:27 2009 +0000 +++ b/libpurple/xmlnode.h Fri Mar 13 04:29:11 2009 +0000 @@ -157,6 +157,7 @@ */ void xmlnode_set_attrib(xmlnode *node, const char *attr, const char *value); +#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_XMLNODE_C_) /** * Sets a prefixed attribute for a node * @@ -164,6 +165,8 @@ * @param attr The name of the attribute to set * @param prefix The prefix of the attribute to ste * @param value The value of the attribute + * + * @deprecated Use xmlnode_set_attrib_full instead. */ void xmlnode_set_attrib_with_prefix(xmlnode *node, const char *attr, const char *prefix, const char *value); @@ -174,8 +177,25 @@ * @param attr The name of the attribute to set * @param xmlns The namespace of the attribute to ste * @param value The value of the attribute + * + * @deprecated Use xmlnode_set_attrib_full instead. */ void xmlnode_set_attrib_with_namespace(xmlnode *node, const char *attr, const char *xmlns, const char *value); +#endif /* PURPLE_DISABLE_DEPRECATED */ + +/** + * Sets a namespaced attribute for a node + * + * @param node The node to set an attribute for. + * @param attr The name of the attribute to set + * @param xmlns The namespace of the attribute to ste + * @param prefix The prefix of the attribute to ste + * @param value The value of the attribute + * + * @since 2.6.0 + */ +void xmlnode_set_attrib_full(xmlnode *node, const char *attr, const char *xmlns, + const char *prefix, const char *value); /** * Gets an attribute from a node.
