Thu, 30 Oct 2008 22:40:49 +0000
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 | 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::Account::Option PACKAGE = Purple::Account::Option PREFIX = purple_account_option_ |
| 11118 | 4 | PROTOTYPES: ENABLE |
| 5 | ||
| 12785 | 6 | void |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
7 | purple_account_option_destroy(option) |
|
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::Account::Option option |
| 11118 | 9 | |
| 12785 | 10 | const char * |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
11 | purple_account_option_get_default_string(option) |
|
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::Account::Option option |
| 11118 | 13 | |
| 14 | void | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
15 | purple_account_option_add_list_item(option, key, value) |
|
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::Account::Option option |
| 11118 | 17 | const char * key |
| 12785 | 18 | const char * value |
| 11118 | 19 | |
| 20 | void | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
21 | purple_account_option_set_default_string(option, value); |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
22 | Purple::Account::Option option |
| 11118 | 23 | const char * value |
| 24 | ||
| 25 | void | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
26 | purple_account_option_set_default_int(option, value); |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
27 | Purple::Account::Option option |
| 11118 | 28 | int value |
| 29 | ||
| 30 | void | |
|
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_account_option_set_default_bool(option, value); |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
32 | Purple::Account::Option option |
| 12785 | 33 | gboolean value |
| 11118 | 34 | |
|
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::Account::Option |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
36 | purple_account_option_list_new(class, text, pref_name, values) |
| 11118 | 37 | const char * text |
| 38 | const char * pref_name | |
| 39 | SV * values | |
| 40 | PREINIT: | |
| 41 | GList *t_GL; | |
| 42 | int i, t_len; | |
| 11131 | 43 | CODE: |
| 11118 | 44 | t_GL = NULL; |
| 45 | t_len = av_len((AV *)SvRV(values)); | |
| 46 | ||
|
23980
a38cbb35eecf
Some cleanup and a couple leak fixes.
Daniel Atallah <datallah@pidgin.im>
parents:
18190
diff
changeset
|
47 | for (i = 0; i < t_len; i++) |
|
a38cbb35eecf
Some cleanup and a couple leak fixes.
Daniel Atallah <datallah@pidgin.im>
parents:
18190
diff
changeset
|
48 | t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(values), i, 0))); |
|
a38cbb35eecf
Some cleanup and a couple leak fixes.
Daniel Atallah <datallah@pidgin.im>
parents:
18190
diff
changeset
|
49 | |
|
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 | RETVAL = purple_account_option_list_new(text, pref_name, t_GL); |
| 11131 | 51 | OUTPUT: |
| 52 | RETVAL | |
| 11118 | 53 | |
|
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::Account::Option |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
55 | purple_account_option_string_new(class, text, pref_name, default_value) |
| 11118 | 56 | const char * text |
| 57 | const char * pref_name | |
| 58 | const char * default_value | |
| 12364 | 59 | C_ARGS: |
| 60 | text, pref_name, default_value | |
| 11118 | 61 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
62 | Purple::Account::Option |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
63 | purple_account_option_int_new(class, text, pref_name, default_value) |
| 11118 | 64 | const char * text |
| 65 | const char * pref_name | |
| 66 | gboolean default_value | |
| 12364 | 67 | C_ARGS: |
| 68 | text, pref_name, default_value | |
| 11118 | 69 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
70 | Purple::Account::Option |
|
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_account_option_bool_new(class, text, pref_name, default_value) |
| 11118 | 72 | const char * text |
| 73 | const char * pref_name | |
| 74 | gboolean default_value | |
| 12364 | 75 | C_ARGS: |
| 76 | text, pref_name, default_value | |
| 11118 | 77 | |
|
15894
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::Account::Option |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
79 | purple_account_option_new(class, type, text, pref_name) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
80 | Purple::PrefType type |
| 11118 | 81 | const char * text |
| 82 | const char * pref_name | |
| 12364 | 83 | C_ARGS: |
| 84 | type, text, pref_name | |
| 11118 | 85 | |
| 86 | void | |
|
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_account_option_get_list(option) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
88 | Purple::Account::Option option |
| 11118 | 89 | PREINIT: |
|
18190
bcf28ef7e8ff
Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@pidgin.im>
parents:
15894
diff
changeset
|
90 | GList *l; |
| 11118 | 91 | PPCODE: |
|
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 | for (l = purple_account_option_get_list(option); l != NULL; l = l->next) { |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
93 | /* XXX These are actually PurpleKeyValuePairs but we don't have a |
| 12785 | 94 | * type for that and even if we did I don't think there's |
| 95 | * anything perl could do with them, so I'm just going to | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
96 | * leave this as a Purple::ListEntry for now. */ |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
97 | XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::ListEntry"))); |
| 11118 | 98 | } |
| 99 | ||
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
100 | Purple::PrefType |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
101 | purple_account_option_get_type(option) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
102 | Purple::Account::Option option |
| 11118 | 103 | |
| 12785 | 104 | gboolean |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
105 | purple_account_option_get_masked(option) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
106 | Purple::Account::Option option |
| 11118 | 107 | |
| 12785 | 108 | int |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
109 | purple_account_option_get_default_int(option) |
|
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::Account::Option option; |
| 12785 | 111 | |
| 112 | gboolean | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
113 | purple_account_option_get_default_bool(option) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
114 | Purple::Account::Option option; |
| 11118 | 115 | |
| 116 | const char * | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
117 | purple_account_option_get_setting(option) |
|
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::Account::Option option |
| 11118 | 119 | |
| 120 | const char * | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
121 | purple_account_option_get_text(option) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
122 | Purple::Account::Option option |
| 11118 | 123 | |
| 12785 | 124 | void |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
125 | purple_account_option_set_list(option, values) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
126 | Purple::Account::Option option |
| 11118 | 127 | SV * values |
| 128 | PREINIT: | |
| 129 | GList *t_GL; | |
| 130 | int i, t_len; | |
| 131 | PPCODE: | |
| 132 | t_GL = NULL; | |
| 133 | t_len = av_len((AV *)SvRV(values)); | |
| 134 | ||
|
23980
a38cbb35eecf
Some cleanup and a couple leak fixes.
Daniel Atallah <datallah@pidgin.im>
parents:
18190
diff
changeset
|
135 | for (i = 0; i < t_len; i++) |
|
a38cbb35eecf
Some cleanup and a couple leak fixes.
Daniel Atallah <datallah@pidgin.im>
parents:
18190
diff
changeset
|
136 | t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(values), i, 0))); |
|
a38cbb35eecf
Some cleanup and a couple leak fixes.
Daniel Atallah <datallah@pidgin.im>
parents:
18190
diff
changeset
|
137 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
138 | purple_account_option_set_list(option, t_GL); |
| 11118 | 139 | |
| 140 | void | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
141 | purple_account_option_set_masked(option, masked) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
142 | Purple::Account::Option option |
| 11118 | 143 | gboolean masked |
| 144 | ||
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
145 | MODULE = Purple::Account::Option PACKAGE = Purple::Account::UserSplit PREFIX = purple_account_user_split_ |
| 11118 | 146 | PROTOTYPES: ENABLE |
| 147 | ||
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
148 | Purple::Account::UserSplit |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
149 | purple_account_user_split_new(class, text, default_value, sep) |
| 11118 | 150 | const char * text |
| 151 | const char * default_value | |
| 152 | char sep | |
| 12364 | 153 | C_ARGS: |
| 154 | text, default_value, sep | |
| 11118 | 155 | |
| 12785 | 156 | char |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
157 | purple_account_user_split_get_separator(split) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
158 | Purple::Account::UserSplit split |
| 11118 | 159 | |
| 160 | const char * | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
161 | purple_account_user_split_get_text(split) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
162 | Purple::Account::UserSplit split |
| 11118 | 163 | |
| 12785 | 164 | void |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
165 | purple_account_user_split_destroy(split) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
166 | Purple::Account::UserSplit split |