# 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 _LibAppArmor
else:
    import _LibAppArmor

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__)


AA_RECORD_EXEC_MMAP = _LibAppArmor.AA_RECORD_EXEC_MMAP
AA_RECORD_READ = _LibAppArmor.AA_RECORD_READ
AA_RECORD_WRITE = _LibAppArmor.AA_RECORD_WRITE
AA_RECORD_EXEC = _LibAppArmor.AA_RECORD_EXEC
AA_RECORD_LINK = _LibAppArmor.AA_RECORD_LINK
AA_RECORD_SYNTAX_V1 = _LibAppArmor.AA_RECORD_SYNTAX_V1
AA_RECORD_SYNTAX_V2 = _LibAppArmor.AA_RECORD_SYNTAX_V2
AA_RECORD_SYNTAX_UNKNOWN = _LibAppArmor.AA_RECORD_SYNTAX_UNKNOWN
AA_RECORD_INVALID = _LibAppArmor.AA_RECORD_INVALID
AA_RECORD_ERROR = _LibAppArmor.AA_RECORD_ERROR
AA_RECORD_AUDIT = _LibAppArmor.AA_RECORD_AUDIT
AA_RECORD_ALLOWED = _LibAppArmor.AA_RECORD_ALLOWED
AA_RECORD_DENIED = _LibAppArmor.AA_RECORD_DENIED
AA_RECORD_HINT = _LibAppArmor.AA_RECORD_HINT
AA_RECORD_STATUS = _LibAppArmor.AA_RECORD_STATUS
class aa_log_record(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    version = property(_LibAppArmor.aa_log_record_version_get, _LibAppArmor.aa_log_record_version_set)
    event = property(_LibAppArmor.aa_log_record_event_get, _LibAppArmor.aa_log_record_event_set)
    pid = property(_LibAppArmor.aa_log_record_pid_get, _LibAppArmor.aa_log_record_pid_set)
    peer_pid = property(_LibAppArmor.aa_log_record_peer_pid_get, _LibAppArmor.aa_log_record_peer_pid_set)
    task = property(_LibAppArmor.aa_log_record_task_get, _LibAppArmor.aa_log_record_task_set)
    magic_token = property(_LibAppArmor.aa_log_record_magic_token_get, _LibAppArmor.aa_log_record_magic_token_set)
    epoch = property(_LibAppArmor.aa_log_record_epoch_get, _LibAppArmor.aa_log_record_epoch_set)
    audit_sub_id = property(_LibAppArmor.aa_log_record_audit_sub_id_get, _LibAppArmor.aa_log_record_audit_sub_id_set)
    bitmask = property(_LibAppArmor.aa_log_record_bitmask_get, _LibAppArmor.aa_log_record_bitmask_set)
    audit_id = property(_LibAppArmor.aa_log_record_audit_id_get, _LibAppArmor.aa_log_record_audit_id_set)
    operation = property(_LibAppArmor.aa_log_record_operation_get, _LibAppArmor.aa_log_record_operation_set)
    denied_mask = property(_LibAppArmor.aa_log_record_denied_mask_get, _LibAppArmor.aa_log_record_denied_mask_set)
    requested_mask = property(_LibAppArmor.aa_log_record_requested_mask_get, _LibAppArmor.aa_log_record_requested_mask_set)
    fsuid = property(_LibAppArmor.aa_log_record_fsuid_get, _LibAppArmor.aa_log_record_fsuid_set)
    ouid = property(_LibAppArmor.aa_log_record_ouid_get, _LibAppArmor.aa_log_record_ouid_set)
    profile = property(_LibAppArmor.aa_log_record_profile_get, _LibAppArmor.aa_log_record_profile_set)
    peer_profile = property(_LibAppArmor.aa_log_record_peer_profile_get, _LibAppArmor.aa_log_record_peer_profile_set)
    comm = property(_LibAppArmor.aa_log_record_comm_get, _LibAppArmor.aa_log_record_comm_set)
    name = property(_LibAppArmor.aa_log_record_name_get, _LibAppArmor.aa_log_record_name_set)
    name2 = property(_LibAppArmor.aa_log_record_name2_get, _LibAppArmor.aa_log_record_name2_set)
    namespace = property(_LibAppArmor.aa_log_record_namespace_get, _LibAppArmor.aa_log_record_namespace_set)
    attribute = property(_LibAppArmor.aa_log_record_attribute_get, _LibAppArmor.aa_log_record_attribute_set)
    parent = property(_LibAppArmor.aa_log_record_parent_get, _LibAppArmor.aa_log_record_parent_set)
    info = property(_LibAppArmor.aa_log_record_info_get, _LibAppArmor.aa_log_record_info_set)
    peer_info = property(_LibAppArmor.aa_log_record_peer_info_get, _LibAppArmor.aa_log_record_peer_info_set)
    error_code = property(_LibAppArmor.aa_log_record_error_code_get, _LibAppArmor.aa_log_record_error_code_set)
    active_hat = property(_LibAppArmor.aa_log_record_active_hat_get, _LibAppArmor.aa_log_record_active_hat_set)
    net_family = property(_LibAppArmor.aa_log_record_net_family_get, _LibAppArmor.aa_log_record_net_family_set)
    net_protocol = property(_LibAppArmor.aa_log_record_net_protocol_get, _LibAppArmor.aa_log_record_net_protocol_set)
    net_sock_type = property(_LibAppArmor.aa_log_record_net_sock_type_get, _LibAppArmor.aa_log_record_net_sock_type_set)
    net_local_addr = property(_LibAppArmor.aa_log_record_net_local_addr_get, _LibAppArmor.aa_log_record_net_local_addr_set)
    net_local_port = property(_LibAppArmor.aa_log_record_net_local_port_get, _LibAppArmor.aa_log_record_net_local_port_set)
    net_foreign_addr = property(_LibAppArmor.aa_log_record_net_foreign_addr_get, _LibAppArmor.aa_log_record_net_foreign_addr_set)
    net_foreign_port = property(_LibAppArmor.aa_log_record_net_foreign_port_get, _LibAppArmor.aa_log_record_net_foreign_port_set)
    dbus_bus = property(_LibAppArmor.aa_log_record_dbus_bus_get, _LibAppArmor.aa_log_record_dbus_bus_set)
    dbus_path = property(_LibAppArmor.aa_log_record_dbus_path_get, _LibAppArmor.aa_log_record_dbus_path_set)
    dbus_interface = property(_LibAppArmor.aa_log_record_dbus_interface_get, _LibAppArmor.aa_log_record_dbus_interface_set)
    dbus_member = property(_LibAppArmor.aa_log_record_dbus_member_get, _LibAppArmor.aa_log_record_dbus_member_set)
    signal = property(_LibAppArmor.aa_log_record_signal_get, _LibAppArmor.aa_log_record_signal_set)
    peer = property(_LibAppArmor.aa_log_record_peer_get, _LibAppArmor.aa_log_record_peer_set)
    fs_type = property(_LibAppArmor.aa_log_record_fs_type_get, _LibAppArmor.aa_log_record_fs_type_set)
    flags = property(_LibAppArmor.aa_log_record_flags_get, _LibAppArmor.aa_log_record_flags_set)
    src_name = property(_LibAppArmor.aa_log_record_src_name_get, _LibAppArmor.aa_log_record_src_name_set)

    def __init__(self):
        _LibAppArmor.aa_log_record_swiginit(self, _LibAppArmor.new_aa_log_record())
    __swig_destroy__ = _LibAppArmor.delete_aa_log_record

# Register aa_log_record in _LibAppArmor:
_LibAppArmor.aa_log_record_swigregister(aa_log_record)


def parse_record(str):
    return _LibAppArmor.parse_record(str)

def free_record(record):
    return _LibAppArmor.free_record(record)

def aa_splitcon(con, mode):
    return _LibAppArmor.aa_splitcon(con, mode)

def _aa_is_blacklisted(name):
    return _LibAppArmor._aa_is_blacklisted(name)

def aa_is_enabled():
    return _LibAppArmor.aa_is_enabled()

def aa_find_mountpoint(mnt):
    return _LibAppArmor.aa_find_mountpoint(mnt)

def aa_change_hat(subprofile, magic_token):
    return _LibAppArmor.aa_change_hat(subprofile, magic_token)

def aa_change_profile(profile):
    return _LibAppArmor.aa_change_profile(profile)

def aa_change_onexec(profile):
    return _LibAppArmor.aa_change_onexec(profile)

def aa_change_hatv(subprofiles, token):
    return _LibAppArmor.aa_change_hatv(subprofiles, token)

def aa_change_hat_vargs(*args):
    return _LibAppArmor.aa_change_hat_vargs(*args)

def aa_stack_profile(profile):
    return _LibAppArmor.aa_stack_profile(profile)

def aa_stack_onexec(profile):
    return _LibAppArmor.aa_stack_onexec(profile)

def aa_getprocattr_raw(tid, attr, buf, len, mode):
    return _LibAppArmor.aa_getprocattr_raw(tid, attr, buf, len, mode)

def aa_getprocattr(tid, attr, buf, mode):
    return _LibAppArmor.aa_getprocattr(tid, attr, buf, mode)

def aa_gettaskcon(target, label, mode):
    return _LibAppArmor.aa_gettaskcon(target, label, mode)

def aa_getcon(label, mode):
    return _LibAppArmor.aa_getcon(label, mode)

def aa_getpeercon_raw(fd, buf, len, mode):
    return _LibAppArmor.aa_getpeercon_raw(fd, buf, len, mode)

def aa_getpeercon(fd, label, mode):
    return _LibAppArmor.aa_getpeercon(fd, label, mode)

def aa_query_label(mask, query, size, allow, audit):
    return _LibAppArmor.aa_query_label(mask, query, size, allow, audit)

def aa_query_file_path_len(mask, label, label_len, path, path_len, allowed, audited):
    return _LibAppArmor.aa_query_file_path_len(mask, label, label_len, path, path_len, allowed, audited)

def aa_query_file_path(mask, label, path, allowed, audited):
    return _LibAppArmor.aa_query_file_path(mask, label, path, allowed, audited)

def aa_query_link_path_len(label, label_len, target, target_len, link, link_len, allowed, audited):
    return _LibAppArmor.aa_query_link_path_len(label, label_len, target, target_len, link, link_len, allowed, audited)

def aa_query_link_path(label, target, link, allowed, audited):
    return _LibAppArmor.aa_query_link_path(label, target, link, allowed, audited)


