diff options
Diffstat (limited to 'swig')
| -rw-r--r-- | swig/plist.i | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/swig/plist.i b/swig/plist.i index c750cd7..055039b 100644 --- a/swig/plist.i +++ b/swig/plist.i | |||
| @@ -66,7 +66,7 @@ typedef struct { | |||
| 66 | free($self); | 66 | free($self); |
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | void AddSubNode(PListNode* subnode) { | 69 | void add_sub_node(PListNode* subnode) { |
| 70 | plist_add_sub_node($self->node, subnode); | 70 | plist_add_sub_node($self->node, subnode); |
| 71 | } | 71 | } |
| 72 | 72 | ||
| @@ -153,7 +153,13 @@ typedef struct { | |||
| 153 | return plist_get_node_type($self->node); | 153 | return plist_get_node_type($self->node); |
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | PListNode* find_sub_node_by_string(char* s) { | 156 | PListNode* find_node_by_key(char *s) { |
| 157 | PListNode* plist = (PListNode*) malloc(sizeof(PListNode)); | ||
| 158 | plist = plist_find_node_by_key($self->node, s); | ||
| 159 | return plist; | ||
| 160 | } | ||
| 161 | |||
| 162 | PListNode* find_node_by_string(char* s) { | ||
| 157 | PListNode* plist = (PListNode*) malloc(sizeof(PListNode)); | 163 | PListNode* plist = (PListNode*) malloc(sizeof(PListNode)); |
| 158 | plist = plist_find_node_by_string($self->node, s); | 164 | plist = plist_find_node_by_string($self->node, s); |
| 159 | return plist; | 165 | return plist; |
| @@ -172,5 +178,13 @@ typedef struct { | |||
| 172 | plist_to_bin($self->node, &s, &l); | 178 | plist_to_bin($self->node, &s, &l); |
| 173 | return s; | 179 | return s; |
| 174 | } | 180 | } |
| 181 | |||
| 182 | void from_xml (char* xml) { | ||
| 183 | plist_from_xml(xml, strlen(xml), &$self->node); | ||
| 184 | } | ||
| 185 | |||
| 186 | void from_bin (char* data, uint64_t len) { | ||
| 187 | plist_from_bin(data, len, &$self->node); | ||
| 188 | } | ||
| 175 | }; | 189 | }; |
| 176 | 190 | ||
