NAME

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

SYNOPSIS

use Net::OBEX::Packet::Request;
use Net::OBEX::Packet::Headers;

my $head = Net::OBEX::Packet::Headers->new;
my $req = Net::OBEX::Packet::Request->new;

my $obexftp_target
= $head->make( target  => pack 'H*', 'F9EC7BC4953C11D2984E525400DC9E09');

my $connect_packet = $req->make(
    packet  => 'connect',
    headers => [ $obexftp_target ],
);

# send $connect_packet down the wire

my $disconnect_packet = $req->make( packet => 'disconnect' );
# this one can go too now.

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 raw OBEX packets ready to go down the wire. The module does not provide Headers creation, to create packet headers use Net::OBEX::Packet::Headers

CONSTRUCTOR

new

my $req = Net::OBEX::Packet::Request->new;

Takes no arguments, returns a freshly baked Net::OBEX::Packet::Request object ready for request packet production.

METHODS

make

my $connect_packet = $req->make(
    packet  => 'connect',
    headers => [ $obexftp_target ],
);

my $disconnect_packet = $req->make( packet => 'disconnect' );

Takes several name/value arguments. The packet argument indicates which packet to construct, the rest of the arguments will go directly into a specific packet's constructor (new()) method. The following is a list of valid packet argument values with a corresponding module, read the documentation of that module's constructor to find out the rest of the possible arguments to make() method.

connect

Will make OBEX Connect packet, see Net::OBEX::Packet::Request::Connect

disconnect

Will make OBEX Disconnect packet, see Net::OBEX::Packet::Request::Disconnect

setpath

Will make OBEX SetPath packet, see Net::OBEX::Packet::Request::SetPath

get

Will make OBEX Get packet, see Net::OBEX::Packet::Request::Get

put

Will make OBEX Get packet, see Net::OBEX::Packet::Request::Put

abort

Will make OBEX Abort packet, see Net::OBEX::Packet::Request::Abort

The rest of packets are yet to be implemented.

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.