# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.8
#
# 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
if version_info >= (2, 6, 0):
    def swig_import_helper():
        from os.path import dirname
        import imp
        fp = None
        try:
            fp, pathname, description = imp.find_module('_sefs', [dirname(__file__)])
        except ImportError:
            import _sefs
            return _sefs
        if fp is not None:
            try:
                _mod = imp.load_module('_sefs', fp, pathname, description)
            finally:
                fp.close()
            return _mod
    _sefs = swig_import_helper()
    del swig_import_helper
else:
    import _sefs
del version_info
try:
    _swig_property = property
except NameError:
    pass  # Python < 2.2 doesn't have 'property'.


def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
    if (name == "thisown"):
        return self.this.own(value)
    if (name == "this"):
        if type(value).__name__ == 'SwigPyObject':
            self.__dict__[name] = value
            return
    method = class_type.__swig_setmethods__.get(name, None)
    if method:
        return method(self, value)
    if (not static):
        if _newclass:
            object.__setattr__(self, name, value)
        else:
            self.__dict__[name] = value
    else:
        raise AttributeError("You cannot add attributes to %s" % self)


def _swig_setattr(self, class_type, name, value):
    return _swig_setattr_nondynamic(self, class_type, name, value, 0)


def _swig_getattr_nondynamic(self, class_type, name, static=1):
    if (name == "thisown"):
        return self.this.own()
    method = class_type.__swig_getmethods__.get(name, None)
    if method:
        return method(self)
    if (not static):
        return object.__getattr__(self, name)
    else:
        raise AttributeError(name)

def _swig_getattr(self, class_type, name):
    return _swig_getattr_nondynamic(self, class_type, name, 0)


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

try:
    _object = object
    _newclass = 1
except AttributeError:
    class _object:
        pass
    _newclass = 0


import apol
import qpol

_sefs.SEFS_MSG_ERR_swigconstant(_sefs)
SEFS_MSG_ERR = _sefs.SEFS_MSG_ERR

_sefs.SEFS_MSG_WARN_swigconstant(_sefs)
SEFS_MSG_WARN = _sefs.SEFS_MSG_WARN

_sefs.SEFS_MSG_INFO_swigconstant(_sefs)
SEFS_MSG_INFO = _sefs.SEFS_MSG_INFO

_sefs.SEFS_FCLIST_TYPE_NONE_swigconstant(_sefs)
SEFS_FCLIST_TYPE_NONE = _sefs.SEFS_FCLIST_TYPE_NONE

_sefs.SEFS_FCLIST_TYPE_FILESYSTEM_swigconstant(_sefs)
SEFS_FCLIST_TYPE_FILESYSTEM = _sefs.SEFS_FCLIST_TYPE_FILESYSTEM

_sefs.SEFS_FCLIST_TYPE_FCFILE_swigconstant(_sefs)
SEFS_FCLIST_TYPE_FCFILE = _sefs.SEFS_FCLIST_TYPE_FCFILE

_sefs.SEFS_FCLIST_TYPE_DB_swigconstant(_sefs)
SEFS_FCLIST_TYPE_DB = _sefs.SEFS_FCLIST_TYPE_DB

def sefs_fclist_handleMsg(fclist, level, fmt):
    return _sefs.sefs_fclist_handleMsg(fclist, level, fmt)
sefs_fclist_handleMsg = _sefs.sefs_fclist_handleMsg
class sefs_fclist(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, sefs_fclist, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, sefs_fclist, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_destroy__ = _sefs.delete_sefs_fclist
    __del__ = lambda self: None

    def runQueryMap(self, query, fn, data):
        return _sefs.sefs_fclist_runQueryMap(self, query, fn, data)

    def runQuery(self, query):
        return _sefs.sefs_fclist_runQuery(self, query)

    def isMLS(self):
        return _sefs.sefs_fclist_isMLS(self)

    def associatePolicy(self, *args):
        return _sefs.sefs_fclist_associatePolicy(self, *args)

    def fclist_type(self):
        return _sefs.sefs_fclist_fclist_type(self)
sefs_fclist_swigregister = _sefs.sefs_fclist_swigregister
sefs_fclist_swigregister(sefs_fclist)

class sefs_db(sefs_fclist):
    __swig_setmethods__ = {}
    for _s in [sefs_fclist]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, sefs_db, name, value)
    __swig_getmethods__ = {}
    for _s in [sefs_fclist]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, sefs_db, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        this = _sefs.new_sefs_db(*args)
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _sefs.delete_sefs_db
    __del__ = lambda self: None

    def runQueryMap(self, query, fn, data):
        return _sefs.sefs_db_runQueryMap(self, query, fn, data)

    def isMLS(self):
        return _sefs.sefs_db_isMLS(self)

    def save(self, filename):
        return _sefs.sefs_db_save(self, filename)

    def getCTime(self):
        return _sefs.sefs_db_getCTime(self)
    __swig_getmethods__["isDB"] = lambda x: _sefs.sefs_db_isDB
    if _newclass:
        isDB = staticmethod(_sefs.sefs_db_isDB)
sefs_db_swigregister = _sefs.sefs_db_swigregister
sefs_db_swigregister(sefs_db)

def sefs_db_isDB(filename):
    return _sefs.sefs_db_isDB(filename)
sefs_db_isDB = _sefs.sefs_db_isDB

class sefs_entry(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, sefs_entry, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, sefs_entry, name)
    __repr__ = _swig_repr

    def __init__(self, e):
        this = _sefs.new_sefs_entry(e)
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _sefs.delete_sefs_entry
    __del__ = lambda self: None

    def context(self):
        return _sefs.sefs_entry_context(self)

    def inode(self):
        return _sefs.sefs_entry_inode(self)

    def dev(self):
        return _sefs.sefs_entry_dev(self)

    def objectClass(self):
        return _sefs.sefs_entry_objectClass(self)

    def path(self):
        return _sefs.sefs_entry_path(self)

    def origin(self):
        return _sefs.sefs_entry_origin(self)

    def toString(self):
        return _sefs.sefs_entry_toString(self)
sefs_entry_swigregister = _sefs.sefs_entry_swigregister
sefs_entry_swigregister(sefs_entry)

class sefs_fcfile(sefs_fclist):
    __swig_setmethods__ = {}
    for _s in [sefs_fclist]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, sefs_fcfile, name, value)
    __swig_getmethods__ = {}
    for _s in [sefs_fclist]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, sefs_fcfile, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        this = _sefs.new_sefs_fcfile(*args)
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _sefs.delete_sefs_fcfile
    __del__ = lambda self: None

    def runQueryMap(self, query, fn, data):
        return _sefs.sefs_fcfile_runQueryMap(self, query, fn, data)

    def isMLS(self):
        return _sefs.sefs_fcfile_isMLS(self)

    def appendFile(self, file):
        return _sefs.sefs_fcfile_appendFile(self, file)

    def appendFileList(self, files):
        return _sefs.sefs_fcfile_appendFileList(self, files)

    def fileListStrs(self):
        return _sefs.sefs_fcfile_fileListStrs(self)
sefs_fcfile_swigregister = _sefs.sefs_fcfile_swigregister
sefs_fcfile_swigregister(sefs_fcfile)

class sefs_filesystem(sefs_fclist):
    __swig_setmethods__ = {}
    for _s in [sefs_fclist]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, sefs_filesystem, name, value)
    __swig_getmethods__ = {}
    for _s in [sefs_fclist]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, sefs_filesystem, name)
    __repr__ = _swig_repr

    def __init__(self, new_root, msg_callback, varg):
        this = _sefs.new_sefs_filesystem(new_root, msg_callback, varg)
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _sefs.delete_sefs_filesystem
    __del__ = lambda self: None

    def runQueryMap(self, query, fn, data):
        return _sefs.sefs_filesystem_runQueryMap(self, query, fn, data)

    def isMLS(self):
        return _sefs.sefs_filesystem_isMLS(self)

    def root(self):
        return _sefs.sefs_filesystem_root(self)

    def getDevName(self, dev):
        return _sefs.sefs_filesystem_getDevName(self, dev)
sefs_filesystem_swigregister = _sefs.sefs_filesystem_swigregister
sefs_filesystem_swigregister(sefs_filesystem)

class sefs_query(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, sefs_query, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, sefs_query, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _sefs.new_sefs_query()
        try:
            self.this.append(this)
        except Exception:
            self.this = this
    __swig_destroy__ = _sefs.delete_sefs_query
    __del__ = lambda self: None

    def user(self, name):
        return _sefs.sefs_query_user(self, name)

    def role(self, name):
        return _sefs.sefs_query_role(self, name)

    def type(self, name, indirect):
        return _sefs.sefs_query_type(self, name, indirect)

    def range(self, name, match):
        return _sefs.sefs_query_range(self, name, match)

    def objectClass(self, *args):
        return _sefs.sefs_query_objectClass(self, *args)

    def path(self, str):
        return _sefs.sefs_query_path(self, str)

    def inode(self, ino):
        return _sefs.sefs_query_inode(self, ino)

    def dev(self, str):
        return _sefs.sefs_query_dev(self, str)

    def regex(self, r):
        return _sefs.sefs_query_regex(self, r)
sefs_query_swigregister = _sefs.sefs_query_swigregister
sefs_query_swigregister(sefs_query)


def libsefs_get_version():
    return _sefs.libsefs_get_version()
libsefs_get_version = _sefs.libsefs_get_version

def sefs_default_file_contexts_get_path():
    return _sefs.sefs_default_file_contexts_get_path()
sefs_default_file_contexts_get_path = _sefs.sefs_default_file_contexts_get_path

def sefs_entry_from_void(v):
    return _sefs.sefs_entry_from_void(v)
sefs_entry_from_void = _sefs.sefs_entry_from_void
# This file is compatible with both classic and new-style classes.


