Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 26261:413b445a6018 | 26262:b03430dae08e |
|---|---|
| 155 * @param attr The name of the attribute. | 155 * @param attr The name of the attribute. |
| 156 * @param value The value of the attribute. | 156 * @param value The value of the attribute. |
| 157 */ | 157 */ |
| 158 void xmlnode_set_attrib(xmlnode *node, const char *attr, const char *value); | 158 void xmlnode_set_attrib(xmlnode *node, const char *attr, const char *value); |
| 159 | 159 |
| 160 #if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_XMLNODE_C_) | |
| 160 /** | 161 /** |
| 161 * Sets a prefixed attribute for a node | 162 * Sets a prefixed attribute for a node |
| 162 * | 163 * |
| 163 * @param node The node to set an attribute for. | 164 * @param node The node to set an attribute for. |
| 164 * @param attr The name of the attribute to set | 165 * @param attr The name of the attribute to set |
| 165 * @param prefix The prefix of the attribute to ste | 166 * @param prefix The prefix of the attribute to ste |
| 166 * @param value The value of the attribute | 167 * @param value The value of the attribute |
| 168 * | |
| 169 * @deprecated Use xmlnode_set_attrib_full instead. | |
| 167 */ | 170 */ |
| 168 void xmlnode_set_attrib_with_prefix(xmlnode *node, const char *attr, const char *prefix, const char *value); | 171 void xmlnode_set_attrib_with_prefix(xmlnode *node, const char *attr, const char *prefix, const char *value); |
| 169 | 172 |
| 170 /** | 173 /** |
| 171 * Sets a namespaced attribute for a node | 174 * Sets a namespaced attribute for a node |
| 172 * | 175 * |
| 173 * @param node The node to set an attribute for. | 176 * @param node The node to set an attribute for. |
| 174 * @param attr The name of the attribute to set | 177 * @param attr The name of the attribute to set |
| 175 * @param xmlns The namespace of the attribute to ste | 178 * @param xmlns The namespace of the attribute to ste |
| 176 * @param value The value of the attribute | 179 * @param value The value of the attribute |
| 180 * | |
| 181 * @deprecated Use xmlnode_set_attrib_full instead. | |
| 177 */ | 182 */ |
| 178 void xmlnode_set_attrib_with_namespace(xmlnode *node, const char *attr, const char *xmlns, const char *value); | 183 void xmlnode_set_attrib_with_namespace(xmlnode *node, const char *attr, const char *xmlns, const char *value); |
| 184 #endif /* PURPLE_DISABLE_DEPRECATED */ | |
| 185 | |
| 186 /** | |
| 187 * Sets a namespaced attribute for a node | |
| 188 * | |
| 189 * @param node The node to set an attribute for. | |
| 190 * @param attr The name of the attribute to set | |
| 191 * @param xmlns The namespace of the attribute to ste | |
| 192 * @param prefix The prefix of the attribute to ste | |
| 193 * @param value The value of the attribute | |
| 194 * | |
| 195 * @since 2.6.0 | |
| 196 */ | |
| 197 void xmlnode_set_attrib_full(xmlnode *node, const char *attr, const char *xmlns, | |
| 198 const char *prefix, const char *value); | |
| 179 | 199 |
| 180 /** | 200 /** |
| 181 * Gets an attribute from a node. | 201 * Gets an attribute from a node. |
| 182 * | 202 * |
| 183 * @param node The node to get an attribute from. | 203 * @param node The node to get an attribute from. |
