Mon, 16 Apr 2007 00:43:53 +0000
Commit a proper copy of this binary file. The old one was corrupted,
probably due to missing SVN attributes.
This was retrieved from the following URL, though we may have it in CVS:
http://dev.openwengo.com/trac/openwengo/trac.cgi/browser/vendors/gaim/trunk/doc/oscar/On_Sending_Files_via_OSCAR.odt?rev=4273
| 12988 | 1 | $MODULE_NAME = "Plugin Action Test Plugin"; |
| 2 | use Gaim; | |
| 3 | ||
| 4 | sub plugin_init { | |
| 5 | return %PLUGIN_INFO; | |
| 6 | } | |
| 7 | ||
| 8 | sub plugin_load { | |
| 9 | my $plugin = shift; | |
| 10 | } | |
| 11 | ||
| 12 | sub plugin_unload { | |
| 13 | my $plugin = shift; | |
| 14 | } | |
| 15 | ||
| 16 | sub fun1 { | |
| 17 | print "1\n"; | |
| 18 | } | |
| 19 | ||
| 20 | sub fun2 { | |
| 21 | print "2\n"; | |
| 22 | } | |
| 23 | ||
| 24 | sub fun3 { | |
| 25 | print "3\n"; | |
| 26 | } | |
| 27 | ||
| 28 | %plugin_actions = ( | |
| 29 | "Action 1" => \&fun1, | |
| 30 | "Action 2" => \&fun2, | |
| 31 | "Action 3" => \&fun3 | |
| 32 | # "Action 1" => sub { print "1\n"; }, | |
| 33 | # "Action 2" => sub { print "2\n"; }, | |
| 34 | # "Action 3" => sub { print "3\n"; } | |
| 35 | ); | |
| 36 | ||
| 37 | sub plugin_action_names { | |
| 38 | foreach $key (keys %plugin_actions) { | |
| 39 | push @array, $key; | |
| 40 | } | |
| 41 | ||
| 42 | return @array; | |
| 43 | } | |
| 44 | ||
| 45 | # All the information Gaim gets about our nifty plugin | |
| 46 | %PLUGIN_INFO = ( | |
| 47 | perl_api_version => 2, | |
| 48 | name => "Perl: $MODULE_NAME", | |
| 49 | version => "0.1", | |
| 50 | summary => "Test plugin for the Perl interpreter.", | |
| 51 | description => "Just a basic test plugin template.", | |
| 52 | author => "Etan Reisner <deryni\@gmail.com>", | |
| 53 | url => "http://sourceforge.net/users/deryni9/", | |
| 54 | ||
| 55 | load => "plugin_load", | |
| 56 | unload => "plugin_unload", | |
| 57 | plugin_action_sub => "plugin_action_names" | |
| 58 | ); |