# This file was automatically generated by SWIG (http://www.swig.org).
# Version 1.3.31
#
# Don't modify this file, modify the SWIG interface instead.

package netpgpperl;
require Exporter;
require DynaLoader;
@ISA = qw(Exporter DynaLoader);
package netpgpperlc;
bootstrap netpgpperl;
package netpgpperl;
@EXPORT = qw( );

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

package netpgpperl;

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 netpgpperl;

*netpgp_init = *netpgpperlc::netpgp_init;
*netpgp_end = *netpgpperlc::netpgp_end;
*netpgp_set_debug = *netpgpperlc::netpgp_set_debug;
*netpgp_get_debug = *netpgpperlc::netpgp_get_debug;
*netpgp_get_info = *netpgpperlc::netpgp_get_info;
*netpgp_list_packets = *netpgpperlc::netpgp_list_packets;
*netpgp_setvar = *netpgpperlc::netpgp_setvar;
*netpgp_getvar = *netpgpperlc::netpgp_getvar;
*netpgp_incvar = *netpgpperlc::netpgp_incvar;
*netpgp_unsetvar = *netpgpperlc::netpgp_unsetvar;
*netpgp_set_homedir = *netpgpperlc::netpgp_set_homedir;
*netpgp_list_keys = *netpgpperlc::netpgp_list_keys;
*netpgp_find_key = *netpgpperlc::netpgp_find_key;
*netpgp_get_key = *netpgpperlc::netpgp_get_key;
*netpgp_export_key = *netpgpperlc::netpgp_export_key;
*netpgp_import_key = *netpgpperlc::netpgp_import_key;
*netpgp_generate_key = *netpgpperlc::netpgp_generate_key;
*netpgp_encrypt_file = *netpgpperlc::netpgp_encrypt_file;
*netpgp_decrypt_file = *netpgpperlc::netpgp_decrypt_file;
*netpgp_sign_file = *netpgpperlc::netpgp_sign_file;
*netpgp_verify_file = *netpgpperlc::netpgp_verify_file;
*netpgp_sign_memory = *netpgpperlc::netpgp_sign_memory;
*netpgp_verify_memory = *netpgpperlc::netpgp_verify_memory;
*netpgp_encrypt_memory = *netpgpperlc::netpgp_encrypt_memory;
*netpgp_decrypt_memory = *netpgpperlc::netpgp_decrypt_memory;
*netpgp_match_keys = *netpgpperlc::netpgp_match_keys;
*netpgp_match_pubkeys = *netpgpperlc::netpgp_match_pubkeys;
*netpgp_validate_sigs = *netpgpperlc::netpgp_validate_sigs;

############# Class : netpgpperl::netpgp_t ##############

package netpgpperl::netpgp_t;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( netpgpperl );
%OWNER = ();
%ITERATORS = ();
*swig_c_get = *netpgpperlc::netpgp_t_c_get;
*swig_c_set = *netpgpperlc::netpgp_t_c_set;
*swig_size_get = *netpgpperlc::netpgp_t_size_get;
*swig_size_set = *netpgpperlc::netpgp_t_size_set;
*swig_name_get = *netpgpperlc::netpgp_t_name_get;
*swig_name_set = *netpgpperlc::netpgp_t_name_set;
*swig_value_get = *netpgpperlc::netpgp_t_value_get;
*swig_value_set = *netpgpperlc::netpgp_t_value_set;
*swig_pubring_get = *netpgpperlc::netpgp_t_pubring_get;
*swig_pubring_set = *netpgpperlc::netpgp_t_pubring_set;
*swig_secring_get = *netpgpperlc::netpgp_t_secring_get;
*swig_secring_set = *netpgpperlc::netpgp_t_secring_set;
*swig_io_get = *netpgpperlc::netpgp_t_io_get;
*swig_io_set = *netpgpperlc::netpgp_t_io_set;
*swig_passfp_get = *netpgpperlc::netpgp_t_passfp_get;
*swig_passfp_set = *netpgpperlc::netpgp_t_passfp_set;
sub new {
    my $pkg = shift;
    my $self = netpgpperlc::new_netpgp_t(@_);
    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}) {
        netpgpperlc::delete_netpgp_t($self);
        delete $OWNER{$self};
    }
}

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 netpgpperl;

1;
