The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::OBEX::Packet::Headers - construct "1 byte sequence" OBEX headers.

SYNOPSIS

    use strict;
    use warnings;

    use Net::OBEX::Packet::Headers::Byte1;

    my $raw = Net::OBEX::Packet::Headers::Byte1->new("\x82", "\x99")->make;

DESCRIPTION

WARNING!!! This module is still in alpha stage. Use it for test purposes only as interface might change in the future.

The module provides means to create OBEX protocol 0x80 (one byte quantity) packet headers. Currently there are no standard headers of this class in OBEX. Unless you are making a custom header you probably want to use Net::OBEX::Packet::Headers instead.

CONSTRUCTOR

new

    my $header
    = Net::OBEX::Packet::Headers::Byte1->new( "\x82", "X" );

Constructs and returns a Net::OBEX::Packet::Headers::Byte1 object. Two arguments: first is the byte of the HI identifier of the header and second argument is the 1 byte value of the header.

METHODS

make

    my $raw_header = $header->make;

Takes no arguments, returns a raw data of the header suitable to go down the wire.

    my $raw_header = $header->header;

Must be called after a call to make(). Takes no arguments, return value is the return of make(), the only difference is that data has been "made" already.

value

    my $old_value = $header->value;

    $header->value( $new_value );

Returns the currently set header value (see new() method). If called with an optional argument will set the header value to the value of the argument, and the following calls to make() will produce headers with this new value.

hi

    my $old_hi = $header->hi;

    $header->hi( "\x82" );

Returns the currently set header HI identifier. If called with an optional argument will set the header HI identifier to the value of the argument, and the following calls to make() will produce headers with this new HI.

REPOSITORY

Fork this module on GitHub: https://github.com/zoffixznet/Net-OBEX

BUGS

To report bugs or request features, please use https://github.com/zoffixznet/Net-OBEX/issues

If you can't access GitHub, you can email your request to bug-Net-OBEX at rt.cpan.org

AUTHOR

Zoffix Znet <zoffix at cpan.org> (http://zoffix.com/, http://haslayout.net/)

LICENSE

You can use and distribute this module under the same terms as Perl itself. See the LICENSE file included in this distribution for complete details.