libpurple/plugins/perl/common/XMLNode.xs

Thu, 30 Oct 2008 22:40:49 +0000

author
Richard Laager <rlaager@pidgin.im>
date
Thu, 30 Oct 2008 22:40:49 +0000
changeset 24569
5dbd0617a27d
parent 15894
765ec644ac47
child 16238
33bf2fd32108
child 18068
b6554e3c8224
child 20478
46933dc62880
child 28223
928e9c958b31
permissions
-rw-r--r--

Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
to detect when we're still using deprecated functions internally (and by
extension, when we've deprecated something we shouldn't have). In the
course of developing this changeset, I fixed a few such cases.

Given that the plan is to switch from PURPLE_HIDE_STRUCTS to
PURPLE_DISABLE_DEPRECATED as each struct is fully dealt with, this will
also ensure we have no regressions on the struct hiding work.

Deprecated functions are still available to the respective .c file, to
avoid missing prototype errors. Also, Perl and DBus undef the
*_DISABLE_DEPRECATED defines as appropriate so that deprecated functions
will still be exported to Perl plugins and via DBus. (Otherwise, we'd
be breaking backwards compatibility.)

11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
1 #include "module.h"
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
4 PROTOTYPES: ENABLE
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
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
12364
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
7 xmlnode_copy(class, 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
12364
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
9 C_ARGS:
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
10 src
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
11
12773
1f635f83d71f [gaim-migrate @ 15120]
Etan Reisner <deryni@pidgin.im>
parents: 12364
diff changeset
12 void
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
13 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
14 Purple::XMLNode node
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
15
15894
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
16 Purple::XMLNode
12364
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
17 xmlnode_from_str(class, str, size)
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
18 const char *str
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
19 gssize size
12364
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
20 C_ARGS:
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
21 str, size
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
22
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
23 const char *
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
24 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
25 Purple::XMLNode node
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
26 const char *attr
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
27
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
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
29 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
30 Purple::XMLNode parent
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
31 const char *name
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
32
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
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
34 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
35 Purple::XMLNode parent
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
36 const char *name
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
37 const char *xmlns
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
38
15165
0ff631dfbbca [gaim-migrate @ 17889]
Daniel Atallah <datallah@pidgin.im>
parents: 14779
diff changeset
39 gchar_own *
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
40 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
41 Purple::XMLNode node
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
42
15894
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
43 Purple::XMLNode
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
44 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
45 Purple::XMLNode node
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
46
12773
1f635f83d71f [gaim-migrate @ 15120]
Etan Reisner <deryni@pidgin.im>
parents: 12364
diff changeset
47 void
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
48 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
49 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
50 Purple::XMLNode child
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
51
12773
1f635f83d71f [gaim-migrate @ 15120]
Etan Reisner <deryni@pidgin.im>
parents: 12364
diff changeset
52 void
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
53 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
54 Purple::XMLNode node
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
55 const char *data
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
56 gssize size
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
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
12364
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
59 xmlnode_new(class, name)
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
60 const char *name
12364
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
61 C_ARGS:
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
62 name
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
63
15894
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
64 Purple::XMLNode
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
65 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
66 Purple::XMLNode parent
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
67 const char *name
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
68
12773
1f635f83d71f [gaim-migrate @ 15120]
Etan Reisner <deryni@pidgin.im>
parents: 12364
diff changeset
69 void
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
70 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
71 Purple::XMLNode node
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
72 const char *attr
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
73
12773
1f635f83d71f [gaim-migrate @ 15120]
Etan Reisner <deryni@pidgin.im>
parents: 12364
diff changeset
74 void
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
75 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
76 Purple::XMLNode node
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
77 const char *attr
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
78 const char *value
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
79
15165
0ff631dfbbca [gaim-migrate @ 17889]
Daniel Atallah <datallah@pidgin.im>
parents: 14779
diff changeset
80 gchar_own *
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
81 xmlnode_to_formatted_str(node, len)
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
83 int *len
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
84
15165
0ff631dfbbca [gaim-migrate @ 17889]
Daniel Atallah <datallah@pidgin.im>
parents: 14779
diff changeset
85 gchar_own *
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
86 xmlnode_to_str(node, len)
15894
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
87 Purple::XMLNode node
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
88 int *len

mercurial