Changeset cfc8d58 for protocols/yahoo/yahoo.c
- Timestamp:
- 2007-04-16T04:31:52Z (18 years ago)
- Branches:
- master
- Children:
- b3cae44
- Parents:
- 6bbb939
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/yahoo/yahoo.c
r6bbb939 rcfc8d58 67 67 static int byahoo_chat_id = 0; 68 68 69 static char *byahoo_strip( c har *in )69 static char *byahoo_strip( const char *in ) 70 70 { 71 71 int len; … … 86 86 else if( strncmp( in, "\e[", 2 ) == 0 ) 87 87 { 88 c har *s;88 const char *s; 89 89 90 90 for( s = in + 2; *s && *s != 'm'; s ++ ); … … 172 172 struct byahoo_data *yd = ic->proto_data; 173 173 174 yahoo_send_im( yd->y2_id, NULL, who, what, 1 );174 yahoo_send_im( yd->y2_id, NULL, who, what, 1, 0 ); 175 175 176 176 return 1; … … 240 240 yd->current_status = YAHOO_STATUS_AVAILABLE; 241 241 242 yahoo_set_away( yd->y2_id, yd->current_status, msg, ic->away != NULL );242 yahoo_set_away( yd->y2_id, yd->current_status, msg, ic->away != NULL ? 2 : 0 ); 243 243 } 244 244 … … 274 274 struct byahoo_data *yd = (struct byahoo_data *) ic->proto_data; 275 275 276 yahoo_add_buddy( yd->y2_id, who, group ? group : BYAHOO_DEFAULT_GROUP );276 yahoo_add_buddy( yd->y2_id, who, group ? group : BYAHOO_DEFAULT_GROUP, NULL ); 277 277 } 278 278 … … 451 451 } 452 452 453 void ext_yahoo_login_response( int id, int succ, c har *url )453 void ext_yahoo_login_response( int id, int succ, const char *url ) 454 454 { 455 455 struct im_connection *ic = byahoo_get_ic_by_id( id ); … … 543 543 } 544 544 545 void ext_yahoo_status_changed( int id, c har *who, int stat, char *msg, int away)545 void ext_yahoo_status_changed( int id, const char *who, int stat, const char *msg, int away, int idle, int mobile ) 546 546 { 547 547 struct im_connection *ic = byahoo_get_ic_by_id( id ); … … 607 607 } 608 608 609 void ext_yahoo_got_im( int id, c har *who,char *msg, long tm, int stat, int utf8 )609 void ext_yahoo_got_im( int id, const char *me, const char *who, const char *msg, long tm, int stat, int utf8 ) 610 610 { 611 611 struct im_connection *ic = byahoo_get_ic_by_id( id ); 612 612 char *m = byahoo_strip( msg ); 613 613 614 serv_got_im( ic, who,m, 0, 0, strlen( m ) );614 serv_got_im( ic, (char*) who, (char*) m, 0, 0, strlen( m ) ); 615 615 g_free( m ); 616 616 } 617 617 618 void ext_yahoo_got_file( int id, char *who, char *url, long expires, char *msg, char *fname, unsigned long fesize ) 618 void ext_yahoo_got_file( int id, 619 const char *ignored, 620 const char *who, const char *url, long expires, const char *msg, const char *fname, unsigned long fesize ) 619 621 { 620 622 struct im_connection *ic = byahoo_get_ic_by_id( id ); … … 623 625 } 624 626 625 void ext_yahoo_typing_notify( int id, c har *who, int stat )627 void ext_yahoo_typing_notify( int id, const char *ignored, const char *who, int stat ) 626 628 { 627 629 struct im_connection *ic = byahoo_get_ic_by_id( id ); 628 630 if (stat == 1) { 629 631 /* User is typing */ 630 serv_got_typing( ic, who, 1, 1 );632 serv_got_typing( ic, (char*) who, 1, 1 ); 631 633 } 632 634 else { 633 635 /* User stopped typing */ 634 serv_got_typing( ic, who, 1, 0 );635 } 636 } 637 638 void ext_yahoo_system_message( int id, c har *msg )636 serv_got_typing( ic, (char*) who, 1, 0 ); 637 } 638 } 639 640 void ext_yahoo_system_message( int id, const char *msg ) 639 641 { 640 642 struct im_connection *ic = byahoo_get_ic_by_id( id ); … … 643 645 } 644 646 645 void ext_yahoo_webcam_invite( int id, c har *from )647 void ext_yahoo_webcam_invite( int id, const char *ignored, const char *from ) 646 648 { 647 649 struct im_connection *ic = byahoo_get_ic_by_id( id ); … … 650 652 } 651 653 652 void ext_yahoo_error( int id, c har *err, int fatal)654 void ext_yahoo_error( int id, const char *err, int fatal, int num ) 653 655 { 654 656 struct im_connection *ic = byahoo_get_ic_by_id( id ); … … 719 721 } 720 722 721 int ext_yahoo_connect_async( int id, c har *host, int port, yahoo_connect_callback callback, void *data )723 int ext_yahoo_connect_async( int id, const char *host, int port, yahoo_connect_callback callback, void *data ) 722 724 { 723 725 struct byahoo_connect_callback_data *d; … … 740 742 /* Because we don't want asynchronous connects in BitlBee, and because 741 743 libyahoo doesn't seem to use this one anyway, this one is now defunct. */ 742 int ext_yahoo_connect(c har *host, int port)744 int ext_yahoo_connect(const char *host, int port) 743 745 { 744 746 #if 0 … … 796 798 } 797 799 798 void ext_yahoo_got_conf_invite( int id, char *who, char *room, char *msg, YList *members ) 800 void ext_yahoo_got_conf_invite( int id, const char *ignored, 801 const char *who, const char *room, const char *msg, YList *members ) 799 802 { 800 803 struct im_connection *ic = byahoo_get_ic_by_id( id ); … … 806 809 memset( inv, 0, sizeof( struct byahoo_conf_invitation ) ); 807 810 inv->name = g_strdup( room ); 808 inv->c = serv_got_joined_chat( ic, room );811 inv->c = serv_got_joined_chat( ic, (char*) room ); 809 812 inv->c->data = members; 810 813 inv->yid = id; … … 821 824 } 822 825 823 void ext_yahoo_conf_userdecline( int id, c har *who, char *room,char *msg )826 void ext_yahoo_conf_userdecline( int id, const char *ignored, const char *who, const char *room, const char *msg ) 824 827 { 825 828 struct im_connection *ic = byahoo_get_ic_by_id( id ); … … 828 831 } 829 832 830 void ext_yahoo_conf_userjoin( int id, c har *who,char *room )833 void ext_yahoo_conf_userjoin( int id, const char *ignored, const char *who, const char *room ) 831 834 { 832 835 struct im_connection *ic = byahoo_get_ic_by_id( id ); … … 836 839 837 840 if( c ) 838 add_chat_buddy( c, who ); 839 } 840 841 void ext_yahoo_conf_userleave( int id, char *who, char *room ) 841 add_chat_buddy( c, (char*) who ); 842 } 843 844 void ext_yahoo_conf_userleave( int id, const char *ignored, const char *who, const char *room ) 845 842 846 { 843 847 struct im_connection *ic = byahoo_get_ic_by_id( id ); … … 847 851 848 852 if( c ) 849 remove_chat_buddy( c, who, "" );850 } 851 852 void ext_yahoo_conf_message( int id, c har *who, char *room,char *msg, int utf8 )853 remove_chat_buddy( c, (char*) who, "" ); 854 } 855 856 void ext_yahoo_conf_message( int id, const char *ignored, const char *who, const char *room, const char *msg, int utf8 ) 853 857 { 854 858 struct im_connection *ic = byahoo_get_ic_by_id( id ); … … 859 863 860 864 if( c ) 861 serv_got_chat_in( c, who, 0,m, 0 );865 serv_got_chat_in( c, (char*) who, 0, (char*) m, 0 ); 862 866 g_free( m ); 863 867 } 864 868 865 void ext_yahoo_chat_cat_xml( int id, char *xml ) 866 { 867 } 868 869 void ext_yahoo_chat_join( int id, char *room, char *topic, YList *members, int fd ) 870 { 871 } 872 873 void ext_yahoo_chat_userjoin( int id, char *room, struct yahoo_chat_member *who ) 874 { 875 } 876 877 void ext_yahoo_chat_userleave( int id, char *room, char *who ) 878 { 879 } 880 881 void ext_yahoo_chat_message( int id, char *who, char *room, char *msg, int msgtype, int utf8 ) 882 { 883 } 884 885 void ext_yahoo_chat_yahoologout( int id ) 886 { 887 } 888 889 void ext_yahoo_chat_yahooerror( int id ) 890 { 891 } 892 893 void ext_yahoo_contact_added( int id, char *myid, char *who, char *msg ) 894 { 895 } 896 897 void ext_yahoo_rejected( int id, char *who, char *msg ) 898 { 899 } 900 901 void ext_yahoo_game_notify( int id, char *who, int stat ) 902 { 903 } 904 905 void ext_yahoo_mail_notify( int id, char *from, char *subj, int cnt ) 869 void ext_yahoo_chat_cat_xml( int id, const char *xml ) 870 { 871 } 872 873 void ext_yahoo_chat_join( int id, const char *who, const char *room, const char *topic, YList *members, int fd ) 874 { 875 } 876 877 void ext_yahoo_chat_userjoin( int id, const char *me, const char *room, struct yahoo_chat_member *who ) 878 { 879 free(who->id); 880 free(who->alias); 881 free(who->location); 882 free(who); 883 } 884 885 void ext_yahoo_chat_userleave( int id, const char *me, const char *room, const char *who ) 886 { 887 } 888 889 void ext_yahoo_chat_message( int id, const char *me, const char *who, const char *room, const char *msg, int msgtype, int utf8 ) 890 { 891 } 892 893 void ext_yahoo_chat_yahoologout( int id, const char *me ) 894 { 895 } 896 897 void ext_yahoo_chat_yahooerror( int id, const char *me ) 898 { 899 } 900 901 void ext_yahoo_contact_added( int id, const char *myid, const char *who, const char *msg ) 902 { 903 } 904 905 void ext_yahoo_rejected( int id, const char *who, const char *msg ) 906 { 907 } 908 909 void ext_yahoo_game_notify( int id, const char *me, const char *who, int stat ) 910 { 911 } 912 913 void ext_yahoo_mail_notify( int id, const char *from, const char *subj, int cnt ) 906 914 { 907 915 struct im_connection *ic = byahoo_get_ic_by_id( id ); … … 913 921 } 914 922 915 void ext_yahoo_webcam_invite_reply( int id, c har *from, int accept )916 { 917 } 918 919 void ext_yahoo_webcam_closed( int id, c har *who, int reason )923 void ext_yahoo_webcam_invite_reply( int id, const char *me, const char *from, int accept ) 924 { 925 } 926 927 void ext_yahoo_webcam_closed( int id, const char *who, int reason ) 920 928 { 921 929 } … … 925 933 } 926 934 927 void ext_yahoo_webcam_viewer( int id, c har *who, int connect )935 void ext_yahoo_webcam_viewer( int id, const char *who, int connect ) 928 936 { 929 937 } … … 933 941 } 934 942 935 int ext_yahoo_log( c har *fmt, ... )943 int ext_yahoo_log( const char *fmt, ... ) 936 944 { 937 945 return( 0 ); … … 941 949 { 942 950 } 951 952 void ext_yahoo_got_ping( int id, const char *msg) 953 { 954 } 955 956 void ext_yahoo_got_buddyicon (int id, const char *me, const char *who, const char *url, int checksum) {} 957 void ext_yahoo_got_buddyicon_checksum (int id, const char *me,const char *who, int checksum) {} 958 959 void ext_yahoo_got_buddyicon_request(int id, const char *me, const char *who){} 960 void ext_yahoo_buddyicon_uploaded(int id, const char *url){}
Note: See TracChangeset
for help on using the changeset viewer.