Changeset 745 for trunk/server/source4/lib/ldb/pyldb.h
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/source4/lib/ldb/pyldb.h
r414 r745 2 2 Unix SMB/CIFS implementation. 3 3 4 Swiginterface to ldb.4 Python interface to ldb. 5 5 6 6 Copyright (C) 2007-2008 Jelmer Vernooij <jelmer@samba.org> … … 27 27 #define _PYLDB_H_ 28 28 29 #include <Python.h>30 29 #include <talloc.h> 31 30 32 31 typedef struct { 33 32 PyObject_HEAD 33 TALLOC_CTX *mem_ctx; 34 34 struct ldb_context *ldb_ctx; 35 TALLOC_CTX *mem_ctx;36 35 } PyLdbObject; 37 36 38 PyObject *PyLdb_FromLdbContext(struct ldb_context *ldb_ctx);39 37 #define PyLdb_AsLdbContext(pyobj) ((PyLdbObject *)pyobj)->ldb_ctx 40 38 #define PyLdb_Check(ob) PyObject_TypeCheck(ob, &PyLdb) … … 42 40 typedef struct { 43 41 PyObject_HEAD 42 TALLOC_CTX *mem_ctx; 44 43 struct ldb_dn *dn; 45 TALLOC_CTX *mem_ctx;46 44 } PyLdbDnObject; 47 45 … … 53 51 typedef struct { 54 52 PyObject_HEAD 53 TALLOC_CTX *mem_ctx; 55 54 struct ldb_message *msg; 56 TALLOC_CTX *mem_ctx;57 55 } PyLdbMessageObject; 58 56 #define PyLdbMessage_Check(ob) PyObject_TypeCheck(ob, &PyLdbMessage) … … 61 59 typedef struct { 62 60 PyObject_HEAD 61 TALLOC_CTX *mem_ctx; 63 62 struct ldb_module *mod; 64 TALLOC_CTX *mem_ctx;65 63 } PyLdbModuleObject; 66 PyObject *PyLdbMessage_FromMessage(struct ldb_message *message);67 PyObject *PyLdbModule_FromModule(struct ldb_module *mod);68 64 #define PyLdbModule_AsModule(pyobj) ((PyLdbModuleObject *)pyobj)->mod 69 65 70 66 typedef struct { 71 PyObject_HEAD 67 PyObject_HEAD 68 TALLOC_CTX *mem_ctx; 72 69 struct ldb_message_element *el; 73 TALLOC_CTX *mem_ctx;74 70 } PyLdbMessageElementObject; 75 struct ldb_message_element *PyObject_AsMessageElement(TALLOC_CTX *mem_ctx, PyObject *obj, int flags, const char *name);76 PyObject *PyLdbMessageElement_FromMessageElement(struct ldb_message_element *, TALLOC_CTX *mem_ctx);77 71 #define PyLdbMessageElement_AsMessageElement(pyobj) ((PyLdbMessageElementObject *)pyobj)->el 78 72 #define PyLdbMessageElement_Check(ob) PyObject_TypeCheck(ob, &PyLdbMessageElement) … … 80 74 typedef struct { 81 75 PyObject_HEAD 76 TALLOC_CTX *mem_ctx; 82 77 struct ldb_parse_tree *tree; 78 } PyLdbTreeObject; 79 #define PyLdbTree_AsTree(pyobj) ((PyLdbTreeObject *)pyobj)->tree 80 81 typedef struct { 82 PyObject_HEAD 83 83 TALLOC_CTX *mem_ctx; 84 } PyLdbTreeObject; 85 PyObject *PyLdbTree_FromTree(struct ldb_parse_tree *); 86 #define PyLdbTree_AsTree(pyobj) ((PyLdbTreeObject *)pyobj)->tree 84 PyObject *msgs; 85 PyObject *referals; 86 PyObject *controls; 87 } PyLdbResultObject; 88 89 typedef struct { 90 PyObject_HEAD 91 TALLOC_CTX *mem_ctx; 92 struct ldb_control *data; 93 } PyLdbControlObject; 87 94 88 95 #define PyErr_LDB_ERROR_IS_ERR_RAISE(err,ret,ldb) \
Note:
See TracChangeset
for help on using the changeset viewer.