r26399: Use -O option for SWIG (less evil generated code).
[Samba.git] / source4 / lib / ldb / ldb.py
blobd9ddb8af0adc1825d8e32fd16bbc737fec33d53a
1 # This file was automatically generated by SWIG (http://www.swig.org).
2 # Version 1.3.33
4 # Don't modify this file, modify the SWIG interface instead.
6 import _ldb
7 import new
8 new_instancemethod = new.instancemethod
9 try:
10 _swig_property = property
11 except NameError:
12 pass # Python < 2.2 doesn't have 'property'.
13 def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
14 if (name == "thisown"): return self.this.own(value)
15 if (name == "this"):
16 if type(value).__name__ == 'PySwigObject':
17 self.__dict__[name] = value
18 return
19 method = class_type.__swig_setmethods__.get(name,None)
20 if method: return method(self,value)
21 if (not static) or hasattr(self,name):
22 self.__dict__[name] = value
23 else:
24 raise AttributeError("You cannot add attributes to %s" % self)
26 def _swig_setattr(self,class_type,name,value):
27 return _swig_setattr_nondynamic(self,class_type,name,value,0)
29 def _swig_getattr(self,class_type,name):
30 if (name == "thisown"): return self.this.own()
31 method = class_type.__swig_getmethods__.get(name,None)
32 if method: return method(self)
33 raise AttributeError,name
35 def _swig_repr(self):
36 try: strthis = "proxy of " + self.this.__repr__()
37 except: strthis = ""
38 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
40 import types
41 try:
42 _object = types.ObjectType
43 _newclass = 1
44 except AttributeError:
45 class _object : pass
46 _newclass = 0
47 del types
50 def _swig_setattr_nondynamic_method(set):
51 def set_attr(self,name,value):
52 if (name == "thisown"): return self.this.own(value)
53 if hasattr(self,name) or (name == "this"):
54 set(self,name,value)
55 else:
56 raise AttributeError("You cannot add attributes to %s" % self)
57 return set_attr
60 SCOPE_DEFAULT = _ldb.SCOPE_DEFAULT
61 SCOPE_BASE = _ldb.SCOPE_BASE
62 SCOPE_ONELEVEL = _ldb.SCOPE_ONELEVEL
63 SCOPE_SUBTREE = _ldb.SCOPE_SUBTREE
64 CHANGETYPE_NONE = _ldb.CHANGETYPE_NONE
65 CHANGETYPE_ADD = _ldb.CHANGETYPE_ADD
66 CHANGETYPE_DELETE = _ldb.CHANGETYPE_DELETE
67 CHANGETYPE_MODIFY = _ldb.CHANGETYPE_MODIFY
68 class Dn(object):
69 thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
70 __repr__ = _swig_repr
71 def __init__(self, *args, **kwargs):
72 _ldb.Dn_swiginit(self,_ldb.new_Dn(*args, **kwargs))
73 __swig_destroy__ = _ldb.delete_Dn
74 Dn.validate = new_instancemethod(_ldb.Dn_validate,None,Dn)
75 Dn.get_casefold = new_instancemethod(_ldb.Dn_get_casefold,None,Dn)
76 Dn.__str__ = new_instancemethod(_ldb.Dn___str__,None,Dn)
77 Dn.parent = new_instancemethod(_ldb.Dn_parent,None,Dn)
78 Dn.__cmp__ = new_instancemethod(_ldb.Dn___cmp__,None,Dn)
79 Dn.is_valid = new_instancemethod(_ldb.Dn_is_valid,None,Dn)
80 Dn.is_special = new_instancemethod(_ldb.Dn_is_special,None,Dn)
81 Dn.is_null = new_instancemethod(_ldb.Dn_is_null,None,Dn)
82 Dn.check_special = new_instancemethod(_ldb.Dn_check_special,None,Dn)
83 Dn.__len__ = new_instancemethod(_ldb.Dn___len__,None,Dn)
84 Dn.add_child = new_instancemethod(_ldb.Dn_add_child,None,Dn)
85 Dn.add_base = new_instancemethod(_ldb.Dn_add_base,None,Dn)
86 Dn.canonical_str = new_instancemethod(_ldb.Dn_canonical_str,None,Dn)
87 Dn.canonical_ex_str = new_instancemethod(_ldb.Dn_canonical_ex_str,None,Dn)
88 Dn.__add__ = new_instancemethod(_ldb.Dn___add__,None,Dn)
89 Dn_swigregister = _ldb.Dn_swigregister
90 Dn_swigregister(Dn)
92 ldb_dn_from_pyobject = _ldb.ldb_dn_from_pyobject
93 ldb_msg_element_from_pyobject = _ldb.ldb_msg_element_from_pyobject
94 ldb_msg_element_to_set = _ldb.ldb_msg_element_to_set
95 class ldb_msg_element(object):
96 thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
97 def __init__(self): raise AttributeError, "No constructor defined"
98 __repr__ = _swig_repr
99 __swig_destroy__ = _ldb.delete_ldb_msg_element
100 ldb_msg_element.__iter__ = new_instancemethod(_ldb.ldb_msg_element___iter__,None,ldb_msg_element)
101 ldb_msg_element.__set__ = new_instancemethod(_ldb.ldb_msg_element___set__,None,ldb_msg_element)
102 ldb_msg_element.__cmp__ = new_instancemethod(_ldb.ldb_msg_element___cmp__,None,ldb_msg_element)
103 ldb_msg_element_swigregister = _ldb.ldb_msg_element_swigregister
104 ldb_msg_element_swigregister(ldb_msg_element)
106 def MessageElement(*args, **kwargs):
107 val = _ldb.new_MessageElement(*args, **kwargs)
108 return val
110 ldb_msg_list_elements = _ldb.ldb_msg_list_elements
111 class Message(object):
112 thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
113 __repr__ = _swig_repr
114 dn = _swig_property(_ldb.Message_dn_get, _ldb.Message_dn_set)
115 def __init__(self, *args, **kwargs):
116 _ldb.Message_swiginit(self,_ldb.new_Message(*args, **kwargs))
117 __swig_destroy__ = _ldb.delete_Message
118 Message.__getitem__ = new_instancemethod(_ldb.Message___getitem__,None,Message)
119 Message.__setitem__ = new_instancemethod(_ldb.Message___setitem__,None,Message)
120 Message.__len__ = new_instancemethod(_ldb.Message___len__,None,Message)
121 Message.keys = new_instancemethod(_ldb.Message_keys,None,Message)
122 Message.__iter__ = new_instancemethod(_ldb.Message___iter__,None,Message)
123 Message.__delitem__ = new_instancemethod(_ldb.Message___delitem__,None,Message)
124 Message_swigregister = _ldb.Message_swigregister
125 Message_swigregister(Message)
127 ldb_ldif_to_pyobject = _ldb.ldb_ldif_to_pyobject
128 LdbError = _ldb.LdbError
130 LDB_ERR_OPERATIONS_ERROR = _ldb.LDB_ERR_OPERATIONS_ERROR
131 LDB_ERR_PROTOCOL_ERROR = _ldb.LDB_ERR_PROTOCOL_ERROR
132 LDB_ERR_TIME_LIMIT_EXCEEDED = _ldb.LDB_ERR_TIME_LIMIT_EXCEEDED
133 LDB_ERR_SIZE_LIMIT_EXCEEDED = _ldb.LDB_ERR_SIZE_LIMIT_EXCEEDED
134 LDB_ERR_COMPARE_FALSE = _ldb.LDB_ERR_COMPARE_FALSE
135 LDB_ERR_COMPARE_TRUE = _ldb.LDB_ERR_COMPARE_TRUE
136 LDB_ERR_AUTH_METHOD_NOT_SUPPORTED = _ldb.LDB_ERR_AUTH_METHOD_NOT_SUPPORTED
137 LDB_ERR_STRONG_AUTH_REQUIRED = _ldb.LDB_ERR_STRONG_AUTH_REQUIRED
138 LDB_ERR_REFERRAL = _ldb.LDB_ERR_REFERRAL
139 LDB_ERR_ADMIN_LIMIT_EXCEEDED = _ldb.LDB_ERR_ADMIN_LIMIT_EXCEEDED
140 LDB_ERR_UNSUPPORTED_CRITICAL_EXTENSION = _ldb.LDB_ERR_UNSUPPORTED_CRITICAL_EXTENSION
141 LDB_ERR_CONFIDENTIALITY_REQUIRED = _ldb.LDB_ERR_CONFIDENTIALITY_REQUIRED
142 LDB_ERR_SASL_BIND_IN_PROGRESS = _ldb.LDB_ERR_SASL_BIND_IN_PROGRESS
143 LDB_ERR_NO_SUCH_ATTRIBUTE = _ldb.LDB_ERR_NO_SUCH_ATTRIBUTE
144 LDB_ERR_UNDEFINED_ATTRIBUTE_TYPE = _ldb.LDB_ERR_UNDEFINED_ATTRIBUTE_TYPE
145 LDB_ERR_INAPPROPRIATE_MATCHING = _ldb.LDB_ERR_INAPPROPRIATE_MATCHING
146 LDB_ERR_CONSTRAINT_VIOLATION = _ldb.LDB_ERR_CONSTRAINT_VIOLATION
147 LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS = _ldb.LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS
148 LDB_ERR_INVALID_ATTRIBUTE_SYNTAX = _ldb.LDB_ERR_INVALID_ATTRIBUTE_SYNTAX
149 LDB_ERR_NO_SUCH_OBJECT = _ldb.LDB_ERR_NO_SUCH_OBJECT
150 LDB_ERR_ALIAS_PROBLEM = _ldb.LDB_ERR_ALIAS_PROBLEM
151 LDB_ERR_INVALID_DN_SYNTAX = _ldb.LDB_ERR_INVALID_DN_SYNTAX
152 LDB_ERR_ALIAS_DEREFERENCING_PROBLEM = _ldb.LDB_ERR_ALIAS_DEREFERENCING_PROBLEM
153 LDB_ERR_INAPPROPRIATE_AUTHENTICATION = _ldb.LDB_ERR_INAPPROPRIATE_AUTHENTICATION
154 LDB_ERR_INVALID_CREDENTIALS = _ldb.LDB_ERR_INVALID_CREDENTIALS
155 LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS = _ldb.LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS
156 LDB_ERR_BUSY = _ldb.LDB_ERR_BUSY
157 LDB_ERR_UNAVAILABLE = _ldb.LDB_ERR_UNAVAILABLE
158 LDB_ERR_UNWILLING_TO_PERFORM = _ldb.LDB_ERR_UNWILLING_TO_PERFORM
159 LDB_ERR_LOOP_DETECT = _ldb.LDB_ERR_LOOP_DETECT
160 LDB_ERR_NAMING_VIOLATION = _ldb.LDB_ERR_NAMING_VIOLATION
161 LDB_ERR_OBJECT_CLASS_VIOLATION = _ldb.LDB_ERR_OBJECT_CLASS_VIOLATION
162 LDB_ERR_NOT_ALLOWED_ON_NON_LEAF = _ldb.LDB_ERR_NOT_ALLOWED_ON_NON_LEAF
163 LDB_ERR_NOT_ALLOWED_ON_RDN = _ldb.LDB_ERR_NOT_ALLOWED_ON_RDN
164 LDB_ERR_ENTRY_ALREADY_EXISTS = _ldb.LDB_ERR_ENTRY_ALREADY_EXISTS
165 LDB_ERR_OBJECT_CLASS_MODS_PROHIBITED = _ldb.LDB_ERR_OBJECT_CLASS_MODS_PROHIBITED
166 LDB_ERR_AFFECTS_MULTIPLE_DSAS = _ldb.LDB_ERR_AFFECTS_MULTIPLE_DSAS
167 LDB_ERR_OTHER = _ldb.LDB_ERR_OTHER
168 class ldb(object):
169 thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
170 def __init__(self): raise AttributeError, "No constructor defined"
171 __repr__ = _swig_repr
172 __swig_destroy__ = _ldb.delete_ldb
173 ldb.connect = new_instancemethod(_ldb.ldb_connect,None,ldb)
174 ldb.search = new_instancemethod(_ldb.ldb_search,None,ldb)
175 ldb.delete = new_instancemethod(_ldb.ldb_delete,None,ldb)
176 ldb.rename = new_instancemethod(_ldb.ldb_rename,None,ldb)
177 ldb.add = new_instancemethod(_ldb.ldb_add,None,ldb)
178 ldb.modify = new_instancemethod(_ldb.ldb_modify,None,ldb)
179 ldb.get_config_basedn = new_instancemethod(_ldb.ldb_get_config_basedn,None,ldb)
180 ldb.get_root_basedn = new_instancemethod(_ldb.ldb_get_root_basedn,None,ldb)
181 ldb.get_schema_basedn = new_instancemethod(_ldb.ldb_get_schema_basedn,None,ldb)
182 ldb.get_default_basedn = new_instancemethod(_ldb.ldb_get_default_basedn,None,ldb)
183 ldb.errstring = new_instancemethod(_ldb.ldb_errstring,None,ldb)
184 ldb.set_create_perms = new_instancemethod(_ldb.ldb_set_create_perms,None,ldb)
185 ldb.set_modules_dir = new_instancemethod(_ldb.ldb_set_modules_dir,None,ldb)
186 ldb.set_debug = new_instancemethod(_ldb.ldb_set_debug,None,ldb)
187 ldb.set_opaque = new_instancemethod(_ldb.ldb_set_opaque,None,ldb)
188 ldb.get_opaque = new_instancemethod(_ldb.ldb_get_opaque,None,ldb)
189 ldb.transaction_start = new_instancemethod(_ldb.ldb_transaction_start,None,ldb)
190 ldb.transaction_commit = new_instancemethod(_ldb.ldb_transaction_commit,None,ldb)
191 ldb.transaction_cancel = new_instancemethod(_ldb.ldb_transaction_cancel,None,ldb)
192 ldb.__contains__ = new_instancemethod(_ldb.ldb___contains__,None,ldb)
193 ldb.parse_ldif = new_instancemethod(_ldb.ldb_parse_ldif,None,ldb)
194 ldb_swigregister = _ldb.ldb_swigregister
195 ldb_swigregister(ldb)
197 def Ldb(*args, **kwargs):
198 val = _ldb.new_Ldb(*args, **kwargs)
199 return val
201 valid_attr_name = _ldb.valid_attr_name
202 timestring = _ldb.timestring
203 string_to_time = _ldb.string_to_time