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

from sys import version_info as _swig_python_version_info
if _swig_python_version_info < (2, 7, 0):
    raise RuntimeError("Python 2.7 or later required")

# Import the low-level C/C++ module
if __package__ or "." in __name__:
    from . import _utils
else:
    import _utils

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_instance_variable(set):
    def set_instance_attr(self, name, value):
        if name == "thisown":
            self.this.own(value)
        elif name == "this":
            set(self, name, value)
        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add instance attributes to %s" % self)
    return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
    def set_class_attr(cls, name, value):
        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
            set(cls, name, value)
        else:
            raise AttributeError("You cannot add class attributes to %s" % cls)
    return set_class_attr


def _swig_add_metaclass(metaclass):
    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
    def wrapper(cls):
        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
    return wrapper


class _SwigNonDynamicMeta(type):
    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)


import weakref

SHARED_PTR_DISOWN = _utils.SHARED_PTR_DISOWN
class SQLite3(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, dbPath):
        _utils.SQLite3_swiginit(self, _utils.new_SQLite3(dbPath))

    def close(self):
        return _utils.SQLite3_close(self)
    __swig_destroy__ = _utils.delete_SQLite3

# Register SQLite3 in _utils:
_utils.SQLite3_swigregister(SQLite3)

class Logger(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    Level_CRITICAL = _utils.Logger_Level_CRITICAL
    Level_ERROR = _utils.Logger_Level_ERROR
    Level_WARNING = _utils.Logger_Level_WARNING
    Level_NOTICE = _utils.Logger_Level_NOTICE
    Level_INFO = _utils.Logger_Level_INFO
    Level_DEBUG = _utils.Logger_Level_DEBUG
    Level_TRACE = _utils.Logger_Level_TRACE

    @staticmethod
    def levelToCStr(level):
        return _utils.Logger_levelToCStr(level)
    LOG_SOURCE_LIBDNF = _utils.Logger_LOG_SOURCE_LIBDNF
    LOG_SOURCE_LIBREPO = _utils.Logger_LOG_SOURCE_LIBREPO

    def critical(self, *args):
        return _utils.Logger_critical(self, *args)

    def error(self, *args):
        return _utils.Logger_error(self, *args)

    def warning(self, *args):
        return _utils.Logger_warning(self, *args)

    def notice(self, *args):
        return _utils.Logger_notice(self, *args)

    def info(self, *args):
        return _utils.Logger_info(self, *args)

    def debug(self, *args):
        return _utils.Logger_debug(self, *args)

    def trace(self, *args):
        return _utils.Logger_trace(self, *args)

    def write(self, *args):
        return _utils.Logger_write(self, *args)
    __swig_destroy__ = _utils.delete_Logger

    def __init__(self):
        if self.__class__ == Logger:
            _self = None
        else:
            _self = self
        _utils.Logger_swiginit(self, _utils.new_Logger(_self, ))
    def __disown__(self):
        self.this.disown()
        _utils.disown_Logger(self)
        return weakref.proxy(self)

# Register Logger in _utils:
_utils.Logger_swigregister(Logger)

def Logger_levelToCStr(level):
    return _utils.Logger_levelToCStr(level)

class NullLogger(Logger):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def write(self, *args):
        return _utils.NullLogger_write(self, *args)

    def __init__(self):
        _utils.NullLogger_swiginit(self, _utils.new_NullLogger())
    __swig_destroy__ = _utils.delete_NullLogger

# Register NullLogger in _utils:
_utils.NullLogger_swigregister(NullLogger)

class Log(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    @staticmethod
    def setLogger(logger):
        return _utils.Log_setLogger(logger)

    @staticmethod
    def getLogger():
        return _utils.Log_getLogger()

    def __init__(self):
        _utils.Log_swiginit(self, _utils.new_Log())
    __swig_destroy__ = _utils.delete_Log

# Register Log in _utils:
_utils.Log_swigregister(Log)

def Log_setLogger(logger):
    return _utils.Log_setLogger(logger)

def Log_getLogger():
    return _utils.Log_getLogger()


def decompress(inPath, outPath, outMode, compressType=None):
    return _utils.decompress(inPath, outPath, outMode, compressType)

def checksum_check(type, inPath, checksum_valid):
    return _utils.checksum_check(type, inPath, checksum_valid)

def checksum_value(type, inPath):
    return _utils.checksum_value(type, inPath)


