[7a1c90d] | 1 | =pod |
---|
| 2 | |
---|
| 3 | Net::OSCAR::MethodInfo -- Mappings from method names to (SNAC,family). Used by |
---|
| 4 | rate management functionality |
---|
| 5 | |
---|
| 6 | =cut |
---|
| 7 | |
---|
| 8 | package Net::OSCAR::MethodInfo; |
---|
| 9 | |
---|
| 10 | $VERSION = '1.925'; |
---|
| 11 | $REVISION = '$Revision: 1.2 $'; |
---|
| 12 | |
---|
| 13 | use strict; |
---|
| 14 | use warnings; |
---|
| 15 | use vars qw(@ISA $VERSION $REVISION); |
---|
| 16 | use Net::OSCAR::XML; |
---|
| 17 | |
---|
| 18 | sub encode($) { |
---|
| 19 | my %snac = protobit_to_snac($_[0]); |
---|
| 20 | my($family, $subtype) = ($snac{family}, $snac{subtype}); |
---|
| 21 | return pack("nn", $family, $subtype); |
---|
| 22 | } |
---|
| 23 | |
---|
| 24 | our %methods = ( |
---|
| 25 | set_stealth => encode("set_extended_status"), |
---|
| 26 | get_info => encode("get_info"), |
---|
| 27 | get_away => encode("get_away"), |
---|
| 28 | send_typing_status => encode("typing_notification"), |
---|
| 29 | evil => encode("outgoing_warning"), |
---|
| 30 | get_icon => encode("buddy_icon_download"), |
---|
| 31 | set_extended_status => encode("set_extended_status"), |
---|
| 32 | set_info => encode("set_info"), |
---|
| 33 | change_password => encode("change_account_info"), |
---|
| 34 | confirm_account => encode("confirm_account_request"), |
---|
| 35 | change_email => encode("change_account_info"), |
---|
| 36 | format_screenname => encode("change_account_info"), |
---|
| 37 | set_idle => encode("set_idle"), |
---|
| 38 | chat_join => encode("chat_navigator_room_create"), |
---|
| 39 | chat_accept => encode("chat_invitation_accept"), |
---|
| 40 | chat_decline => encode("chat_invitation_decline"), |
---|
| 41 | auth_response => encode("signon"), |
---|
| 42 | get_icq_info => encode("ICQ_meta_request"), |
---|
| 43 | send_message => encode("outgoing_IM"), |
---|
| 44 | svcreq => encode("service_request"), |
---|
| 45 | send_im => encode("outgoing_IM"), |
---|
| 46 | file_send => encode("outgoing_IM"), |
---|
| 47 | rendezvous_revise => encode("outgoing_IM"), |
---|
| 48 | rendezvous_reject => encode("outgoing_IM"), |
---|
| 49 | chat_send => encode("outgoing_chat_IM") |
---|
| 50 | ); |
---|
| 51 | |
---|
| 52 | 1; |
---|