| 1 | package Growl::Any::NetGrowlClient; | ||
| 2 | |||
| 3 | 3 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 3 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 3 | ▶ | use parent qw(Growl::Any::Base); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 3 | ▶ | use Carp (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 3 | ▶ | use Net::GrowlClient (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 0 | ▶ | sub register { |
|
Subroutine
register: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 11 | 0 | my ($self, $appname, $events) = @_; | |
| 12 | 0 | $self->set_appname($appname); | |
| 13 | |||
| 14 | $self->{instance} = Net::GrowlClient->init( | ||
| 15 | CLIENT_TYPE_REGISTRATION => 0, | ||
| 16 | CLIENT_TYPE_NOTIFICATION => 1, | ||
| 17 | CLIENT_PASSWORD => $self->{password}, | ||
| 18 | CLIENT_APPLICATION_NAME => $self->appname, | ||
| 19 | 0 | CLIENT_NOTIFICATION_LIST => [ $self->encode_list(@{$events}), 'Error'], | |
| 20 | ); | ||
| 21 | }; | ||
| 22 | |||
| 23 | 0 | ▶ | sub notify { |
|
Subroutine
notify: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 24 | 0 | my ($self, $event, $title, $message, $icon) = @_; | |
| 25 | $self->{instance}->notify( | ||
| 26 | 0 | title => $self->encode($title), | |
| 27 | message => $self->encode($message), | ||
| 28 | notification => $self->encode($event), | ||
| 29 | ); | ||
| 30 | } | ||
| 31 | |||
| 32 | 1; | ||
| 33 | __END__ | ||