Changes in perl/lib/BarnOwl/Hooks.pm [120dac7:b8a3e00]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/lib/BarnOwl/Hooks.pm
r120dac7 rb8a3e00 36 36 Called before BarnOwl shutdown 37 37 38 =item $wakeup39 40 Called, at most once per second, on user input41 42 38 =item $receiveMessage 43 39 … … 61 57 from every function registered with this hook will be appended and 62 58 displayed in a popup window, with zephyr formatting parsed. 63 64 =item $awayOn65 66 Called, for all protocol handlers, to go away, with the away message,67 if any.68 69 =item $awayOff70 71 Called, for all protocol handlers, to come back from away.72 73 =item $getIsAway74 75 Called to check away status for all protocol handlers. Protocol76 handlers should return a true value if any account of the user is away77 for the given protocol, and a false value otherwise.78 59 79 60 =item $getQuickstart … … 92 73 93 74 our @EXPORT_OK = qw($startup $shutdown 94 $wakeup95 75 $receiveMessage $newMessage 96 76 $mainLoop $getBuddyList 97 $awayOn $awayOff $getIsAway98 77 $getQuickstart); 99 78 … … 104 83 our $startup = BarnOwl::Hook->new; 105 84 our $shutdown = BarnOwl::Hook->new; 106 our $wakeup = BarnOwl::Hook->new;107 85 our $receiveMessage = BarnOwl::Hook->new; 108 86 our $newMessage = BarnOwl::Hook->new; … … 110 88 our $getBuddyList = BarnOwl::Hook->new; 111 89 our $getQuickstart = BarnOwl::Hook->new; 112 our $awayOn = BarnOwl::Hook->new;113 our $awayOff = BarnOwl::Hook->new;114 our $getIsAway = BarnOwl::Hook->new;115 90 116 91 # Internal startup/shutdown routines called by the C code … … 200 175 } 201 176 202 sub _wakeup {203 $wakeup->run;204 }205 206 177 sub _receive_msg { 207 178 my $m = shift; … … 228 199 sub _get_quickstart { 229 200 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;243 201 } 244 202
Note: See TracChangeset
for help on using the changeset viewer.