Sat, 28 Aug 2004 12:58:57 +0000
[gaim-migrate @ 10788]
Change the namespace for our gtk cell renderer
| 7131 | 1 | /** |
| 2 | * @file xmlnode.h XML DOM functions | |
| 3 | * | |
| 4 | * gaim | |
| 5 | * | |
| 8046 | 6 | * Gaim is the legal property of its developers, whose names are too numerous |
| 7 | * to list here. Please refer to the COPYRIGHT file distributed with this | |
| 8 | * source distribution. | |
| 7131 | 9 | * |
| 10 | * This program is free software; you can redistribute it and/or modify | |
| 11 | * it under the terms of the GNU General Public License as published by | |
| 12 | * the Free Software Foundation; either version 2 of the License, or | |
| 13 | * (at your option) any later version. | |
| 14 | * | |
| 15 | * This program is distributed in the hope that it will be useful, | |
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 18 | * GNU General Public License for more details. | |
| 19 | * | |
| 20 | * You should have received a copy of the GNU General Public License | |
| 21 | * along with this program; if not, write to the Free Software | |
| 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 23 | */ | |
| 24 | #ifndef _GAIM_XMLNODE_H_ | |
| 25 | #define _GAIM_XMLNODE_H_ | |
| 26 | ||
| 8135 | 27 | typedef enum _XMLNodeType |
| 7131 | 28 | { |
| 8135 | 29 | XMLNODE_TYPE_TAG, |
| 30 | XMLNODE_TYPE_ATTRIB, | |
| 31 | XMLNODE_TYPE_DATA | |
| 32 | } XMLNodeType; | |
| 7131 | 33 | |
| 34 | typedef struct _xmlnode | |
| 35 | { | |
| 36 | char *name; | |
| 8135 | 37 | XMLNodeType type; |
| 7131 | 38 | char *data; |
| 39 | size_t data_sz; | |
| 40 | struct _xmlnode *parent; | |
| 41 | struct _xmlnode *child; | |
| 42 | struct _xmlnode *next; | |
| 43 | } xmlnode; | |
| 44 | ||
| 45 | xmlnode *xmlnode_new(const char *name); | |
| 46 | xmlnode *xmlnode_new_child(xmlnode *parent, const char *name); | |
| 47 | void xmlnode_insert_child(xmlnode *parent, xmlnode *child); | |
| 48 | xmlnode *xmlnode_get_child(xmlnode *parent, const char *name); | |
| 8262 | 49 | xmlnode *xmlnode_get_child_with_namespace(xmlnode *parent, const char *name, const char *xmlns); |
| 8135 | 50 | xmlnode *xmlnode_get_next_twin(xmlnode *node); |
| 7131 | 51 | void xmlnode_insert_data(xmlnode *parent, const char *data, size_t size); |
| 52 | char *xmlnode_get_data(xmlnode *node); | |
| 53 | void xmlnode_set_attrib(xmlnode *node, const char *attr, const char *value); | |
| 54 | const char *xmlnode_get_attrib(xmlnode *node, const char *attr); | |
| 55 | void xmlnode_remove_attrib(xmlnode *node, const char *attr); | |
| 7642 | 56 | char *xmlnode_to_str(xmlnode *node, int *len); |
| 9837 | 57 | char *xmlnode_to_formatted_str(xmlnode *node, int *len); |
| 7131 | 58 | xmlnode *xmlnode_from_str(const char *str, size_t size); |
| 8167 | 59 | xmlnode *xmlnode_copy(xmlnode *src); |
| 7131 | 60 | |
| 61 | void xmlnode_free(xmlnode *node); | |
| 62 | ||
| 63 | #endif /* _GAIM_XMLNODE_H_ */ |