summaryrefslogtreecommitdiff
path: root/libpurple/xmlnode.h
diff options
context:
space:
mode:
authorElliott Sales de Andrade <qulogic@pidgin.im>2009-03-13 04:29:11 +0000
committerElliott Sales de Andrade <qulogic@pidgin.im>2009-03-13 04:29:11 +0000
commit832b349cf2ff00439333abc4b8dfcfbed51f7635 (patch)
tree7ad7f6a8a4e83a69939f25785fe9364977bfca10 /libpurple/xmlnode.h
parentb1eba08dab236c82fc629627dd201b4f1e36e146 (diff)
downloadpidgin-832b349cf2ff00439333abc4b8dfcfbed51f7635.tar.gz
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.
Diffstat (limited to 'libpurple/xmlnode.h')
-rw-r--r--libpurple/xmlnode.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/libpurple/xmlnode.h b/libpurple/xmlnode.h
index bab8192d13..bfc41f2403 100644
--- a/libpurple/xmlnode.h
+++ b/libpurple/xmlnode.h
@@ -157,6 +157,7 @@ char *xmlnode_get_data_unescaped(xmlnode *node);
*/
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 @@ void xmlnode_set_attrib(xmlnode *node, const char *attr, const char *value);
* @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 @@ void xmlnode_set_attrib_with_prefix(xmlnode *node, const char *attr, const char
* @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.