# This file was automatically generated by SWIG (http://www.swig.org).
# Version 1.3.35
#
# Don't modify this file, modify the SWIG interface instead.

"""
Credentials management.
"""

import _credentials
import new
new_instancemethod = new.instancemethod
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__ == 'PySwigObject':
            self.__dict__[name] = value
            return
    method = class_type.__swig_setmethods__.get(name,None)
    if method: return method(self,value)
    if (not static) or hasattr(self,name):
        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,name

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

import types
try:
    _object = types.ObjectType
    _newclass = 1
except AttributeError:
    class _object : pass
    _newclass = 0
del types


def _swig_setattr_nondynamic_method(set):
    def set_attr(self,name,value):
        if (name == "thisown"): return self.this.own(value)
        if hasattr(self,name) or (name == "this"):
            set(self,name,value)
        else:
            raise AttributeError("You cannot add attributes to %s" % self)
    return set_attr


import param
AUTO_USE_KERBEROS = _credentials.AUTO_USE_KERBEROS
DONT_USE_KERBEROS = _credentials.DONT_USE_KERBEROS
MUST_USE_KERBEROS = _credentials.MUST_USE_KERBEROS
class Credentials(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr
    def __init__(self, *args, **kwargs): 
        _credentials.Credentials_swiginit(self,_credentials.new_Credentials(*args, **kwargs))
    def get_username(*args, **kwargs):
        """
        S.get_username() -> username
        Obtain username.
        """
        return _credentials.Credentials_get_username(*args, **kwargs)

    def set_username(*args, **kwargs):
        """
        S.set_username(name, obtained=CRED_SPECIFIED) -> None
        Change username.
        """
        return _credentials.Credentials_set_username(*args, **kwargs)

    def get_password(*args, **kwargs):
        """
        S.get_password() -> password
        Obtain password.
        """
        return _credentials.Credentials_get_password(*args, **kwargs)

    def set_password(*args, **kwargs):
        """
        S.set_password(password, obtained=CRED_SPECIFIED) -> None
        Change password.
        """
        return _credentials.Credentials_set_password(*args, **kwargs)

    def set_domain(*args, **kwargs):
        """
        S.set_domain(domain, obtained=CRED_SPECIFIED) -> None
        Change domain name.
        """
        return _credentials.Credentials_set_domain(*args, **kwargs)

    def get_realm(*args, **kwargs):
        """
        S.get_realm() -> realm
        Obtain realm name.
        """
        return _credentials.Credentials_get_realm(*args, **kwargs)

    def set_realm(*args, **kwargs):
        """
        S.set_realm(realm, obtained=CRED_SPECIFIED) -> None
        Change realm name.
        """
        return _credentials.Credentials_set_realm(*args, **kwargs)

    def parse_string(*args, **kwargs):
        """
        S.parse_string(text, obtained=CRED_SPECIFIED) -> None
        Parse credentials string.
        """
        return _credentials.Credentials_parse_string(*args, **kwargs)

    def get_bind_dn(*args, **kwargs):
        """
        S.get_bind_dn() -> bind dn
        Obtain bind DN.
        """
        return _credentials.Credentials_get_bind_dn(*args, **kwargs)

    def set_bind_dn(*args, **kwargs):
        """
        S.set_bind_dn(bind_dn) -> None
        Change bind DN.
        """
        return _credentials.Credentials_set_bind_dn(*args, **kwargs)

    def set_anonymous(*args, **kwargs):
        """
        S.set_anonymous() -> None
        Use anonymous credentials.
        """
        return _credentials.Credentials_set_anonymous(*args, **kwargs)

    def wrong_password(*args, **kwargs):
        """
        S.wrong_password() -> bool
        Indicate the returned password was incorrect.
        """
        return _credentials.Credentials_wrong_password(*args, **kwargs)

    def set_cmdline_callbacks(*args, **kwargs):
        """
        S.set_cmdline_callbacks() -> bool
        Use command-line to obtain credentials not explicitly set.
        """
        return _credentials.Credentials_set_cmdline_callbacks(*args, **kwargs)

    __swig_destroy__ = _credentials.delete_Credentials
Credentials.get_username = new_instancemethod(_credentials.Credentials_get_username,None,Credentials)
Credentials.set_username = new_instancemethod(_credentials.Credentials_set_username,None,Credentials)
Credentials.get_password = new_instancemethod(_credentials.Credentials_get_password,None,Credentials)
Credentials.set_password = new_instancemethod(_credentials.Credentials_set_password,None,Credentials)
Credentials.get_domain = new_instancemethod(_credentials.Credentials_get_domain,None,Credentials)
Credentials.set_domain = new_instancemethod(_credentials.Credentials_set_domain,None,Credentials)
Credentials.get_realm = new_instancemethod(_credentials.Credentials_get_realm,None,Credentials)
Credentials.set_realm = new_instancemethod(_credentials.Credentials_set_realm,None,Credentials)
Credentials.set_kerberos_state = new_instancemethod(_credentials.Credentials_set_kerberos_state,None,Credentials)
Credentials.parse_string = new_instancemethod(_credentials.Credentials_parse_string,None,Credentials)
Credentials.get_bind_dn = new_instancemethod(_credentials.Credentials_get_bind_dn,None,Credentials)
Credentials.set_bind_dn = new_instancemethod(_credentials.Credentials_set_bind_dn,None,Credentials)
Credentials.set_anonymous = new_instancemethod(_credentials.Credentials_set_anonymous,None,Credentials)
Credentials.get_workstation = new_instancemethod(_credentials.Credentials_get_workstation,None,Credentials)
Credentials.set_workstation = new_instancemethod(_credentials.Credentials_set_workstation,None,Credentials)
Credentials.set_machine_account = new_instancemethod(_credentials.Credentials_set_machine_account,None,Credentials)
Credentials.guess = new_instancemethod(_credentials.Credentials_guess,None,Credentials)
Credentials.is_anonymous = new_instancemethod(_credentials.Credentials_is_anonymous,None,Credentials)
Credentials.get_nt_hash = new_instancemethod(_credentials.Credentials_get_nt_hash,None,Credentials)
Credentials.authentication_requested = new_instancemethod(_credentials.Credentials_authentication_requested,None,Credentials)
Credentials.wrong_password = new_instancemethod(_credentials.Credentials_wrong_password,None,Credentials)
Credentials.set_cmdline_callbacks = new_instancemethod(_credentials.Credentials_set_cmdline_callbacks,None,Credentials)
Credentials_swigregister = _credentials.Credentials_swigregister
Credentials_swigregister(Credentials)



