Changes in perl/lib/BarnOwl/Hooks.pm [b8a3e00:120dac7]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/lib/BarnOwl/Hooks.pm
rb8a3e00 r120dac7 36 36 Called before BarnOwl shutdown 37 37 38 =item $wakeup 39 40 Called, at most once per second, on user input 41 38 42 =item $receiveMessage 39 43 … … 57 61 from every function registered with this hook will be appended and 58 62 displayed 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. 59 78 60 79 =item $getQuickstart … … 73 92 74 93 our @EXPORT_OK = qw($startup $shutdown 94 $wakeup 75 95 $receiveMessage $newMessage 76 96 $mainLoop $getBuddyList 97 $awayOn $awayOff $getIsAway 77 98 $getQuickstart); 78 99 … … 83 104 our $startup = BarnOwl::Hook->new; 84 105 our $shutdown = BarnOwl::Hook->new; 106 our $wakeup = BarnOwl::Hook->new; 85 107 our $receiveMessage = BarnOwl::Hook->new; 86 108 our $newMessage = BarnOwl::Hook->new; … … 88 110 our $getBuddyList = BarnOwl::Hook->new; 89 111 our $getQuickstart = BarnOwl::Hook->new; 112 our $awayOn = BarnOwl::Hook->new; 113 our $awayOff = BarnOwl::Hook->new; 114 our $getIsAway = BarnOwl::Hook->new; 90 115 91 116 # Internal startup/shutdown routines called by the C code … … 175 200 } 176 201 202 sub _wakeup { 203 $wakeup->run; 204 } 205 177 206 sub _receive_msg { 178 207 my $m = shift; … … 199 228 sub _get_quickstart { 200 229 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; 201 243 } 202 244
Note: See TracChangeset
for help on using the changeset viewer.