Sat, 22 Jun 2013 15:58:44 +0530
Added ciphers and hashes _new functions to .xs files
| 11118 | 1 | #include "module.h" |
| 2 | ||
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
3 | MODULE = Purple::XMLNode PACKAGE = Purple::XMLNode PREFIX = xmlnode_ |
| 11118 | 4 | PROTOTYPES: ENABLE |
| 5 | ||
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
6 | Purple::XMLNode |
|
28223
928e9c958b31
Fix the Perl XMLNode API so that calls don't need to explicitly pass
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
7 | xmlnode_copy(src) |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
8 | Purple::XMLNode src |
| 11118 | 9 | |
| 12773 | 10 | void |
| 11118 | 11 | xmlnode_free(node) |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
12 | Purple::XMLNode node |
| 11118 | 13 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
14 | Purple::XMLNode |
|
28223
928e9c958b31
Fix the Perl XMLNode API so that calls don't need to explicitly pass
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
15 | xmlnode_from_str(const char *str, gssize length(str)) |
|
928e9c958b31
Fix the Perl XMLNode API so that calls don't need to explicitly pass
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
16 | PROTOTYPE: $ |
| 11118 | 17 | |
| 18 | const char * | |
|
28224
315ba0216ae0
Add Purple::XMLNode::get_name()
Paul Aurich <darkrain42@pidgin.im>
parents:
28223
diff
changeset
|
19 | xmlnode_get_name(node) |
|
315ba0216ae0
Add Purple::XMLNode::get_name()
Paul Aurich <darkrain42@pidgin.im>
parents:
28223
diff
changeset
|
20 | Purple::XMLNode node |
|
315ba0216ae0
Add Purple::XMLNode::get_name()
Paul Aurich <darkrain42@pidgin.im>
parents:
28223
diff
changeset
|
21 | CODE: |
|
315ba0216ae0
Add Purple::XMLNode::get_name()
Paul Aurich <darkrain42@pidgin.im>
parents:
28223
diff
changeset
|
22 | RETVAL = node->name; |
|
315ba0216ae0
Add Purple::XMLNode::get_name()
Paul Aurich <darkrain42@pidgin.im>
parents:
28223
diff
changeset
|
23 | OUTPUT: |
|
315ba0216ae0
Add Purple::XMLNode::get_name()
Paul Aurich <darkrain42@pidgin.im>
parents:
28223
diff
changeset
|
24 | RETVAL |
|
315ba0216ae0
Add Purple::XMLNode::get_name()
Paul Aurich <darkrain42@pidgin.im>
parents:
28223
diff
changeset
|
25 | |
|
315ba0216ae0
Add Purple::XMLNode::get_name()
Paul Aurich <darkrain42@pidgin.im>
parents:
28223
diff
changeset
|
26 | const char * |
| 11118 | 27 | xmlnode_get_attrib(node, attr) |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
28 | Purple::XMLNode node |
| 11118 | 29 | const char *attr |
| 30 | ||
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
31 | Purple::XMLNode |
| 11118 | 32 | xmlnode_get_child(parent, name) |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
33 | Purple::XMLNode parent |
| 11118 | 34 | const char *name |
|
28393
1f319c8ff5cb
Add two XMLNode accessors for iterating through the children of an XMLNode.
Paul Aurich <darkrain42@pidgin.im>
parents:
28224
diff
changeset
|
35 | PREINIT: |
|
1f319c8ff5cb
Add two XMLNode accessors for iterating through the children of an XMLNode.
Paul Aurich <darkrain42@pidgin.im>
parents:
28224
diff
changeset
|
36 | xmlnode *tmp; |
|
1f319c8ff5cb
Add two XMLNode accessors for iterating through the children of an XMLNode.
Paul Aurich <darkrain42@pidgin.im>
parents:
28224
diff
changeset
|
37 | CODE: |
|
1f319c8ff5cb
Add two XMLNode accessors for iterating through the children of an XMLNode.
Paul Aurich <darkrain42@pidgin.im>
parents:
28224
diff
changeset
|
38 | if (!name || *name == '\0') { |
|
1f319c8ff5cb
Add two XMLNode accessors for iterating through the children of an XMLNode.
Paul Aurich <darkrain42@pidgin.im>
parents:
28224
diff
changeset
|
39 | tmp = parent->child; |
|
1f319c8ff5cb
Add two XMLNode accessors for iterating through the children of an XMLNode.
Paul Aurich <darkrain42@pidgin.im>
parents:
28224
diff
changeset
|
40 | while (tmp && tmp->type != XMLNODE_TYPE_TAG) |
|
1f319c8ff5cb
Add two XMLNode accessors for iterating through the children of an XMLNode.
Paul Aurich <darkrain42@pidgin.im>
parents:
28224
diff
changeset
|
41 | tmp = tmp->next; |
|
1f319c8ff5cb
Add two XMLNode accessors for iterating through the children of an XMLNode.
Paul Aurich <darkrain42@pidgin.im>
parents:
28224
diff
changeset
|
42 | RETVAL = tmp; |
|
1f319c8ff5cb
Add two XMLNode accessors for iterating through the children of an XMLNode.
Paul Aurich <darkrain42@pidgin.im>
parents:
28224
diff
changeset
|
43 | } else |
|
1f319c8ff5cb
Add two XMLNode accessors for iterating through the children of an XMLNode.
Paul Aurich <darkrain42@pidgin.im>
parents:
28224
diff
changeset
|
44 | RETVAL = xmlnode_get_child(parent, name); |
|
1f319c8ff5cb
Add two XMLNode accessors for iterating through the children of an XMLNode.
Paul Aurich <darkrain42@pidgin.im>
parents:
28224
diff
changeset
|
45 | OUTPUT: |
|
1f319c8ff5cb
Add two XMLNode accessors for iterating through the children of an XMLNode.
Paul Aurich <darkrain42@pidgin.im>
parents:
28224
diff
changeset
|
46 | RETVAL |
| 11118 | 47 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
48 | Purple::XMLNode |
| 11118 | 49 | xmlnode_get_child_with_namespace(parent, name, xmlns) |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
50 | Purple::XMLNode parent |
| 11118 | 51 | const char *name |
| 52 | const char *xmlns | |
| 53 | ||
|
15165
0ff631dfbbca
[gaim-migrate @ 17889]
Daniel Atallah <datallah@pidgin.im>
parents:
14779
diff
changeset
|
54 | gchar_own * |
| 11118 | 55 | xmlnode_get_data(node) |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
56 | Purple::XMLNode node |
| 11118 | 57 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
58 | Purple::XMLNode |
|
28393
1f319c8ff5cb
Add two XMLNode accessors for iterating through the children of an XMLNode.
Paul Aurich <darkrain42@pidgin.im>
parents:
28224
diff
changeset
|
59 | xmlnode_get_next(node) |
|
1f319c8ff5cb
Add two XMLNode accessors for iterating through the children of an XMLNode.
Paul Aurich <darkrain42@pidgin.im>
parents:
28224
diff
changeset
|
60 | Purple::XMLNode node |
|
1f319c8ff5cb
Add two XMLNode accessors for iterating through the children of an XMLNode.
Paul Aurich <darkrain42@pidgin.im>
parents:
28224
diff
changeset
|
61 | PREINIT: |
|
1f319c8ff5cb
Add two XMLNode accessors for iterating through the children of an XMLNode.
Paul Aurich <darkrain42@pidgin.im>
parents:
28224
diff
changeset
|
62 | xmlnode *tmp; |
|
1f319c8ff5cb
Add two XMLNode accessors for iterating through the children of an XMLNode.
Paul Aurich <darkrain42@pidgin.im>
parents:
28224
diff
changeset
|
63 | CODE: |
|
1f319c8ff5cb
Add two XMLNode accessors for iterating through the children of an XMLNode.
Paul Aurich <darkrain42@pidgin.im>
parents:
28224
diff
changeset
|
64 | tmp = node->next; |
|
1f319c8ff5cb
Add two XMLNode accessors for iterating through the children of an XMLNode.
Paul Aurich <darkrain42@pidgin.im>
parents:
28224
diff
changeset
|
65 | while (tmp && tmp->type != XMLNODE_TYPE_TAG) |
|
1f319c8ff5cb
Add two XMLNode accessors for iterating through the children of an XMLNode.
Paul Aurich <darkrain42@pidgin.im>
parents:
28224
diff
changeset
|
66 | tmp = tmp->next; |
|
1f319c8ff5cb
Add two XMLNode accessors for iterating through the children of an XMLNode.
Paul Aurich <darkrain42@pidgin.im>
parents:
28224
diff
changeset
|
67 | RETVAL = tmp; |
|
1f319c8ff5cb
Add two XMLNode accessors for iterating through the children of an XMLNode.
Paul Aurich <darkrain42@pidgin.im>
parents:
28224
diff
changeset
|
68 | OUTPUT: |
|
1f319c8ff5cb
Add two XMLNode accessors for iterating through the children of an XMLNode.
Paul Aurich <darkrain42@pidgin.im>
parents:
28224
diff
changeset
|
69 | RETVAL |
|
1f319c8ff5cb
Add two XMLNode accessors for iterating through the children of an XMLNode.
Paul Aurich <darkrain42@pidgin.im>
parents:
28224
diff
changeset
|
70 | |
|
1f319c8ff5cb
Add two XMLNode accessors for iterating through the children of an XMLNode.
Paul Aurich <darkrain42@pidgin.im>
parents:
28224
diff
changeset
|
71 | Purple::XMLNode |
| 11118 | 72 | xmlnode_get_next_twin(node) |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
73 | Purple::XMLNode node |
| 11118 | 74 | |
| 12773 | 75 | void |
| 11118 | 76 | xmlnode_insert_child(parent, child) |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
77 | Purple::XMLNode parent |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
78 | Purple::XMLNode child |
| 11118 | 79 | |
| 12773 | 80 | void |
| 11118 | 81 | xmlnode_insert_data(node, data, size) |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
82 | Purple::XMLNode node |
| 11118 | 83 | const char *data |
| 84 | gssize size | |
| 85 | ||
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
86 | Purple::XMLNode |
| 12364 | 87 | xmlnode_new(class, name) |
| 11118 | 88 | const char *name |
| 12364 | 89 | C_ARGS: |
| 90 | name | |
| 11118 | 91 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
92 | Purple::XMLNode |
| 11118 | 93 | xmlnode_new_child(parent, name) |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
94 | Purple::XMLNode parent |
| 11118 | 95 | const char *name |
| 96 | ||
| 12773 | 97 | void |
| 11118 | 98 | xmlnode_remove_attrib(node, attr) |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
99 | Purple::XMLNode node |
| 11118 | 100 | const char *attr |
| 101 | ||
| 12773 | 102 | void |
| 11118 | 103 | xmlnode_set_attrib(node, attr, value) |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
104 | Purple::XMLNode node |
| 11118 | 105 | const char *attr |
| 106 | const char *value | |
| 107 | ||
|
15165
0ff631dfbbca
[gaim-migrate @ 17889]
Daniel Atallah <datallah@pidgin.im>
parents:
14779
diff
changeset
|
108 | gchar_own * |
|
28223
928e9c958b31
Fix the Perl XMLNode API so that calls don't need to explicitly pass
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
109 | xmlnode_to_formatted_str(node) |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
110 | Purple::XMLNode node |
|
28223
928e9c958b31
Fix the Perl XMLNode API so that calls don't need to explicitly pass
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
111 | CODE: |
|
928e9c958b31
Fix the Perl XMLNode API so that calls don't need to explicitly pass
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
112 | RETVAL = xmlnode_to_formatted_str(node, NULL); |
|
928e9c958b31
Fix the Perl XMLNode API so that calls don't need to explicitly pass
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
113 | OUTPUT: |
|
928e9c958b31
Fix the Perl XMLNode API so that calls don't need to explicitly pass
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
114 | RETVAL |
| 11118 | 115 | |
|
15165
0ff631dfbbca
[gaim-migrate @ 17889]
Daniel Atallah <datallah@pidgin.im>
parents:
14779
diff
changeset
|
116 | gchar_own * |
|
28223
928e9c958b31
Fix the Perl XMLNode API so that calls don't need to explicitly pass
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
117 | xmlnode_to_str(node) |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
118 | Purple::XMLNode node |
|
28223
928e9c958b31
Fix the Perl XMLNode API so that calls don't need to explicitly pass
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
119 | CODE: |
|
928e9c958b31
Fix the Perl XMLNode API so that calls don't need to explicitly pass
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
120 | RETVAL = xmlnode_to_str(node, NULL); |
|
928e9c958b31
Fix the Perl XMLNode API so that calls don't need to explicitly pass
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
121 | OUTPUT: |
|
928e9c958b31
Fix the Perl XMLNode API so that calls don't need to explicitly pass
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
122 | RETVAL |