xmlnode * _h_elim_init ( const char *name , const char *id , SEXP_VALUE *args , gpointer data ) { ASSERT_ALISTP( args, id, name ); char *dir = ALIST_VAL_STRING( args, "dot-dir" ); char *ui = ALIST_VAL_STRING( args, "ui-id" ); gboolean dbg = ALIST_VAL_BOOL ( args, "debug" ); if( !ui ) { ui = "elim"; } // libpurple initialisation: purple_util_set_user_dir ( dir ); purple_util_init (); purple_core_set_ui_ops ( &elim_core_ui_ops ); purple_eventloop_set_ui_ops ( &elim_eventloop_ui_ops ); purple_blist_set_ui_ops ( &elim_blist_ui_ops ); purple_accounts_set_ui_ops ( &elim_account_ui_ops ); purple_request_set_ui_ops ( &elim_request_ui_ops ); purple_idle_set_ui_ops ( &elim_idle_ui_ops ); purple_connections_set_ui_ops ( &elim_connections_ui_ops ); purple_conversations_set_ui_ops( &elim_conversation_ui_ops ); purple_notify_set_ui_ops ( &elim_notify_ui_ops ); // load any data for init: if( purple_get_core() == NULL ) { // purple debug goes to stdout if we don't divert it here: g_set_print_handler( (GPrintFunc)_h_elim_warning ); // look for plugins in user specified directory tree: char *ppath = g_build_filename( purple_user_dir(), "plugins", NULL ); purple_plugins_add_search_path ( ppath ); purple_debug_set_enabled( dbg ); purple_core_init ( ui ); purple_set_blist ( purple_blist_new() ); purple_prefs_load(); purple_blist_load(); // glib signal initialisation: elim_ft_signals_init(); // tidy up: g_free( ppath ); } else { const char *cur_ui = purple_core_get_ui(); if( strcmp( cur_ui, name ) ) { sexp_val_free( args ); return response_error( EINVAL, id, name, "purple has already been initialised" ); } } sexp_val_free( args ); xmlnode *rval = xnode_new( "alist" ); AL_STR( rval, "ui-id", purple_core_get_ui() ); return response_value( 0, id, name, rval ); }
const char * purple_core_get_ui(void) { PurpleCore *core = purple_get_core(); g_return_val_if_fail(core != NULL, NULL); return core->ui; }
static void init_plugin(PurplePlugin *plugin) { PurpleAccountOption *option; option = purple_account_option_string_new(_("Pager server"), "server", YAHOO_PAGER_HOST); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_int_new(_("Pager port"), "port", YAHOO_PAGER_PORT); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("File transfer server"), "xfer_host", YAHOO_XFER_HOST); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_int_new(_("File transfer port"), "xfer_port", YAHOO_XFER_PORT); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("Chat room locale"), "room_list_locale", YAHOO_ROOMLIST_LOCALE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("Encoding"), "local_charset", "UTF-8"); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_bool_new(_("Ignore conference and chatroom invitations"), "ignore_invites", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_bool_new(_("Use account proxy for SSL connections"), "proxy_ssl", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); #if 0 option = purple_account_option_string_new(_("Chat room list URL"), "room_list", YAHOO_ROOMLIST_URL); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("Yahoo Chat server"), "ycht-server", YAHOO_YCHT_HOST); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_int_new(_("Yahoo Chat port"), "ycht-port", YAHOO_YCHT_PORT); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); #endif my_protocol = plugin; yahoo_register_commands(); yahoo_init_colorht(); purple_signal_connect(purple_get_core(), "uri-handler", plugin, PURPLE_CALLBACK(yahoo_uri_handler), NULL); }
static gboolean plugin_load(PurplePlugin *plugin, GError **error) { purple_prefs_add_none("/plugins/gtk"); purple_prefs_add_none("/plugins/gtk/win32"); purple_prefs_add_none("/plugins/gtk/win32/winprefs"); purple_prefs_add_bool(PREF_DBLIST_DOCKABLE, FALSE); purple_prefs_add_bool(PREF_DBLIST_DOCKED, FALSE); purple_prefs_add_int(PREF_DBLIST_HEIGHT, 0); purple_prefs_add_int(PREF_DBLIST_SIDE, 0); /* Convert old preferences */ if(purple_prefs_exists(PREF_DBLIST_ON_TOP)) { gint blist_top = BLIST_TOP_NEVER; if(purple_prefs_get_bool(PREF_BLIST_ON_TOP)) blist_top = BLIST_TOP_ALWAYS; else if(purple_prefs_get_bool(PREF_DBLIST_ON_TOP)) blist_top = BLIST_TOP_DOCKED; purple_prefs_remove(PREF_BLIST_ON_TOP); purple_prefs_remove(PREF_DBLIST_ON_TOP); purple_prefs_add_int(PREF_BLIST_ON_TOP, blist_top); } else purple_prefs_add_int(PREF_BLIST_ON_TOP, BLIST_TOP_NEVER); purple_prefs_remove(PREF_CHAT_BLINK); handle = plugin; /* blist docking init */ if(purple_blist_get_buddy_list() && PIDGIN_BLIST(purple_blist_get_buddy_list()) && PIDGIN_BLIST(purple_blist_get_buddy_list())->window) { blist_create_cb(purple_blist_get_buddy_list(), NULL); } /* This really shouldn't happen anymore generally, but if for some strange reason, the blist is recreated, we need to set it up again. */ purple_signal_connect(pidgin_blist_get_handle(), "gtkblist-created", plugin, PURPLE_CALLBACK(blist_create_cb), NULL); purple_signal_connect((void*)purple_get_core(), "quitting", plugin, PURPLE_CALLBACK(purple_quit_cb), NULL); purple_prefs_connect_callback(handle, PREF_BLIST_ON_TOP, winprefs_set_blist_ontop, NULL); purple_prefs_connect_callback(handle, PREF_DBLIST_DOCKABLE, winprefs_set_blist_dockable, NULL); return TRUE; }
static gboolean plugin_load(PurplePlugin *plugin) { handle = plugin; /* blist docking init */ if(purple_get_blist() && PIDGIN_BLIST(purple_get_blist()) && PIDGIN_BLIST(purple_get_blist())->window) { blist_create_cb(purple_get_blist(), NULL); } /* This really shouldn't happen anymore generally, but if for some strange reason, the blist is recreated, we need to set it up again. */ purple_signal_connect(pidgin_blist_get_handle(), "gtkblist-created", plugin, PURPLE_CALLBACK(blist_create_cb), NULL); purple_signal_connect((void*)purple_get_core(), "quitting", plugin, PURPLE_CALLBACK(purple_quit_cb), NULL); purple_prefs_connect_callback(handle, PREF_BLIST_ON_TOP, winprefs_set_blist_ontop, NULL); purple_prefs_connect_callback(handle, PREF_DBLIST_DOCKABLE, winprefs_set_blist_dockable, NULL); return TRUE; }
static gboolean plugin_load(PurplePlugin *plugin #if PURPLE_VERSION_CHECK(3, 0, 0) , GError **error #endif ) { #if PURPLE_VERSION_CHECK(3, 0, 0) skypeweb_protocol = purple_protocols_add(SKYPEWEB_TYPE_PROTOCOL, error); if (!skypeweb_protocol) return FALSE; #endif purple_signal_connect(purple_conversations_get_handle(), "conversation-updated", plugin, PURPLE_CALLBACK(skypeweb_mark_conv_seen), NULL); //leave purple_cmd_register("leave", "", PURPLE_CMD_P_PRPL, PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_PRPL_ONLY | PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS, plugin->info->id, skypeweb_cmd_leave, _("leave: Leave the group chat"), NULL); //kick purple_cmd_register("kick", "s", PURPLE_CMD_P_PRPL, PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_PRPL_ONLY, plugin->info->id, skypeweb_cmd_kick, _("kick <user>: Kick a user from the group chat."), NULL); //add purple_cmd_register("add", "s", PURPLE_CMD_P_PRPL, PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_PRPL_ONLY, plugin->info->id, skypeweb_cmd_invite, _("add <user>: Add a user to the group chat."), NULL); //topic purple_cmd_register("topic", "s", PURPLE_CMD_P_PRPL, PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_PRPL_ONLY | PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS, plugin->info->id, skypeweb_cmd_topic, _("topic [<new topic>]: View or change the topic"), NULL); /* //call, as in call person //kickban purple_cmd_register("kickban", "s", PURPLE_CMD_P_PRPL, PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_PRPL_ONLY, plugin->info->id, skypeweb_cmd_kickban, _("kickban <user> [room]: Kick and ban a user from the room."), NULL); //setrole purple_cmd_register("setrole", "ss", PURPLE_CMD_P_PRPL, PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_PRPL_ONLY, plugin->info->id, skypeweb_cmd_setrole, _("setrole <user> <MASTER | USER | ADMIN>: Change the role of a user."), NULL); */ purple_cmd_register("list", "", PURPLE_CMD_P_PRPL, PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_PRPL_ONLY | PURPLE_CMD_FLAG_IM, plugin->info->id, skypeweb_cmd_list, _("list: Display a list of multi-chat group chats you are in."), NULL); purple_signal_connect(purple_get_core(), "uri-handler", plugin, PURPLE_CALLBACK(skypeweb_uri_handler), NULL); return TRUE; }
static void init_plugin(PurplePlugin *plugin) { PurpleAccountUserSplit *split; PurpleAccountOption *option; GList *encryption_values = NULL; /* Translators: 'domain' is used here in the context of Internet domains, e.g. pidgin.im */ split = purple_account_user_split_new(_("Domain"), NULL, '@'); purple_account_user_split_set_reverse(split, FALSE); prpl_info.user_splits = g_list_append(prpl_info.user_splits, split); split = purple_account_user_split_new(_("Resource"), "", '/'); purple_account_user_split_set_reverse(split, FALSE); prpl_info.user_splits = g_list_append(prpl_info.user_splits, split); #define ADD_VALUE(list, desc, v) { \ PurpleKeyValuePair *kvp = g_new0(PurpleKeyValuePair, 1); \ kvp->key = g_strdup((desc)); \ kvp->value = g_strdup((v)); \ list = g_list_prepend(list, kvp); \ } ADD_VALUE(encryption_values, _("Require encryption"), "require_tls"); ADD_VALUE(encryption_values, _("Use encryption if available"), "opportunistic_tls"); ADD_VALUE(encryption_values, _("Use old-style SSL"), "old_ssl"); #if 0 ADD_VALUE(encryption_values, "None", "none"); #endif encryption_values = g_list_reverse(encryption_values); #undef ADD_VALUE option = purple_account_option_list_new(_("Connection security"), "connection_security", encryption_values); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_bool_new( _("Allow plaintext auth over unencrypted streams"), "auth_plain_in_clear", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_int_new(_("Connect port"), "port", 5222); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("Connect server"), "connect_server", NULL); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("File transfer proxies"), "ft_proxies", /* TODO: Is this an acceptable default? * Also, keep this in sync as they add more servers */ JABBER_DEFAULT_FT_PROXIES); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("BOSH URL"), "bosh_url", NULL); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); /* this should probably be part of global smiley theme settings later on, shared with MSN */ option = purple_account_option_bool_new(_("Show Custom Smileys"), "custom_smileys", TRUE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); my_protocol = plugin; purple_prefs_remove("/plugins/prpl/jabber"); purple_signal_connect(purple_get_core(), "uri-handler", plugin, PURPLE_CALLBACK(xmpp_uri_handler), NULL); }
static void init_plugin(PurplePlugin *plugin) { #ifdef HAVE_CYRUS_SASL #ifdef _WIN32 UINT old_error_mode; gchar *sasldir; #endif int ret; #endif PurpleAccountUserSplit *split; PurpleAccountOption *option; /* Translators: 'domain' is used here in the context of Internet domains, e.g. pidgin.im */ split = purple_account_user_split_new(_("Domain"), NULL, '@'); purple_account_user_split_set_reverse(split, FALSE); prpl_info.user_splits = g_list_append(prpl_info.user_splits, split); split = purple_account_user_split_new(_("Resource"), NULL, '/'); purple_account_user_split_set_reverse(split, FALSE); prpl_info.user_splits = g_list_append(prpl_info.user_splits, split); option = purple_account_option_bool_new(_("Require SSL/TLS"), "require_tls", JABBER_DEFAULT_REQUIRE_TLS); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_bool_new(_("Force old (port 5223) SSL"), "old_ssl", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_bool_new( _("Allow plaintext auth over unencrypted streams"), "auth_plain_in_clear", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_int_new(_("Connect port"), "port", 5222); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("Connect server"), "connect_server", NULL); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("File transfer proxies"), "ft_proxies", /* TODO: Is this an acceptable default? * Also, keep this in sync as they add more servers */ "proxy.eu.jabber.org"); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("BOSH URL"), "bosh_url", NULL); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); /* this should probably be part of global smiley theme settings later on, shared with MSN */ option = purple_account_option_bool_new(_("Show Custom Smileys"), "custom_smileys", TRUE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); my_protocol = plugin; jabber_init_plugin(plugin); purple_prefs_remove("/plugins/prpl/jabber"); /* XXX - If any other plugin wants SASL this won't be good ... */ #ifdef HAVE_CYRUS_SASL #ifdef _WIN32 sasldir = g_build_filename(wpurple_install_dir(), "sasl2", NULL); sasl_set_path(SASL_PATH_TYPE_PLUGIN, sasldir); g_free(sasldir); /* Suppress error popups for failing to load sasl plugins */ old_error_mode = SetErrorMode(SEM_FAILCRITICALERRORS); #endif if ((ret = sasl_client_init(NULL)) != SASL_OK) { purple_debug_error("xmpp", "Error (%d) initializing SASL.\n", ret); } #ifdef _WIN32 /* Restore the original error mode */ SetErrorMode(old_error_mode); #endif #endif jabber_register_commands(); /* reverse order of unload_plugin */ jabber_iq_init(); jabber_caps_init(); /* PEP things should be init via jabber_pep_init, not here */ jabber_pep_init(); jabber_data_init(); jabber_bosh_init(); /* BEGIN SPICEBIRD CHANGES */ #if 0 #warning implement adding and retrieving own features via IPC API #endif /* END SPICEBIRD CHANGES */ jabber_ibb_init(); jabber_si_init(); purple_signal_connect(purple_get_core(), "uri-handler", plugin, PURPLE_CALLBACK(xmpp_uri_handler), NULL); }
STATIC_PROTO_INIT gboolean purple_core_init(const char *ui) { PurpleCoreUiOps *ops; PurpleCore *core; g_return_val_if_fail(ui != NULL, FALSE); g_return_val_if_fail(purple_get_core() == NULL, FALSE); #ifdef ENABLE_NLS bindtextdomain(PACKAGE, LOCALEDIR); #endif //VOXOX - JRT - 2009.04.11 #ifdef _WIN32 wpurple_init(); #ifdef _DEBUG // _CrtSetDbgFlag( 0x20 ); //_CRTDBG_LEAK_CHECK_DF );//VOXOX - JRT - 2009.04.10 JRT-XXX // _CrtSetAllocHook( AllocHook ); #endif #endif g_type_init(); _core = core = g_new0(PurpleCore, 1); core->ui = g_strdup(ui); core->reserved = NULL; ops = purple_core_get_ui_ops(); /* The signals subsystem is important and should be first. */ purple_signals_init(); purple_util_init(); purple_signal_register(core, "uri-handler", purple_marshal_BOOLEAN__POINTER_POINTER_POINTER, purple_value_new(PURPLE_TYPE_BOOLEAN), 3, purple_value_new(PURPLE_TYPE_STRING), /* Protocol */ purple_value_new(PURPLE_TYPE_STRING), /* Command */ purple_value_new(PURPLE_TYPE_BOXED, "GHashTable *")); /* Parameters */ purple_signal_register(core, "quitting", purple_marshal_VOID, NULL, 0); /* The prefs subsystem needs to be initialized before static protocols * for protocol prefs to work. */ purple_prefs_init(); purple_debug_init(); if (ops != NULL) { if (ops->ui_prefs_init != NULL) ops->ui_prefs_init(); if (ops->debug_ui_init != NULL) ops->debug_ui_init(); } #ifdef HAVE_DBUS purple_dbus_init(); #endif purple_ciphers_init(); purple_cmds_init(); /* Since plugins get probed so early we should probably initialize their * subsystem right away too. */ purple_plugins_init(); /* Initialize all static protocols. */ static_proto_init(); purple_plugins_probe(G_MODULE_SUFFIX); /* The buddy icon code uses the imgstore, so init it early. */ purple_imgstore_init(); /* Accounts use status, buddy icons and connection signals, so * initialize these before accounts */ purple_status_init(); purple_buddy_icons_init(); purple_connections_init(); purple_accounts_init(); purple_savedstatuses_init(); purple_notify_init(); purple_certificate_init(); purple_conversations_init(); purple_blist_init(); purple_log_init(); purple_network_init(); purple_privacy_init(); purple_pounces_init(); purple_proxy_init(); purple_dnsquery_init(); purple_sound_init(); purple_ssl_init(); purple_stun_init(); purple_xfers_init(); purple_idle_init(); purple_smileys_init(); /* * Call this early on to try to auto-detect our IP address and * hopefully save some time later. */ purple_network_get_my_ip(-1); if (ops != NULL && ops->ui_init != NULL) ops->ui_init(); return TRUE; }
void purple_core_quit(void) { PurpleCoreUiOps *ops; PurpleCore *core = purple_get_core(); g_return_if_fail(core != NULL); /* The self destruct sequence has been initiated */ purple_signal_emit(purple_get_core(), "quitting"); /* Transmission ends */ purple_connections_disconnect_all(); /* * Certificates must be destroyed before the SSL plugins, because * PurpleCertificates contain pointers to PurpleCertificateSchemes, * and the PurpleCertificateSchemes will be unregistered when the * SSL plugin is uninit. */ purple_certificate_uninit(); /* Save .xml files, remove signals, etc. */ purple_smileys_uninit(); purple_idle_uninit(); purple_pounces_uninit(); purple_blist_uninit(); purple_ciphers_uninit(); purple_notify_uninit(); purple_conversations_uninit(); purple_connections_uninit(); purple_buddy_icons_uninit(); purple_accounts_uninit(); purple_savedstatuses_uninit(); purple_status_uninit(); purple_sound_uninit(); purple_xfers_uninit(); purple_proxy_uninit(); purple_dnsquery_uninit(); purple_imgstore_uninit(); purple_network_uninit(); /* The SSL plugins must be uninit before they're unloaded */ purple_ssl_uninit(); purple_debug_info("main", "Unloading all plugins\n"); purple_plugins_destroy_all(); ops = purple_core_get_ui_ops(); if (ops != NULL && ops->quit != NULL) ops->quit(); /* Everything after this must not try to read any prefs */ purple_prefs_uninit(); purple_plugins_uninit(); #ifdef HAVE_DBUS purple_dbus_uninit(); #endif purple_cmds_uninit(); /* Everything after this cannot try to write things to the confdir */ purple_util_uninit(); purple_signals_uninit(); g_free(core->ui); g_free(core); #ifdef _WIN32 wpurple_cleanup(); #endif _core = NULL; }
/************************************************************************** * Plugin stuff **************************************************************************/ static gboolean plugin_load(PurplePlugin *plugin) { void *core_handle = purple_get_core(); void *acc_handle = purple_accounts_get_handle(); void *blist_handle = purple_blist_get_handle(); void *conn_handle = purple_connections_get_handle(); void *conv_handle = purple_conversations_get_handle(); void *ft_handle = purple_xfers_get_handle(); void *notify_handle = purple_notify_get_handle(); //gntp_register(NULL); connected = 0; registered = 0; connect_to_dll(); _getcwd(DefaultIcon, _MAX_PATH); strcat(DefaultIcon, "/pixmaps/pidgin/growl_icon.png"); if(!registered) { if(growl_register) { growl_register(SERVER_IP, PLUGIN_NAME, (const char **const)notifications, 12, 0, DefaultIcon); registered = 1; } } /* Account subsystem signals */ purple_signal_connect(acc_handle, "account-status-changed", plugin, PURPLE_CALLBACK(account_status_changed_cb), NULL); /* Buddy List subsystem signals */ purple_signal_connect(blist_handle, "buddy-status-changed", plugin, PURPLE_CALLBACK(buddy_status_changed_cb), NULL); purple_signal_connect(blist_handle, "buddy-signed-on", plugin, PURPLE_CALLBACK(buddy_signed_on_cb), NULL); purple_signal_connect(blist_handle, "buddy-signed-off", plugin, PURPLE_CALLBACK(buddy_signed_off_cb), NULL); purple_signal_connect(blist_handle, "buddy-icon-changed", plugin, PURPLE_CALLBACK(buddy_icon_changed_cb), NULL); /* Connection subsystem signals */ purple_signal_connect(conn_handle, "signed-on", plugin, PURPLE_CALLBACK(signed_on_cb), NULL); purple_signal_connect(conn_handle, "signed-off", plugin, PURPLE_CALLBACK(signed_off_cb), NULL); purple_signal_connect(conn_handle, "connection-error", plugin, PURPLE_CALLBACK(connection_error_cb), NULL); /* Conversations subsystem signals */ purple_signal_connect(conv_handle, "wrote-im-msg", plugin, PURPLE_CALLBACK(wrote_im_msg_cb), NULL); purple_signal_connect(conv_handle, "sent-im-msg", plugin, PURPLE_CALLBACK(sent_im_msg_cb), NULL); purple_signal_connect(conv_handle, "received-im-msg", plugin, PURPLE_CALLBACK(received_im_msg_cb), NULL); purple_signal_connect(conv_handle, "wrote-chat-msg", plugin, PURPLE_CALLBACK(wrote_chat_msg_cb), NULL); purple_signal_connect(conv_handle, "sent-chat-msg", plugin, PURPLE_CALLBACK(sent_chat_msg_cb), NULL); purple_signal_connect(conv_handle, "received-chat-msg", plugin, PURPLE_CALLBACK(received_chat_msg_cb), NULL); purple_signal_connect(conv_handle, "conversation-created", plugin, PURPLE_CALLBACK(conversation_created_cb), NULL); purple_signal_connect(conv_handle, "chat-buddy-joined", plugin, PURPLE_CALLBACK(chat_buddy_joined_cb), NULL); purple_signal_connect(conv_handle, "chat-buddy-flags", plugin, PURPLE_CALLBACK(chat_buddy_flags_cb), NULL); purple_signal_connect(conv_handle, "chat-buddy-left", plugin, PURPLE_CALLBACK(chat_buddy_left_cb), NULL); purple_signal_connect(conv_handle, "chat-invited-user", plugin, PURPLE_CALLBACK(chat_invited_user_cb), NULL); purple_signal_connect(conv_handle, "chat-invited", plugin, PURPLE_CALLBACK(chat_invited_cb), NULL); purple_signal_connect(conv_handle, "chat-joined", plugin, PURPLE_CALLBACK(chat_joined_cb), NULL); purple_signal_connect(conv_handle, "chat-left", plugin, PURPLE_CALLBACK(chat_left_cb), NULL); purple_signal_connect(conv_handle, "chat-topic-changed", plugin, PURPLE_CALLBACK(chat_topic_changed_cb), NULL); /* Core signals */ purple_signal_connect(core_handle, "quitting", plugin, PURPLE_CALLBACK(quitting_cb), NULL); /* File transfer signals */ purple_signal_connect(ft_handle, "file-recv-accept", plugin, PURPLE_CALLBACK(ft_recv_accept_cb), NULL); purple_signal_connect(ft_handle, "file-recv-start", plugin, PURPLE_CALLBACK(ft_recv_start_cb), NULL); purple_signal_connect(ft_handle, "file-recv-cancel", plugin, PURPLE_CALLBACK(ft_recv_cancel_cb), NULL); purple_signal_connect(ft_handle, "file-recv-complete", plugin, PURPLE_CALLBACK(ft_recv_complete_cb), NULL); purple_signal_connect(ft_handle, "file-send-accept", plugin, PURPLE_CALLBACK(ft_send_accept_cb), NULL); purple_signal_connect(ft_handle, "file-send-start", plugin, PURPLE_CALLBACK(ft_send_start_cb), NULL); purple_signal_connect(ft_handle, "file-send-cancel", plugin, PURPLE_CALLBACK(ft_send_cancel_cb), NULL); purple_signal_connect(ft_handle, "file-send-complete", plugin, PURPLE_CALLBACK(ft_send_complete_cb), NULL); /* Notify signals */ purple_signal_connect(notify_handle, "displaying-email-notification", plugin, PURPLE_CALLBACK(notify_email_cb), NULL); purple_signal_connect(notify_handle, "displaying-emails-notification", plugin, PURPLE_CALLBACK(notify_emails_cb), NULL); return TRUE; }