NAME

Skype::Any::Handler - Handler interface for Skype::Any

METHODS

handlers

$handler->handlers($name, $property);

register

$handler->register($name, sub { ... });

Register _ (default) handler.

$handler->register($name, +{$property => sub { ... }, ...});

Register $name handler and you can register named handler below.

Command
$handler->register(Command => sub {
    my $command = shift; # Skype::Any::Command
});
Notify
$handler->register(Notify => sub {
    my $notification = shift;
    my $command = Skype::Any::Command->new($notification);
    my ($obj, $id, $property, $value) = $command->split_reply();

    ...
});
Reply
$handler->register(Reply => sub {
    my $reply = shift; # Skype::Any::Command

    ...
});
Error
$handler->register(Error => sub {
    my $error = shift; # Skype::Any::Error
});

call

$handler->call($name, $property => @args);

clear

$handler->clear($name);
$handler->clear($name, $property);

Clear $name handler.

clear_all

$handler->clear_all($name);
$handler->clear_all($name, $property);

Clear all of $name handlers.