NAME

Net::OBEX::Packet::Request::Get - create OBEX protocol Get request packets.

SYNOPSIS

use Net::OBEX::Packet::Request::Get;

my $get = Net::OBEX::Packet::Request::Get->new(
    headers => [ $bunch, $of, $raw, $headers ],
);

my $get_packet = $get->make;

$get->headers([]); # reset headers.
$get->is_final(1); # set final bit

my $get_packet2 = $get->make;

DESCRIPTION

WARNING!!! This module is in an early alpha stage. It is recommended that you use it only for testing.

The module provides means to create OBEX protocol Get (0x03 and 0x83) packets. It is used internally by Net::OBEX::Packet::Request module and you probably want to use that instead.

CONSTRUCTOR

new

$pack = Net::OBEX::Packet::Request::Get->new;

$pack2 = Net::OBEX::Packet::Request::Get->new(
    is_final    => 1,
    headers     => [ $some, $raw, $headers ],
);

Returns a Net::OBEX::Packet::Request::Get object, takes two arguments, all of which are optional. The possible arguments are as follows:

headers

Net::OBEX::Packet::Request::Get->new(
    headers => [ $some, $raw, $headers ],
);

Optional. Takes an arrayref as a value, elements of which are raw OBEX packet headers. See Net::OBEX::Packet::Headers if you want to create those.

is_final

Net::OBEX::Packet::Request::Get->new( is_final => 1 );

Optional. When set to a true value will set packet's "Final Bit". Defaults to: 0

METHODS

make

my $raw_packet = $pack->make;

Takes no arguments, returns a raw OBEX packet ready to go down the wire.

raw

my $raw_packet = $pack->raw;

Takes no arguments, must be called after make() call, returns the raw OBEX packet which was made with last make() (i.e. the last return value of make()).

is_final

my $old_is_final = $pack->is_final;

$pack->is_final( 1 );

Returns either true or false value indicating whether or not the "final bit" of the packet is set. Takes one argument, which is either a true or false value, indicating if the next packet made by make() should have its final bit set.

headers

my $headers_ref = $pack->headers;

$pack->headers( [ $bunch, $of, $raw, $headers ] );

Returns an arrayref of currently set OBEX packet headers. Takes one optional argument which is an arrayref, elements of which are raw OBEX packet headers. See Net::OBEX::Packet::Headers if you want to create those. If you want a packet with no headers use an empty arrayref as an argument.

AUTHOR

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

BUGS

Please report any bugs or feature requests to bug-net-obex-packet-request at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-OBEX-Packet-Request. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Net::OBEX::Packet::Request

You can also look for information at:

COPYRIGHT & LICENSE

Copyright 2008 Zoffix Znet, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.