# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.12
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

package OBEXFTP;
use base qw(Exporter);
use base qw(DynaLoader);
package OBEXFTPc;
bootstrap OBEXFTP;
package OBEXFTP;
@EXPORT = qw();

# ---------- BASE METHODS -------------

package OBEXFTP;

sub TIEHASH {
    my ($classname,$obj) = @_;
    return bless $obj, $classname;
}

sub CLEAR { }

sub FIRSTKEY { }

sub NEXTKEY { }

sub FETCH {
    my ($self,$field) = @_;
    my $member_func = "swig_${field}_get";
    $self->$member_func();
}

sub STORE {
    my ($self,$field,$newval) = @_;
    my $member_func = "swig_${field}_set";
    $self->$member_func($newval);
}

sub this {
    my $ptr = shift;
    return tied(%$ptr);
}


# ------- FUNCTION WRAPPERS --------

package OBEXFTP;

*discover = *OBEXFTPc::discover;
*browsebt = *OBEXFTPc::browsebt;

############# Class : OBEXFTP::client ##############

package OBEXFTP::client;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( OBEXFTP );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = shift;
    my $self = OBEXFTPc::new_client(@_);
    bless $self, $pkg if defined($self);
}

sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        OBEXFTPc::delete_client($self);
        delete $OWNER{$self};
    }
}

*callback = *OBEXFTPc::client_callback;
*discover = *OBEXFTPc::client_discover;
*connect = *OBEXFTPc::client_connect;
*connectpush = *OBEXFTPc::client_connectpush;
*connectsync = *OBEXFTPc::client_connectsync;
*disconnect = *OBEXFTPc::client_disconnect;
*chpath = *OBEXFTPc::client_chpath;
*mkpath = *OBEXFTPc::client_mkpath;
*cdup = *OBEXFTPc::client_cdup;
*cdtop = *OBEXFTPc::client_cdtop;
*get = *OBEXFTPc::client_get;
*list = *OBEXFTPc::client_list;
*get_capability = *OBEXFTPc::client_get_capability;
*get_file = *OBEXFTPc::client_get_file;
*put_file = *OBEXFTPc::client_put_file;
*put_data = *OBEXFTPc::client_put_data;
*delete = *OBEXFTPc::client_delete;
sub DISOWN {
    my $self = shift;
    my $ptr = tied(%$self);
    delete $OWNER{$ptr};
}

sub ACQUIRE {
    my $self = shift;
    my $ptr = tied(%$self);
    $OWNER{$ptr} = 1;
}


# ------- VARIABLE STUBS --------

package OBEXFTP;

*IRDA = *OBEXFTPc::IRDA;
*INET = *OBEXFTPc::INET;
*CABLE = *OBEXFTPc::CABLE;
*BLUETOOTH = *OBEXFTPc::BLUETOOTH;
*USB = *OBEXFTPc::USB;
*SYNC = *OBEXFTPc::SYNC;
*PUSH = *OBEXFTPc::PUSH;
*FTP = *OBEXFTPc::FTP;
1;
