| 1 | package Net::OBEX::Response::Connect; | ||||||||||
| 2 | |||||||||||
| 3 | 7 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 7 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 7 | our $VERSION = '1.001002'; # VERSION | |||||||||
| 7 | |||||||||||
| 8 | 7 | ▶ | use Carp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 7 | ▶ | use base 'Net::OBEX::Response::Generic'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | 2 | ▶ | sub parse_info { | ||||||||
|
Subroutine
parse_info: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||
| 12 | 2 | my ( $self, $packet ) = @_; | |||||||||
| 13 | 2 | ▶ | $packet = $self->packet | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | unless defined $packet; | ||||||||||
| 15 | |||||||||||
| 16 | 2 | my %info; | |||||||||
| 17 | 2 | @info{ qw( | |||||||||
| 18 | response_code packet_length obex_version flags mtu | ||||||||||
| 19 | ) | ||||||||||
| 20 | } = unpack 'a n B8 B8 n', $packet; | ||||||||||
| 21 | |||||||||||
| 22 | @info{qw( response_code response_code_meaning ) } = | ||||||||||
| 23 | 2 | $self->code_meaning( $info{response_code} ); | |||||||||
| 24 | |||||||||||
| 25 | 2 | $info{headers_length} = $info{packet_length} - 7; | |||||||||
| 26 | 2 | $self->headers_length( $info{headers_length} ); | |||||||||
| 27 | |||||||||||
| 28 | 2 | return $self->info( \%info ); | |||||||||
| 29 | } | ||||||||||
| 30 | |||||||||||
| 31 | 7 | 1; | |||||||||
| 32 | |||||||||||
| 33 | __END__ | ||||||||||