Thu, 07 Aug 2008 01:41:44 +0000
Some cleanup and a couple leak fixes.
| 11118 | 1 | |
| 2 | ||
| 15884 | 3 | typedef struct group *Purple__Group; |
| 6508 | 4 | |
| 5 | #define group perl_group | |
| 6 | ||
|
6816
b14a3043ed09
[gaim-migrate @ 7356]
Herman Bloggs <herman@bluedigits.com>
parents:
6699
diff
changeset
|
7 | #include <glib.h> |
|
b14a3043ed09
[gaim-migrate @ 7356]
Herman Bloggs <herman@bluedigits.com>
parents:
6699
diff
changeset
|
8 | #ifdef _WIN32 |
|
b14a3043ed09
[gaim-migrate @ 7356]
Herman Bloggs <herman@bluedigits.com>
parents:
6699
diff
changeset
|
9 | #undef pipe |
|
b14a3043ed09
[gaim-migrate @ 7356]
Herman Bloggs <herman@bluedigits.com>
parents:
6699
diff
changeset
|
10 | #endif |
| 6508 | 11 | #include <EXTERN.h> |
| 12 | #include <perl.h> | |
| 13 | #include <XSUB.h> | |
| 14 | ||
| 15 | #undef group | |
| 16 | ||
| 17 | #include "../perl-common.h" | |
| 18 | ||
| 19 | #include "account.h" | |
| 11118 | 20 | #include "accountopt.h" |
| 21 | #include "blist.h" | |
| 22 | #include "buddyicon.h" | |
| 23 | #include "cipher.h" | |
| 24 | #include "cmds.h" | |
| 6508 | 25 | #include "connection.h" |
|
6591
cc1ab32edcdc
[gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents:
6588
diff
changeset
|
26 | #include "conversation.h" |
|
15066
57ab37fe1190
[gaim-migrate @ 17784]
Richard Laager <rlaager@pidgin.im>
parents:
14779
diff
changeset
|
27 | #include "core.h" |
| 6508 | 28 | #include "debug.h" |
| 11118 | 29 | #include "desktopitem.h" |
| 30 | #include "eventloop.h" | |
| 31 | #include "ft.h" | |
| 15884 | 32 | #ifdef PURPLE_GTKPERL |
| 11118 | 33 | #include "gtkaccount.h" |
| 34 | #include "gtkblist.h" | |
| 35 | #include "gtkconn.h" | |
| 36 | #include "gtkconv.h" | |
| 37 | #include "gtkutils.h" | |
| 14434 | 38 | #endif |
| 11118 | 39 | #include "imgstore.h" |
| 40 | #include "network.h" | |
| 41 | #include "notify.h" | |
| 42 | #include "plugin.h" | |
| 43 | #include "pluginpref.h" | |
| 44 | #include "pounce.h" | |
| 45 | #include "prefs.h" | |
| 46 | #include "privacy.h" | |
| 47 | #include "prpl.h" | |
| 48 | #include "proxy.h" | |
| 49 | #include "request.h" | |
| 50 | #include "roomlist.h" | |
| 51 | #include "savedstatuses.h" | |
|
6523
20c459e452ac
[gaim-migrate @ 7040]
Christian Hammond <chipx86@chipx86.com>
parents:
6520
diff
changeset
|
52 | #include "server.h" |
| 11118 | 53 | #include "signals.h" |
|
23023
6aeeb2037709
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21641
diff
changeset
|
54 | #include "smiley.h" |
| 11118 | 55 | #include "sound.h" |
| 56 | #include "sslconn.h" | |
| 57 | #include "status.h" | |
| 58 | #include "stringref.h" | |
|
11318
13fa1d5134f3
[gaim-migrate @ 13521]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
11170
diff
changeset
|
59 | /* Ewww. perl has it's own util.h which is in the include path :( */ |
|
15437
68e19d25f4dd
Fix perl plugin compilation after libpurple rename
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
60 | #include "libpurple/util.h" |
| 11118 | 61 | #include "value.h" |
| 62 | #include "xmlnode.h" | |
| 63 | ||
| 12808 | 64 | /* account.h */ |
| 15884 | 65 | typedef PurpleAccount * Purple__Account; |
| 66 | typedef PurpleAccountOption * Purple__Account__Option; | |
| 67 | typedef PurpleAccountUiOps * Purple__Account__UiOps; | |
| 68 | typedef PurpleAccountUserSplit * Purple__Account__UserSplit; | |
| 11118 | 69 | |
| 12808 | 70 | /* blist.h */ |
| 15884 | 71 | typedef PurpleBlistNode * Purple__BuddyList__Node; |
| 72 | typedef PurpleBlistNodeFlags Purple__BuddyList__NodeFlags; | |
|
17859
afbace92af8d
New function purple_blist_node_get_type.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17212
diff
changeset
|
73 | typedef PurpleBlistNodeType Purple__BuddyList__NodeType; |
| 15884 | 74 | typedef PurpleBlistUiOps * Purple__BuddyList__UiOps; |
| 75 | typedef PurpleBuddyList * Purple__BuddyList; | |
| 76 | typedef PurpleBuddy * Purple__BuddyList__Buddy; | |
| 77 | typedef PurpleChat * Purple__BuddyList__Chat; | |
| 78 | typedef PurpleContact * Purple__BuddyList__Contact; | |
| 79 | typedef PurpleGroup * Purple__BuddyList__Group; | |
| 11118 | 80 | |
| 12808 | 81 | /* buddyicon.h */ |
| 15884 | 82 | typedef PurpleBuddyIcon * Purple__Buddy__Icon; |
| 11118 | 83 | |
| 12808 | 84 | /* cipher.h */ |
| 15884 | 85 | typedef PurpleCipher * Purple__Cipher; |
| 86 | typedef PurpleCipherCaps Purple__CipherCaps; | |
| 87 | typedef PurpleCipherContext * Purple__Cipher__Context; | |
| 88 | typedef PurpleCipherOps * Purple__Cipher__Ops; | |
| 11118 | 89 | |
| 12808 | 90 | /* cmds.h */ |
| 15884 | 91 | typedef PurpleCmdFlag Purple__Cmd__Flag; |
| 92 | typedef PurpleCmdId Purple__Cmd__Id; | |
| 93 | typedef PurpleCmdPriority Purple__Cmd__Priority; | |
| 94 | typedef PurpleCmdRet Purple__Cmd__Ret; | |
| 11118 | 95 | |
| 12808 | 96 | /* connection.h */ |
| 15884 | 97 | typedef PurpleConnection * Purple__Connection; |
| 98 | typedef PurpleConnectionFlags Purple__ConnectionFlags; | |
| 99 | typedef PurpleConnectionState Purple__ConnectionState; | |
| 100 | typedef PurpleConnectionUiOps * Purple__Connection__UiOps; | |
| 11118 | 101 | |
| 12808 | 102 | /* conversation.h */ |
| 15884 | 103 | typedef PurpleConversationType Purple__ConversationType; |
| 104 | typedef PurpleConvUpdateType Purple__ConvUpdateType; | |
| 105 | typedef PurpleTypingState Purple__TypingState; | |
| 106 | typedef PurpleMessageFlags Purple__MessageFlags; | |
| 107 | typedef PurpleConvChatBuddyFlags Purple__ConvChatBuddyFlags; | |
| 108 | typedef PurpleConversation * Purple__Conversation; | |
| 109 | typedef PurpleConversationUiOps * Purple__Conversation__UiOps; | |
| 110 | typedef PurpleConvIm * Purple__Conversation__IM; | |
| 111 | typedef PurpleConvChat * Purple__Conversation__Chat; | |
| 112 | typedef PurpleConvChatBuddy * Purple__Conversation__ChatBuddy; | |
| 11118 | 113 | |
|
15066
57ab37fe1190
[gaim-migrate @ 17784]
Richard Laager <rlaager@pidgin.im>
parents:
14779
diff
changeset
|
114 | /* core.h */ |
|
57ab37fe1190
[gaim-migrate @ 17784]
Richard Laager <rlaager@pidgin.im>
parents:
14779
diff
changeset
|
115 | |
| 15884 | 116 | typedef PurpleCore * Purple__Core; |
| 117 | typedef PurpleCoreUiOps * Purple__Core__UiOps; | |
|
15066
57ab37fe1190
[gaim-migrate @ 17784]
Richard Laager <rlaager@pidgin.im>
parents:
14779
diff
changeset
|
118 | |
| 12808 | 119 | /* debug.h */ |
| 15884 | 120 | typedef PurpleDebugLevel Purple__DebugLevel; |
| 11118 | 121 | |
| 12808 | 122 | /* desktopitem.h */ |
| 15884 | 123 | typedef PurpleDesktopItem * Purple__DesktopItem; |
| 124 | typedef PurpleDesktopItemType Purple__DesktopItemType; | |
| 11118 | 125 | |
| 12808 | 126 | /* eventloop.h */ |
| 15884 | 127 | typedef PurpleInputCondition * Purple__InputCondition; |
| 128 | typedef PurpleEventLoopUiOps * Purple__EventLoopUiOps; | |
| 11118 | 129 | |
| 12808 | 130 | /* ft.h */ |
| 15884 | 131 | typedef PurpleXfer * Purple__Xfer; |
| 132 | typedef PurpleXferType Purple__XferType; | |
| 133 | typedef PurpleXferStatusType Purple__XferStatusType; | |
| 134 | typedef PurpleXferUiOps * Purple__XferUiOps; | |
| 11118 | 135 | |
| 15884 | 136 | #ifdef PURPLE_GTKPERL |
| 12808 | 137 | /* gtkblish.h */ |
| 15884 | 138 | typedef PurpleGtkBuddyList * Purple__GTK__BuddyList; |
| 139 | typedef PurpleStatusIconSize Purple__StatusIconSize; | |
| 11118 | 140 | |
| 12808 | 141 | /* gtkutils.h */ |
| 15884 | 142 | typedef PurpleButtonOrientation Purple__ButtonOrientation; |
| 143 | typedef PurpleButtonStyle Purple__ButtonStyle; | |
| 11139 | 144 | #ifndef _WIN32 |
| 15884 | 145 | typedef PurpleBrowserPlace Purple__BrowserPlace; |
| 11139 | 146 | #endif /* _WIN32 */ |
| 6508 | 147 | |
| 12808 | 148 | /* gtkconv.h */ |
| 15884 | 149 | typedef PurpleUnseenState Purple__UnseenState; |
| 150 | typedef PurpleGtkConversation * Purple__GTK__Conversation; | |
| 151 | typedef GdkPixbuf * Purple__GDK__Pixbuf; | |
| 152 | typedef GtkWidget * Purple__GTK__Widget; | |
| 11118 | 153 | |
| 12808 | 154 | /* gtkutils.h */ |
| 15884 | 155 | typedef GtkFileSelection * Purple__GTK__FileSelection; |
| 156 | typedef GtkSelectionData * Purple__GTK__SelectionData; | |
| 157 | typedef GtkTextView * Purple__GTK__TextView; | |
| 11118 | 158 | |
| 12808 | 159 | /* gtkconn.h */ |
| 14434 | 160 | #endif |
| 11118 | 161 | |
| 12808 | 162 | /* imgstore.h */ |
| 15884 | 163 | typedef PurpleStoredImage * Purple__StoredImage; |
| 11118 | 164 | |
| 12808 | 165 | /* log.h */ |
| 15884 | 166 | typedef PurpleLog * Purple__Log; |
| 167 | typedef PurpleLogCommonLoggerData * Purple__LogCommonLoggerData; | |
| 168 | typedef PurpleLogLogger * Purple__Log__Logger; | |
| 169 | typedef PurpleLogReadFlags * Purple__Log__ReadFlags; | |
| 170 | typedef PurpleLogSet * Purple__LogSet; | |
| 171 | typedef PurpleLogType Purple__LogType; | |
| 11118 | 172 | |
|
12910
e6c3213c28ec
[gaim-migrate @ 15263]
Daniel Atallah <datallah@pidgin.im>
parents:
12882
diff
changeset
|
173 | /* network.h */ |
| 15884 | 174 | typedef PurpleNetworkListenData * Purple__NetworkListenData; |
| 175 | typedef PurpleNetworkListenCallback Purple__NetworkListenCallback; | |
|
12910
e6c3213c28ec
[gaim-migrate @ 15263]
Daniel Atallah <datallah@pidgin.im>
parents:
12882
diff
changeset
|
176 | |
| 12808 | 177 | /* notify.h */ |
| 15884 | 178 | typedef PurpleNotifyCloseCallback Purple__NotifyCloseCallback; |
| 179 | typedef PurpleNotifyMsgType Purple__NotifyMsgType; | |
| 180 | typedef PurpleNotifySearchButtonType Purple__NotifySearchButtonType; | |
| 181 | typedef PurpleNotifySearchResults * Purple__NotifySearchResults; | |
| 182 | typedef PurpleNotifySearchColumn * Purple__NotifySearchColumn; | |
| 183 | typedef PurpleNotifySearchButton * Purple__NotifySearchButton; | |
| 184 | typedef PurpleNotifyType Purple__NotifyType; | |
| 185 | typedef PurpleNotifyUiOps * Purple__NotifyUiOps; | |
| 186 | typedef PurpleNotifyUserInfo * Purple__NotifyUserInfo; | |
| 187 | typedef PurpleNotifyUserInfoEntry * Purple__NotifyUserInfoEntry; | |
| 11118 | 188 | |
| 12808 | 189 | /* plugin.h */ |
| 15884 | 190 | typedef PurplePlugin * Purple__Plugin; |
| 191 | typedef PurplePluginAction * Purple__Plugin__Action; | |
| 192 | typedef PurplePluginInfo * Purple__PluginInfo; | |
| 193 | typedef PurplePluginLoaderInfo * Purple__PluginLoaderInfo; | |
| 194 | typedef PurplePluginType Purple__PluginType; | |
| 195 | typedef PurplePluginUiInfo * Purple__PluginUiInfo; | |
| 11118 | 196 | |
| 12808 | 197 | /* pluginpref.h */ |
| 15884 | 198 | typedef PurplePluginPref * Purple__PluginPref; |
| 199 | typedef PurplePluginPrefFrame * Purple__PluginPref__Frame; | |
| 200 | typedef PurplePluginPrefType Purple__PluginPrefType; | |
|
21641
a0d410a35eb8
Add purple_plugin_pref_[sg]et_format_type to the Perl API. There are a number of new functions that also need to be added, but I don't have time to do that right now. Fixes #3781.
Daniel Atallah <datallah@pidgin.im>
parents:
17859
diff
changeset
|
201 | typedef PurpleStringFormatType Purple__String__Format__Type; |
| 11118 | 202 | |
| 12808 | 203 | /* pounce.h */ |
| 15884 | 204 | typedef PurplePounce * Purple__Pounce; |
| 205 | typedef PurplePounceEvent Purple__PounceEvent; | |
| 11118 | 206 | |
| 12808 | 207 | /* prefs.h */ |
| 15884 | 208 | typedef PurplePrefType Purple__PrefType; |
| 11118 | 209 | |
| 12808 | 210 | /* privacy.h */ |
| 15884 | 211 | typedef PurplePrivacyType Purple__PrivacyType; |
| 212 | typedef PurplePrivacyUiOps * Purple__Privacy__UiOps; | |
| 11118 | 213 | |
| 12808 | 214 | /* proxy.h */ |
| 15884 | 215 | typedef PurpleProxyInfo * Purple__ProxyInfo; |
| 216 | typedef PurpleProxyType Purple__ProxyType; | |
|
6588
187c6026c574
[gaim-migrate @ 7110]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
217 | |
| 12808 | 218 | /* prpl.h */ |
| 15884 | 219 | typedef PurpleBuddyIconSpec * Purple__Buddy__Icon__Spec; |
| 220 | typedef PurpleIconScaleRules Purple__IconScaleRules; | |
| 221 | typedef PurplePluginProtocolInfo * Purple__PluginProtocolInfo; | |
| 222 | typedef PurpleProtocolOptions Purple__ProtocolOptions; | |
| 11118 | 223 | |
| 12808 | 224 | /* request.h */ |
| 15884 | 225 | typedef PurpleRequestField * Purple__Request__Field; |
| 226 | typedef PurpleRequestFields * Purple__Request__Fields; | |
| 227 | typedef PurpleRequestFieldGroup * Purple__Request__Field__Group; | |
| 228 | typedef PurpleRequestFieldType Purple__RequestFieldType; | |
| 229 | typedef PurpleRequestType Purple__RequestType; | |
| 230 | typedef PurpleRequestUiOps * Purple__Request__UiOps; | |
| 11118 | 231 | |
| 12808 | 232 | /* roomlist.h */ |
| 15884 | 233 | typedef PurpleRoomlist * Purple__Roomlist; |
| 234 | typedef PurpleRoomlistField * Purple__Roomlist__Field; | |
| 235 | typedef PurpleRoomlistFieldType Purple__RoomlistFieldType; | |
| 236 | typedef PurpleRoomlistRoom * Purple__Roomlist__Room; | |
| 237 | typedef PurpleRoomlistRoomType Purple__RoomlistRoomType; | |
| 238 | typedef PurpleRoomlistUiOps * Purple__Roomlist__UiOps; | |
| 11118 | 239 | |
| 12808 | 240 | /* savedstatuses.h */ |
| 15884 | 241 | typedef PurpleSavedStatus * Purple__SavedStatus; |
|
17212
29c5fc5e0cdc
Warmenhove a patch from Steven Danna to add bindings to all the savedstatus.h
Etan Reisner <deryni@pidgin.im>
parents:
16773
diff
changeset
|
242 | typedef PurpleSavedStatusSub * Purple__SavedStatus__Sub; |
| 11118 | 243 | |
|
23023
6aeeb2037709
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21641
diff
changeset
|
244 | /* smiley.h */ |
|
6aeeb2037709
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21641
diff
changeset
|
245 | typedef PurpleSmiley * Purple__Smiley; |
|
6aeeb2037709
Expose smiley API to perl plugins.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21641
diff
changeset
|
246 | |
| 12808 | 247 | /* sound.h */ |
| 15884 | 248 | typedef PurpleSoundEventID Purple__SoundEventID; |
| 249 | typedef PurpleSoundUiOps * Purple__Sound__UiOps; | |
| 11118 | 250 | |
| 12808 | 251 | /* sslconn.h */ |
| 15884 | 252 | typedef PurpleInputCondition * Purple__Input__Condition; |
| 253 | typedef PurpleSslConnection * Purple__Ssl__Connection; | |
| 254 | typedef PurpleSslErrorType Purple__SslErrorType; | |
| 255 | typedef PurpleSslOps * Purple__Ssl__Ops; | |
| 11118 | 256 | |
| 12808 | 257 | /* status.h */ |
| 15884 | 258 | typedef PurplePresence * Purple__Presence; |
| 259 | typedef PurplePresenceContext Purple__PresenceContext; | |
| 260 | typedef PurpleStatus * Purple__Status; | |
| 261 | typedef PurpleStatusAttr * Purple__StatusAttr; | |
| 262 | typedef PurpleStatusPrimitive Purple__StatusPrimitive; | |
| 263 | typedef PurpleStatusType * Purple__StatusType; | |
| 11118 | 264 | |
| 13018 | 265 | /* stringref.h */ |
| 15884 | 266 | typedef PurpleStringref * Purple__Stringref; |
| 11118 | 267 | |
| 12919 | 268 | /* util.h */ |
| 15884 | 269 | typedef PurpleInfoFieldFormatCallback Purple__Util__InfoFieldFormatCallback; |
| 270 | typedef PurpleUtilFetchUrlData Purple__Util__FetchUrlData; | |
| 271 | typedef PurpleMenuAction * Purple__Menu__Action; | |
| 12919 | 272 | |
| 12808 | 273 | /* value.h */ |
| 15884 | 274 | typedef PurpleValue * Purple__Value; |
| 11118 | 275 | |
| 12808 | 276 | /* xmlnode.h */ |
| 15884 | 277 | typedef xmlnode * Purple__XMLNode; |
| 12808 | 278 | typedef XMLNodeType XMLNode__Type; |
| 11118 | 279 | |
|
14779
1b71da367f56
[gaim-migrate @ 17471]
Martijn van Beers <martijn@eekeek.org>
parents:
14434
diff
changeset
|
280 | /* other */ |
| 15884 | 281 | typedef void * Purple__Handle; |
|
15165
0ff631dfbbca
[gaim-migrate @ 17889]
Daniel Atallah <datallah@pidgin.im>
parents:
15066
diff
changeset
|
282 | |
|
0ff631dfbbca
[gaim-migrate @ 17889]
Daniel Atallah <datallah@pidgin.im>
parents:
15066
diff
changeset
|
283 | typedef gchar gchar_own; |
|
0ff631dfbbca
[gaim-migrate @ 17889]
Daniel Atallah <datallah@pidgin.im>
parents:
15066
diff
changeset
|
284 | |
|
16773
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15884
diff
changeset
|
285 | typedef struct _constiv { |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15884
diff
changeset
|
286 | const char *name; |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15884
diff
changeset
|
287 | IV iv; |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15884
diff
changeset
|
288 | } constiv; |