Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/lib/BarnOwl/Hooks.pm

    r120dac7 rb8a3e00  
    3636Called before BarnOwl shutdown
    3737
    38 =item $wakeup
    39 
    40 Called, at most once per second, on user input
    41 
    4238=item $receiveMessage
    4339
     
    6157from every function registered with this hook will be appended and
    6258displayed in a popup window, with zephyr formatting parsed.
    63 
    64 =item $awayOn
    65 
    66 Called, for all protocol handlers, to go away, with the away message,
    67 if any.
    68 
    69 =item $awayOff
    70 
    71 Called, for all protocol handlers, to come back from away.
    72 
    73 =item $getIsAway
    74 
    75 Called to check away status for all protocol handlers.  Protocol
    76 handlers should return a true value if any account of the user is away
    77 for the given protocol, and a false value otherwise.
    7859
    7960=item $getQuickstart
     
    9273
    9374our @EXPORT_OK = qw($startup $shutdown
    94                     $wakeup
    9575                    $receiveMessage $newMessage
    9676                    $mainLoop $getBuddyList
    97                     $awayOn $awayOff $getIsAway
    9877                    $getQuickstart);
    9978
     
    10483our $startup = BarnOwl::Hook->new;
    10584our $shutdown = BarnOwl::Hook->new;
    106 our $wakeup = BarnOwl::Hook->new;
    10785our $receiveMessage = BarnOwl::Hook->new;
    10886our $newMessage = BarnOwl::Hook->new;
     
    11088our $getBuddyList = BarnOwl::Hook->new;
    11189our $getQuickstart = BarnOwl::Hook->new;
    112 our $awayOn = BarnOwl::Hook->new;
    113 our $awayOff = BarnOwl::Hook->new;
    114 our $getIsAway = BarnOwl::Hook->new;
    11590
    11691# Internal startup/shutdown routines called by the C code
     
    200175}
    201176
    202 sub _wakeup {
    203     $wakeup->run;
    204 }
    205 
    206177sub _receive_msg {
    207178    my $m = shift;
     
    228199sub _get_quickstart {
    229200    return join("\n", $getQuickstart->run);
    230 }
    231 
    232 sub _away_on {
    233     $awayOn->run(@_);
    234 }
    235 
    236 sub _away_off {
    237     $awayOff->run();
    238 }
    239 
    240 sub _get_is_away {
    241     my @is_away = grep { $_ } $getIsAway->run();
    242     return scalar @is_away;
    243201}
    244202
Note: See TracChangeset for help on using the changeset viewer.