summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-05-22 16:50:33 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-05-23 00:35:50 +0200
commit505cea9d4c9ae3b7baf401fd543500041c20f93d (patch)
treeceacb0ae56bd47fb5c18b90812c7ec06d62de737 /source4/lib
parentd0b355109705f70e848c58ccc4b7b5f0a9eaab40 (diff)
downloadsamba-505cea9d4c9ae3b7baf401fd543500041c20f93d.tar.gz
samba-505cea9d4c9ae3b7baf401fd543500041c20f93d.tar.bz2
samba-505cea9d4c9ae3b7baf401fd543500041c20f93d.zip
Add some docstrings to ldb python module, fix MessageElement name.
(This used to be commit 717283331f8a1ebd80e7ec52d9bfe709f869ec86)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/ldb/ldb.i93
-rw-r--r--source4/lib/ldb/ldb.py189
-rw-r--r--source4/lib/ldb/ldb_wrap.c292
3 files changed, 430 insertions, 144 deletions
diff --git a/source4/lib/ldb/ldb.i b/source4/lib/ldb/ldb.i
index 18e981f7be..6a807a7dde 100644
--- a/source4/lib/ldb/ldb.i
+++ b/source4/lib/ldb/ldb.i
@@ -40,7 +40,7 @@ typedef struct ldb_message ldb_msg;
typedef struct ldb_context ldb;
typedef struct ldb_dn ldb_dn;
typedef struct ldb_ldif ldb_ldif;
-typedef struct ldb_message_element ldb_msg_element;
+typedef struct ldb_message_element ldb_message_element;
typedef int ldb_error;
typedef int ldb_int_error;
@@ -210,21 +210,35 @@ fail:
return ret;
}
~ldb_dn() { talloc_free($self); }
+ %feature("docstring") validate "S.validate() -> bool\n" \
+ "Validate DN is correct.";
bool validate();
const char *get_casefold();
const char *get_linearized();
ldb_dn *parent() { return ldb_dn_get_parent(NULL, $self); }
int compare(ldb_dn *other);
bool is_valid();
+ %feature("docstring") is_special "S.is_special() -> bool\n" \
+ "Check whether this is a special LDB DN.";
bool is_special();
+ %feature("docstring") is_null "S.is_null() -> bool\n" \
+ "Check whether this is a null DN.";
bool is_null();
bool check_special(const char *name);
int get_comp_num();
+ %feature("docstring") add_child "S.add_child(dn) -> None\n" \
+ "Add a child DN to this DN.";
bool add_child(ldb_dn *child);
+ %feature("docstring") add_base "S.add_base(dn) -> None\n" \
+ "Add a base DN to this DN.";
bool add_base(ldb_dn *base);
+ %feature("docstring") canonical_str "S.canonical_str() -> string\n" \
+ "Canonical version of this DN (like a posix path).";
const char *canonical_str() {
return ldb_dn_canonical_string($self, $self);
}
+ %feature("docstring") canonical_ex_str "S.canonical_ex_str() -> string\n" \
+ "Canonical version of this DN (like a posix path, with terminating newline).";
const char *canonical_ex_str() {
return ldb_dn_canonical_ex_string($self, $self);
}
@@ -289,7 +303,7 @@ int ldb_dn_from_pyobject(TALLOC_CTX *mem_ctx, PyObject *object,
return ret;
}
-ldb_msg_element *ldb_msg_element_from_pyobject(TALLOC_CTX *mem_ctx,
+ldb_message_element *ldb_msg_element_from_pyobject(TALLOC_CTX *mem_ctx,
PyObject *set_obj, int flags,
const char *attr_name)
{
@@ -320,7 +334,7 @@ ldb_msg_element *ldb_msg_element_from_pyobject(TALLOC_CTX *mem_ctx,
}
PyObject *ldb_msg_element_to_set(struct ldb_context *ldb_ctx,
- ldb_msg_element *me)
+ ldb_message_element *me)
{
int i;
PyObject *result;
@@ -339,9 +353,10 @@ PyObject *ldb_msg_element_to_set(struct ldb_context *ldb_ctx,
%}
#endif
+int ldb_msg_element_compare(ldb_message_element *, ldb_message_element *);
/* ldb_message_element */
-%rename(__cmp__) ldb_message_element::compare;
-%rename(MessageElement) ldb_msg_element;
+%rename(MessageElement) ldb_message_element;
+%rename(ldb_message_element_compare) ldb_msg_element_compare;
typedef struct ldb_message_element {
%extend {
#ifdef SWIGPYTHON
@@ -355,7 +370,7 @@ typedef struct ldb_message_element {
return ldb_msg_element_to_set(NULL, $self);
}
- ldb_msg_element(PyObject *set_obj, int flags=0, const char *name = NULL)
+ ldb_message_element(PyObject *set_obj, int flags=0, const char *name = NULL)
{
return ldb_msg_element_from_pyobject(NULL, set_obj, flags, name);
}
@@ -374,8 +389,8 @@ typedef struct ldb_message_element {
return ldb_val_to_py_object(NULL, $self, &$self->values[i]);
}
- ~ldb_msg_element() { talloc_free($self); }
- int compare(ldb_msg_element *);
+ ~ldb_message_element() { talloc_free($self); }
+ %rename(__cmp__) ldb_msg_element_compare;
}
%pythoncode {
def __getitem__(self, i):
@@ -398,21 +413,19 @@ typedef struct ldb_message_element {
return False
return True
}
-} ldb_msg_element;
+} ldb_message_element;
/* ldb_message */
%rename(Message) ldb_message;
#ifdef SWIGPYTHON
%rename(__delitem__) ldb_message::remove_attr;
-%typemap(out) ldb_msg_element * {
+%typemap(out) ldb_message_element * {
if ($1 == NULL)
PyErr_SetString(PyExc_KeyError, "no such element");
else
$result = SWIG_NewPointerObj($1, SWIGTYPE_p_ldb_message_element, 0);
}
-//%typemap(out) ldb_msg_element *;
-
%inline {
PyObject *ldb_msg_list_elements(ldb_msg *msg)
@@ -443,10 +456,10 @@ typedef struct ldb_message {
return ret;
}
~ldb_msg() { talloc_free($self); }
- ldb_msg_element *find_element(const char *name);
+ ldb_message_element *find_element(const char *name);
#ifdef SWIGPYTHON
- void __setitem__(const char *attr_name, ldb_msg_element *val)
+ void __setitem__(const char *attr_name, ldb_message_element *val)
{
struct ldb_message_element *el;
@@ -613,7 +626,7 @@ PyObject *PyExc_LdbError;
%typemap(in,numinputs=1) ldb_msg *add_msg {
Py_ssize_t dict_pos, msg_pos;
- ldb_msg_element *msgel;
+ ldb_message_element *msgel;
PyObject *key, *value;
if (PyDict_Check($input)) {
@@ -660,6 +673,8 @@ typedef struct ldb_context {
%extend {
ldb(void) { return ldb_init(NULL); }
+ %feature("docstring") connect "S.connect(url,flags=0,options=None) -> None\n" \
+ "Connect to a LDB URL.";
ldb_error connect(const char *url, unsigned int flags = 0,
const char *options[] = NULL);
@@ -707,11 +722,19 @@ typedef struct ldb_context {
return ret;
}
+ %feature("docstring") delete "S.delete(dn) -> None\n" \
+ "Remove an entry.";
ldb_error delete(ldb_dn *dn);
+ %feature("docstring") rename "S.rename(old_dn, new_dn) -> None\n" \
+ "Rename an entry.";
ldb_error rename(ldb_dn *olddn, ldb_dn *newdn);
struct ldb_control **parse_control_strings(TALLOC_CTX *mem_ctx,
const char * const*control_strings);
+ %feature("docstring") add "S.add(message) -> None\n" \
+ "Add an entry.";
ldb_error add(ldb_msg *add_msg);
+ %feature("docstring") modify "S.modify(message) -> None\n" \
+ "Modify an entry.";
ldb_error modify(ldb_msg *message);
ldb_dn *get_config_basedn();
ldb_dn *get_root_basedn();
@@ -747,20 +770,36 @@ typedef struct ldb_context {
}
const char *errstring();
+ %feature("docstring") set_create_perms "S.set_create_perms(mode) -> None\n" \
+ "Set mode to use when creating new LDB files.";
void set_create_perms(unsigned int perms);
+ %feature("docstring") set_modules_dir "S.set_modules_dir(path) -> None\n" \
+ "Set path LDB should search for modules";
void set_modules_dir(const char *path);
ldb_error set_debug(void (*debug)(void *context, enum ldb_debug_level level,
const char *fmt, va_list ap),
void *context);
+ %feature("docstring") set_opaque "S.set_opaque(name, value) -> None\n" \
+ "Set an opaque value on this LDB connection. \n"
+ ":note: Passing incorrect values may cause crashes.";
ldb_error set_opaque(const char *name, void *value);
+ %feature("docstring") get_opaque "S.get_opaque(name) -> value\n" \
+ "Get an opaque value set on this LDB connection. \n"
+ ":note: The returned value may not be useful in Python.";
void *get_opaque(const char *name);
+ %feature("docstring") transaction_start "S.transaction_start() -> None\n" \
+ "Start a new transaction.";
ldb_error transaction_start();
+ %feature("docstring") transaction_commit "S.transaction_commit() -> None\n" \
+ "Commit currently active transaction.";
ldb_error transaction_commit();
+ %feature("docstring") transaction_commit "S.transaction_cancel() -> None\n" \
+ "Cancel currently active transaction.";
ldb_error transaction_cancel();
void schema_attribute_remove(const char *name);
ldb_error schema_attribute_add(const char *attribute, unsigned flags, const char *syntax);
- ldb_error setup_wellknown_attributes(void);
-
+ ldb_error setup_wellknown_attributes(void);
+
#ifdef SWIGPYTHON
%typemap(in,numinputs=0,noblock=1) struct ldb_result **result_as_bool (struct ldb_result *tmp) { $1 = &tmp; }
%typemap(argout,noblock=1) struct ldb_result **result_as_bool { $result = ((*$1)->count > 0)?Py_True:Py_False; }
@@ -771,6 +810,9 @@ typedef struct ldb_context {
result_as_bool);
}
+ %feature("docstring") parse_ldif "S.parse_ldif(ldif) -> iter(messages)\n" \
+ "Parse a string formatted using LDIF.";
+
PyObject *parse_ldif(const char *s)
{
PyObject *list = PyList_New(0);
@@ -791,12 +833,25 @@ typedef struct ldb_context {
}
%pythoncode {
def __init__(self, url=None, flags=0, options=None):
+ """Create a new LDB object.
+
+ Will also connect to the specified URL if one was given.
+ """
_ldb.Ldb_swiginit(self,_ldb.new_Ldb())
if url is not None:
self.connect(url, flags, options)
def search(self, base=None, scope=SCOPE_DEFAULT, expression=None,
attrs=None, controls=None):
+ """Search in a database.
+
+ :param base: Optional base DN to search
+ :param scope: Search scope (SCOPE_BASE, SCOPE_ONELEVEL or SCOPE_SUBTREE)
+ :param expression: Optional search expression
+ :param attrs: Attributes to return (defaults to all)
+ :param controls: Optional list of controls
+ :return: Iterator over Message objects
+ """
if not (attrs is None or isinstance(attrs, list)):
raise TypeError("attributes not a list")
parsed_controls = None
@@ -816,6 +871,8 @@ typedef struct ldb_context {
%nodefault Dn;
%rename(valid_attr_name) ldb_valid_attr_name;
+%feature("docstring") ldb_valid_attr_name "S.valid_attr_name(name) -> bool\n"
+ "Check whether the supplied name is a valid attribute name.";
int ldb_valid_attr_name(const char *s);
typedef unsigned long time_t;
@@ -839,5 +896,7 @@ time_t ldb_string_to_time(const char *s);
$1->name = (char *)PyObject_GetAttrString($input, (char *)"name");
}
+%feature("docstring") ldb_register_module "S.register_module(module) -> None\n"
+ "Register a LDB module.";
%rename(register_module) ldb_register_module;
ldb_int_error ldb_register_module(const struct ldb_module_ops *);
diff --git a/source4/lib/ldb/ldb.py b/source4/lib/ldb/ldb.py
index e9f4055fbf..0149f05429 100644
--- a/source4/lib/ldb/ldb.py
+++ b/source4/lib/ldb/ldb.py
@@ -71,6 +71,55 @@ class Dn(object):
def __init__(self, *args, **kwargs):
_ldb.Dn_swiginit(self,_ldb.new_Dn(*args, **kwargs))
__swig_destroy__ = _ldb.delete_Dn
+ def validate(*args, **kwargs):
+ """
+ S.validate() -> bool
+ Validate DN is correct.
+ """
+ return _ldb.Dn_validate(*args, **kwargs)
+
+ def is_special(*args, **kwargs):
+ """
+ S.is_special() -> bool
+ Check whether this is a special LDB DN.
+ """
+ return _ldb.Dn_is_special(*args, **kwargs)
+
+ def is_null(*args, **kwargs):
+ """
+ S.is_null() -> bool
+ Check whether this is a null DN.
+ """
+ return _ldb.Dn_is_null(*args, **kwargs)
+
+ def add_child(*args, **kwargs):
+ """
+ S.add_child(dn) -> None
+ Add a child DN to this DN.
+ """
+ return _ldb.Dn_add_child(*args, **kwargs)
+
+ def add_base(*args, **kwargs):
+ """
+ S.add_base(dn) -> None
+ Add a base DN to this DN.
+ """
+ return _ldb.Dn_add_base(*args, **kwargs)
+
+ def canonical_str(*args, **kwargs):
+ """
+ S.canonical_str() -> string
+ Canonical version of this DN (like a posix path).
+ """
+ return _ldb.Dn_canonical_str(*args, **kwargs)
+
+ def canonical_ex_str(*args, **kwargs):
+ """
+ S.canonical_ex_str() -> string
+ Canonical version of this DN (like a posix path, with terminating newline).
+ """
+ return _ldb.Dn_canonical_ex_str(*args, **kwargs)
+
def __eq__(self, other):
if isinstance(other, self.__class__):
return self.__cmp__(other) == 0
@@ -97,11 +146,13 @@ Dn.__add__ = new_instancemethod(_ldb.Dn___add__,None,Dn)
Dn_swigregister = _ldb.Dn_swigregister
Dn_swigregister(Dn)
-class ldb_msg_element(object):
+ldb_msg_element_compare = _ldb.ldb_msg_element_compare
+class MessageElement(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
- def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined"
__repr__ = _swig_repr
- __swig_destroy__ = _ldb.delete_ldb_msg_element
+ def __init__(self, *args, **kwargs):
+ _ldb.MessageElement_swiginit(self,_ldb.new_MessageElement(*args, **kwargs))
+ __swig_destroy__ = _ldb.delete_MessageElement
def __getitem__(self, i):
ret = self.get(i)
if ret is None:
@@ -122,17 +173,12 @@ class ldb_msg_element(object):
return False
return True
-ldb_msg_element.__iter__ = new_instancemethod(_ldb.ldb_msg_element___iter__,None,ldb_msg_element)
-ldb_msg_element.__set__ = new_instancemethod(_ldb.ldb_msg_element___set__,None,ldb_msg_element)
-ldb_msg_element.__len__ = new_instancemethod(_ldb.ldb_msg_element___len__,None,ldb_msg_element)
-ldb_msg_element.get = new_instancemethod(_ldb.ldb_msg_element_get,None,ldb_msg_element)
-ldb_msg_element.__cmp__ = new_instancemethod(_ldb.ldb_msg_element___cmp__,None,ldb_msg_element)
-ldb_msg_element_swigregister = _ldb.ldb_msg_element_swigregister
-ldb_msg_element_swigregister(ldb_msg_element)
-
-def MessageElement(*args, **kwargs):
- val = _ldb.new_MessageElement(*args, **kwargs)
- return val
+MessageElement.__iter__ = new_instancemethod(_ldb.MessageElement___iter__,None,MessageElement)
+MessageElement.__set__ = new_instancemethod(_ldb.MessageElement___set__,None,MessageElement)
+MessageElement.__len__ = new_instancemethod(_ldb.MessageElement___len__,None,MessageElement)
+MessageElement.get = new_instancemethod(_ldb.MessageElement_get,None,MessageElement)
+MessageElement_swigregister = _ldb.MessageElement_swigregister
+MessageElement_swigregister(MessageElement)
ldb_msg_list_elements = _ldb.ldb_msg_list_elements
class Message(object):
@@ -217,14 +263,113 @@ class Ldb(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
def __init__(self, *args, **kwargs):
_ldb.Ldb_swiginit(self,_ldb.new_Ldb(*args, **kwargs))
+ def connect(*args, **kwargs):
+ """
+ S.connect(url,flags=0,options=None) -> None
+ Connect to a LDB URL.
+ """
+ return _ldb.Ldb_connect(*args, **kwargs)
+
__swig_destroy__ = _ldb.delete_Ldb
+ def delete(*args, **kwargs):
+ """
+ S.delete(dn) -> None
+ Remove an entry.
+ """
+ return _ldb.Ldb_delete(*args, **kwargs)
+
+ def rename(*args, **kwargs):
+ """
+ S.rename(old_dn, new_dn) -> None
+ Rename an entry.
+ """
+ return _ldb.Ldb_rename(*args, **kwargs)
+
+ def add(*args, **kwargs):
+ """
+ S.add(message) -> None
+ Add an entry.
+ """
+ return _ldb.Ldb_add(*args, **kwargs)
+
+ def modify(*args, **kwargs):
+ """
+ S.modify(message) -> None
+ Modify an entry.
+ """
+ return _ldb.Ldb_modify(*args, **kwargs)
+
+ def set_create_perms(*args, **kwargs):
+ """
+ S.set_create_perms(mode) -> None
+ Set mode to use when creating new LDB files.
+ """
+ return _ldb.Ldb_set_create_perms(*args, **kwargs)
+
+ def set_modules_dir(*args, **kwargs):
+ """
+ S.set_modules_dir(path) -> None
+ Set path LDB should search for modules
+ """
+ return _ldb.Ldb_set_modules_dir(*args, **kwargs)
+
+ def set_opaque(*args, **kwargs):
+ """
+ S.set_opaque(name, value) -> None
+ Set an opaque value on this LDB connection.
+ :note: Passing incorrect values may cause crashes.
+ """
+ return _ldb.Ldb_set_opaque(*args, **kwargs)
+
+ def get_opaque(*args, **kwargs):
+ """
+ S.get_opaque(name) -> value
+ Get an opaque value set on this LDB connection.
+ :note: The returned value may not be useful in Python.
+ """
+ return _ldb.Ldb_get_opaque(*args, **kwargs)
+
+ def transaction_start(*args, **kwargs):
+ """
+ S.transaction_start() -> None
+ Start a new transaction.
+ """
+ return _ldb.Ldb_transaction_start(*args, **kwargs)
+
+ def transaction_commit(*args, **kwargs):
+ """
+ S.transaction_commit() -> None
+ Commit currently active transaction.
+ """
+ return _ldb.Ldb_transaction_commit(*args, **kwargs)
+
+ def parse_ldif(*args, **kwargs):
+ """
+ S.parse_ldif(ldif) -> iter(messages)
+ Parse a string formatted using LDIF.
+ """
+ return _ldb.Ldb_parse_ldif(*args, **kwargs)
+
def __init__(self, url=None, flags=0, options=None):
+ """Create a new LDB object.
+
+ Will also connect to the specified URL if one was given.
+ """
_ldb.Ldb_swiginit(self,_ldb.new_Ldb())
if url is not None:
self.connect(url, flags, options)
def search(self, base=None, scope=SCOPE_DEFAULT, expression=None,
attrs=None, controls=None):
+ """Search in a database.
+
+ :param base: Optional base DN to search
+ :param scope: Search scope (SCOPE_BASE, SCOPE_ONELEVEL or SCOPE_SUBTREE)
+ :param expression: Optional search expression
+ :param attrs: Attributes to return (defaults to all)
+ :param controls: Optional list of controls
+ :return: Iterator over Message objects
+ """
if not (attrs is None or isinstance(attrs, list)):
raise TypeError("attributes not a list")
parsed_controls = None
@@ -263,9 +408,21 @@ Ldb.__repr__ = new_instancemethod(_ldb.Ldb___repr__,None,Ldb)
Ldb_swigregister = _ldb.Ldb_swigregister
Ldb_swigregister(Ldb)
-valid_attr_name = _ldb.valid_attr_name
+
+def valid_attr_name(*args, **kwargs):
+ """
+ S.valid_attr_name(name) -> bool
+ Check whether the supplied name is a valid attribute name.
+ """
+ return _ldb.valid_attr_name(*args, **kwargs)
timestring = _ldb.timestring
string_to_time = _ldb.string_to_time
-register_module = _ldb.register_module
+
+def register_module(*args, **kwargs):
+ """
+ S.register_module(module) -> None
+ Register a LDB module.
+ """
+ return _ldb.register_module(*args, **kwargs)
diff --git a/source4/lib/ldb/ldb_wrap.c b/source4/lib/ldb/ldb_wrap.c
index d787266416..bfd507a8f2 100644
--- a/source4/lib/ldb/ldb_wrap.c
+++ b/source4/lib/ldb/ldb_wrap.c
@@ -2554,7 +2554,7 @@ typedef struct ldb_message ldb_msg;
typedef struct ldb_context ldb;
typedef struct ldb_dn ldb_dn;
typedef struct ldb_ldif ldb_ldif;
-typedef struct ldb_message_element ldb_msg_element;
+typedef struct ldb_message_element ldb_message_element;
typedef int ldb_error;
typedef int ldb_int_error;
@@ -2761,7 +2761,7 @@ int ldb_dn_from_pyobject(TALLOC_CTX *mem_ctx, PyObject *object,
return ret;
}
-ldb_msg_element *ldb_msg_element_from_pyobject(TALLOC_CTX *mem_ctx,
+ldb_message_element *ldb_msg_element_from_pyobject(TALLOC_CTX *mem_ctx,
PyObject *set_obj, int flags,
const char *attr_name)
{
@@ -2792,7 +2792,7 @@ ldb_msg_element *ldb_msg_element_from_pyobject(TALLOC_CTX *mem_ctx,
}
PyObject *ldb_msg_element_to_set(struct ldb_context *ldb_ctx,
- ldb_msg_element *me)
+ ldb_message_element *me)
{
int i;
PyObject *result;
@@ -2809,10 +2809,10 @@ PyObject *ldb_msg_element_to_set(struct ldb_context *ldb_ctx,
}
-SWIGINTERN PyObject *ldb_msg_element___iter__(ldb_msg_element *self){
+SWIGINTERN PyObject *ldb_message_element___iter__(ldb_message_element *self){
return PyObject_GetIter(ldb_msg_element_to_set(NULL, self));
}
-SWIGINTERN PyObject *ldb_msg_element___set__(ldb_msg_element *self){
+SWIGINTERN PyObject *ldb_message_element___set__(ldb_message_element *self){
return ldb_msg_element_to_set(NULL, self);
}
@@ -2960,19 +2960,19 @@ SWIG_AsVal_int (PyObject * obj, int *val)
return res;
}
-SWIGINTERN ldb_msg_element *new_ldb_msg_element(PyObject *set_obj,int flags,char const *name){
+SWIGINTERN ldb_message_element *new_ldb_message_element(PyObject *set_obj,int flags,char const *name){
return ldb_msg_element_from_pyobject(NULL, set_obj, flags, name);
}
-SWIGINTERN int ldb_msg_element___len__(ldb_msg_element *self){
+SWIGINTERN int ldb_message_element___len__(ldb_message_element *self){
return self->num_values;
}
-SWIGINTERN PyObject *ldb_msg_element_get(ldb_msg_element *self,int i){
+SWIGINTERN PyObject *ldb_message_element_get(ldb_message_element *self,int i){
if (i < 0 || i >= self->num_values)
return Py_None;
return ldb_val_to_py_object(NULL, self, &self->values[i]);
}
-SWIGINTERN void delete_ldb_msg_element(ldb_msg_element *self){ talloc_free(self); }
+SWIGINTERN void delete_ldb_message_element(ldb_message_element *self){ talloc_free(self); }
PyObject *ldb_msg_list_elements(ldb_msg *msg)
{
@@ -2995,7 +2995,7 @@ SWIGINTERN ldb_msg *new_ldb_msg(ldb_dn *dn){
return ret;
}
SWIGINTERN void delete_ldb_msg(ldb_msg *self){ talloc_free(self); }
-SWIGINTERN void ldb_msg___setitem____SWIG_0(ldb_msg *self,char const *attr_name,ldb_msg_element *val){
+SWIGINTERN void ldb_msg___setitem____SWIG_0(ldb_msg *self,char const *attr_name,ldb_message_element *val){
struct ldb_message_element *el;
ldb_msg_remove_attr(self, attr_name);
@@ -3763,9 +3763,43 @@ SWIGINTERN PyObject *Dn_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
return SWIG_Python_InitShadowInstance(args);
}
-SWIGINTERN PyObject *_wrap_ldb_msg_element___iter__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_ldb_msg_element_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
- ldb_msg_element *arg1 = (ldb_msg_element *) 0 ;
+ ldb_message_element *arg1 = (ldb_message_element *) 0 ;
+ ldb_message_element *arg2 = (ldb_message_element *) 0 ;
+ int result;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ void *argp2 = 0 ;
+ int res2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ char * kwnames[] = {
+ (char *)"arg1",(char *)"arg2", NULL
+ };
+
+ if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ldb_msg_element_compare",kwnames,&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_message_element, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ldb_msg_element_compare" "', argument " "1"" of type '" "ldb_message_element *""'");
+ }
+ arg1 = (ldb_message_element *)(argp1);
+ res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ldb_message_element, 0 | 0 );
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ldb_msg_element_compare" "', argument " "2"" of type '" "ldb_message_element *""'");
+ }
+ arg2 = (ldb_message_element *)(argp2);
+ result = (int)ldb_msg_element_compare(arg1,arg2);
+ resultobj = SWIG_From_int((int)(result));
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_MessageElement___iter__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ ldb_message_element *arg1 = (ldb_message_element *) 0 ;
PyObject *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -3775,10 +3809,10 @@ SWIGINTERN PyObject *_wrap_ldb_msg_element___iter__(PyObject *SWIGUNUSEDPARM(sel
swig_obj[0] = args;
res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_message_element, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ldb_msg_element___iter__" "', argument " "1"" of type '" "ldb_msg_element *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MessageElement___iter__" "', argument " "1"" of type '" "ldb_message_element *""'");
}
- arg1 = (ldb_msg_element *)(argp1);
- result = (PyObject *)ldb_msg_element___iter__(arg1);
+ arg1 = (ldb_message_element *)(argp1);
+ result = (PyObject *)ldb_message_element___iter__(arg1);
resultobj = result;
return resultobj;
fail:
@@ -3786,9 +3820,9 @@ fail:
}
-SWIGINTERN PyObject *_wrap_ldb_msg_element___set__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_MessageElement___set__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
- ldb_msg_element *arg1 = (ldb_msg_element *) 0 ;
+ ldb_message_element *arg1 = (ldb_message_element *) 0 ;
PyObject *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -3798,10 +3832,10 @@ SWIGINTERN PyObject *_wrap_ldb_msg_element___set__(PyObject *SWIGUNUSEDPARM(self
swig_obj[0] = args;
res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_message_element, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ldb_msg_element___set__" "', argument " "1"" of type '" "ldb_msg_element *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MessageElement___set__" "', argument " "1"" of type '" "ldb_message_element *""'");
}
- arg1 = (ldb_msg_element *)(argp1);
- result = (PyObject *)ldb_msg_element___set__(arg1);
+ arg1 = (ldb_message_element *)(argp1);
+ result = (PyObject *)ldb_message_element___set__(arg1);
resultobj = result;
return resultobj;
fail:
@@ -3814,7 +3848,7 @@ SWIGINTERN PyObject *_wrap_new_MessageElement(PyObject *SWIGUNUSEDPARM(self), Py
PyObject *arg1 = (PyObject *) 0 ;
int arg2 = (int) 0 ;
char *arg3 = (char *) NULL ;
- ldb_msg_element *result = 0 ;
+ ldb_message_element *result = 0 ;
int val2 ;
int ecode2 = 0 ;
int res3 ;
@@ -3843,8 +3877,8 @@ SWIGINTERN PyObject *_wrap_new_MessageElement(PyObject *SWIGUNUSEDPARM(self), Py
}
arg3 = (char *)(buf3);
}
- result = (ldb_msg_element *)new_ldb_msg_element(arg1,arg2,(char const *)arg3);
- resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ldb_message_element, SWIG_POINTER_OWN | 0 );
+ result = (ldb_message_element *)new_ldb_message_element(arg1,arg2,(char const *)arg3);
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ldb_message_element, SWIG_POINTER_NEW | 0 );
if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
return resultobj;
fail:
@@ -3853,9 +3887,9 @@ fail:
}
-SWIGINTERN PyObject *_wrap_ldb_msg_element___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_MessageElement___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
- ldb_msg_element *arg1 = (ldb_msg_element *) 0 ;
+ ldb_message_element *arg1 = (ldb_message_element *) 0 ;
int result;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -3865,10 +3899,10 @@ SWIGINTERN PyObject *_wrap_ldb_msg_element___len__(PyObject *SWIGUNUSEDPARM(self
swig_obj[0] = args;
res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_message_element, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ldb_msg_element___len__" "', argument " "1"" of type '" "ldb_msg_element *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MessageElement___len__" "', argument " "1"" of type '" "ldb_message_element *""'");
}
- arg1 = (ldb_msg_element *)(argp1);
- result = (int)ldb_msg_element___len__(arg1);
+ arg1 = (ldb_message_element *)(argp1);
+ result = (int)ldb_message_element___len__(arg1);
resultobj = SWIG_From_int((int)(result));
return resultobj;
fail:
@@ -3876,9 +3910,9 @@ fail:
}
-SWIGINTERN PyObject *_wrap_ldb_msg_element_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
+SWIGINTERN PyObject *_wrap_MessageElement_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
- ldb_msg_element *arg1 = (ldb_msg_element *) 0 ;
+ ldb_message_element *arg1 = (ldb_message_element *) 0 ;
int arg2 ;
PyObject *result = 0 ;
void *argp1 = 0 ;
@@ -3891,18 +3925,18 @@ SWIGINTERN PyObject *_wrap_ldb_msg_element_get(PyObject *SWIGUNUSEDPARM(self), P
(char *) "self",(char *) "i", NULL
};
- if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ldb_msg_element_get",kwnames,&obj0,&obj1)) SWIG_fail;
+ if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MessageElement_get",kwnames,&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_message_element, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ldb_msg_element_get" "', argument " "1"" of type '" "ldb_msg_element *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MessageElement_get" "', argument " "1"" of type '" "ldb_message_element *""'");
}
- arg1 = (ldb_msg_element *)(argp1);
+ arg1 = (ldb_message_element *)(argp1);
ecode2 = SWIG_AsVal_int(obj1, &val2);
if (!SWIG_IsOK(ecode2)) {
- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ldb_msg_element_get" "', argument " "2"" of type '" "int""'");
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MessageElement_get" "', argument " "2"" of type '" "int""'");
}
arg2 = (int)(val2);
- result = (PyObject *)ldb_msg_element_get(arg1,arg2);
+ result = (PyObject *)ldb_message_element_get(arg1,arg2);
resultobj = result;
return resultobj;
fail:
@@ -3910,9 +3944,9 @@ fail:
}
-SWIGINTERN PyObject *_wrap_delete_ldb_msg_element(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_delete_MessageElement(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
- ldb_msg_element *arg1 = (ldb_msg_element *) 0 ;
+ ldb_message_element *arg1 = (ldb_message_element *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject *swig_obj[1] ;
@@ -3921,10 +3955,10 @@ SWIGINTERN PyObject *_wrap_delete_ldb_msg_element(PyObject *SWIGUNUSEDPARM(self)
swig_obj[0] = args;
res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_message_element, SWIG_POINTER_DISOWN | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ldb_msg_element" "', argument " "1"" of type '" "ldb_msg_element *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MessageElement" "', argument " "1"" of type '" "ldb_message_element *""'");
}
- arg1 = (ldb_msg_element *)(argp1);
- delete_ldb_msg_element(arg1);
+ arg1 = (ldb_message_element *)(argp1);
+ delete_ldb_message_element(arg1);
resultobj = SWIG_Py_Void();
return resultobj;
@@ -3933,47 +3967,17 @@ fail:
}
-SWIGINTERN PyObject *_wrap_ldb_msg_element___cmp__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
- PyObject *resultobj = 0;
- ldb_msg_element *arg1 = (ldb_msg_element *) 0 ;
- ldb_msg_element *arg2 = (ldb_msg_element *) 0 ;
- int result;
- void *argp1 = 0 ;
- int res1 = 0 ;
- void *argp2 = 0 ;
- int res2 = 0 ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- char * kwnames[] = {
- (char *) "self",(char *)"arg2", NULL
- };
-
- if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ldb_msg_element___cmp__",kwnames,&obj0,&obj1)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_message_element, 0 | 0 );
- if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ldb_msg_element___cmp__" "', argument " "1"" of type '" "ldb_msg_element *""'");
- }
- arg1 = (ldb_msg_element *)(argp1);
- res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ldb_message_element, 0 | 0 );
- if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ldb_msg_element___cmp__" "', argument " "2"" of type '" "ldb_msg_element *""'");
- }
- arg2 = (ldb_msg_element *)(argp2);
- result = (int)ldb_msg_element_compare(arg1,arg2);
- resultobj = SWIG_From_int((int)(result));
- return resultobj;
-fail:
- return NULL;
-}
-
-
-SWIGINTERN PyObject *ldb_msg_element_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *MessageElement_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_ldb_message_element, SWIG_NewClientData(obj));
return SWIG_Py_Void();
}
+SWIGINTERN PyObject *MessageElement_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ return SWIG_Python_InitShadowInstance(args);
+}
+
SWIGINTERN PyObject *_wrap_ldb_msg_list_elements(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
ldb_msg *arg1 = (ldb_msg *) 0 ;
@@ -4118,7 +4122,7 @@ SWIGINTERN PyObject *_wrap_Message_find_element(PyObject *SWIGUNUSEDPARM(self),
PyObject *resultobj = 0;
ldb_msg *arg1 = (ldb_msg *) 0 ;
char *arg2 = (char *) 0 ;
- ldb_msg_element *result = 0 ;
+ ldb_message_element *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
@@ -4144,7 +4148,7 @@ SWIGINTERN PyObject *_wrap_Message_find_element(PyObject *SWIGUNUSEDPARM(self),
if (arg1 == NULL)
SWIG_exception(SWIG_ValueError,
"Message can not be None");
- result = (ldb_msg_element *)ldb_msg_find_element(arg1,(char const *)arg2);
+ result = (ldb_message_element *)ldb_msg_find_element(arg1,(char const *)arg2);
{
if (result == NULL)
PyErr_SetString(PyExc_KeyError, "no such element");
@@ -4163,7 +4167,7 @@ SWIGINTERN PyObject *_wrap_Message___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(
PyObject *resultobj = 0;
ldb_msg *arg1 = (ldb_msg *) 0 ;
char *arg2 = (char *) 0 ;
- ldb_msg_element *arg3 = (ldb_msg_element *) 0 ;
+ ldb_message_element *arg3 = (ldb_message_element *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
@@ -4185,9 +4189,9 @@ SWIGINTERN PyObject *_wrap_Message___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(
arg2 = (char *)(buf2);
res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_ldb_message_element, 0 | 0 );
if (!SWIG_IsOK(res3)) {
- SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Message___setitem__" "', argument " "3"" of type '" "ldb_msg_element *""'");
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Message___setitem__" "', argument " "3"" of type '" "ldb_message_element *""'");
}
- arg3 = (ldb_msg_element *)(argp3);
+ arg3 = (ldb_message_element *)(argp3);
if (arg1 == NULL)
SWIG_exception(SWIG_ValueError,
"Message can not be None");
@@ -4262,7 +4266,7 @@ check_1:
fail:
SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Message___setitem__'.\n"
" Possible C/C++ prototypes are:\n"
- " __setitem__(ldb_msg *,char const *,ldb_msg_element *)\n"
+ " __setitem__(ldb_msg *,char const *,ldb_message_element *)\n"
" __setitem__(ldb_msg *,char const *,PyObject *)\n");
return NULL;
}
@@ -4787,7 +4791,7 @@ SWIGINTERN PyObject *_wrap_Ldb_add(PyObject *SWIGUNUSEDPARM(self), PyObject *arg
arg1 = (ldb *)(argp1);
{
Py_ssize_t dict_pos, msg_pos;
- ldb_msg_element *msgel;
+ ldb_message_element *msgel;
PyObject *key, *value;
if (PyDict_Check(obj1)) {
@@ -5725,32 +5729,54 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"ldb_val_to_py_object", (PyCFunction) _wrap_ldb_val_to_py_object, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"new_Dn", (PyCFunction) _wrap_new_Dn, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"delete_Dn", (PyCFunction)_wrap_delete_Dn, METH_O, NULL},
- { (char *)"Dn_validate", (PyCFunction)_wrap_Dn_validate, METH_O, NULL},
+ { (char *)"Dn_validate", (PyCFunction)_wrap_Dn_validate, METH_O, (char *)"\n"
+ "S.validate() -> bool\n"
+ "Validate DN is correct.\n"
+ ""},
{ (char *)"Dn_get_casefold", (PyCFunction)_wrap_Dn_get_casefold, METH_O, NULL},
{ (char *)"Dn___str__", (PyCFunction)_wrap_Dn___str__, METH_O, NULL},
{ (char *)"Dn_parent", (PyCFunction)_wrap_Dn_parent, METH_O, NULL},
{ (char *)"Dn___cmp__", (PyCFunction) _wrap_Dn___cmp__, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Dn_is_valid", (PyCFunction)_wrap_Dn_is_valid, METH_O, NULL},
- { (char *)"Dn_is_special", (PyCFunction)_wrap_Dn_is_special, METH_O, NULL},
- { (char *)"Dn_is_null", (PyCFunction)_wrap_Dn_is_null, METH_O, NULL},
+ { (char *)"Dn_is_special", (PyCFunction)_wrap_Dn_is_special, METH_O, (char *)"\n"
+ "S.is_special() -> bool\n"
+ "Check whether this is a special LDB DN.\n"
+ ""},
+ { (char *)"Dn_is_null", (PyCFunction)_wrap_Dn_is_null, METH_O, (char *)"\n"
+ "S.is_null() -> bool\n"
+ "Check whether this is a null DN.\n"
+ ""},
{ (char *)"Dn_check_special", (PyCFunction) _wrap_Dn_check_special, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Dn___len__", (PyCFunction)_wrap_Dn___len__, METH_O, NULL},
- { (char *)"Dn_add_child", (PyCFunction) _wrap_Dn_add_child, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"Dn_add_base", (PyCFunction) _wrap_Dn_add_base, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"Dn_canonical_str", (PyCFunction)_wrap_Dn_canonical_str, METH_O, NULL},
- { (char *)"Dn_canonical_ex_str", (PyCFunction)_wrap_Dn_canonical_ex_str, METH_O, NULL},
+ { (char *)"Dn_add_child", (PyCFunction) _wrap_Dn_add_child, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
+ "S.add_child(dn) -> None\n"
+ "Add a child DN to this DN.\n"
+ ""},
+ { (char *)"Dn_add_base", (PyCFunction) _wrap_Dn_add_base, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
+ "S.add_base(dn) -> None\n"
+ "Add a base DN to this DN.\n"
+ ""},
+ { (char *)"Dn_canonical_str", (PyCFunction)_wrap_Dn_canonical_str, METH_O, (char *)"\n"
+ "S.canonical_str() -> string\n"
+ "Canonical version of this DN (like a posix path).\n"
+ ""},
+ { (char *)"Dn_canonical_ex_str", (PyCFunction)_wrap_Dn_canonical_ex_str, METH_O, (char *)"\n"
+ "S.canonical_ex_str() -> string\n"
+ "Canonical version of this DN (like a posix path, with terminating newline).\n"
+ ""},
{ (char *)"Dn___repr__", (PyCFunction)_wrap_Dn___repr__, METH_O, NULL},
{ (char *)"Dn___add__", (PyCFunction) _wrap_Dn___add__, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Dn_swigregister", Dn_swigregister, METH_VARARGS, NULL},
{ (char *)"Dn_swiginit", Dn_swiginit, METH_VARARGS, NULL},
- { (char *)"ldb_msg_element___iter__", (PyCFunction)_wrap_ldb_msg_element___iter__, METH_O, NULL},
- { (char *)"ldb_msg_element___set__", (PyCFunction)_wrap_ldb_msg_element___set__, METH_O, NULL},
+ { (char *)"ldb_msg_element_compare", (PyCFunction) _wrap_ldb_msg_element_compare, METH_VARARGS | METH_KEYWORDS, NULL},
+ { (char *)"MessageElement___iter__", (PyCFunction)_wrap_MessageElement___iter__, METH_O, NULL},
+ { (char *)"MessageElement___set__", (PyCFunction)_wrap_MessageElement___set__, METH_O, NULL},
{ (char *)"new_MessageElement", (PyCFunction) _wrap_new_MessageElement, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"ldb_msg_element___len__", (PyCFunction)_wrap_ldb_msg_element___len__, METH_O, NULL},
- { (char *)"ldb_msg_element_get", (PyCFunction) _wrap_ldb_msg_element_get, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"delete_ldb_msg_element", (PyCFunction)_wrap_delete_ldb_msg_element, METH_O, NULL},
- { (char *)"ldb_msg_element___cmp__", (PyCFunction) _wrap_ldb_msg_element___cmp__, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"ldb_msg_element_swigregister", ldb_msg_element_swigregister, METH_VARARGS, NULL},
+ { (char *)"MessageElement___len__", (PyCFunction)_wrap_MessageElement___len__, METH_O, NULL},
+ { (char *)"MessageElement_get", (PyCFunction) _wrap_MessageElement_get, METH_VARARGS | METH_KEYWORDS, NULL},
+ { (char *)"delete_MessageElement", (PyCFunction)_wrap_delete_MessageElement, METH_O, NULL},
+ { (char *)"MessageElement_swigregister", MessageElement_swigregister, METH_VARARGS, NULL},
+ { (char *)"MessageElement_swiginit", MessageElement_swiginit, METH_VARARGS, NULL},
{ (char *)"ldb_msg_list_elements", (PyCFunction) _wrap_ldb_msg_list_elements, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Message_dn_set", _wrap_Message_dn_set, METH_VARARGS, NULL},
{ (char *)"Message_dn_get", (PyCFunction)_wrap_Message_dn_get, METH_O, NULL},
@@ -5766,40 +5792,84 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"Message_swiginit", Message_swiginit, METH_VARARGS, NULL},
{ (char *)"ldb_ldif_to_pyobject", (PyCFunction) _wrap_ldb_ldif_to_pyobject, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"new_Ldb", (PyCFunction)_wrap_new_Ldb, METH_NOARGS, NULL},
- { (char *)"Ldb_connect", (PyCFunction) _wrap_Ldb_connect, METH_VARARGS | METH_KEYWORDS, NULL},
+ { (char *)"Ldb_connect", (PyCFunction) _wrap_Ldb_connect, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
+ "S.connect(url,flags=0,options=None) -> None\n"
+ "Connect to a LDB URL.\n"
+ ""},
{ (char *)"delete_Ldb", (PyCFunction)_wrap_delete_Ldb, METH_O, NULL},
{ (char *)"Ldb_search_ex", (PyCFunction) _wrap_Ldb_search_ex, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"Ldb_delete", (PyCFunction) _wrap_Ldb_delete, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"Ldb_rename", (PyCFunction) _wrap_Ldb_rename, METH_VARARGS | METH_KEYWORDS, NULL},
+ { (char *)"Ldb_delete", (PyCFunction) _wrap_Ldb_delete, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
+ "S.delete(dn) -> None\n"
+ "Remove an entry.\n"
+ ""},
+ { (char *)"Ldb_rename", (PyCFunction) _wrap_Ldb_rename, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
+ "S.rename(old_dn, new_dn) -> None\n"
+ "Rename an entry.\n"
+ ""},
{ (char *)"Ldb_parse_control_strings", (PyCFunction) _wrap_Ldb_parse_control_strings, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"Ldb_add", (PyCFunction) _wrap_Ldb_add, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"Ldb_modify", (PyCFunction) _wrap_Ldb_modify, METH_VARARGS | METH_KEYWORDS, NULL},
+ { (char *)"Ldb_add", (PyCFunction) _wrap_Ldb_add, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
+ "S.add(message) -> None\n"
+ "Add an entry.\n"
+ ""},
+ { (char *)"Ldb_modify", (PyCFunction) _wrap_Ldb_modify, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
+ "S.modify(message) -> None\n"
+ "Modify an entry.\n"
+ ""},
{ (char *)"Ldb_get_config_basedn", (PyCFunction)_wrap_Ldb_get_config_basedn, METH_O, NULL},
{ (char *)"Ldb_get_root_basedn", (PyCFunction)_wrap_Ldb_get_root_basedn, METH_O, NULL},
{ (char *)"Ldb_get_schema_basedn", (PyCFunction)_wrap_Ldb_get_schema_basedn, METH_O, NULL},
{ (char *)"Ldb_get_default_basedn", (PyCFunction)_wrap_Ldb_get_default_basedn, METH_O, NULL},
{ (char *)"Ldb_schema_format_value", (PyCFunction) _wrap_Ldb_schema_format_value, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Ldb_errstring", (PyCFunction)_wrap_Ldb_errstring, METH_O, NULL},
- { (char *)"Ldb_set_create_perms", (PyCFunction) _wrap_Ldb_set_create_perms, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"Ldb_set_modules_dir", (PyCFunction) _wrap_Ldb_set_modules_dir, METH_VARARGS | METH_KEYWORDS, NULL},
+ { (char *)"Ldb_set_create_perms", (PyCFunction) _wrap_Ldb_set_create_perms, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
+ "S.set_create_perms(mode) -> None\n"
+ "Set mode to use when creating new LDB files.\n"
+ ""},
+ { (char *)"Ldb_set_modules_dir", (PyCFunction) _wrap_Ldb_set_modules_dir, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
+ "S.set_modules_dir(path) -> None\n"
+ "Set path LDB should search for modules\n"
+ ""},
{ (char *)"Ldb_set_debug", (PyCFunction) _wrap_Ldb_set_debug, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"Ldb_set_opaque", (PyCFunction) _wrap_Ldb_set_opaque, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"Ldb_get_opaque", (PyCFunction) _wrap_Ldb_get_opaque, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"Ldb_transaction_start", (PyCFunction)_wrap_Ldb_transaction_start, METH_O, NULL},
- { (char *)"Ldb_transaction_commit", (PyCFunction)_wrap_Ldb_transaction_commit, METH_O, NULL},
+ { (char *)"Ldb_set_opaque", (PyCFunction) _wrap_Ldb_set_opaque, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
+ "S.set_opaque(name, value) -> None\n"
+ "Set an opaque value on this LDB connection. \n"
+ ":note: Passing incorrect values may cause crashes.\n"
+ ""},
+ { (char *)"Ldb_get_opaque", (PyCFunction) _wrap_Ldb_get_opaque, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
+ "S.get_opaque(name) -> value\n"
+ "Get an opaque value set on this LDB connection. \n"
+ ":note: The returned value may not be useful in Python.\n"
+ ""},
+ { (char *)"Ldb_transaction_start", (PyCFunction)_wrap_Ldb_transaction_start, METH_O, (char *)"\n"
+ "S.transaction_start() -> None\n"
+ "Start a new transaction.\n"
+ ""},
+ { (char *)"Ldb_transaction_commit", (PyCFunction)_wrap_Ldb_transaction_commit, METH_O, (char *)"\n"
+ "S.transaction_commit() -> None\n"
+ "Commit currently active transaction.\n"
+ ""},
{ (char *)"Ldb_transaction_cancel", (PyCFunction)_wrap_Ldb_transaction_cancel, METH_O, NULL},
{ (char *)"Ldb_schema_attribute_remove", (PyCFunction) _wrap_Ldb_schema_attribute_remove, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Ldb_schema_attribute_add", (PyCFunction) _wrap_Ldb_schema_attribute_add, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Ldb_setup_wellknown_attributes", (PyCFunction)_wrap_Ldb_setup_wellknown_attributes, METH_O, NULL},
{ (char *)"Ldb___contains__", (PyCFunction) _wrap_Ldb___contains__, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"Ldb_parse_ldif", (PyCFunction) _wrap_Ldb_parse_ldif, METH_VARARGS | METH_KEYWORDS, NULL},
+ { (char *)"Ldb_parse_ldif", (PyCFunction) _wrap_Ldb_parse_ldif, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
+ "S.parse_ldif(ldif) -> iter(messages)\n"
+ "Parse a string formatted using LDIF.\n"
+ ""},
{ (char *)"Ldb___repr__", (PyCFunction)_wrap_Ldb___repr__, METH_O, NULL},
{ (char *)"Ldb_swigregister", Ldb_swigregister, METH_VARARGS, NULL},
{ (char *)"Ldb_swiginit", Ldb_swiginit, METH_VARARGS, NULL},
- { (char *)"valid_attr_name", (PyCFunction) _wrap_valid_attr_name, METH_VARARGS | METH_KEYWORDS, NULL},
+ { (char *)"valid_attr_name", (PyCFunction) _wrap_valid_attr_name, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
+ "S.valid_attr_name(name) -> bool\n"
+ "Check whether the supplied name is a valid attribute name.\n"
+ ""},
{ (char *)"timestring", (PyCFunction) _wrap_timestring, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"string_to_time", (PyCFunction) _wrap_string_to_time, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"register_module", (PyCFunction) _wrap_register_module, METH_VARARGS | METH_KEYWORDS, NULL},
+ { (char *)"register_module", (PyCFunction) _wrap_register_module, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
+ "S.register_module(module) -> None\n"
+ "Register a LDB module.\n"
+ ""},
{ NULL, NULL, 0, NULL }
};
@@ -5814,7 +5884,7 @@ static swig_type_info _swigt__p_ldb_context = {"_p_ldb_context", "struct ldb_con
static swig_type_info _swigt__p_ldb_dn = {"_p_ldb_dn", "struct ldb_dn *|ldb_dn *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_ldb_ldif = {"_p_ldb_ldif", "struct ldb_ldif *|ldb_ldif *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_ldb_message = {"_p_ldb_message", "ldb_msg *|struct ldb_message *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_ldb_message_element = {"_p_ldb_message_element", "struct ldb_message_element *|ldb_msg_element *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_ldb_message_element = {"_p_ldb_message_element", "struct ldb_message_element *|ldb_message_element *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_ldb_module_ops = {"_p_ldb_module_ops", "struct ldb_module_ops *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_ldb_result = {"_p_ldb_result", "struct ldb_result *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_ldb_val = {"_p_ldb_val", "struct ldb_val *", 0, 0, (void*)0, 0};