line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# ABSTRACT: Off-the-Record communication Channel |
2
|
|
|
|
|
|
|
package Protocol::OTR::Channel; |
3
|
|
|
|
|
|
|
BEGIN { |
4
|
4
|
|
|
4
|
|
124
|
$Protocol::OTR::Channel::AUTHORITY = 'cpan:AJGB'; |
5
|
|
|
|
|
|
|
} |
6
|
|
|
|
|
|
|
$Protocol::OTR::Channel::VERSION = '0.05'; |
7
|
4
|
|
|
4
|
|
16
|
use strict; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
99
|
|
8
|
4
|
|
|
4
|
|
15
|
use warnings; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
77
|
|
9
|
4
|
|
|
4
|
|
17
|
use Scalar::Util (); |
|
4
|
|
|
|
|
3
|
|
|
4
|
|
|
|
|
52
|
|
10
|
4
|
|
|
4
|
|
13
|
use Protocol::OTR (); |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
735
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub _new { |
13
|
3
|
|
|
3
|
|
5
|
my ($class, $cnt, $args) = @_; |
14
|
|
|
|
|
|
|
|
15
|
3
|
|
|
|
|
13
|
$args->{selected_instag} = Protocol::OTR::INSTAG_BEST(); |
16
|
3
|
|
|
|
|
5
|
$args->{known_sessions} = {}; |
17
|
3
|
|
|
|
|
5
|
$args->{gone_secure} = 0; |
18
|
|
|
|
|
|
|
|
19
|
3
|
|
|
|
|
5
|
my $self = bless $args, $class; |
20
|
3
|
|
|
|
|
12
|
$self->{cnt} = $cnt; |
21
|
|
|
|
|
|
|
|
22
|
3
|
|
|
|
|
9
|
return $self; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub account { |
26
|
114
|
|
|
114
|
1
|
798
|
return $_[0]->{cnt}->{act}; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub contact { |
30
|
118
|
|
|
118
|
1
|
3277
|
return $_[0]->{cnt}; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub _ev { |
34
|
114
|
|
|
114
|
|
1009395
|
my ($self, $cb_name) = (shift, shift); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
{ |
37
|
114
|
|
|
|
|
122
|
Scalar::Util::weaken(my $this = $self); |
|
114
|
|
|
|
|
237
|
|
38
|
114
|
|
|
|
|
342
|
$this->{$cb_name}->($this, @_); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
__END__ |