summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/events/events.i5
-rw-r--r--source4/lib/events/events.py19
-rw-r--r--source4/lib/events/events_wrap.c10
3 files changed, 27 insertions, 7 deletions
diff --git a/source4/lib/events/events.i b/source4/lib/events/events.i
index c16d482efc..7de8aec79d 100644
--- a/source4/lib/events/events.i
+++ b/source4/lib/events/events.i
@@ -27,8 +27,11 @@ typedef struct event_context event;
typedef struct event_context {
%extend {
+ %feature("docstring") event "S.__init__()";
event(TALLOC_CTX *mem_ctx) { return event_context_init(mem_ctx); }
+ %feature("docstring") loop_once "S.loop_once() -> int";
int loop_once(void);
+ %feature("docstring") loop_wait "S.loop_wait() -> int";
int loop_wait(void);
}
} event;
@@ -44,6 +47,8 @@ typedef struct event_context {
struct event_context *event_context_init_byname(TALLOC_CTX *mem_ctx, const char *name);
+%feature("docstring") event_backend_list "event_backend_list() -> list";
const char **event_backend_list(TALLOC_CTX *mem_ctx);
+%feature("docstring") event_set_default_backend "event_set_default_backend(name) -> None";
%rename(set_default_backend) event_set_default_backend;
void event_set_default_backend(const char *backend);
diff --git a/source4/lib/events/events.py b/source4/lib/events/events.py
index 237726897d..264e0b7cdf 100644
--- a/source4/lib/events/events.py
+++ b/source4/lib/events/events.py
@@ -61,7 +61,16 @@ class event(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):
+ """S.__init__()"""
_events.event_swiginit(self,_events.new_event(*args, **kwargs))
+ def loop_once(*args, **kwargs):
+ """S.loop_once() -> int"""
+ return _events.event_loop_once(*args, **kwargs)
+
+ def loop_wait(*args, **kwargs):
+ """S.loop_wait() -> int"""
+ return _events.event_loop_wait(*args, **kwargs)
+
__swig_destroy__ = _events.delete_event
event.loop_once = new_instancemethod(_events.event_loop_once,None,event)
event.loop_wait = new_instancemethod(_events.event_loop_wait,None,event)
@@ -69,7 +78,13 @@ event_swigregister = _events.event_swigregister
event_swigregister(event)
event_context_init_byname = _events.event_context_init_byname
-event_backend_list = _events.event_backend_list
-set_default_backend = _events.set_default_backend
+
+def event_backend_list(*args):
+ """event_backend_list() -> list"""
+ return _events.event_backend_list(*args)
+
+def set_default_backend(*args, **kwargs):
+ """event_set_default_backend(name) -> None"""
+ return _events.set_default_backend(*args, **kwargs)
diff --git a/source4/lib/events/events_wrap.c b/source4/lib/events/events_wrap.c
index 727485dfdb..ccaeab7ad6 100644
--- a/source4/lib/events/events_wrap.c
+++ b/source4/lib/events/events_wrap.c
@@ -2773,15 +2773,15 @@ fail:
static PyMethodDef SwigMethods[] = {
- { (char *)"new_event", (PyCFunction)_wrap_new_event, METH_NOARGS, NULL},
- { (char *)"event_loop_once", (PyCFunction)_wrap_event_loop_once, METH_O, NULL},
- { (char *)"event_loop_wait", (PyCFunction)_wrap_event_loop_wait, METH_O, NULL},
+ { (char *)"new_event", (PyCFunction)_wrap_new_event, METH_NOARGS, (char *)"S.__init__()"},
+ { (char *)"event_loop_once", (PyCFunction)_wrap_event_loop_once, METH_O, (char *)"S.loop_once() -> int"},
+ { (char *)"event_loop_wait", (PyCFunction)_wrap_event_loop_wait, METH_O, (char *)"S.loop_wait() -> int"},
{ (char *)"delete_event", (PyCFunction)_wrap_delete_event, METH_O, NULL},
{ (char *)"event_swigregister", event_swigregister, METH_VARARGS, NULL},
{ (char *)"event_swiginit", event_swiginit, METH_VARARGS, NULL},
{ (char *)"event_context_init_byname", (PyCFunction) _wrap_event_context_init_byname, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"event_backend_list", (PyCFunction)_wrap_event_backend_list, METH_NOARGS, NULL},
- { (char *)"set_default_backend", (PyCFunction) _wrap_set_default_backend, METH_VARARGS | METH_KEYWORDS, NULL},
+ { (char *)"event_backend_list", (PyCFunction)_wrap_event_backend_list, METH_NOARGS, (char *)"event_backend_list() -> list"},
+ { (char *)"set_default_backend", (PyCFunction) _wrap_set_default_backend, METH_VARARGS | METH_KEYWORDS, (char *)"event_set_default_backend(name) -> None"},
{ NULL, NULL, 0, NULL }
};