From: <ev...@us...> - 2006-08-19 01:31:30
|
Revision: 16859 Author: evands Date: 2006-08-18 18:31:21 -0700 (Fri, 18 Aug 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16859&view=rev Log Message: ----------- ** Part 5 of a 4 part commit ** Restructured the tree and the build files for the core/UI split. libgaim is now built as a library against which gtkgaim and gntgaim link and can be built separately from them by configuring with them disable d (--disable-gtkgaim and --disable-gntgaim). Each of the three source trees (gtk, console, and core) has its own plugins folder. This works nicely on my system; hopefully it won't cause too much chaos for others. If you have local changes, an easy way to merge them to the new layout should be along the lines of svn diff -r version_before_move > myChanges.diff patch -p1 < myChanges.diff where svn diff is done from the gaim checkout root but patch is done from gtk or core (or both). This changeset combines work by Sadrul Chowdhury, Gary Kramlich (grim), and me. Known issues: * On my system, at least, something's not quite right with the gtkgaim build process; it imports gtkgaim.h (as can be seen by adding a #warning) but <gtk/gtk.h> doesn't seem to be used. The GTK_STOCK_XXX defines claim to be undeclared. I was going to make this work before committing, but I strongly suspect someone with more autotools experience will be able to fix it easily whereas I've already glared at it for an hour. * The gnt console UI depends on libgnt, which is not yet automatically built. Either autogen.sh && make && make install libgnt (in console/libgnt) or configure with --disable-gnt for now. * The Windows build process has not been touched yet so still needs updating. * There's an stray "rm: core: is a directory" warning after autogen.sh is compl te. I'm not sure where that's coming from. Modified Paths: -------------- trunk/plugins/Makefile.am Removed Paths: ------------- trunk/pixmaps/ trunk/plugins/ChangeLog trunk/plugins/ChangeLog.API trunk/plugins/HOWTO trunk/plugins/ciphertest.c trunk/plugins/codeinline.c trunk/plugins/contact_priority.c trunk/plugins/crazychat/ trunk/plugins/dbus-buddyicons-example.py trunk/plugins/dbus-example.c trunk/plugins/docklet/ trunk/plugins/extplacement.c trunk/plugins/filectl.c trunk/plugins/fortuneprofile.pl trunk/plugins/gaim.pl trunk/plugins/gaiminc.c trunk/plugins/gaimrc.c trunk/plugins/gestures/ trunk/plugins/gevolution/ trunk/plugins/gtk-signals-test.c trunk/plugins/history.c trunk/plugins/iconaway.c trunk/plugins/idle.c trunk/plugins/ipc-test-client.c trunk/plugins/ipc-test-server.c trunk/plugins/log_reader.c trunk/plugins/mailchk.c trunk/plugins/mono/ trunk/plugins/musicmessaging/ trunk/plugins/notify.c trunk/plugins/perl/ trunk/plugins/pluginpref_example.c trunk/plugins/psychic.c trunk/plugins/raw.c trunk/plugins/relnot.c trunk/plugins/signals-test.c trunk/plugins/simple.c trunk/plugins/spellchk.c trunk/plugins/ssl/ trunk/plugins/statenotify.c trunk/plugins/tcl/ trunk/plugins/test.pl trunk/plugins/ticker/ trunk/plugins/timestamp.c trunk/plugins/timestamp_format.c trunk/plugins/win32/ Deleted: trunk/plugins/ChangeLog =================================================================== --- trunk/plugins/ChangeLog 2006-08-19 01:29:53 UTC (rev 16858) +++ trunk/plugins/ChangeLog 2006-08-19 01:31:21 UTC (rev 16859) @@ -1,161 +0,0 @@ -version 0.11.0pre5: - The build process for plugins has changed slightly. Everything still - works more or less the same from a user point of view, that is, 'make - file.so' will still turn file.c into a plugin. The build now uses - libtool in an attempt to increase portability. By using libtool the - act of compiling and linking has been divided into two steps (to be - precise it always was two but we only called gcc once; now we call - libtool twice). PLUGIN_CFLAGS has also been added. Any -D switches you - were passing in PLUGIN_LIBS should be passed in PLUGIN_CFLAGS now. - -version 0.11.0pre1: - Gaim is now multi-connection based. This represents a significant - change. Most of the code was modified, though most of the modifications - were small (referencing an int as part of a struct as opposed to as a - global int). Plugins need to be modified to match the new function - declarations and such. - - Gaim now uses GModule from the GLib library for plugins. This brings - a few changes. gaim_plugin_init is now passed a GModule *, which it - should use for all of its callbacks. gaim_plugin_init now returns - char * instead of int instead of void. If gaim_plugin_init returns - NULL then gaim assumes everything was OK and proceeds. Otherwise, it - displays the error message and unloads your plugin. There is no more - gaim_plugin_error (at least, that gaim itself will use. You may wish - to simply return gaim_plugin_error() in gaim_plugin_init). - - Because gaim now uses GModule, plugins are opened with RTLD_GLOBAL. I - had previously wanted to avoid this, but there are simply too many - benefits gained from using GModule to reject it for this reason. This - means that plugins can now call each other's functions. Beware, this - has good and bad implications. If you call a function, it will look - first in your plugin, and then in gaim's global symbol table, including - other plugins. - - The new system allows for protocol plugins. New protocols (including - Yahoo, MSN, IRC, ICQ, etc) can be loaded dynamically. However, most - of these plugins are going to be controlled by the gaim maintainers. - If you have interest in writing a protocol plugin, please talk to one - of us before you start. - - That's about all that I'm going to talk about. My SN is EWarmenhoven - if you have any questions (like what the hell struct gaim_connection is - and what its relation to struct aim_user is). - -version 0.10.0: - Rather than have a separate CFLAGS and LDFLAGS for the plugins than - for gaim, and doing all kinds of crazy things to work around the - problems that creates, the plugins now have the same CFLAGS and LIBS. - The plugins also have PLUGIN_LIBS which can be passed at make time. - This makes things like #ifdef USE_APPLET and #ifdef USE_PERL much more - reliable. (#include "config.h" in order to get all the #defines) - - The internals of gaim plugin events got modified slightly. It should - have no effect on existing plugins or the way plugins are made. The - change was to make my life easier adding perl. It should also make - adding new plugin events even easier than before (though I doubt that - any more will ever be added). Also, events are printed to the debug - window. - - event_buddy_away was being triggered every blist_update for every away - buddy. This got fixed, but now when you sign on, event_buddy_away may - be called before event_buddy_signon. Not that it should matter much. - - Just after I finish saying that no more events will be added, I go and - add one. Go figure. Anyway, it's event_new_conversation. Enough people - asked me to add it, and I found it useful enough, that I finally did - add it. It gets passed a char *, the name of the person who the - conversation is with. This gets triggered when a new conversation - window is created, in case you couldn't figure it out on your own. - - event_blist_update wasn't being called if you weren't reporting idle - time or if you were idle. This got fixed. - -version 0.9.20: - It's 3 am the night before finals, it's obviously a good time to hack - gaim. - - This became quite long, and if you don't want to read it all, here's - the important stuff summed up: - - 9 new events (see SIGNALS file for more details) - - int gaim_plugin_init(void *) (no longer returns void, see error.c) - - void gaim_plugin_unload(void *) (to allow plugin to remove itself) - - can only load 1 instance of the same plugin - - PLUGIN_LIBS for extra libraries for plugin - - The first thing to note is that there are about 9 new events plugins - can attach to, most of them dealing with chat, since I know that was a - big thing that was missing. Please note that I was nice and decided to - tack these extra events onto the end of the enum, which means that - plugins do not have to be recompiled in order for them to still work. - - The big change is that gaim_plugin_init no longer returns void, but - int. If it returns 0+, gaim interprets this as there being no error, - and continues with loading as normal. (This should be backwards- - compatible: returning 0/1 is the equivalent of returning void.) If it - returns a number less than 0, there was an error loading detected by - the plugin. At that point, gaim will try to clean things up by removing - any callbacks that have been added by the plugin. It will then try to - call the plugin's gaim_plugin_error function, if there is one. The - function should take an int (the int returned by gaim_plugin_init) and - return a char*. If the char* is not NULL, it is displayed by gaim as an - error message. The plugin is then unloaded and closed and life goes - back to normal. If any of that was confusing, it was confusing to me, - too. I added a plugin, error.c, which should help clear things up. - - Another big thing to note is that plugins can unload themselves. A good - example of why this is useful is a ticker plugin. If the user closes - the ticker window, they obviously want the plugin to be unloaded. Gaim - has no way of knowing that; therefore, the plugin must tell gaim that - it is to be unloaded. To have a plugin unload itself, simply call - gaim_plugin_unload(void *) (the void* is the handle passed to - gaim_plugin_init). Because you are explicitly asking to be removed, - gaim assumes that you have done any cleanup already, and so does not - call gaim_plugin_remove. Rather, it simply removes your callbacks and - unloads the plugin. (There is some trickery to this. Think about it: - your plugin calls the function, your plugin is unloaded, and execution - returns to your plugin, which no longer exists. This would cause a - segfault if it behaved exactly as described. Instead, the plugin is - removed from the list of plugins, and removed 5 seconds later. By then - the plugin should be effectively gone, though still in memory.) - - In previous versions of gaim, you could load multiple copies of the - same plugin. This is no longer the case. The reason for this was that - there were not two instances of the plugin in memory; rather, one copy - and two structures representing the same plugin. Then, the callbacks - would be called twice (since the plugin would most likely act the same - across multiple instances), and when one was unloaded, all callbacks - for both instances would be removed. Rather than deal with two copies - of the same plugin, it is easier and cleaner to only handle one. - - Sometimes it's necessary to link a plugin with libraries other than the - ones needed for GTK. Before, it was necessary to modify the Makefile to - do so (which was usually messy since it's generated by GNU automake). - Now, you can simply set the environment variable PLUGIN_LIBS to be the - extra libraries you want to link in. For example, to link plugin.c with - the math library, you can run the command - PLUGIN_LIBS=-lm make plugin.so - To link with multiple plugins, make sure to indicate spaces, e.g. - PLUGIN_LIBS='-lm -lcrypt' make encrypt.so - - There is a new event, event_quit, which signifies that gaim has exited - correctly (i.e. didn't segfault). Also, after this event is called, all - plugins are removed, and their gaim_plugin_remove function is called. - This behavior is different from previous versions; however, it is the - proper way of doing things, and should have no effect on current - plugins. The reason event_quit exists despite plugins being removed at - quit is because a plugin can be removed without gaim quitting. They are - distinctly separate events. - - The new events mean that some versions of gaim have certain events, - others don't. The thing I find fascinating though is that even if a - plugin is compiled for a later version, it will still be backwards- - compatible, even if it makes use of the newer events. The reason why - is the names of the events are stored as integers, and those integers - will never match an event in a prior version. This means you don't - have to worry about which version the person is using, only which - version the person is compiling against. For simplicity's sake, please - assume people are compiling against the latest version. For - practicality's sake, VERSION is #define'd to be the version you're - compiling against, starting with 0.9.20. Prior versions do not have - this defined in the standard plugin Makefile. Deleted: trunk/plugins/ChangeLog.API =================================================================== --- trunk/plugins/ChangeLog.API 2006-08-19 01:29:53 UTC (rev 16858) +++ trunk/plugins/ChangeLog.API 2006-08-19 01:31:21 UTC (rev 16859) @@ -1,612 +0,0 @@ -Gaim: The Pimpin' Penguin IM Client that's good for the soul! - -version 2.0.0: - Changed: - * All the status stuff. Yay! - * gaim_prefs_connect_callback(), added handle parameter - * gtk_imhtml_toolbar now descends from GtkHBox making it easier to add your - own widgets to it - * gaim_find_conversation_with_account, added a "type" parameter - * gaim_gtk_prefs_labeled_spin_button, the "key" parameter is now a - const char* instead of just a char* - * gaim_gtk_prefs_labeled_entry, the "key" parameter is now a const char* - instead of just a char* - * the add_buddy perl sub. The sub now takes the account as the first - argument, and buddy and group as the second and third. It also adds - the buddy to the server-side buddy list of the given account. - * gaim_connection_new, gaim_account_connect and gaim_account_register no - longer return a GaimConnection - * keep_alive in GaimConnection is renamed to keepalive - * gaim_mkstemp, added a second argument, a boolean, of whether or not the - file is binary - * gaim_log_logger_new, rewritten - * gaim_conv_window_remove_conversation()'s last argument to be a - GaimConversation. - * A new blocked icon: pixmaps/status/default/blocked.png - * In pixmaps/status/default: extendedaway.png renamed to extended_away.png - * In pixmaps/status/default: na.png renamed to unavailable.png - * gtk_imhtml_toggle_bold(): No longer returns a value - * gtk_imhtml_toggle_italic(): No longer returns a value - * gtk_imhtml_toggle_underline(): No longer returns a value - * gtk_imhtml_toggle_strike(): No longer returns a value - * gtk_imhtml_scroll_to_end(): Added the smooth paramter - * gaim_log_new(), added conv parameter - * gaim_buddy_icon_new(), leaves a reference which the caller owns. Use - gaim_buddy_icon_unref() immediately if you don't want a reference (the - old behavior). - * GAIM_CONV_UNKNOWN to GAIM_CONV_TYPE_UNKNOWN. - * GAIM_CONV_IM to GAIM_CONV_TYPE_IM. - * GAIM_CONV_CHAT to GAIM_CONV_TYPE_CHAT. - * GAIM_CONV_MISC to GAIM_CONV_TYPE_MISC. - * GAIM_CONV_ANY to GAIM_CONV_TYPE_ANY. - * GaimConversationUiOps.write_conv, Replaced const char *who with - const char *name, const char *alias - * gaim_conv_chat_add_users(), added extra_msgs and new_arrivals (pass NULL - and FALSE respectively, to get the same behavior as before) - * chat_add_users in GaimConversationUiOps, added cbuddies and - new_arrivals and removed buddies. - * chat_rename_user in GaimConversationUiOps, added new_alias - * gaim_conv_chat_cb_new(), added alias. (pass NULL to get the same - behavior as before). - * GaimConversation.log became GList * GaimConversation.logs, so that a - conversation can have multiple logs at once - * gaim_conv_chat_add_user, added extra_msgs - * gaim_notify_userinfo, removed primary and secondary parameters - * GaimNotifyUiOps.notify_userinfo: removed title, primary, and - secondary parameters - * Idle timers are now added and removed in gtkidle.c in response - to the signed-on and signed-off signals - * GaimXfer->ops.read, GaimXfer->ops.write, gaim_xfer_set_read_fnc(), - gaim_xfer_set_write_fnc(), gaim_xfer_read(), gaim_xfer_write(): - Changed ssize_t to gssize - * serv_got_im, serv_got_chat_in, serv_send_im and serv_chat_send all use - GaimMessageFlags instead of GaimConvImFlags / GaimConvChatFlags - * All core<->prpl message passing now uses html. This was previously true - for receiving messages, it's now also true for sending them. prpls that - don't support html need to gaim_unescape_html() the message. - * Notify API: GCallback -> GaimNotifyCloseCallback, - void *user_data -> gpointer user_data - * gaim_notify_searchresults_get_rows_count, - gaim_notify_searchresults_get_columns_count: return type now guint - * gaim_account_notify_added: No longer checks if there is a - GaimBuddy for the added user, that's left up to the prpls. See the - documentation for this function and gaim_account_request_add. - * gaim_accounts_reorder: new_index is now a gint instead of a size_t - * displaying-message signals: displaying-[im|chat]-msg and - displayed-[im|chat]-msg signals are emitted for all messages - (ie, for received messages, sent messages, system messages, error - messages etc.), and the signals now have - gaim_gtk_conversations_get_handle() for their handle. - * GAIM_NOTIFY_BUTTON_ADD_BUDDY to GAIM_NOTIFY_BUTTON_ADD - * conversation-switched: This signal has been moved from conversation to - the UI and the signal-handlers only receive the - conversation that has been switched to. - * GaimPluginProtocolInfo: Added offline_message - * GaimPluginProtocolInfo: Added whiteboard_prpl_ops - * GaimPluginProtocolInfo: Added media_prpl_ops - * GaimPluginProtocolInfo: Added "str" argument to tooltip_text, changed - the return type to void - * GaimPluginProtocolInfo: Added "full" argument to tooltip_text - * gaim_pounce_new(): Added option argument for pounce options - * gaim_network_listen() and gaim_network_listen_range(): Added - socket_type parameter to allow creation of UDP listening. Modified - to be asynchronous with a Callback to allow for UPnP operation. - * GaimPrefCallback: val is now a gconstpointer instead of a gpointer - * gtk_imhtml_get_current_format(): the arguments are now set to TRUE or - FALSE. Previously they were set to TRUE or left alone. Also, you - may now pass NULL if you're not interested in a specific formatting. - * Smiley Themes: Backslashes must be backslash-escaped. - * Plugins: Depedencies are now honored when unloading plugins. - * gaim_markup_extract_info_field(): Added format_cb parameter. - * gaim_str_to_time(): Added support for parsing the MM/DD/YYYY format. - * gaim_plugin_action_new(): label is now const char * - * gaim_plugin_pref_new_with_name(): name is now const char * - * gaim_plugin_pref_new_with_label(): label is now const char * - * gaim_plugin_pref_new_with_name_and_label(): name and label are - now const char * - * gaim_plugin_pref_set_name(): name is now const char * - * gaim_plugin_pref_get_name(): return type is now const char * - * gaim_plugin_pref_set_label(): label is now const char * - * gaim_plugin_pref_get_label(): return type is now const char * - * gaim_plugin_pref_add_choice(): label is now const char * - * struct proto_chat_entry: label is now const char * - * struct proto_chat_entry: identifier is now const char * - * All network activity has been updated to use non-blocking sockets. - This means that plugins must be updated to expect such a socket from - gaim_proxy_connect() and gaim_network_listen*(). - * gaim_proxy_connect(): changed to return NULL on error and a pointer - to a GaimProxyConnectInfo object which can be used to cancel - connection attempts using gaim_proxy_connect_cancel(). - * gaim_gtk_create_imhtml(): Added sw_ret() parameter - * gaim_account_get_log(): Added create parameter - * GAIM_CMD_P_VERYHIGH is now GAIM_CMD_P_VERY_HIGH - - Removed: - * gaim_gtk_sound_{get,set}_mute() (replaced by the /gaim/gtk/sound/mute - preference) - * gaim_escape_html(const char *html) (use g_markup_escape_text(html, -1) - instead) - * gaim_accounts_sync, account changes are now scheduled to be saved - automatically - * gaim_connection_connect - * gaim_connection_disconnect - * gaim_connection_register - * gaim_accounts_auto_login - * gaim_find_conversation, use gaim_find_conversation_with_account instead - * serv_login - * serv_close - * serv_finish_login - * gaim_chat_get_display_name - * gaim_conversation_set_history, gaim_conversation_get_history, and - GaimConversation->history. Use gtk_imhtml_get_markup instead. - * serv_rename_group - * set_gaim_user_dir to gaim_util_set_user_dir - * create_prpl_icon to gaim_gtk_create_prpl_icon - * Window flashing support in the core: gaim_conv_window_flash, and flash UI - operation for conversations. Use signal "received-im-msg" or similar. - * All warning stuff from the core. - * gaim_gtkconv_get_dest_tab_at_xy(), instead use gaim_gtkconv_get_tab_at_xy() - * chat_add_user from GaimConversationUiOps: only chat_add_users is used - * chat_remove_user from GaimConversationUiOps: only chat_remove_users is used - * uc from the GaimBuddy struct - * gaim_sound_get_handle() - * gaim_debug_vargs() - * serv_add_buddy(); use gaim_account_add_buddy() instead - * serv_add_buddies(); use gaim_account_add_buddies() instead - * serv_remove_buddy(); use gaim_account_remove_buddy() instead - * serv_remove_buddies(); use gaim_account_remove_buddies() instead - * serv_change_passwd(); use gaim_account_change_password() instead - * serv_touch_idle(): use gaim_gtk_check_idle() instead - * GaimGtkImPane->a_virgin - * gaim_str_strip_cr(); use gaim_str_strip_char(str, '\r') instead - * gaim_find_buddys_group renamed to gaim_buddy_get_group - * gaim_gtkpounce_menu_build() - * gaim_gtkpounce_dialog_show() - * GaimGtkBuddyList->bpmenu - * GaimConvImFlags and GaimConvChatFlags; use GaimMessageFlags instead - * cb and user_data from the ops in GaimNotifyUiOps: This is now handled - by the notify API in the core. - * GaimConversationUiOps.updated: use the conversation-updated signal - * GAIM_SUBTYPE_CONV_WINDOW: windows are now only represented in the UI, - so GAIM_TYPE_BOXED is used for the signal types - * gaim_gtk_privacy_is_showable(): We do fallback privacy in the core - now, so this would always be TRUE now. - * GaimBlistNodeAction: See GaimMenuAction - * gaim_blist_node_action_new(); use gaim_menu_action_new() instead - * gaim_date() - * gaim_date_full(): See gaim_date_format_full() - * gaim_strftime(): See gaim_utf8_strftime() - * GAIM_MESSAGE_COLORIZE - * user_data from gaim_notify_searchresults_new_rows and from - notify_searchresults in GaimNotifyUiOps. - * gaim_conversation_get_send_history(), and send_history from - GaimConversation - * Removed ui_ops from GaimBuddyList. Use gaim_blist_get_ui_ops() instead - - Added: - * gaim_prefs_disconnect_by_handle() - * a password field to GaimConnection, which only persists for the - session (when "remember password" is false, account->password is - NEVER set) Use gaim_connection_get_password(GaimConnection *gc) - * gaim_log_common_writer, gaim_log_common_lister, gaim_log_common_sizer, - and gaim_log_get_log_dir to allow log formats that use standard Gaim - log directory to use Gaim's built-in code for these purposes. - * GaimLogCommonLoggerData struct for a basic logger_data struct to be - used with "common" logger functions. - * gaim_gtk_blist_node_is_contact_expanded, returns TRUE if the given - blist node is a buddy inside an expanded contact, or is itself an - expanded contact - * GaimLogSet struct, get_log_sets function to GaimLogLogger, - gaim_log_get_log_sets, gaim_log_set_compare - * gaim_privacy_check(), to check if a given user is allowed to send - messages to the specified account - * gtk_imhtml_clear_formatting() - * gtk_imhtml_delete to clear out part of a imhtml buffer - * gtk_imhtml_get_protocol_name() - * gaim_buddy_icons_get_full_path(), to get the full path of a buddy - icon setting - * CHAT_USERS_ALIAS_COLUMN, CHAT_USERS_COLOR_COLUMN, - CHAT_USERS_BUDDY_COLUMN to the list of columns for the chat - user list - * gaim_account_add_buddy() - * gaim_account_add_buddies() - * gaim_account_remove_buddy() - * gaim_account_remove_buddies() - * gaim_account_change_password() - * gaim_account_supports_offline_message() - * gaim_conversation_close_logs(), to force a conversation's log(s) to - be closed. New logs will be opened as necessary. - * gaim_plugin_get_id() - * gaim_plugin_get_name() - * gaim_plugin_get_version() - * gaim_plugin_get_summary() - * gaim_plugin_get_description() - * gaim_plugin_get_author() - * gaim_plugin_get_homepage() - * gaim_gtkconv_switch_active_conversation(GaimConversation *) - * gaim_str_strip_char() to strip a given character from - a given string - * gaim_util_chrreplace() to replace a given character with a - different character - * gaim_gtk_blist_toggle_visibility() to intelligently toggle the - visiblity of the buddy list - * gaim_gtk_blist_visibility_manager_add() to indicate the addition of a - visibility manager - see the docs for more information - * gaim_gtk_blist_visibility_manager_remove() to indicate the removal of - a visibility manager - see the docs for more information - * gaim_gtk_conversations_find_unseen_list() to get a list of conversations - with an "unseen" state >= to the specified state and other criteria - * gaim_gtk_conversations_fill_menu() fill a menu from list of conversations - * gaim_gtk_create_prpl_icon() - * gaim_gtk_create_prpl_icon_with_status() - * gaim_gtk_pounces_manager_show() - * gaim_gtk_pounces_manager_hide() - * gaim_gtk_pounce_editor_show() - * GAIM_POUNCE_MESSAGE_RECEIVED - * GaimPounceOption - * gaim_pounce_set_options() - * gaim_pounce_set_options() - * GAIM_STOCK_CONNECT, GAIM_STOCK_DISCONNECT - * GAIM_STOCK_PLUGIN - * gaim_account_request_add: Notifies the user that they were added to - someone's buddy list, and offers them the choice - of adding that person to their buddy list. - * gaim_blist_alias_contact() - * gaim_cipher_http_digest_calculate_session_key() - * gaim_cipher_http_digest_calculate_response() - * gaim_notify_searchresults_labeled() - * GAIM_NOTIFY_BUTTON_LABELED, GAIM_NOTIFY_BUTTON_INFO, - GAIM_NOTIFY_BUTTON_IM, GAIM_NOTIFY_BUTTON_JOIN, - GAIM_NOTIFY_BUTTON_INVITE - * stock buttons GAIM_STOCK_IM, GAIM_STOCK_INFO - * gaim_conversation_present() - * GaimConversationUiOps->present(GaimConversation *) - * GaimPlugin.unloadable - * gaim_plugin_is_unloadable() - * GAIM_PLUGIN_PREF_STRING_FORMAT - * gaim_plugin_pref_get_format_type() - * gaim_plugin_pref_set_format_type() - * GaimStringFormatType - * gaim_log_get_handle() - * gaim_log_uninit() - * GAIM_SUBTYPE_LOG - * gaim_marshal_POINTER__POINTER_POINTER - * gaim_utf8_ncr_encode() - * gaim_gtk_log_init() - * gaim_gtk_log_get_handle() - * gaim_gtk_log_uninit() - * gaim_url_fetch_request() - * GaimMenuAction - * gaim_menu_action_new() - * gaim_menu_action_free() - * GaimInfoFieldFormatCallback - * gaim_utf8_strftime() - * gaim_date_format_short() - * gaim_date_format_long() - * gaim_date_format_full() - * gaim_time_format() - * gaim_plugin_action_free() - * GaimRequestType: Added GAIM_REQUEST_FOLDER - * GaimRequestUiOps: Added request_folder - * gaim_request_folder() - * gaim_gtk_setup_screenname_autocomplete() - * gaim_gtk_set_cursor() - * gaim_gtk_clear_cursor() - * GAIM_MESSAGE_ACTIVE_ONLY - * gaim_proxy_get_setup() - * GaimNotifySearchResultsCallback: Added user_data. - * gaim_notify_searchresults: Added user_data. - - Signals - Changed: (See the Doxygen docs for details on all signals.) - * Signal propagation now stops after a handler returns a non-NULL value. - This value is now returned. Previously, all registered handlers were - called and the value from the last handler was used. - * "buddy-typing" and "buddy-typing-stopped": replaced the GaimConversation* - with GaimAccount*, const char *name. Also, the signal is now emitted - regardless of whether a conversation exists and regardless of whether - the user is on the buddy list. - * "chat-buddy-joined": added the new_arrival argument - * "chat-invited" handlers can now return a value to control what happens - to the invite (accept, reject, prompt the user). - * "chat-left": Emitted *after* setting chat->left to TRUE. - * "drawing-tooltip": the second argument is now a GString* instead of - a char** - * "drawing-tooltip": added the "full" argument - * "received-im-msg" and "received-chat-msg" to match, both now pass a - conversation pointer and flags - * "receiving-im-msg" and "receving-chat-msg" to match, both now pass a - conversation pointer and a pointer to the flags. - * "writing-im-msg", "wrote-im-msg", "writing-chat-msg", "wrote-chat-msg": - Now emitted from a difference place in the message handling code. - The arguments also changed. - * "displaying-im-msg", "displayed-im-msg", "displaying-chat-msg", - "displayed-chat-msg": Added "who" argument, which changes the order - of the existing arguments. - - Signals - Added: (See the Doxygen docs for details on all signals.) - * "account-disabled" - * "account-status-changed" - * "account-alias-changed" - * "cipher-added" - * "cipher-removed" - * "conversation-dragging" - * "dbus-method-called" - * "dbus-introspect" - * "file-recv-accept" - * "file-recv-start" - * "file-recv-cancel" - * "file-recv-complete" - * "file-recv-request" - * "file-send-accept" - * "file-send-start" - * "file-send-cancel" - * "file-send-complete" - * "buddy-added" - * "buddy-removed" - * "blist-node-aliased" - * "buddy-status-changed" - * "buddy-idle-changed": A buddy's idle status changed. - * "buddy-icon-changed" - * "displaying-userinfo" - * "gtkblist-hiding" - * "gtkblist-unhiding" - * "log-displaying" - * "savedstatus-changed" - - Signals - Removed: - * "account-away": replaced by account-status-changed - * "account-warned" - * "buddy-away": replaced by buddy-status-changed - * "buddy-back": replaced by buddy-status-changed - * "buddy-idle": replaced by buddy-idle-changed - * "buddy-unidle": replaced by buddy-idle-changed - * "buddy-icon-cached": replaced by buddy-icon-changed - * "conversation-drag-end": replaced by conversation-dragging - * "conversation-switching" - -version 1.5.0 (8/11/2005): - * Added: gaim_xfer_conversation_write - Writes a messages to a conversation window with the use - of the associated file transfer. - -version 1.4.0 (7/7/2005): - * Added: gaim_buddy_icon_uncache() - Deletes a cached buddy icon for a specified buddy - * Added: gaim_buddy_icon_get_type - Attempts to determine the type of a given buddy icon. - * Added: buddy-icon-cached signal - Emitted when a new buddy icon is cached. - -version 1.3.1 (6/9/2005): - * No changes - -version 1.3.0 (5/10/2005): - * Added: gaim_blist_schedule_save() - This should be used instead of gaim_blist_sync when you - want the blist.xml file to be written to disk. There - should not be many occasions when you want to do this, - as the functions in the blist API that modify the buddy - list will normally call it for you. - * Added: OPT_PROTO_NO_NORMALIZE_CONV - Tells the conversation API to not normalize screen names - in conversations. This is used by the Jabber PRPL. - -version 1.2.1 (4/3/2005): - * No changes - -version 1.2.0 (3/17/2005): - * You can use gaim_signal_connect_priority() and - gaim_signal_connect_priority_vargs() to connect to - Gaim signals with a given priority (Will Gorman) - * Added: gaim_conversation_set_features - gaim_conversation_get_features - These allow plugins (notable prpls) to change the - formatting capabilities of an existing conversation. - This comes with a new "features" field in - GaimConversation (Christopher O'Brien) - * Added: GAIM_CONNECTION_NO_IMAGES to GaimConectionFlags - (Christopher O'Brien) - * Added: GAIM_CBFLAGS_TYPING to GaimConvChatBuddyFlags - (Christopher O'Brien) - * Added: gaim_account_request_add which takes the same arguments as - * gaim_account_notify_added but always asks the user if they want to add - * the buddy to the buddy list - * Added: An accompanying request_add GaimAccountUiOp - -version 1.1.4 (2/24/2005): - * No changes - -version 1.1.3 (2/17/2005): - * No changes - -version 1.1.2 (1/20/2005): - * No changes - -version 1.1.1 (12/28/2004): - * No changes - -version 1.1.0 (12/02/2004): - * Added: gaim_utf8_salvage - * Added: binary relocation support in prefix.h - WARNING: If your plugin uses anything inside the - #ifdef ENABLE_BINRELOC from prefix.h, it won't be - loadable on a copy of Gaim compiled without binreloc - support. In particular, watch out for the autoconf-like - macros, and accidently including them through internal.h, - which you probably shouldn't be including anyway. - -version 1.0.0 (09/17/2004): - * Added: get_chat_name to the GaimPluginProtocolInfo struct - * Changed: gaim_blist_update_buddy_presence(), presence changed to - type gboolean - * Changed: the versioning scheme, and all the plugin structs - -version 0.82 (08/26/2004): - Gaim API: - * Removed: gaim_gtk_get_dispstyle(), gaim_gtk_change_text() - * Removed: multi.h - * Renamed: ui.h to gtkdialogs.h - * Renamed: gtkinternal.h to gtkgaim.h - * Renamed: show_info_dialog to gaim_gtkdialogs_info - * Renamed: show_log_dialog to gaim_gtkdialogs_log - * Renamed: show_warn_dialog to gaim_gtkdialogs_warn - * Renamed: show_im_dialog to gaim_gtkdialogs_im - * Renamed: gaim_gtkdialogs_new_im to gaim_gtkdialogs_im_with_user - * Renamed: destroy_all_dialogs to gaim_gtkdialogs_destroy_all - * Renamed: alias_dialog_bud to gaim_gtkdialogs_alias_buddy - * Renamed: alias_dialog_contact to gaim_gtkdialogs_alias_contact - * Renamed: alias_dialog_blist_chat to gaim_gtkdialogs_alias_chat - * Renamed: show_confirm_del to gaim_gtkdialogs_remove_buddy - * Renamed: show_confirm_del_group to gaim_gtkdialogs_remove_group - * Renamed: show_confirm_del_blist_chat to gaim_gtkdialogs_remove_chat - * Renamed: show_confirm_del_contact to gaim_gtkdialogs_remove_contact - * Renamed: show_about to gaim_gtkdialogs_about - * Added: gaim_notify_userinfo() and the associated notify_userinfo() UI op - (someone who knows just why we have this can edit here) - - Buddy List API: - * Changed: gaim_blist_request_add_chat(), added name parameter - * Added: gaim_contact_on_account() - * Added: flags parameter to the GaimBlistNode struct - - Conversation API: - * Added: gaim_gtkconv_button_new() - - Protocol Plugin API: v7 - * Added: chat_info_defaults to the GaimPluginProtocolInfo struct - - Signals: - * Added: conversation-updated for any update to the data associated - with the conversation (topic, icon, adding to buddy list, etc.) - - Conversation API: - * Changed: gaim_conv_chat_add_user() (added new_arrival parameter) - -version 0.81 (08/05/2004): - Commands API: - * Most functions now have a void *data argument. - - Blist API: - * Added: gaim_buddy_get_contact_alias - * Renamed: gaim_get_buddy_alias to gaim_buddy_get_alias - * Renamed: gaim_get_buddy_alias_only to gaim_buddy_get_alias_only - - Conversation API: - * Changed: gaim_conv_chat_add_user(), added flags parameter - * Changed: gaim_conv_chat_add_users(), added GList of flags parameter - * Changed: gaim_conv_chat_get_users(), now returns a GList of - GaimConvChatBuddy's - * Changed: gaim_conv_chat_set_users() now expects a GList of - GaimConvChatBuddy's - * Added: gaim_conv_chat_set_user_flags() - * Added: gaim_conv_chat_get_user_flags() - * Added: gaim_conv_chat_find_user() - * Added: gaim_conv_chat_cb_new() - * Added: gaim_conv_chat_cb_find() - * Added: gaim_conv_chat_cb_destroy() - * Added: gaim_conv_chat_cb_get_name() - - Conversation UI ops: - * Added: chat_update_user() - - Signals: - * Changed: chat-buddy-joining & chat-buddy-joined now include the user's flags - * Changed: chat-buddy-joining & chat-buddy-leaving are now booleans, return - TRUE if you don't want the join/leave to be displayed in the UI. - * Added: chat-buddy-flags for when user's flags change - gaim_marshal_VOID__POINTER_POINTER_POINTER_UINT_UINT (required for the new - chat-buddy-flags signal) - * Added: account-modified for when account settings have been changed. - -version 0.80 (07/15/2004): - Gaim API: - * Removed: PRPL numbers : gaim_account_set_protocol(), - gaim_account_get_protocol(), gaim_accounts_find_with_prpl_num, - gaim_prpl_num_to_id(), gaim_prpl_id_to_num(), GaimProtocol - - Protocol Plugin API: v6 - * Added: can_receive_file & send_file to the GaimPluginProtocolInfo struct - - Signals: - * Changed "chat-invited" to also include the components hash table so - plugins can use serv_join_chat when the signal is emitted. - * Added "chat-topic-changed" signal plugins know when a topic is changed. - -version 0.79 (06/24/2004): - Gaim API: - * gaim_url_parse() now takes two additional parameters, which are used - for returning the username and password from the URL, if they exist. - * Added: has_focus UI op to GaimConversationUiOps and - GaimConvWindowUiOps. - * Added: gaim_conversation_has_focus() and gaim_conv_window_has_focus(). - * Removed: gaim_blist_save() - - Protocol Plugin API: v5 - * Changed: add_buddy, add_buddies, remove_buddy, remove_buddies, - rename_group and remove_group to take GaimBuddy's and - GaimGroup's consistently. - * Removed: OPT_PROTO_BUDDY_ICON (replaced by icon_spec) - * Added: icon_spec to the GaimPluginProtocolInfo struct - -version 0.78 (05/30/2004): - Plugin API: v4 - * Added: actions - for plugins to add to the new Plugin Actions menu - - Loader Plugin API: v2 (no changes) - - Protocol Plugin API: v4 - * Removed: set_dir, get_dir and dir_search (not used, AIM-centric) - * Removed: actions (replaced by generic plugin actions) - - Perl Plugin API: v2 (no changes) - TCL Plugin API: (no changes) - - Signals: - * Added: "blist-node-extended-menu" for extending Buddy, Chat and - Group right-click menus - * Added: "drawing-tooltip" for plugins to allow plugins to change text - appearing in tooltips - * Added: "gtkblist-created" - * Added: "receiving-im-msg" and "receiving-chat-msg" (these behave - exactly like received-*-msg used to) - * Added: "buddy-idle-updated" signal, for when the idle time changes. - * Changed: "received-im-msg" and "received-chat-msg" no longer pass - pointers to who, message and flags, and are now void. - * Removed: "drawing-menu" - it was UI sepecific and - "blist-node-extended-menu" is superior - -version 0.77 (04/22/2004): - Loader & Protocol Plugins independantly versioned - Plugin loading now checks versioning on plugins (Standard, Loader & - Protocol) - new GAIM_{PLUGIN,PRPL,LOADER}_API_VERSION constants - - Plugin API: v3 - * Added: prefs_info for UI independant plugin prefs - - Loader Plugin API: v2 - * Added: api_version at top of GaimPluginLoaderInfo struct - - Protocol Plugin API: v2 - * Added: api_version at top of GaimPluginProtocolInfo struct - * Added: chat_menu for protocol specific extensions to the chat menu - * Removed: get_away "Nada used it. Pink elephants on parade." - * Removed: protocol_prefs (replaced by generic plugin prefs_info) - - Perl Plugin API: v2 (no changes) - TCL API: (no changes) - - Signals: - * Added: "conversation-drag-ended" - -version 0.76 (04/01/2004): - Plugin API: v2 - Perl Plugin API: v2 - Loader Plugin API: (not versioned) - Protocol Plugin API: (not versioned) - * Added: protocol_prefs for protocol specific preferences - * Added: reject_chat so protocols can act on chat invite rejection - - TCL Plugin API: (not versioned) - * Changes to plugin registration to show descriptions - Deleted: trunk/plugins/HOWTO =================================================================== --- trunk/plugins/HOWTO 2006-08-19 01:29:53 UTC (rev 16858) +++ trunk/plugins/HOWTO 2006-08-19 01:31:21 UTC (rev 16859) @@ -1,83 +0,0 @@ -Everything in this file should be considered old and potentially out of -date. For more reliable information, install doxygen and graphiz dot, -then run -make docs -in the gaim source tree. This will produce html docs in gaim/docs/html -that will provide an api reference and in the related pages section, -information on perl and c plugins. - - -Ok, this howto is going to be really short and sweet and to the point. - -First off, before you do anything else, in all of the files for your plugin, -put the lines - -#define GAIM_PLUGINS -#include "gaim.h" - -I mean this. Without this, all kinds of things will not work correctly. If you -really want to know exactly what this does, read ../src/gaim.h and learn. But -if you don't want to do that, just know that it's important. - -Now that you've put that there, make sure gaim.h is in your include path. - -Ok, now you're ready to write the plugin. - -The only function that is required is gaim_plugin_init(GModule *). This gets -called as soon as it gets loaded (sort of - man dlopen for more details). If -your function never returns, it will crash gaim! If your plugin uses up all -the memory in the system, it will crash gaim! Once your plugin gets loaded, -it effectively becomes a part of gaim, and anything that goes wrong will look -like it is a problem with gaim itself. I write bugfree code! :) Therefore, it -is your problem, not mine. (I'm usually nice and willing to help you with your -problems though.) - -The GModule* that gets passed to gaim_plugin_init is the handle for the plugin. -DO NOT CHANGE THIS POINTER! Bad things will happen. You've been warned. It's -needed for connecting to signals and things. It's a good idea to remember it -somehow. - -gaim_plugin_init should return a char*. If the char* returned is not NULL, it -is interpreted as an error, and used as an error message. See the ChangeLog -file in this directory for more details. - -You can basically do anything you want in the plugin. You can make function -calls, change public widgets, display new widgets, things like that. But the -really neat thing is you can do things at events. For example, when one of -your buddies signs on, you can instantly send them a message. You can modify -the incoming and outgoing text. You can do all kinds of crazy things. Whatever -you want. Check out SIGNALS for more information. - -Plugins can share globals with gaim, but will not share with other plugins. -This is so if you have a global variable GtkWidget *window in your plugin and -J. Random Hacker also has the same name on a global variable, you won't be -constantly overwriting each others' variables. Unfortunately, this also means -that plugins will have difficulty working together. But then again, that's -what shared memory is for. - -Plugins can be configured. This makes it so they don't have to be recompiled -in order to change things internal to them, and it's also just a cool feature -to have :). It's optional; to allow your plugin to be configured, add a -function called gaim_plugin_config(). The advised course of action is to have -it pop up a dialog window; but it's your plugin. - -When your plugin gets unloaded, gaim will try to call gaim_plugin_remove(). It -doesn't have to be there, but it's nice if, say, you create a window, and when -the plugin gets unloaded, it removes the window. Also, all the callbacks you -have attached to gaim signals will be removed. - -Plugins can also unload themselves. To do this, call gaim_plugin_unload(GModule *) -(the GModule* is the handle passed to gaim_plugin_init). When your plugin gets -unloaded, gaim will remove all of your callbacks. It will not call your -gaim_plugin_remove function, however, since it will assume you have already -done the necessary cleanup. - -Compilation of the plugins is fairly straight-forward; there is a Makefile in -this directory that has a rule for making the .so file from a .c file. No -modification of the Makefile should be necessary, unless if you simply want -to type 'make' to have it made; otherwise, 'make filename.so' will take -filename.c and make the .so plugin from it. If you need to link in with extra -libraries, you can set the environment variable PLUGIN_LIBS to be the libraries -you want to link with. - -There are a few examples in this directory. Enjoy. Modified: trunk/plugins/Makefile.am =================================================================== --- trunk/plugins/Makefile.am 2006-08-19 01:29:53 UTC (rev 16858) +++ trunk/plugins/Makefile.am 2006-08-19 01:31:21 UTC (rev 16859) @@ -1,13 +1,18 @@ -DIST_SUBDIRS = docklet gevolution gestures mono musicmessaging perl ssl tcl ticker - +if ENABLE_GTK + if BUILD_GEVOLUTION GEVOLUTION_DIR = gevolution -endif +endif # GEvolution if USE_PERL PERL_DIR = perl -endif +endif # Perl +gtk_dirs = docklet $(GEVOLUTION_DIR) gestures musicmessaging $(PERL_DIR) ticker +endif # GTK + +DIST_SUBDIRS = mono ssl tcl $(gtk_dirs) + if USE_TCL TCL_DIR = tcl endif @@ -15,74 +20,78 @@ if ENABLE_DBUS DBUS_LTLIB = dbus-example.la +if ENABLE_GTK # Only use music messaging if dbus is enabled MUSICMESSAGING_DIR = musicmessaging endif +endif if USE_MONO MONO_DIR = mono endif SUBDIRS = \ - docklet \ - $(GEVOLUTION_DIR) \ - gestures \ $(MONO_DIR) \ - $(MUSICMESSAGING_DIR) \ - $(PERL_DIR) \ ssl \ $(TCL_DIR) \ - ticker + $(gtk_dirs) plugindir = $(libdir)/gaim -extplacement_la_LDFLAGS = -module -avoid-version $(GLIB_LIBS) -gaimrc_la_LDFLAGS = -module -avoid-version $(GTK_LIBS) -history_la_LDFLAGS = -module -avoid-version $(GTK_LIBS) -iconaway_la_LDFLAGS = -module -avoid-version $(GTK_LIBS) idle_la_LDFLAGS = -module -avoid-version $(GLIB_LIBS) -notify_la_LDFLAGS = -module -avoid-version $(GTK_LIBS) psychic_la_LDFLAGS = -module -avoid-version $(GLIB_LIBS) relnot_la_LDFLAGS = -module -avoid-version $(GLIB_LIBS) -spellchk_la_LDFLAGS = -module -avoid-version $(GTK_LIBS) statenotify_la_LDFLAGS = -module -avoid-version $(GLIB_LIBS) -timestamp_la_LDFLAGS = -module -avoid-version $(GTK_LIBS) -timestamp_format_la_LDFLAGS = -module -avoid-version $(GTK_LIBS) # this can't be in a conditional otherwise automake 1.4 yells dbus_example_la_LDFLAGS = -module -avoid-version $(GLIB_LIBS) $(DBUS_LIBS) if PLUGINS -plugin_LTLIBRARIES = \ +if ENABLE_GTK +gtk_plugins = \ extplacement.la \ gaimrc.la \ history.la \ iconaway.la \ - idle.la \ notify.la \ - psychic.la \ - relnot.la \ spellchk.la \ - statenotify.la \ timestamp.la \ - timestamp_format.la \ - $(DBUS_LTLIB) - - + timestamp_format.la + extplacement_la_SOURCES = extplacement.c gaimrc_la_SOURCES = gaimrc.c history_la_SOURCES = history.c iconaway_la_SOURCES = iconaway.c -idle_la_SOURCES = idle.c notify_la_SOURCES = notify.c -psychic_la_SOURCES = psychic.c -relnot_la_SOURCES = relnot.c spellchk_la_SOURCES = spellchk.c -statenotify_la_SOURCES = statenotify.c timestamp_la_SOURCES = timestamp.c timestamp_format_la_SOURCES = timestamp_format.c +extplacement_la_LDFLAGS = -module -avoid-version $(GLIB_LIBS) +gaimrc_la_LDFLAGS = -module -avoid-version $(GTK_LIBS) +history_la_LDFLAGS = -module -avoid-version $(GTK_LIBS) +iconaway_la_LDFLAGS = -module -avoid-version $(GTK_LIBS) +notify_la_LDFLAGS = -module -avoid-version $(GTK_LIBS) +spellchk_la_LDFLAGS = -module -avoid-version $(GTK_LIBS) +timestamp_la_LDFLAGS = -module -avoid-version $(GTK_LIBS) +timestamp_format_la_LDFLAGS = -module -avoid-version $(GTK_LIBS) + +endif # ENABLE_GTK + +plugin_LTLIBRARIES = \ + idle.la \ + psychic.la \ + relnot.la \ + statenotify.la \ + $(gtk_plugins) \ + $(DBUS_LTLIB) + +idle_la_SOURCES = idle.c +psychic_la_SOURCES = psychic.c +relnot_la_SOURCES = relnot.c +statenotify_la_SOURCES = statenotify.c + if ENABLE_DBUS CLEANFILES = dbus-example-bindings.c Deleted: trunk/plugins/ciphertest.c =================================================================== --- trunk/plugins/ciphertest.c 2006-08-19 01:29:53 UTC (rev 16858) +++ trunk/plugins/ciphertest.c 2006-08-19 01:31:21 UTC (rev 16859) @@ -1,287 +0,0 @@ -/* - * A plugin to test the ciphers that ship with gaim - * - * Copyright (C) 2004, Gary Kramlich <amc...@us...> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#ifndef GAIM_PLUGINS -#define GAIM_PLUGINS -#endif - -#include "internal.h" - -#include <glib.h> -#include <string.h> - -#include "cipher.h" -#include "debug.h" -#include "plugin.h" -#include "version.h" - -struct test { - const gchar *question; - const gchar *answer; -}; - -/************************************************************************** - * MD5 Stuff - **************************************************************************/ -struct test md5_tests[8] = { - { "", "d41d8cd98f00b204e9800998ecf8427e"}, - { "a", "0cc175b9c0f1b6a831c399e269772661"}, - { "abc", "900150983cd24fb0d6963f7d28e17f72"}, - { "message digest", "f96b697d7cb7938d525a2f31aaf161d0"}, - { "abcdefghijklmnopqrstuvwxyz", "c3fcd3d76192e4007dfb496cca67e13b"}, - { "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "abcdefghijklmnopqrstuvwxyz" - "0123456789", "d174ab98d277d9f5a5611c2c9f419d9f"}, - {"123456789012345678901234567" - "890123456789012345678901234" - "56789012345678901234567890", "57edf4a22be3c955ac49da2e2107b67a"}, - { NULL, NULL } -}; - -static void -cipher_test_md5() { - GaimCipher *cipher; - GaimCipherContext *context; - gchar digest[33]; - gboolean ret; - gint i = 0; - - cipher = gaim_ciphers_find_cipher("md5"); - if(!cipher) { - gaim_debug_info("cipher-test", - "could not find md5 cipher, not testing\n"); - return; - } - - gaim_debug_info("cipher-test", "Running md5 tests\n"); - - context = gaim_cipher_context_new(cipher, NULL); - - while(md5_tests[i].answer) { - gaim_debug_info("cipher-test", "Test %02d:\n", i); - gaim_debug_info("cipher-test", "Testing '%s'\n", md5_tests[i].question); - - gaim_cipher_context_append(context, (guchar *)md5_tests[i].question, - strlen(md5_tests[i].question)); - - ret = gaim_cipher_context_digest_to_str(context, sizeof(digest), - digest, NULL); - - if(!ret) { - gaim_debug_info("cipher-test", "failed\n"); - } else { - gaim_debug_info("cipher-test", "\tGot: %s\n", digest); - gaim_debug_info("cipher-test", "\tWanted: %s\n", - md5_tests[i].answer); - } - - gaim_cipher_context_reset(context, NULL); - i++; - } - - gaim_cipher_context_destroy(context); - - gaim_debug_info("cipher-test", "md5 tests completed\n\n"); -} - -/************************************************************************** - * SHA-1 stuff - **************************************************************************/ -struct test sha1_tests[5] = { - {"a", "86f7e437faa5a7fce15d1ddcb9eaeaea377667b8"}, - {"abc", "a9993e364706816aba3e25717850c26c9cd0d89d"} , - {"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", "84983e441c3bd26ebaae4aa1f95129e5e54670f1"} , - {NULL, "34aa973cd4c4daa4f61eeb2bdbad27316534016f"}, - {NULL, NULL} -}; - -static void -cipher_test_sha1() { - GaimCipher *cipher; - GaimCipherContext *context; - gchar digest[41]; - gint i = 0; - gboolean ret; - - cipher = gaim_ciphers_find_cipher("sha1"); - if(!cipher) { - gaim_debug_info("cipher-test", - "could not find sha1 cipher, not testing\n"); - return; - } - - gaim_debug_info("cipher-test", "Running sha1 tests\n"); - - context = gaim_cipher_context_new(cipher, NULL); - - while(sha1_tests[i].answer) { - gaim_debug_info("cipher-test", "Test %02d:\n", i); - gaim_debug_info("cipher-test", "Testing '%s'\n", - (sha1_tests[i].question != NULL) ? - sha1_tests[i].question : "'a'x1000, 1000 times"); - - if(sha1_tests[i].question) { - gaim_cipher_context_append(context, (guchar *)sha1_tests[i].question, - strlen(sha1_tests[i].question)); - } else { - gint j; - guchar buff[1000]; - - memset(buff, 'a', 1000); - - for(j = 0; j < 1000; j++) - gaim_cipher_context_append(context, buff, 1000); - } - - ret = gaim_cipher_context_digest_to_str(context, sizeof(digest), - digest, NULL); - - if(!ret) { - gaim_debug_info("cipher-test", "failed\n"); - } else { - gaim_debug_info("cipher-test", "\tGot: %s\n", digest); - gaim_debug_info("cipher-test", "\tWanted: %s\n", - sha1_tests[i].answer); - } - - gaim_cipher_context_reset(context, NULL); - i++; - } - - gaim_cipher_context_destroy(context); - - gaim_debug_info("cipher-test", "sha1 tests completed\n\n"); -} - -static void -cipher_test_digest() -{ - const gchar *nonce = "dcd98b7102dd2f0e8b11d0f600bfb0c093"; - const gchar *client_nonce = "0a4f113b"; - const gchar *username = "Mufasa"; - const gchar *realm = "tes...@ho..."; - const gchar *password = "Circle Of Life"; - const gchar *algorithm = "md5"; - const gchar *nonce_count = "00000001"; - const gchar *method = "GET"; - const gchar *qop = "auth"; - const gchar *digest_uri = "/dir/index.html"; - const gchar *entity = NULL; - - gchar *session_key; - - gaim_debug_info("cipher-test", "Running HTTP Digest tests\n"); - - session_key = gaim_cipher_http_digest_calculate_session_key( - algorithm, username, realm, password, - nonce, client_nonce); - - if (session_key == NULL) - { - gaim_debug_info("cipher-test", - "gaim_cipher_http_digest_calculate_session_key failed.\n"); - } - else - { - gchar *response; - - gaim_debug_info("cipher-test", "\tsession_key: Got: %s\n", session_key); - gaim_debug_info("cipher-test", "\tsession_key: Wanted: %s\n", "939e7578ed9e3c518a452acee763bce9"); - - response = gaim_cipher_http_digest_calculate_response( - algorithm, method, digest_uri, qop, entity, - nonce, nonce_count, client_nonce, session_key); - - g_free(session_key); - - if (response == NULL) - { - gaim_debug_info("cipher-test", - "gaim_cipher_http_digest_calculate_session_key failed.\n"); - } - else - { - gaim_debug_info("cipher-test", "\tresponse: Got: %s\n", response); - gaim_debug_info("cipher-test", "\tresponse: Wanted: %s\n", "6629fae49393a05397450978507c4ef1"); - g_free(response); - } - } - - gaim_debug_info("cipher-test", "HTTP Digest tests completed\n\n"); -} - -/************************************************************************** - * Plugin stuff - **************************************************************************/ -static gboolean -plugin_load(GaimPlugin *plugin) { - cipher_test_md5(); - cipher_test_sha1(); - cipher_test_digest(); - - return TRUE; -} - -static gboolean -plugin_unload(GaimPlugin *plugin) { - return TRUE; -} - -static GaimPluginInfo info = -{ - GAIM_PLUGIN_MAGIC, - GAIM_MAJOR_VERSION, - GAIM_MINOR_VERSION, - GAIM_PLUGIN_STANDARD, /**< type */ - NULL, /**< ui_requirement */ - 0, /**< flags */ - NULL, /**< dependencies */ - GAIM_PRIORITY_DEFAULT, /**< priority */ - - "core-cipher-test", /**< id */ - N_("Cipher Test"), /**< name */ - VERSION, /**< version */ - /** summary */ - N_("Tests the ciphers that ship with gaim."), - /** description */ - N_("Tests the ciphers that ship with gaim."), - "Gary Kramlich <amc...@us...>", /**< author */ - GAIM_WEBSITE, /**< homepage */ - - plugin_load, /**< load */ - plugin_unload, /**< unload */ - NULL, /**< destroy */ - - NULL, /**< ui_info */ - NULL, /**< extra_info */ - NULL, - NULL -}; - -static void -init_plugin(GaimPlugin *plugin) { -} - -GAIM_INIT_PLUGIN(cipher_test, init_plugin, info) Deleted: trunk/plugins/codeinline.c =================================================================== --- trunk/plugins/codeinline.c 2006-08-19 01:29:53 UTC (rev 16858) +++ trunk/plugins/codeinline.c 2006-08-19 01:31:21 UTC (rev 16859) @@ -1,93 +0,0 @@ -/* - * gaim - * - * Gaim is the legal property of its developers, whose names are too numerous - * to list here. Please refer to the COPYRIGHT file distributed with this - * source distribution. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "internal.h" -#include "plugin.h" -#include "notify.h" -#include "util.h" -#include "version.h" -#include "gtkutils.h" -#include "gtkimhtml.h" - -GaimPlugin *plugin_handle = NULL; - -static gboolean outgoing_msg_cb(GaimAccount *account, const char *who, char **message, - GaimConversation *conv, GaimMessageFlags flags, gpointer null) -{ - char *m; - char **ms = g_strsplit(*message, "<u>", -1); - m = g_strjoinv("<font face=\"monospace\" color=\"#00b025\">", ms); - g_strfreev(ms); - - ms = g_strsplit(m, "</u>", -1); - g_free(m); - m = g_strjoinv("</font>", ms); - g_free(*message); - *message = m; - return FALSE; -} - -static gboolean -plugin_load(GaimPlugin *plugin) -{ - void *handle = gaim_conversations_get_handle(); - plugin_handle = plugin; - gaim_signal_connect(handle, "writing-im-msg", plugin, - GAIM_CALLBACK(outgoing_msg_cb), NULL); - - return TRUE; -} - - -static GaimPluginInfo info = -{ - GAIM_PLUGIN_MAGIC, - GAIM_MAJOR_VERSION, - GAIM_MINOR_VERSION, - GAIM_PLUGIN_STANDARD, - NULL, - 0, - NULL, - GAIM_PRIORITY_DEFAULT, - "codeinline", - "Code Inline", - "1.0", - "Formats text as code", - "Changes the formatting of any outgoing text such that " - "anything underlined will be received green and monospace.", - "Sean Egan <sea...@gm...>", - "http://gaim.sourceforge.net", - plugin_load, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL -}; - - static void - init_plugin(GaimPlugin *plugin) - { - } - -GAIM_INIT_PLUGIN(urlcatcher, init_plugin, info) Deleted: trunk/plugins/contact_priority.c =================================================================== --- trunk/plugins/contact_priority.c 2006-08-19 01:29:53 UTC (rev 16858) +++ trunk/plugins/contact_priority.c 2006-08-19 01:31:21 UTC (rev 16859) @@ -1,205 +0,0 @@ -/* - * Contact priority settings plugin. - * - * Copyright (C) 2003 Etan Reisner, <de...@us...>. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General ... [truncated message content] |