source: perl/modules/AIM/lib/Net/OSCAR/Callbacks/1/incoming_extended_information.pm @ 7a1c90d

barnowl_perlaim
Last change on this file since 7a1c90d was 7a1c90d, checked in by Geoffrey Thomas <geofft@mit.edu>, 16 years ago
Skeleton AIM module, and Net::OSCAR 1.925
  • Property mode set to 100644
File size: 1019 bytes
RevLine 
[7a1c90d]1package Net::OSCAR::Callbacks;
2use strict;
3use warnings;
4use vars qw($connection $snac $conntype $family $subtype $data $reqid $reqdata $session $protobit %data);
5sub {
6
7if(exists($data{upload_checksum})) {
8        # OSCAR will send the upload request again on the icon connection.
9        # Since we already have the sending queued up on that connection,
10        # just ignore the repeat request.
11        if($connection->{conntype} != CONNTYPE_ICON) {
12                if($session->{icon} and $session->{is_on}) {
13                        $connection->log_print(OSCAR_DBG_INFO, "Uploading buddy icon.");
14                        $session->svcdo(CONNTYPE_ICON, protobit => "icon_upload", protodata => {
15                                icon => $session->{icon}
16                        });
17                }
18        }
19} elsif(exists($data{resend_checksum})) {
20        $connection->log_print(OSCAR_DBG_INFO, "Got icon resend request!");
21        $session->set_icon($session->{icon}) if $session->{icon};
22} elsif(exists($data{status_message})) {
23        $session->callback_extended_status($data{status_message});
24} else {
25        $connection->log_print(OSCAR_DBG_WARN, "Unknown extended info request");
26}
27
28};
Note: See TracBrowser for help on using the repository browser.