r26194: Wrap the events subsystem in a separate file.
[samba.git] / source4 / libcli / swig / libcli_nbt.i
index ec7632ccf4c491ea6a157762b7ebedd746fc48fc..6fd85c2b8cd374d3786198712b55dfaa248fbc69 100644 (file)
@@ -29,7 +29,6 @@
 
 #include "includes.h"
 #include "lib/talloc/talloc.h"
-#include "lib/events/events.h"
 #include "libcli/nbt/libnbt.h"
 #include "param/param.h"
 
 
 %}
 
-%apply bool { bool };
-%apply int { uint8_t };
-%apply int { int8_t };
-%apply unsigned int { uint16_t };
-%apply int { int16_t };
-
-%typemap(in) uint32_t {
-       if (PyLong_Check($input))
-               $1 = PyLong_AsUnsignedLong($input);
-       else if (PyInt_Check($input))
-               $1 = PyInt_AsLong($input);
-       else {
-               PyErr_SetString(PyExc_TypeError,"Expected a long or an int");
-               return NULL;
-       }
-}
-
-%typemap(out) uint32_t {
-       $result = PyLong_FromUnsignedLong($1);
-}
-
-%apply unsigned long long { uint64_t };
-%apply long long { int64_t };
-
-%typemap(in) NTSTATUS {
-        if (PyLong_Check($input))
-                $1 = NT_STATUS(PyLong_AsUnsignedLong($input));
-        else if (PyInt_Check($input))
-                $1 = NT_STATUS(PyInt_AsLong($input));
-        else {
-                PyErr_SetString(PyExc_TypeError, "Expected a long or an int");
-                return NULL;
-        }
-}
-
-%typemap(out) NTSTATUS {
-        $result = PyLong_FromUnsignedLong(NT_STATUS_V($1));
-}
-
-TALLOC_CTX *talloc_init(char *name);
-int talloc_free(TALLOC_CTX *ptr);
+%import "stdint.i"
+%import "../util/errors.i"
+%import "../../lib/talloc/talloc.i"
+%import "../../lib/events/events.i"
 
 /* Function prototypes */
-
-struct event_context *event_context_init(TALLOC_CTX *mem_ctx);
-
 struct nbt_name_socket *nbt_name_socket_init(TALLOC_CTX *mem_ctx, 
                                             struct event_context *event_ctx);
 
@@ -138,7 +97,3 @@ NTSTATUS do_nbt_name_query(struct nbt_name_socket *nbtsock,
        return nbt_name_query(nbtsock, mem_ctx, io);
 }
 %}
-
-%init %{
-      lp_load();
-%}