Sun, 19 Nov 2006 19:58:45 +0000
[gaim-migrate @ 17784]
SF Patch #1571670 from zdeqb
"Perl bindings for the functions in core.h and some
bindings for the functions in privacy.h."
I made the following changes:
1. I chose to export gaim_get_core() as Gaim::get_core instead of Gaim::Core::get_core.
2. I don't see any reason to require Perl code to pass bogus values just because C requires them. So, I changed Gaim::Core::quit_cb to NOT take an argument, and to pass NULL to gaim_core_quit_cb().
3. I fixed a typo.
4. I cleaned up some spacing issues.
I noticed that Core.c didn't get created from Core.xs until I re-ran configure. Maybe there's no way to avoid this?
| 11118 | 1 | |
| 2 | ||
| 6508 | 3 | typedef struct group *Gaim__Group; |
| 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" | |
| 14434 | 32 | #ifdef GAIM_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" |
| 54 | #include "sound.h" | |
| 55 | #include "sslconn.h" | |
| 56 | #include "status.h" | |
| 57 | #include "stringref.h" | |
|
11318
13fa1d5134f3
[gaim-migrate @ 13521]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
11170
diff
changeset
|
58 | /* Ewww. perl has it's own util.h which is in the include path :( */ |
|
14377
c0440e16bacd
[gaim-migrate @ 17008]
Daniel Atallah <datallah@pidgin.im>
parents:
14329
diff
changeset
|
59 | #include "libgaim/util.h" |
| 11118 | 60 | #include "value.h" |
| 61 | #include "xmlnode.h" | |
| 62 | ||
| 12808 | 63 | /* account.h */ |
| 64 | typedef GaimAccount * Gaim__Account; | |
| 65 | typedef GaimAccountOption * Gaim__Account__Option; | |
| 66 | typedef GaimAccountUiOps * Gaim__Account__UiOps; | |
| 67 | typedef GaimAccountUserSplit * Gaim__Account__UserSplit; | |
| 11118 | 68 | |
| 12808 | 69 | /* blist.h */ |
| 70 | typedef GaimBlistNode * Gaim__BuddyList__Node; | |
| 12866 | 71 | typedef GaimBlistNodeFlags Gaim__BuddyList__NodeFlags; |
| 12808 | 72 | typedef GaimBlistUiOps * Gaim__BuddyList__UiOps; |
| 73 | typedef GaimBuddyList * Gaim__BuddyList; | |
| 74 | typedef GaimBuddy * Gaim__BuddyList__Buddy; | |
| 75 | typedef GaimChat * Gaim__BuddyList__Chat; | |
| 76 | typedef GaimContact * Gaim__BuddyList__Contact; | |
| 77 | typedef GaimGroup * Gaim__BuddyList__Group; | |
| 11118 | 78 | |
| 12808 | 79 | /* buddyicon.h */ |
| 80 | typedef GaimBuddyIcon * Gaim__Buddy__Icon; | |
| 11118 | 81 | |
| 12808 | 82 | /* cipher.h */ |
| 83 | typedef GaimCipher * Gaim__Cipher; | |
| 11118 | 84 | typedef GaimCipherCaps Gaim__CipherCaps; |
| 12808 | 85 | typedef GaimCipherContext * Gaim__Cipher__Context; |
| 11118 | 86 | typedef GaimCipherOps * Gaim__Cipher__Ops; |
| 87 | ||
| 12808 | 88 | /* cmds.h */ |
| 12882 | 89 | typedef GaimCmdFlag Gaim__Cmd__Flag; |
| 90 | typedef GaimCmdId Gaim__Cmd__Id; | |
| 91 | typedef GaimCmdPriority Gaim__Cmd__Priority; | |
| 92 | typedef GaimCmdRet Gaim__Cmd__Ret; | |
| 11118 | 93 | |
| 12808 | 94 | /* connection.h */ |
| 95 | typedef GaimConnection * Gaim__Connection; | |
| 11118 | 96 | typedef GaimConnectionFlags Gaim__ConnectionFlags; |
| 97 | typedef GaimConnectionState Gaim__ConnectionState; | |
| 12808 | 98 | typedef GaimConnectionUiOps * Gaim__Connection__UiOps; |
| 11118 | 99 | |
| 12808 | 100 | /* conversation.h */ |
| 101 | typedef GaimConversationType Gaim__ConversationType; | |
| 11118 | 102 | typedef GaimConvUpdateType Gaim__ConvUpdateType; |
| 103 | typedef GaimTypingState Gaim__TypingState; | |
| 12808 | 104 | typedef GaimMessageFlags Gaim__MessageFlags; |
| 105 | typedef GaimConvChatBuddyFlags Gaim__ConvChatBuddyFlags; | |
| 106 | typedef GaimConversation * Gaim__Conversation; | |
| 107 | typedef GaimConversationUiOps * Gaim__Conversation__UiOps; | |
| 108 | typedef GaimConvIm * Gaim__Conversation__IM; | |
| 109 | typedef GaimConvChat * Gaim__Conversation__Chat; | |
| 110 | typedef GaimConvChatBuddy * Gaim__Conversation__ChatBuddy; | |
| 11118 | 111 | |
|
15066
57ab37fe1190
[gaim-migrate @ 17784]
Richard Laager <rlaager@pidgin.im>
parents:
14779
diff
changeset
|
112 | /* core.h */ |
|
57ab37fe1190
[gaim-migrate @ 17784]
Richard Laager <rlaager@pidgin.im>
parents:
14779
diff
changeset
|
113 | |
|
57ab37fe1190
[gaim-migrate @ 17784]
Richard Laager <rlaager@pidgin.im>
parents:
14779
diff
changeset
|
114 | typedef GaimCore * Gaim__Core; |
|
57ab37fe1190
[gaim-migrate @ 17784]
Richard Laager <rlaager@pidgin.im>
parents:
14779
diff
changeset
|
115 | typedef GaimCoreUiOps * Gaim__Core__UiOps; |
|
57ab37fe1190
[gaim-migrate @ 17784]
Richard Laager <rlaager@pidgin.im>
parents:
14779
diff
changeset
|
116 | |
| 12808 | 117 | /* debug.h */ |
| 118 | typedef GaimDebugLevel Gaim__DebugLevel; | |
| 11118 | 119 | |
| 12808 | 120 | /* desktopitem.h */ |
| 121 | typedef GaimDesktopItem * Gaim__DesktopItem; | |
| 122 | typedef GaimDesktopItemType Gaim__DesktopItemType; | |
| 11118 | 123 | |
| 12808 | 124 | /* eventloop.h */ |
| 125 | typedef GaimInputCondition * Gaim__InputCondition; | |
| 126 | typedef GaimEventLoopUiOps * Gaim__EventLoopUiOps; | |
| 11118 | 127 | |
| 12808 | 128 | /* ft.h */ |
| 129 | typedef GaimXfer * Gaim__Xfer; | |
| 130 | typedef GaimXferType Gaim__XferType; | |
| 131 | typedef GaimXferStatusType Gaim__XferStatusType; | |
| 132 | typedef GaimXferUiOps * Gaim__XferUiOps; | |
| 11118 | 133 | |
| 14434 | 134 | #ifdef GAIM_GTKPERL |
| 12808 | 135 | /* gtkblish.h */ |
| 11118 | 136 | typedef GaimGtkBuddyList * Gaim__GTK__BuddyList; |
| 12808 | 137 | typedef GaimStatusIconSize Gaim__StatusIconSize; |
| 11118 | 138 | |
| 12808 | 139 | /* gtkutils.h */ |
| 11118 | 140 | typedef GaimButtonOrientation Gaim__ButtonOrientation; |
| 141 | typedef GaimButtonStyle Gaim__ButtonStyle; | |
| 11139 | 142 | #ifndef _WIN32 |
| 11118 | 143 | typedef GaimBrowserPlace Gaim__BrowserPlace; |
| 11139 | 144 | #endif /* _WIN32 */ |
| 6508 | 145 | |
| 12808 | 146 | /* gtkconv.h */ |
| 14434 | 147 | typedef GaimUnseenState Gaim__UnseenState; |
| 12808 | 148 | typedef GaimGtkConversation * Gaim__GTK__Conversation; |
| 11118 | 149 | typedef GdkPixbuf * Gaim__GDK__Pixbuf; |
| 150 | typedef GtkWidget * Gaim__GTK__Widget; | |
| 151 | ||
| 12808 | 152 | /* gtkutils.h */ |
| 11118 | 153 | typedef GtkFileSelection * Gaim__GTK__FileSelection; |
| 12808 | 154 | typedef GtkSelectionData * Gaim__GTK__SelectionData; |
| 11118 | 155 | typedef GtkTextView * Gaim__GTK__TextView; |
| 156 | ||
| 12808 | 157 | /* gtkconn.h */ |
| 14434 | 158 | #endif |
| 11118 | 159 | |
| 12808 | 160 | /* imgstore.h */ |
| 161 | typedef GaimStoredImage * Gaim__StoredImage; | |
| 11118 | 162 | |
| 12808 | 163 | /* log.h */ |
| 164 | typedef GaimLog * Gaim__Log; | |
| 165 | typedef GaimLogCommonLoggerData * Gaim__LogCommonLoggerData; | |
| 166 | typedef GaimLogLogger * Gaim__Log__Logger; | |
| 167 | typedef GaimLogReadFlags * Gaim__Log__ReadFlags; | |
| 168 | typedef GaimLogSet * Gaim__LogSet; | |
| 169 | typedef GaimLogType Gaim__LogType; | |
| 11118 | 170 | |
|
12910
e6c3213c28ec
[gaim-migrate @ 15263]
Daniel Atallah <datallah@pidgin.im>
parents:
12882
diff
changeset
|
171 | /* network.h */ |
| 14434 | 172 | typedef GaimNetworkListenData * Gaim__NetworkListenData; |
|
12910
e6c3213c28ec
[gaim-migrate @ 15263]
Daniel Atallah <datallah@pidgin.im>
parents:
12882
diff
changeset
|
173 | typedef GaimNetworkListenCallback Gaim__NetworkListenCallback; |
|
e6c3213c28ec
[gaim-migrate @ 15263]
Daniel Atallah <datallah@pidgin.im>
parents:
12882
diff
changeset
|
174 | |
| 12808 | 175 | /* notify.h */ |
|
12242
e7fc1748eb56
[gaim-migrate @ 14544]
Richard Laager <rlaager@pidgin.im>
parents:
12216
diff
changeset
|
176 | typedef GaimNotifyCloseCallback Gaim__NotifyCloseCallback; |
| 12808 | 177 | typedef GaimNotifyMsgType Gaim__NotifyMsgType; |
|
11533
f58436975d44
[gaim-migrate @ 13782]
Richard Laager <rlaager@pidgin.im>
parents:
11318
diff
changeset
|
178 | typedef GaimNotifySearchButtonType Gaim__NotifySearchButtonType; |
|
f58436975d44
[gaim-migrate @ 13782]
Richard Laager <rlaager@pidgin.im>
parents:
11318
diff
changeset
|
179 | typedef GaimNotifySearchResults * Gaim__NotifySearchResults; |
|
f58436975d44
[gaim-migrate @ 13782]
Richard Laager <rlaager@pidgin.im>
parents:
11318
diff
changeset
|
180 | typedef GaimNotifySearchColumn * Gaim__NotifySearchColumn; |
|
f58436975d44
[gaim-migrate @ 13782]
Richard Laager <rlaager@pidgin.im>
parents:
11318
diff
changeset
|
181 | typedef GaimNotifySearchButton * Gaim__NotifySearchButton; |
| 12808 | 182 | typedef GaimNotifyType Gaim__NotifyType; |
| 11118 | 183 | typedef GaimNotifyUiOps * Gaim__NotifyUiOps; |
| 184 | ||
| 12808 | 185 | /* plugin.h */ |
| 186 | typedef GaimPlugin * Gaim__Plugin; | |
| 187 | typedef GaimPluginAction * Gaim__Plugin__Action; | |
| 188 | typedef GaimPluginInfo * Gaim__PluginInfo; | |
| 189 | typedef GaimPluginLoaderInfo * Gaim__PluginLoaderInfo; | |
| 11118 | 190 | typedef GaimPluginType Gaim__PluginType; |
| 12808 | 191 | typedef GaimPluginUiInfo * Gaim__PluginUiInfo; |
| 11118 | 192 | |
| 12808 | 193 | /* pluginpref.h */ |
| 194 | typedef GaimPluginPref * Gaim__PluginPref; | |
| 195 | typedef GaimPluginPrefFrame * Gaim__PluginPref__Frame; | |
| 196 | typedef GaimPluginPrefType Gaim__PluginPrefType; | |
| 11118 | 197 | |
| 12808 | 198 | /* pounce.h */ |
| 199 | typedef GaimPounce * Gaim__Pounce; | |
| 200 | typedef GaimPounceEvent Gaim__PounceEvent; | |
| 11118 | 201 | |
| 12808 | 202 | /* prefs.h */ |
| 203 | typedef GaimPrefType Gaim__PrefType; | |
| 11118 | 204 | |
| 12808 | 205 | /* privacy.h */ |
| 206 | typedef GaimPrivacyType Gaim__PrivacyType; | |
| 207 | typedef GaimPrivacyUiOps * Gaim__Privacy__UiOps; | |
| 11118 | 208 | |
| 12808 | 209 | /* proxy.h */ |
| 210 | typedef GaimProxyInfo * Gaim__ProxyInfo; | |
| 211 | typedef GaimProxyType Gaim__ProxyType; | |
|
6588
187c6026c574
[gaim-migrate @ 7110]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
212 | |
| 12808 | 213 | /* prpl.h */ |
| 214 | typedef GaimBuddyIconSpec * Gaim__Buddy__Icon__Spec; | |
| 215 | typedef GaimIconScaleRules Gaim__IconScaleRules; | |
| 216 | typedef GaimPluginProtocolInfo * Gaim__PluginProtocolInfo; | |
| 217 | typedef GaimProtocolOptions Gaim__ProtocolOptions; | |
| 11118 | 218 | |
| 12808 | 219 | /* request.h */ |
| 220 | typedef GaimRequestField * Gaim__Request__Field; | |
| 11118 | 221 | typedef GaimRequestFields * Gaim__Request__Fields; |
| 222 | typedef GaimRequestFieldGroup * Gaim__Request__Field__Group; | |
| 12808 | 223 | typedef GaimRequestFieldType Gaim__RequestFieldType; |
| 224 | typedef GaimRequestType Gaim__RequestType; | |
| 11118 | 225 | typedef GaimRequestUiOps * Gaim__Request__UiOps; |
| 226 | ||
| 12808 | 227 | /* roomlist.h */ |
| 228 | typedef GaimRoomlist * Gaim__Roomlist; | |
| 229 | typedef GaimRoomlistField * Gaim__Roomlist__Field; | |
| 230 | typedef GaimRoomlistFieldType Gaim__RoomlistFieldType; | |
| 231 | typedef GaimRoomlistRoom * Gaim__Roomlist__Room; | |
| 232 | typedef GaimRoomlistRoomType Gaim__RoomlistRoomType; | |
| 233 | typedef GaimRoomlistUiOps * Gaim__Roomlist__UiOps; | |
| 11118 | 234 | |
| 12808 | 235 | /* savedstatuses.h */ |
| 236 | typedef GaimSavedStatus * Gaim__SavedStatus; | |
| 237 | typedef GaimSavedStatusSub * Gaim__SavedStatusSub; | |
| 11118 | 238 | |
| 12808 | 239 | /* sound.h */ |
| 240 | typedef GaimSoundEventID Gaim__SoundEventID; | |
| 241 | typedef GaimSoundUiOps * Gaim__Sound__UiOps; | |
| 11118 | 242 | |
| 12808 | 243 | /* sslconn.h */ |
| 244 | typedef GaimInputCondition * Gaim__Input__Condition; | |
| 245 | typedef GaimSslConnection * Gaim__Ssl__Connection; | |
| 246 | typedef GaimSslErrorType Gaim__SslErrorType; | |
| 11118 | 247 | typedef GaimSslOps * Gaim__Ssl__Ops; |
| 248 | ||
| 12808 | 249 | /* status.h */ |
| 250 | typedef GaimPresence * Gaim__Presence; | |
| 251 | typedef GaimPresenceContext Gaim__PresenceContext; | |
| 252 | typedef GaimStatus * Gaim__Status; | |
| 253 | typedef GaimStatusAttr * Gaim__StatusAttr; | |
| 254 | typedef GaimStatusPrimitive Gaim__StatusPrimitive; | |
| 255 | typedef GaimStatusType * Gaim__StatusType; | |
| 11118 | 256 | |
| 13018 | 257 | /* stringref.h */ |
| 11118 | 258 | typedef GaimStringref * Gaim__Stringref; |
| 259 | ||
| 12919 | 260 | /* util.h */ |
|
14426
8d4f164c4979
[gaim-migrate @ 17070]
Daniel Atallah <datallah@pidgin.im>
parents:
14417
diff
changeset
|
261 | typedef GaimInfoFieldFormatCallback Gaim__Util__InfoFieldFormatCallback; |
|
14417
5b0b76a8dee4
[gaim-migrate @ 17061]
Mark Doliner <markdoliner@pidgin.im>
parents:
14377
diff
changeset
|
262 | typedef GaimUtilFetchUrlData Gaim__Util__FetchUrlData; |
| 12919 | 263 | typedef GaimMenuAction * Gaim__Menu__Action; |
| 264 | ||
| 12808 | 265 | /* value.h */ |
| 11118 | 266 | typedef GaimValue * Gaim__Value; |
| 267 | ||
| 12808 | 268 | /* xmlnode.h */ |
| 269 | typedef xmlnode * Gaim__XMLNode; | |
| 270 | typedef XMLNodeType XMLNode__Type; | |
| 11118 | 271 | |
|
14779
1b71da367f56
[gaim-migrate @ 17471]
Martijn van Beers <martijn@eekeek.org>
parents:
14434
diff
changeset
|
272 | /* other */ |
|
1b71da367f56
[gaim-migrate @ 17471]
Martijn van Beers <martijn@eekeek.org>
parents:
14434
diff
changeset
|
273 | typedef void * Gaim__Handle; |