# 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::common;
use base qw(Exporter);
use base qw(DynaLoader);
require libdnf5::exception;
package libdnf5::commonc;
bootstrap libdnf5::common;
package libdnf5::common;
@EXPORT = qw();

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

package libdnf5::common;

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::common;

*__sub__ = *libdnf5::commonc::__sub__;
*match_int64 = *libdnf5::commonc::match_int64;
*match_string = *libdnf5::commonc::match_string;

############# Class : libdnf5::common::Message ##############

package libdnf5::common::Message;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::common );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = $_[0];
    my $self = libdnf5::commonc::new_Message(@_);
    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::commonc::delete_Message($self);
        delete $OWNER{$self};
    }
}

*format = *libdnf5::commonc::Message_format;
sub DISOWN {
    my $self = shift;
    libdnf5::commonc::disown_Message($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::commonc::swig_get_attr_Message($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::commonc::swig_get_attr_Message($self);
        return $h->{$field} = $newval if $h;
    }
    return $self->$member_func($newval);
}

############# Class : libdnf5::common::EmptyMessage ##############

package libdnf5::common::EmptyMessage;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::common::Message libdnf5::common );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = shift;
    my $self = libdnf5::commonc::new_EmptyMessage(@_);
    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::commonc::delete_EmptyMessage($self);
        delete $OWNER{$self};
    }
}

*format = *libdnf5::commonc::EmptyMessage_format;
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::common::VectorMessagePtr ##############

package libdnf5::common::VectorMessagePtr;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::common );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = shift;
    my $self = libdnf5::commonc::new_VectorMessagePtr(@_);
    bless $self, $pkg if defined($self);
}

*size = *libdnf5::commonc::VectorMessagePtr_size;
*empty = *libdnf5::commonc::VectorMessagePtr_empty;
*clear = *libdnf5::commonc::VectorMessagePtr_clear;
*push = *libdnf5::commonc::VectorMessagePtr_push;
*pop = *libdnf5::commonc::VectorMessagePtr_pop;
*get = *libdnf5::commonc::VectorMessagePtr_get;
*set = *libdnf5::commonc::VectorMessagePtr_set;
sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        libdnf5::commonc::delete_VectorMessagePtr($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::common::VectorString ##############

package libdnf5::common::VectorString;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::common );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = shift;
    my $self = libdnf5::commonc::new_VectorString(@_);
    bless $self, $pkg if defined($self);
}

*size = *libdnf5::commonc::VectorString_size;
*empty = *libdnf5::commonc::VectorString_empty;
*clear = *libdnf5::commonc::VectorString_clear;
*push = *libdnf5::commonc::VectorString_push;
*pop = *libdnf5::commonc::VectorString_pop;
*get = *libdnf5::commonc::VectorString_get;
*set = *libdnf5::commonc::VectorString_set;
sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        libdnf5::commonc::delete_VectorString($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::common::PairStringString ##############

package libdnf5::common::PairStringString;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::common );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = shift;
    my $self = libdnf5::commonc::new_PairStringString(@_);
    bless $self, $pkg if defined($self);
}

*swig_first_get = *libdnf5::commonc::PairStringString_first_get;
*swig_first_set = *libdnf5::commonc::PairStringString_first_set;
*swig_second_get = *libdnf5::commonc::PairStringString_second_get;
*swig_second_set = *libdnf5::commonc::PairStringString_second_set;
sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        libdnf5::commonc::delete_PairStringString($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::common::VectorPairStringString ##############

package libdnf5::common::VectorPairStringString;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::common );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = shift;
    my $self = libdnf5::commonc::new_VectorPairStringString(@_);
    bless $self, $pkg if defined($self);
}

*size = *libdnf5::commonc::VectorPairStringString_size;
*empty = *libdnf5::commonc::VectorPairStringString_empty;
*clear = *libdnf5::commonc::VectorPairStringString_clear;
*push = *libdnf5::commonc::VectorPairStringString_push;
*pop = *libdnf5::commonc::VectorPairStringString_pop;
*get = *libdnf5::commonc::VectorPairStringString_get;
*set = *libdnf5::commonc::VectorPairStringString_set;
sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        libdnf5::commonc::delete_VectorPairStringString($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::common::MapStringString ##############

package libdnf5::common::MapStringString;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::common );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = shift;
    my $self = libdnf5::commonc::new_MapStringString(@_);
    bless $self, $pkg if defined($self);
}

*size = *libdnf5::commonc::MapStringString_size;
*empty = *libdnf5::commonc::MapStringString_empty;
*clear = *libdnf5::commonc::MapStringString_clear;
*get = *libdnf5::commonc::MapStringString_get;
*set = *libdnf5::commonc::MapStringString_set;
*del = *libdnf5::commonc::MapStringString_del;
*has_key = *libdnf5::commonc::MapStringString_has_key;
sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        libdnf5::commonc::delete_MapStringString($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::common::MapStringMapStringString ##############

package libdnf5::common::MapStringMapStringString;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::common );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = shift;
    my $self = libdnf5::commonc::new_MapStringMapStringString(@_);
    bless $self, $pkg if defined($self);
}

*size = *libdnf5::commonc::MapStringMapStringString_size;
*empty = *libdnf5::commonc::MapStringMapStringString_empty;
*clear = *libdnf5::commonc::MapStringMapStringString_clear;
*get = *libdnf5::commonc::MapStringMapStringString_get;
*set = *libdnf5::commonc::MapStringMapStringString_set;
*del = *libdnf5::commonc::MapStringMapStringString_del;
*has_key = *libdnf5::commonc::MapStringMapStringString_has_key;
sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        libdnf5::commonc::delete_MapStringMapStringString($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::common::MapStringPairStringString ##############

package libdnf5::common::MapStringPairStringString;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::common );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = shift;
    my $self = libdnf5::commonc::new_MapStringPairStringString(@_);
    bless $self, $pkg if defined($self);
}

*size = *libdnf5::commonc::MapStringPairStringString_size;
*empty = *libdnf5::commonc::MapStringPairStringString_empty;
*clear = *libdnf5::commonc::MapStringPairStringString_clear;
*get = *libdnf5::commonc::MapStringPairStringString_get;
*set = *libdnf5::commonc::MapStringPairStringString_set;
*del = *libdnf5::commonc::MapStringPairStringString_del;
*has_key = *libdnf5::commonc::MapStringPairStringString_has_key;
sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        libdnf5::commonc::delete_MapStringPairStringString($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::common::PreserveOrderMapStringString ##############

package libdnf5::common::PreserveOrderMapStringString;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::common );
%OWNER = ();
%ITERATORS = ();
*empty = *libdnf5::commonc::PreserveOrderMapStringString_empty;
*size = *libdnf5::commonc::PreserveOrderMapStringString_size;
*max_size = *libdnf5::commonc::PreserveOrderMapStringString_max_size;
*reserve = *libdnf5::commonc::PreserveOrderMapStringString_reserve;
*capacity = *libdnf5::commonc::PreserveOrderMapStringString_capacity;
*shrink_to_fit = *libdnf5::commonc::PreserveOrderMapStringString_shrink_to_fit;
*begin = *libdnf5::commonc::PreserveOrderMapStringString_begin;
*cbegin = *libdnf5::commonc::PreserveOrderMapStringString_cbegin;
*end = *libdnf5::commonc::PreserveOrderMapStringString_end;
*cend = *libdnf5::commonc::PreserveOrderMapStringString_cend;
*rbegin = *libdnf5::commonc::PreserveOrderMapStringString_rbegin;
*crbegin = *libdnf5::commonc::PreserveOrderMapStringString_crbegin;
*rend = *libdnf5::commonc::PreserveOrderMapStringString_rend;
*crend = *libdnf5::commonc::PreserveOrderMapStringString_crend;
*clear = *libdnf5::commonc::PreserveOrderMapStringString_clear;
*insert = *libdnf5::commonc::PreserveOrderMapStringString_insert;
*erase = *libdnf5::commonc::PreserveOrderMapStringString_erase;
*count = *libdnf5::commonc::PreserveOrderMapStringString_count;
*find = *libdnf5::commonc::PreserveOrderMapStringString_find;
*at = *libdnf5::commonc::PreserveOrderMapStringString_at;
sub new {
    my $pkg = shift;
    my $self = libdnf5::commonc::new_PreserveOrderMapStringString(@_);
    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::commonc::delete_PreserveOrderMapStringString($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::common::PreserveOrderMapStringPreserveOrderMapStringString ##############

package libdnf5::common::PreserveOrderMapStringPreserveOrderMapStringString;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::common );
%OWNER = ();
%ITERATORS = ();
*empty = *libdnf5::commonc::PreserveOrderMapStringPreserveOrderMapStringString_empty;
*size = *libdnf5::commonc::PreserveOrderMapStringPreserveOrderMapStringString_size;
*max_size = *libdnf5::commonc::PreserveOrderMapStringPreserveOrderMapStringString_max_size;
*reserve = *libdnf5::commonc::PreserveOrderMapStringPreserveOrderMapStringString_reserve;
*capacity = *libdnf5::commonc::PreserveOrderMapStringPreserveOrderMapStringString_capacity;
*shrink_to_fit = *libdnf5::commonc::PreserveOrderMapStringPreserveOrderMapStringString_shrink_to_fit;
*begin = *libdnf5::commonc::PreserveOrderMapStringPreserveOrderMapStringString_begin;
*cbegin = *libdnf5::commonc::PreserveOrderMapStringPreserveOrderMapStringString_cbegin;
*end = *libdnf5::commonc::PreserveOrderMapStringPreserveOrderMapStringString_end;
*cend = *libdnf5::commonc::PreserveOrderMapStringPreserveOrderMapStringString_cend;
*rbegin = *libdnf5::commonc::PreserveOrderMapStringPreserveOrderMapStringString_rbegin;
*crbegin = *libdnf5::commonc::PreserveOrderMapStringPreserveOrderMapStringString_crbegin;
*rend = *libdnf5::commonc::PreserveOrderMapStringPreserveOrderMapStringString_rend;
*crend = *libdnf5::commonc::PreserveOrderMapStringPreserveOrderMapStringString_crend;
*clear = *libdnf5::commonc::PreserveOrderMapStringPreserveOrderMapStringString_clear;
*insert = *libdnf5::commonc::PreserveOrderMapStringPreserveOrderMapStringString_insert;
*erase = *libdnf5::commonc::PreserveOrderMapStringPreserveOrderMapStringString_erase;
*count = *libdnf5::commonc::PreserveOrderMapStringPreserveOrderMapStringString_count;
*find = *libdnf5::commonc::PreserveOrderMapStringPreserveOrderMapStringString_find;
*at = *libdnf5::commonc::PreserveOrderMapStringPreserveOrderMapStringString_at;
sub new {
    my $pkg = shift;
    my $self = libdnf5::commonc::new_PreserveOrderMapStringPreserveOrderMapStringString(@_);
    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::commonc::delete_PreserveOrderMapStringPreserveOrderMapStringString($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 libdnf5::common;

*QueryCmp_NOT = *libdnf5::commonc::QueryCmp_NOT;
*QueryCmp_ICASE = *libdnf5::commonc::QueryCmp_ICASE;
*QueryCmp_ISNULL = *libdnf5::commonc::QueryCmp_ISNULL;
*QueryCmp_EQ = *libdnf5::commonc::QueryCmp_EQ;
*QueryCmp_NEQ = *libdnf5::commonc::QueryCmp_NEQ;
*QueryCmp_GT = *libdnf5::commonc::QueryCmp_GT;
*QueryCmp_GTE = *libdnf5::commonc::QueryCmp_GTE;
*QueryCmp_LT = *libdnf5::commonc::QueryCmp_LT;
*QueryCmp_LTE = *libdnf5::commonc::QueryCmp_LTE;
*QueryCmp_EXACT = *libdnf5::commonc::QueryCmp_EXACT;
*QueryCmp_NOT_EXACT = *libdnf5::commonc::QueryCmp_NOT_EXACT;
*QueryCmp_IEXACT = *libdnf5::commonc::QueryCmp_IEXACT;
*QueryCmp_NOT_IEXACT = *libdnf5::commonc::QueryCmp_NOT_IEXACT;
*QueryCmp_CONTAINS = *libdnf5::commonc::QueryCmp_CONTAINS;
*QueryCmp_NOT_CONTAINS = *libdnf5::commonc::QueryCmp_NOT_CONTAINS;
*QueryCmp_ICONTAINS = *libdnf5::commonc::QueryCmp_ICONTAINS;
*QueryCmp_NOT_ICONTAINS = *libdnf5::commonc::QueryCmp_NOT_ICONTAINS;
*QueryCmp_STARTSWITH = *libdnf5::commonc::QueryCmp_STARTSWITH;
*QueryCmp_ISTARTSWITH = *libdnf5::commonc::QueryCmp_ISTARTSWITH;
*QueryCmp_ENDSWITH = *libdnf5::commonc::QueryCmp_ENDSWITH;
*QueryCmp_IENDSWITH = *libdnf5::commonc::QueryCmp_IENDSWITH;
*QueryCmp_REGEX = *libdnf5::commonc::QueryCmp_REGEX;
*QueryCmp_IREGEX = *libdnf5::commonc::QueryCmp_IREGEX;
*QueryCmp_GLOB = *libdnf5::commonc::QueryCmp_GLOB;
*QueryCmp_NOT_GLOB = *libdnf5::commonc::QueryCmp_NOT_GLOB;
*QueryCmp_IGLOB = *libdnf5::commonc::QueryCmp_IGLOB;
*QueryCmp_NOT_IGLOB = *libdnf5::commonc::QueryCmp_NOT_IGLOB;
*msg_err_exact_one_object = *libdnf5::commonc::msg_err_exact_one_object;
1;
