gaim/gaim

702c6d109eac
Parents 7c2050cd8799
Children c902dd8c275d
Reverting initial changes so this can be integrated into the yahoo prpl
--- a/plugins/Makefile.am Sun Jul 03 04:58:35 2005 -0400
+++ b/plugins/Makefile.am Tue Jul 12 18:30:55 2005 -0400
@@ -29,7 +29,6 @@
spellchk_la_LDFLAGS = -module -avoid-version $(GTK_LIBS)
statenotify_la_LDFLAGS = -module -avoid-version $(GLIB_LIBS)
timestamp_la_LDFLAGS = -module -avoid-version $(GTK_LIBS)
-goodle_la_LDFLAGS = -module -avoid-version $(GTK_LIBS)
if PLUGINS
@@ -44,8 +43,7 @@
relnot.la \
spellchk.la \
statenotify.la \
- timestamp.la \
- goodle.la
+ timestamp.la
autorecon_la_SOURCES = autorecon.c
extplacement_la_SOURCES = extplacement.c
@@ -58,7 +56,6 @@
spellchk_la_SOURCES = spellchk.c
statenotify_la_SOURCES = statenotify.c
timestamp_la_SOURCES = timestamp.c
-goodle_la_SOURCES = goodle.c
endif # PLUGINS
--- a/plugins/goodle.c Sun Jul 03 04:58:35 2005 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,698 +0,0 @@
-/*
- * Gaim - iChat-like timestamps
- *
- * Copyright (C) 2002-2003, Sean Egan
- * Copyright (C) 2003, Chris J. Friesen <Darth_Sebulba04@yahoo.com>
- *
- * 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
- *
- */
-
-//#define GAIM_PLUGINS
-
-// INCLUDES ============================================================================================
-#include <glib.h>
-#include <gtk/gtk.h>
-#include <gdk/gdk.h>
-
-#include "internal.h"
-
-//#include "account.h"
-
-#include "cmds.h"
-#include "conversation.h"
-#include "debug.h"
-#include "gtkconv.h"
-#include "gtkplugin.h"
-#include "gtkprefs.h"
-#include "gtkutils.h"
-#include "prefs.h"
-#include "util.h"
-#include "version.h"
-
-#include "protocols/yahoo/yahoo.h"
-#include "protocols/yahoo/ycht.h"
-
-// DEFINES =============================================================================================
-
-// Doodle communication commands
-#define DOODLE_CMD_REQUEST 0
-#define DOODLE_CMD_READY 1
-#define DOODLE_CMD_CLEAR 2
-#define DOODLE_CMD_DRAW 3
-#define DOODLE_CMD_UNKNOWN 4
-#define DOODLE_CMD_CONFIRM 5
-
-// Doodle color codes (most likely RGB)
-#define DOODLE_COLOR_RED 13369344
-#define DOODLE_COLOR_ORANGE 16737792
-#define DOODLE_COLOR_YELLOW 15658496
-#define DOODLE_COLOR_GREEN 52224
-#define DOODLE_COLOR_CYAN 52428
-#define DOODLE_COLOR_BLUE 204
-#define DOODLE_COLOR_VIOLET 5381277
-#define DOODLE_COLOR_PURPLE 13369548
-#define DOODLE_COLOR_TAN 12093547
-#define DOODLE_COLOR_BROWN 5256485
-#define DOODLE_COLOR_BLACK 0
-#define DOODLE_COLOR_GREY 11184810
-#define DOODLE_COLOR_WHITE 16777215
-
-// Doodle brush sizes (most likely variable)
-#define DOODLE_BRUSH_SMALL 2
-#define DOODLE_BRUSH_MEDIUM 5
-#define DOODLE_BRUSH_LARGE 10
-
-// PROTOTYPES ==========================================================================================
-static void init_plugin( GaimPlugin *plugin );
-static gboolean goodle_load( GaimPlugin *plugin );
-static gboolean goodle_unload( GaimPlugin *plugin );
-static void goodle_destroy( GaimPlugin *plugin ); // void or gboolean?
-static GtkWidget *get_config_frame( GaimPlugin *plugin );
-
-static void goodle_conv_created( GaimConversation *conv, gpointer data );
-static void goodle_conv_destroyed( GaimConversation *conv, gpointer data );
-
-static void goodle_button_press( GtkButton *button, gpointer data );
-
-static void goodle_set_goodle_pending( gboolean useGoodle );
-static void goodle_pending( gpointer data, gint source, GaimInputCondition cond );
-static void goodle_packet_process( GaimConnection *gc, struct yahoo_packet *pkt );
-
-static void goodle_got_command_request( GaimConnection *gc, char *from );
-static void goodle_got_command_ready( GaimConnection *gc, char *from );
-//static void goodle_got_command_draw( GaimConnection *gc, char *from, char *message );
-//static void goodle_got_command_clear( GaimConnection *gc, char *from );
-static void goodle_got_command_confirm( GaimConnection *gc, char *from );
-//static void goodle_got_command_shutdown(
-
-static void goodle_send_command_confirm( GaimConnection *gc, char *to );
-
-// GLOBALS =============================================================================================
-static gboolean auto_accept = TRUE;
-
-static GList *buttonList = NULL;
-
-//static GList *requestList = NULL;
-//static Glist *goodle_windowList = NULL;
-
-static GaimGtkPluginUiInfo ui_info = { get_config_frame };
-
-static GaimPluginInfo info =
-{
- GAIM_PLUGIN_MAGIC,
- GAIM_MAJOR_VERSION,
- GAIM_MINOR_VERSION,
- GAIM_PLUGIN_STANDARD,
- GAIM_GTK_PLUGIN_TYPE,
- 0,
- NULL,
- GAIM_PRIORITY_DEFAULT,
-
- "core-goodle",
- "Goodle",
- VERSION,
-
- "Draw with other Yahoo IM users",
- "Goodle emulates the Yahoo IM's Doodle IMvironment, in which users can draw together in real-time",
- "Andrew Dieffenbach (puzzud@gmail.com)",
- "http://puzzix.homeip.net:31580/goodle",
-
- goodle_load,
- goodle_unload,
- goodle_destroy,
-
- &ui_info,
- NULL,
- NULL,
- NULL
-};
-
-GAIM_INIT_PLUGIN( goodle, init_plugin, info );
-
-// FUNCTIONS ============================================================================================
-
-// This function is called at the start of Gaim (twice?)
-// Anyhow... this is the biggy... I think :P
-static void init_plugin( GaimPlugin *plugin )
-{
-
-}
-// ------------------------------------------------------------------------------------------------------
-
-// plugin_load is not required. It is called when the plugin is loaded so that you can
-// initialize any variables and so on. Therefore, called when selected in Preferences->Plugins
-static gboolean goodle_load( GaimPlugin *plugin )
-{
- // Set up signal/functions for when the conversation/windows are created
- void *conv_handle = gaim_conversations_get_handle();
-
- // Connect the open and closing conversation signals to our plugin functions
- gaim_signal_connect( conv_handle, "conversation-created", plugin,
- GAIM_CALLBACK( goodle_conv_created ), NULL );
-
- gaim_signal_connect( conv_handle, "deleting-conversation", plugin,
- GAIM_CALLBACK( goodle_conv_destroyed ), NULL );
-
- // Make all active Yahoo accounts use the Goodle network packet handler
- goodle_set_goodle_pending( TRUE );
-
- return( TRUE );
-}
-// ------------------------------------------------------------------------------------------------------
-
-// plugin_destroy is called when plugin is unloaded (unselected)
-static gboolean goodle_unload( GaimPlugin *plugin )
-{
- // Destroy any buttons that haven't been destroyed from closing conversation windows
- g_list_free( buttonList );
-
- // Return full packet handling to the original Yahoo plugin
- goodle_set_goodle_pending( FALSE );
-
- return( TRUE );
-}
-// ------------------------------------------------------------------------------------------------------
-
-// plugin_destroy is called when plugin is destroyed (fails/crashes)
-static void goodle_destroy( GaimPlugin *plugin )
-{
- goodle_unload( plugin );
-}
-// ------------------------------------------------------------------------------------------------------
-
-static void goodle_conv_created( GaimConversation *conv, gpointer data )
-{
- GtkWidget *button;
- GaimGtkConversation *gtkconv;
- //GaimConversationType type;
-
- // Check if this is a valid conversation window in Gaim ?
- if( ( gtkconv = GAIM_GTK_CONVERSATION( conv ) ) == NULL )
- return;
-
- //type = gaim_conversation_get_type( conv );
-
- // Create this button (via Gaim API)
- button = gaim_gtkconv_button_new( NULL,
- "Goodle", "Goodle",
- gtkconv->tooltips,
- goodle_button_press,
- ( gpointer )( conv ) );
-
- // Stamp this button with essentially information attributing it to this particular conversation?
- g_object_set_data( G_OBJECT( button ), "conv", conv );
-
- // Add this particular button to the global list of buttons
- buttonList = g_list_append( buttonList, ( gpointer )( button ) );
-
- // Place the button at the bottom of the Gaim conversation window
- gtk_box_pack_end( GTK_BOX( gtkconv->bbox ), button, TRUE, TRUE, 0 );
- gtk_size_group_add_widget( gtkconv->sg, button );
- gtk_widget_show( button );
-}
-// ------------------------------------------------------------------------------------------------------
-
-static void goodle_conv_destroyed( GaimConversation *conv, gpointer data )
-{
- GaimConversation *stored_conv;
- GtkWidget *button;
- GList *l, *l_next;
-
- // Traverse the list of buttons and destroy the one associated with this conversation window
- for( l = buttonList; l != NULL; l = l_next )
- {
- l_next = l->next;
-
- button = GTK_WIDGET( l->data );
- stored_conv = ( GaimConversation* )g_object_get_data( G_OBJECT( button ), "conv" );
-
- // Does this button's 'stamp' match that of this conversation?
- if( stored_conv == conv )
- {
- gtk_widget_destroy( button );
-
- buttonList = g_list_remove( buttonList, l->data );
- break;
- }
- }
-}
-// ------------------------------------------------------------------------------------------------------
-
-static void goodle_button_press( GtkButton *button, gpointer data )
-{
- GaimConversation *conv = data;
- GaimAccount *account = gaim_conversation_get_account( conv );
- GaimConnection *gc = gaim_account_get_connection( account );
-
- struct yahoo_data *yd;
- struct yahoo_packet *pkt;
-
- yd = gc->proto_data;
-
- // Make and send an acknowledge (ready) Doodle packet
- pkt = yahoo_packet_new( YAHOO_SERVICE_P2PFILEXFER, YAHOO_STATUS_AVAILABLE, 0 );
- yahoo_packet_hash( pkt, 49, "IMVIRONMENT" );
- yahoo_packet_hash( pkt, 1, gaim_normalize( gc->account, gaim_account_get_username( account ) ) );
- yahoo_packet_hash( pkt, 14, "1" );
- yahoo_packet_hash( pkt, 13, "1" );
- yahoo_packet_hash( pkt, 5, gaim_conversation_get_name( conv ) );
- yahoo_packet_hash( pkt, 63, "doodle;11" );
- yahoo_packet_hash( pkt, 64, "1" );
- yahoo_packet_hash( pkt, 1002, "1" );
- yahoo_send_packet( yd, pkt );
-
- // Make and send a request to start a Doodle session
- pkt = yahoo_packet_new( YAHOO_SERVICE_P2PFILEXFER, YAHOO_STATUS_AVAILABLE, 0 );
- yahoo_packet_hash( pkt, 49, "IMVIRONMENT" );
- yahoo_packet_hash( pkt, 1, gaim_normalize( gc->account, gaim_account_get_username( account ) ) );
- yahoo_packet_hash( pkt, 14, "" );
- yahoo_packet_hash( pkt, 13, "0" );
- yahoo_packet_hash( pkt, 5, gaim_conversation_get_name( conv ) );
- yahoo_packet_hash( pkt, 63, "doodle;11" );
- yahoo_packet_hash( pkt, 64, "0" );
- yahoo_packet_hash( pkt, 1002, "1" );
- yahoo_send_packet( yd, pkt );
-
- yahoo_packet_free( pkt );
-
- // TODO Set a variable (in a list?) that shows we are waiting
- // for the remote client to initialize and accept our request for a Doodle session
-
- // TODO Write a local message to this conversation showing that
- // a request for a Doodle session has been made
-}
-
-// ------------------------------------------------------------------------------------------------------
-
-// Configuration dialog for plugin (uses GTK)
-static GtkWidget *get_config_frame( GaimPlugin *plugin )
-{
- GtkWidget *vbox, *frame;
-
- vbox = gtk_vbox_new( FALSE, 6 );
- gtk_container_set_border_width( GTK_CONTAINER( vbox ), 12 );
-
- frame = gaim_gtk_make_frame( vbox, "Settings" );
-
- gaim_gtk_prefs_checkbox( "Automatically accept Doodle requests",
- "/plugins/gtk/goodle/auto_accept",
- frame );
-
- gtk_widget_show_all( vbox );
-
- return( vbox );
-}
-// ------------------------------------------------------------------------------------------------------
-
-static void goodle_set_goodle_pending( gboolean useGoodle )
-{
- GList *accountList = NULL;
- GList *l = NULL;
- GList *l_next = NULL;
-
- GaimAccount *account;
- GaimConnection *gc;
-
- struct yahoo_data *yd;
-
- g_print( "goodle_insert_pending()\n" );
-
- // Obtain all the Gaim accounts (no other way to get to the GaimConnections?)
- accountList = gaim_accounts_get_all();
-
- // Traverse through the accounts to determine which ones are Yahoo
- for( l = accountList; l != NULL; l = l_next )
- {
- g_print( "An account was found.\n" );
- l_next = l->next;
-
- account = ( GaimAccount* )( l->data );
-
- // Check if this particular account is Yahoo
- if( !strcmp( gaim_account_get_protocol_id( account ), "prpl-yahoo" ) )
- {
- if( gaim_account_is_connected( account ) )
- {
- g_print( "%s (yahoo) -> ACTIVE\n", gaim_account_get_username( account ) );
-
- gc = gaim_account_get_connection( account );
-
- yd = gc->proto_data;
-
- if( useGoodle )
- {
- // Replace the packet handler function with a modified one
- // to check for packets concerning 'Doodle'
- gaim_input_remove( gc->inpa );
- gc->inpa = gaim_input_add( yd->fd, GAIM_INPUT_READ, goodle_pending, gc );
- }
- else
- {
- // Replace the modified packet handler function with original
- gaim_input_remove( gc->inpa );
- gc->inpa = gaim_input_add( yd->fd, GAIM_INPUT_READ, yahoo_pending, gc );
- }
- }
- }
- }
-
- // Destroy the list of accounts obtained
- //g_list_free( accountList );
-}
-
-// ------------------------------------------------------------------------------------------------------
-
-// Handles the interception of Yahoo packets
-// Code copied from Tim Ringenbach's yahoo_pending() in the yahoo.c file of the Yahoo Gaim plugin.
-static void goodle_pending( gpointer data, gint source, GaimInputCondition cond )
-{
- g_print( "goodle_pending()\n" );
-
- GaimConnection *gc = data;
- struct yahoo_data *yd = gc->proto_data;
- char buf[1024];
- int len;
-
- len = read(yd->fd, buf, sizeof(buf));
-
- if (len <= 0) {
- gaim_connection_error(gc, _("Unable to read"));
- return;
- }
-
- yd->rxqueue = g_realloc(yd->rxqueue, len + yd->rxlen);
- memcpy(yd->rxqueue + yd->rxlen, buf, len);
- yd->rxlen += len;
-
- while (1) {
- struct yahoo_packet *pkt;
- int pos = 0;
- int pktlen;
-
- if (yd->rxlen < YAHOO_PACKET_HDRLEN)
- return;
-
- if (strncmp(yd->rxqueue, "YMSG", MIN(4, yd->rxlen)) != 0) {
- // HEY! This isn't even a YMSG packet. What
- // are you trying to pull?
- guchar *start;
-
- gaim_debug_warning("yahoo", "Error in YMSG stream, got something not a YMSG packet!\n");
-
- start = memchr(yd->rxqueue + 1, 'Y', yd->rxlen - 1);
- if (start) {
- g_memmove(yd->rxqueue, start, yd->rxlen - (start - yd->rxqueue));
- yd->rxlen -= start - yd->rxqueue;
- continue;
- } else {
- g_free(yd->rxqueue);
- yd->rxqueue = NULL;
- yd->rxlen = 0;
- return;
- }
- }
-
- pos += 4; // YMSG
- pos += 2;
- pos += 2;
-
- pktlen = yahoo_get16(yd->rxqueue + pos); pos += 2;
- gaim_debug(GAIM_DEBUG_MISC, "yahoo",
- "%d bytes to read, rxlen is %d\n", pktlen, yd->rxlen);
-
- if (yd->rxlen < (YAHOO_PACKET_HDRLEN + pktlen))
- return;
-
- yahoo_packet_dump(yd->rxqueue, YAHOO_PACKET_HDRLEN + pktlen);
-
- pkt = yahoo_packet_new(0, 0, 0);
-
- pkt->service = yahoo_get16(yd->rxqueue + pos); pos += 2;
- pkt->status = yahoo_get32(yd->rxqueue + pos); pos += 4;
- gaim_debug(GAIM_DEBUG_MISC, "yahoo",
- "Yahoo Service: 0x%02x Status: %d\n",
- pkt->service, pkt->status);
- pkt->id = yahoo_get32(yd->rxqueue + pos); pos += 4;
-
- yahoo_packet_read(pkt, yd->rxqueue + pos, pktlen);
-
- yd->rxlen -= YAHOO_PACKET_HDRLEN + pktlen;
- if (yd->rxlen) {
- char *tmp = g_memdup(yd->rxqueue + YAHOO_PACKET_HDRLEN + pktlen, yd->rxlen);
- g_free(yd->rxqueue);
- yd->rxqueue = tmp;
- } else {
- g_free(yd->rxqueue);
- yd->rxqueue = NULL;
- }
-
- // Direct any 'Doodle' (YAHOO_SERVICE_P2PFILEXFER) packets to the Goodle packet processor
- if( ( pkt->service == YAHOO_SERVICE_P2PFILEXFER ) )
- {
- g_print( "YAHOO_SERVICE_P2PFILEXFER\n" );
- goodle_packet_process( gc, pkt );
- }
-
- yahoo_packet_process(gc, pkt);
-
- yahoo_packet_free(pkt);
- }
-
- // Call original function for handling Yahoo communication
- //g_print( "Reverting packet responsibility!\n" );
- //yahoo_pending( data, source, cond );
-}
-
-// ------------------------------------------------------------------------------------------------------
-
-static void goodle_packet_process( GaimConnection *gc, struct yahoo_packet *pkt )
-{
- GSList *l = pkt->hash;
-
- char *me = NULL;
- char *from = NULL;
- char *type = NULL;
- char *message = NULL;
- char *command = NULL;
- char *imv = NULL;
- char *unknown = NULL;
-
- int cmd;
-
- // Get all the necessary values from this new packet
- while( l )
- {
- struct yahoo_pair *pair = l->data;
-
- if ( pair->key == 5 ) // Get who the packet is for
- me = pair->value;
-
- if ( pair->key == 4 ) // Get who the packet is from
- from = pair->value;
-
- if ( pair->key == 49 ) // Get the type of packet (not service)
- {
- type = pair->value;
-
- // If this packet isn't an IMVIRONMENT, forget about it
- if( strcmp( type, "IMVIRONMENT" ) )
- return;
- else
- g_print( "%s\n", type );
- }
-
- if ( pair->key == 14 ) // Get the 'message' of the packet
- message = pair->value;
-
- if ( pair->key == 13 ) // Get the command associated with this packet
- {
- command = pair->value;
-
- g_print( "%s\n", command );
- }
-
- if ( pair->key == 63 ) // IMVironment name and version
- {
- imv = pair->value;
-
- // NOTE I may potentially have to handle shutting down Doodle session here
- // because of Yahoo's 'mono' IMV architecture: shutdown command doesn't specify
- // a particular IMV, it just specifies IMV in general... eek!
- /*
- // If this packet isn't for doodling, forget about it
- if( strcmp( imv, "doodle;11" ) )
- return;
- else
- g_print( "%s\n", imv );
- */
- }
-
- if ( pair->key == 64 ) // Not sure, but it does vary with initialization of Doodle
- unknown = pair->value; // So, I'll keep it (for a little while atleast)
-
- l = l->next;
- }
-
- // Now check to see what sort of Doodle message it is
- cmd = atoi( command );
-
- switch( cmd )
- {
- case DOODLE_CMD_REQUEST:
- {
- goodle_got_command_request( gc, from );
- } break;
-
- case DOODLE_CMD_READY:
- {
- goodle_got_command_ready( gc, from );
- } break;
-
- case DOODLE_CMD_CLEAR:
- {
- // TODO Call clearing function
- g_print( "(%s cleared the canvas)\n", from );
- } break;
-
- case DOODLE_CMD_DRAW:
- {
- // TODO Call drawing function
- } break;
-
- case DOODLE_CMD_UNKNOWN:
- {
- // Hell if I know (maybe popup a dialog box too for such a rare occasion?!)
- if( !strcmp( imv, "doodle;11" ) )
- g_print( "!!! Yahoo.Doodle.Command #4!\n" );
- } break;
-
- case DOODLE_CMD_CONFIRM:
- {
- goodle_got_command_confirm( gc, from );
- } break;
- }
-}
-
-// ------------------------------------------------------------------------------------------------------
-
-static void goodle_got_command_request( GaimConnection *gc, char *from )
-{
- struct yahoo_data *yd;
- struct yahoo_packet *pkt;
-
- yd = gc->proto_data;
-
- if( !auto_accept ) // TODO Ask local user to start Doodle session with remote user
- {}; // NOTE This if/else statement won't work right--must use dialog results
-
- // TODO Initialize Goodle window (canvas, palette, etc.)
-
- // TODO Send ready packet (that local client accepted and is ready to start Doodle session)
-
- // Make and send an acknowledge (ready) Doodle packet
- pkt = yahoo_packet_new( YAHOO_SERVICE_P2PFILEXFER, YAHOO_STATUS_AVAILABLE, 0 );
- yahoo_packet_hash( pkt, 49, "IMVIRONMENT" );
- yahoo_packet_hash( pkt, 1, gaim_account_get_username( gc->account ) );
- yahoo_packet_hash( pkt, 14, "1" );
- yahoo_packet_hash( pkt, 13, "1" );
- yahoo_packet_hash( pkt, 5, from );
- yahoo_packet_hash( pkt, 63, "doodle;11" );
- yahoo_packet_hash( pkt, 64, "1" );
- yahoo_packet_hash( pkt, 1002, "1" );
- yahoo_send_packet( yd, pkt );
-
- yahoo_packet_free( pkt );
-}
-
-// ------------------------------------------------------------------------------------------------------
-
-static void goodle_got_command_ready( GaimConnection *gc, char *from )
-{
- // NOTE Only handle this if local client requested Doodle session?
- // TODO So, check to see if local client requested Doodle session (through global request list)
-
- goodle_send_command_confirm( gc, from );
-}
-
-// ------------------------------------------------------------------------------------------------------
-
-static void goodle_got_command_confirm( GaimConnection *gc, char *from )
-{
- // TODO Check if local client really requested a Doodle session.
-
- // TODO Initialize Goodle window (canvas, palette, etc.)
-
- // TODO Perhaps set some kind of 'Doodle session established' flag as some sort of lock?
-}
-
-// ------------------------------------------------------------------------------------------------------
-
-static void goodle_send_command_confirm( GaimConnection *gc, char *to )
-{
- struct yahoo_data *yd;
- struct yahoo_packet *pkt;
-
- yd = gc->proto_data;
-
- if( !auto_accept ) // TODO Ask local user to start Doodle session with remote user
- {}; // NOTE This if/else statement won't work right--must use dialog results
-
- // TODO Initialize Goodle window (canvas, palette, etc.)
-
- // Send ready packet (that local client accepted and is ready)
- pkt = yahoo_packet_new( YAHOO_SERVICE_P2PFILEXFER, YAHOO_STATUS_AVAILABLE, 0 );
- yahoo_packet_hash( pkt, 49, "IMVIRONMENT" );
- yahoo_packet_hash( pkt, 1, gaim_account_get_username( gc->account ) );
- yahoo_packet_hash( pkt, 14, "1" );
- yahoo_packet_hash( pkt, 13, "5" );
- yahoo_packet_hash( pkt, 5, to );
- yahoo_packet_hash( pkt, 63, "doodle;11" );
- yahoo_packet_hash( pkt, 64, "1" );
- yahoo_packet_hash( pkt, 1002, "1" );
- yahoo_send_packet( yd, pkt );
-
- yahoo_packet_free( pkt );
-}
-
-// ------------------------------------------------------------------------------------------------------
-
- /*
- // Make and send a request to clear packet (doesn't work?)
- pkt = yahoo_packet_new( YAHOO_SERVICE_P2PFILEXFER, YAHOO_STATUS_AVAILABLE, 0 );
- yahoo_packet_hash( pkt, 49, "IMVIRONMENT" );
- yahoo_packet_hash( pkt, 1, gaim_normalize( gc->account, gaim_account_get_username( account ) ) );
- yahoo_packet_hash( pkt, 14, " " );
- yahoo_packet_hash( pkt, 13, "2" );
- yahoo_packet_hash( pkt, 5, gaim_conversation_get_name( conv ) );
- yahoo_packet_hash( pkt, 63, "doodle;11" );
- yahoo_packet_hash( pkt, 64, "1" );
- yahoo_packet_hash( pkt, 1002, "1" );
- yahoo_send_packet( yd, pkt );
- */
-
- /*
- // Make and send a drawing packet
- pkt = yahoo_packet_new( YAHOO_SERVICE_P2PFILEXFER, YAHOO_STATUS_AVAILABLE, 0 );
- yahoo_packet_hash( pkt, 49, "IMVIRONMENT" );
- yahoo_packet_hash( pkt, 1, gaim_normalize( gc->account, gaim_account_get_username( account ) ) );
- yahoo_packet_hash( pkt, 14, "\"13369344,5,33,26,0,0,7,0,6,0,7,0,8,6,0,6,0,1,0\"" );
- yahoo_packet_hash( pkt, 13, "3" );
- yahoo_packet_hash( pkt, 5, gaim_conversation_get_name( conv ) );
- yahoo_packet_hash( pkt, 63, "doodle;11" );
- yahoo_packet_hash( pkt, 64, "1" );
- yahoo_packet_hash( pkt, 1002, "1" );
- yahoo_send_packet( yd, pkt );
- */
--- a/src/protocols/yahoo/yahoo.c Sun Jul 03 04:58:35 2005 -0400
+++ b/src/protocols/yahoo/yahoo.c Tue Jul 12 18:30:55 2005 -0400
@@ -1927,7 +1927,7 @@
serv_got_im(gc, who, msg, 0, time(NULL));
}
-void yahoo_packet_process(GaimConnection *gc, struct yahoo_packet *pkt)
+static void yahoo_packet_process(GaimConnection *gc, struct yahoo_packet *pkt)
{
switch (pkt->service) {
case YAHOO_SERVICE_LOGON:
@@ -2044,7 +2044,7 @@
}
}
-void yahoo_pending(gpointer data, gint source, GaimInputCondition cond)
+static void yahoo_pending(gpointer data, gint source, GaimInputCondition cond)
{
GaimConnection *gc = data;
struct yahoo_data *yd = gc->proto_data;
@@ -2896,7 +2896,7 @@
return m;
}
-int yahoo_send_im(GaimConnection *gc, const char *who, const char *what, GaimConvImFlags flags)
+static int yahoo_send_im(GaimConnection *gc, const char *who, const char *what, GaimConvImFlags flags)
{
struct yahoo_data *yd = gc->proto_data;
struct yahoo_packet *pkt = yahoo_packet_new(YAHOO_SERVICE_MESSAGE, YAHOO_STATUS_OFFLINE, 0);
--- a/src/protocols/yahoo/yahoo.h Sun Jul 03 04:58:35 2005 -0400
+++ b/src/protocols/yahoo/yahoo.h Tue Jul 12 18:30:55 2005 -0400
@@ -198,10 +198,3 @@
(GaimConnection *gc, const char *who);
#endif /* _YAHOO_H_ */
-void yahoo_packet_read(struct yahoo_packet *pkt, guchar *data, int len);
-void yahoo_packet_process(GaimConnection *gc, struct yahoo_packet *pkt);
-void yahoo_pending(gpointer data, gint source, GaimInputCondition cond);
-void yahoo_packet_dump(guchar *data, int len);
-
-int yahoo_send_im(GaimConnection *gc, const char *who, const char *what, GaimConvImFlags flags);
-