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

package libdnf5::plugin;
use base qw(Exporter);
use base qw(DynaLoader);
require libdnf5::conf;
require libdnf5::common;
require libdnf5::exception;
require libdnf5::logger;
package libdnf5::pluginc;
bootstrap libdnf5::plugin;
package libdnf5::plugin;
@EXPORT = qw();

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

package libdnf5::plugin;

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 libdnf5::plugin;


############# Class : libdnf5::plugin::Version ##############

package libdnf5::plugin::Version;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::plugin );
%OWNER = ();
%ITERATORS = ();
*swig_major_get = *libdnf5::pluginc::Version_major_get;
*swig_major_set = *libdnf5::pluginc::Version_major_set;
*swig_minor_get = *libdnf5::pluginc::Version_minor_get;
*swig_minor_set = *libdnf5::pluginc::Version_minor_set;
*swig_micro_get = *libdnf5::pluginc::Version_micro_get;
*swig_micro_set = *libdnf5::pluginc::Version_micro_set;
sub new {
    my $pkg = shift;
    my $self = libdnf5::pluginc::new_Version(@_);
    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}) {
        libdnf5::pluginc::delete_Version($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;
}


############# Class : libdnf5::plugin::IPlugin ##############

package libdnf5::plugin::IPlugin;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::plugin );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = $_[0];
    my $self = libdnf5::pluginc::new_IPlugin(@_);
    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}) {
        libdnf5::pluginc::delete_IPlugin($self);
        delete $OWNER{$self};
    }
}

*get_api_version = *libdnf5::pluginc::IPlugin_get_api_version;
*get_name = *libdnf5::pluginc::IPlugin_get_name;
*get_version = *libdnf5::pluginc::IPlugin_get_version;
*get_attributes = *libdnf5::pluginc::IPlugin_get_attributes;
*get_attribute = *libdnf5::pluginc::IPlugin_get_attribute;
*load_plugins = *libdnf5::pluginc::IPlugin_load_plugins;
*init = *libdnf5::pluginc::IPlugin_init;
*pre_base_setup = *libdnf5::pluginc::IPlugin_pre_base_setup;
*post_base_setup = *libdnf5::pluginc::IPlugin_post_base_setup;
*repos_configured = *libdnf5::pluginc::IPlugin_repos_configured;
*repos_loaded = *libdnf5::pluginc::IPlugin_repos_loaded;
*pre_add_cmdline_packages = *libdnf5::pluginc::IPlugin_pre_add_cmdline_packages;
*post_add_cmdline_packages = *libdnf5::pluginc::IPlugin_post_add_cmdline_packages;
*pre_transaction = *libdnf5::pluginc::IPlugin_pre_transaction;
*post_transaction = *libdnf5::pluginc::IPlugin_post_transaction;
*finish = *libdnf5::pluginc::IPlugin_finish;
*get_base = *libdnf5::pluginc::IPlugin_get_base;
sub DISOWN {
    my $self = shift;
    libdnf5::pluginc::disown_IPlugin($self);
    my $ptr = tied(%$self);
    delete $OWNER{$ptr};
}

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

sub FETCH {
    my ($self,$field) = @_;
    my $member_func = "swig_${field}_get";
    if (not $self->can($member_func)) {
        my $h = libdnf5::pluginc::swig_get_attr_IPlugin($self);
        return $h->{$field} if $h;
    }
    return $self->$member_func;
}

sub STORE {
    my ($self,$field,$newval) = @_;
    my $member_func = "swig_${field}_set";
    if (not $self->can($member_func)) {
        my $h = libdnf5::pluginc::swig_get_attr_IPlugin($self);
        return $h->{$field} = $newval if $h;
    }
    return $self->$member_func($newval);
}

############# Class : libdnf5::plugin::IPlugin2_1 ##############

package libdnf5::plugin::IPlugin2_1;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::plugin::IPlugin libdnf5::plugin );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = $_[0];
    my $self = libdnf5::pluginc::new_IPlugin2_1(@_);
    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}) {
        libdnf5::pluginc::delete_IPlugin2_1($self);
        delete $OWNER{$self};
    }
}

*goal_resolved = *libdnf5::pluginc::IPlugin2_1_goal_resolved;
sub DISOWN {
    my $self = shift;
    libdnf5::pluginc::disown_IPlugin2_1($self);
    my $ptr = tied(%$self);
    delete $OWNER{$ptr};
}

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

sub FETCH {
    my ($self,$field) = @_;
    my $member_func = "swig_${field}_get";
    if (not $self->can($member_func)) {
        my $h = libdnf5::pluginc::swig_get_attr_IPlugin2_1($self);
        return $h->{$field} if $h;
    }
    return $self->$member_func;
}

sub STORE {
    my ($self,$field,$newval) = @_;
    my $member_func = "swig_${field}_set";
    if (not $self->can($member_func)) {
        my $h = libdnf5::pluginc::swig_get_attr_IPlugin2_1($self);
        return $h->{$field} = $newval if $h;
    }
    return $self->$member_func($newval);
}

############# Class : libdnf5::plugin::IPlugin2_2 ##############

package libdnf5::plugin::IPlugin2_2;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::plugin::IPlugin2_1 libdnf5::plugin );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = $_[0];
    my $self = libdnf5::pluginc::new_IPlugin2_2(@_);
    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}) {
        libdnf5::pluginc::delete_IPlugin2_2($self);
        delete $OWNER{$self};
    }
}

*post_base_setup_cleanup = *libdnf5::pluginc::IPlugin2_2_post_base_setup_cleanup;
*post_add_cmdline_packages_cleanup = *libdnf5::pluginc::IPlugin2_2_post_add_cmdline_packages_cleanup;
*post_transaction_cleanup = *libdnf5::pluginc::IPlugin2_2_post_transaction_cleanup;
sub DISOWN {
    my $self = shift;
    libdnf5::pluginc::disown_IPlugin2_2($self);
    my $ptr = tied(%$self);
    delete $OWNER{$ptr};
}

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

sub FETCH {
    my ($self,$field) = @_;
    my $member_func = "swig_${field}_get";
    if (not $self->can($member_func)) {
        my $h = libdnf5::pluginc::swig_get_attr_IPlugin2_2($self);
        return $h->{$field} if $h;
    }
    return $self->$member_func;
}

sub STORE {
    my ($self,$field,$newval) = @_;
    my $member_func = "swig_${field}_set";
    if (not $self->can($member_func)) {
        my $h = libdnf5::pluginc::swig_get_attr_IPlugin2_2($self);
        return $h->{$field} = $newval if $h;
    }
    return $self->$member_func($newval);
}

############# Class : libdnf5::plugin::PluginInfo ##############

package libdnf5::plugin::PluginInfo;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::plugin );
%OWNER = ();
%ITERATORS = ();
sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        libdnf5::pluginc::delete_PluginInfo($self);
        delete $OWNER{$self};
    }
}

sub new {
    my $pkg = shift;
    my $self = libdnf5::pluginc::new_PluginInfo(@_);
    bless $self, $pkg if defined($self);
}

*get_name = *libdnf5::pluginc::PluginInfo_get_name;
*is_loaded = *libdnf5::pluginc::PluginInfo_is_loaded;
*get_api_version = *libdnf5::pluginc::PluginInfo_get_api_version;
*get_real_name = *libdnf5::pluginc::PluginInfo_get_real_name;
*get_version = *libdnf5::pluginc::PluginInfo_get_version;
*get_attributes = *libdnf5::pluginc::PluginInfo_get_attributes;
*get_attribute = *libdnf5::pluginc::PluginInfo_get_attribute;
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 libdnf5::plugin;

1;
