# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.12
#
# 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):
    def swig_import_helper():
        import importlib
        pkg = __name__.rpartition('.')[0]
        mname = '.'.join((pkg, '_volume_key')).lstrip('.')
        try:
            return importlib.import_module(mname)
        except ImportError:
            return importlib.import_module('_volume_key')
    _volume_key = swig_import_helper()
    del swig_import_helper
elif _swig_python_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('_volume_key', [dirname(__file__)])
        except ImportError:
            import _volume_key
            return _volume_key
        try:
            _mod = imp.load_module('_volume_key', fp, pathname, description)
        finally:
            if fp is not None:
                fp.close()
        return _mod
    _volume_key = swig_import_helper()
    del swig_import_helper
else:
    import _volume_key
del _swig_python_version_info

try:
    _swig_property = property
except NameError:
    pass  # Python < 2.2 doesn't have 'property'.

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

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(self, class_type, name):
    if (name == "thisown"):
        return self.this.own()
    method = class_type.__swig_getmethods__.get(name, None)
    if method:
        return method(self)
    raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))


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

try:
    _object = object
    _newclass = 1
except __builtin__.Exception:
    class _object:
        pass
    _newclass = 0

SECRET_DEFAULT = _volume_key.SECRET_DEFAULT
SECRET_DATA_ENCRYPTION_KEY = _volume_key.SECRET_DATA_ENCRYPTION_KEY
SECRET_PASSPHRASE = _volume_key.SECRET_PASSPHRASE
VP_IDENTIFICATION = _volume_key.VP_IDENTIFICATION
VP_CONFIGURATION = _volume_key.VP_CONFIGURATION
VP_SECRET = _volume_key.VP_SECRET
VOLUME_FORMAT_LUKS = _volume_key.VOLUME_FORMAT_LUKS
PACKET_FORMAT_UNKNOWN = _volume_key.PACKET_FORMAT_UNKNOWN
PACKET_FORMAT_CLEARTEXT = _volume_key.PACKET_FORMAT_CLEARTEXT
PACKET_FORMAT_ASYMMETRIC = _volume_key.PACKET_FORMAT_ASYMMETRIC
PACKET_FORMAT_ASSYMETRIC = _volume_key.PACKET_FORMAT_ASSYMETRIC
PACKET_FORMAT_PASSPHRASE = _volume_key.PACKET_FORMAT_PASSPHRASE
PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY = _volume_key.PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY
PACKET_FORMAT_SYMMETRIC_WRAP_SECRET_ONLY = _volume_key.PACKET_FORMAT_SYMMETRIC_WRAP_SECRET_ONLY
PACKET_MATCH_OK = _volume_key.PACKET_MATCH_OK
PACKET_MATCH_UNSURE = _volume_key.PACKET_MATCH_UNSURE
class UI(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, UI, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, UI, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _volume_key.new_UI()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _volume_key.delete_UI
    __del__ = lambda self: None
    __swig_setmethods__["generic_cb"] = _volume_key.UI_generic_cb_set
    __swig_getmethods__["generic_cb"] = _volume_key.UI_generic_cb_get
    if _newclass:
        generic_cb = _swig_property(_volume_key.UI_generic_cb_get, _volume_key.UI_generic_cb_set)
    __swig_setmethods__["passphrase_cb"] = _volume_key.UI_passphrase_cb_set
    __swig_getmethods__["passphrase_cb"] = _volume_key.UI_passphrase_cb_get
    if _newclass:
        passphrase_cb = _swig_property(_volume_key.UI_passphrase_cb_get, _volume_key.UI_passphrase_cb_set)

    def set_nss_pwfn_arg(self, data):
        return _volume_key.UI_set_nss_pwfn_arg(self, data)
UI_swigregister = _volume_key.UI_swigregister
UI_swigregister(UI)

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

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")
    __repr__ = _swig_repr
    __swig_destroy__ = _volume_key.delete_libvk_volume_property
    __del__ = lambda self: None
    __swig_getmethods__["label"] = _volume_key.libvk_volume_property_label_get
    if _newclass:
        label = _swig_property(_volume_key.libvk_volume_property_label_get)
    __swig_getmethods__["name"] = _volume_key.libvk_volume_property_name_get
    if _newclass:
        name = _swig_property(_volume_key.libvk_volume_property_name_get)
    __swig_getmethods__["type"] = _volume_key.libvk_volume_property_type_get
    if _newclass:
        type = _swig_property(_volume_key.libvk_volume_property_type_get)
    __swig_getmethods__["value"] = _volume_key.libvk_volume_property_value_get
    if _newclass:
        value = _swig_property(_volume_key.libvk_volume_property_value_get)
libvk_volume_property_swigregister = _volume_key.libvk_volume_property_swigregister
libvk_volume_property_swigregister(libvk_volume_property)

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

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")
    __repr__ = _swig_repr
    __swig_destroy__ = _volume_key.delete_Volume
    __del__ = lambda self: None
    if _newclass:
        open = staticmethod(_volume_key.Volume_open)
    else:
        open = _volume_key.Volume_open
    __swig_getmethods__["hostname"] = _volume_key.Volume_hostname_get
    if _newclass:
        hostname = _swig_property(_volume_key.Volume_hostname_get)
    __swig_getmethods__["uuid"] = _volume_key.Volume_uuid_get
    if _newclass:
        uuid = _swig_property(_volume_key.Volume_uuid_get)
    __swig_getmethods__["label"] = _volume_key.Volume_label_get
    if _newclass:
        label = _swig_property(_volume_key.Volume_label_get)
    __swig_getmethods__["path"] = _volume_key.Volume_path_get
    if _newclass:
        path = _swig_property(_volume_key.Volume_path_get)
    __swig_getmethods__["format"] = _volume_key.Volume_format_get
    if _newclass:
        format = _swig_property(_volume_key.Volume_format_get)

    def dump_properties(self, with_secrets):
        return _volume_key.Volume_dump_properties(self, with_secrets)

    def get_secret(self, secret_type, ui):
        return _volume_key.Volume_get_secret(self, secret_type, ui)

    def add_secret(self, secret_type, secret):
        return _volume_key.Volume_add_secret(self, secret_type, secret)

    def load_packet(self, packet):
        return _volume_key.Volume_load_packet(self, packet)

    def apply_packet(self, packet, secret_type, ui):
        return _volume_key.Volume_apply_packet(self, packet, secret_type, ui)

    def open_with_packet(self, packet, name):
        return _volume_key.Volume_open_with_packet(self, packet, name)

    def create_packet_cleartext(self, secret_type):
        return _volume_key.Volume_create_packet_cleartext(self, secret_type)

    def create_packet_assymetric(self, secret_type, cert, ui):
        return _volume_key.Volume_create_packet_assymetric(self, secret_type, cert, ui)

    def create_packet_asymmetric(self, secret_type, cert, ui):
        return _volume_key.Volume_create_packet_asymmetric(self, secret_type, cert, ui)

    def create_packet_assymetric_from_cert_data(self, secret_type, cert_data, ui, format=PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY):
        return _volume_key.Volume_create_packet_assymetric_from_cert_data(self, secret_type, cert_data, ui, format)

    def create_packet_asymmetric_from_cert_data(self, secret_type, cert_data, ui, format=PACKET_FORMAT_ASYMMETRIC_WRAP_SECRET_ONLY):
        return _volume_key.Volume_create_packet_asymmetric_from_cert_data(self, secret_type, cert_data, ui, format)

    def create_packet_with_passphrase(self, secret_type, passphrase):
        return _volume_key.Volume_create_packet_with_passphrase(self, secret_type, passphrase)

    def packet_match_volume(self, vol):
        return _volume_key.Volume_packet_match_volume(self, vol)
Volume_swigregister = _volume_key.Volume_swigregister
Volume_swigregister(Volume)

def Volume_open(path):
    return _volume_key.Volume_open(path)
Volume_open = _volume_key.Volume_open

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

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")
    __repr__ = _swig_repr
    if _newclass:
        get_format = staticmethod(_volume_key.Packet_get_format)
    else:
        get_format = _volume_key.Packet_get_format
    if _newclass:
        open = staticmethod(_volume_key.Packet_open)
    else:
        open = _volume_key.Packet_open
    if _newclass:
        open_unencrypted = staticmethod(_volume_key.Packet_open_unencrypted)
    else:
        open_unencrypted = _volume_key.Packet_open_unencrypted
Packet_swigregister = _volume_key.Packet_swigregister
Packet_swigregister(Packet)

def Packet_get_format(packet):
    return _volume_key.Packet_get_format(packet)
Packet_get_format = _volume_key.Packet_get_format

def Packet_open(packet, ui):
    return _volume_key.Packet_open(packet, ui)
Packet_open = _volume_key.Packet_open

def Packet_open_unencrypted(packet):
    return _volume_key.Packet_open_unencrypted(packet)
Packet_open_unencrypted = _volume_key.Packet_open_unencrypted

# This file is compatible with both classic and new-style classes.


