Add a setexpiry operation in samdb.py
[metze/samba/wip.git] / source / scripting / python / misc.py
1 # This file was automatically generated by SWIG (http://www.swig.org).
2 # Version 1.3.36
3 #
4 # Don't modify this file, modify the SWIG interface instead.
5
6 """
7 Python bindings for miscellaneous Samba functions.
8 """
9
10 import _misc
11 import new
12 new_instancemethod = new.instancemethod
13 try:
14     _swig_property = property
15 except NameError:
16     pass # Python < 2.2 doesn't have 'property'.
17 def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
18     if (name == "thisown"): return self.this.own(value)
19     if (name == "this"):
20         if type(value).__name__ == 'PySwigObject':
21             self.__dict__[name] = value
22             return
23     method = class_type.__swig_setmethods__.get(name,None)
24     if method: return method(self,value)
25     if (not static) or hasattr(self,name):
26         self.__dict__[name] = value
27     else:
28         raise AttributeError("You cannot add attributes to %s" % self)
29
30 def _swig_setattr(self,class_type,name,value):
31     return _swig_setattr_nondynamic(self,class_type,name,value,0)
32
33 def _swig_getattr(self,class_type,name):
34     if (name == "thisown"): return self.this.own()
35     method = class_type.__swig_getmethods__.get(name,None)
36     if method: return method(self)
37     raise AttributeError,name
38
39 def _swig_repr(self):
40     try: strthis = "proxy of " + self.this.__repr__()
41     except: strthis = ""
42     return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
43
44 import types
45 try:
46     _object = types.ObjectType
47     _newclass = 1
48 except AttributeError:
49     class _object : pass
50     _newclass = 0
51 del types
52
53
54 def _swig_setattr_nondynamic_method(set):
55     def set_attr(self,name,value):
56         if (name == "thisown"): return self.this.own(value)
57         if hasattr(self,name) or (name == "this"):
58             set(self,name,value)
59         else:
60             raise AttributeError("You cannot add attributes to %s" % self)
61     return set_attr
62
63
64 import ldb
65 import credentials
66 import param
67 import security
68
69 def random_password(*args, **kwargs):
70   """
71     S.random_password(len) -> string
72     Generate random password with specified length.
73     """
74   return _misc.random_password(*args, **kwargs)
75
76 def ldb_set_credentials(*args, **kwargs):
77   """
78     S.set_credentials(credentials)
79     Set credentials to use when connecting.
80     """
81   return _misc.ldb_set_credentials(*args, **kwargs)
82
83 def ldb_set_session_info(*args, **kwargs):
84   """
85     S.set_session_info(session_info)
86     Set session info to use when connecting.
87     """
88   return _misc.ldb_set_session_info(*args, **kwargs)
89
90 def ldb_set_loadparm(*args, **kwargs):
91   """
92     S.set_loadparm(session_info)
93     Set loadparm context to use when connecting.
94     """
95   return _misc.ldb_set_loadparm(*args, **kwargs)
96
97 def samdb_set_domain_sid(*args, **kwargs):
98   """
99     S.set_domain_sid(sid)
100     Set SID of domain to use.
101     """
102   return _misc.samdb_set_domain_sid(*args, **kwargs)
103 dsdb_attach_schema_from_ldif_file = _misc.dsdb_attach_schema_from_ldif_file
104
105 def version(*args):
106   """
107     version()
108     Obtain the Samba version.
109     """
110   return _misc.version(*args)
111 dsdb_set_global_schema = _misc.dsdb_set_global_schema
112
113 def ldb_register_samba_handlers(*args, **kwargs):
114   """
115     register_samba_handlers()
116     Register Samba-specific LDB modules and schemas.
117     """
118   return _misc.ldb_register_samba_handlers(*args, **kwargs)
119 dsdb_set_ntds_invocation_id = _misc.dsdb_set_ntds_invocation_id
120 private_path = _misc.private_path
121 unix2nttime = _misc.unix2nttime
122
123