svn commit: samba r20596 - in branches/SAMBA_4_0/source/lib/ldb/include: .

metze at samba.org metze at samba.org
Sun Jan 7 15:26:36 GMT 2007


Author: metze
Date: 2007-01-07 15:26:35 +0000 (Sun, 07 Jan 2007)
New Revision: 20596

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20596

Log:
add prototypes for the ldb_extended functions

metze
Modified:
   branches/SAMBA_4_0/source/lib/ldb/include/ldb.h


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/include/ldb.h
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/include/ldb.h	2007-01-07 10:29:12 UTC (rev 20595)
+++ branches/SAMBA_4_0/source/lib/ldb/include/ldb.h	2007-01-07 15:26:35 UTC (rev 20596)
@@ -852,10 +852,10 @@
 struct ldb_dn *ldb_get_default_basedn(struct ldb_context *ldb);
 
 /**
-  The Default iasync search callback function 
+  The default async search callback function 
 
   \param ldb the context associated with the database (from ldb_init())
-  \param context the callback context
+  \param context the callback context (struct ldb_result *)
   \param ares a single reply from the async core
 
   \return result code (LDB_SUCCESS on success, or a failure code)
@@ -1093,6 +1093,66 @@
 int ldb_delete(struct ldb_context *ldb, struct ldb_dn *dn);
 
 /**
+  The default async extended operation callback function 
+
+  \param ldb the context associated with the database (from ldb_init())
+  \param context the callback context (struct ldb_result *)
+  \param ares a single reply from the async core
+
+  \return result code (LDB_SUCCESS on success, or a failure code)
+
+  \note this function expects the context to always be an struct ldb_result pointer
+  AND a talloc context, this function will steal on the context each message
+  from the ares reply passed on by the async core so that in the end all the
+  messages will be in the context (ldb_result)  memory tree.
+  Freeing the passed context (ldb_result tree) will free all the resources
+  (the request need to be freed separately and the result doe not depend on the
+  request that can be freed as sson as the search request is finished)
+*/
+int ldb_extended_default_callback(struct ldb_context *ldb, void *context, struct ldb_reply *ares);
+
+/**
+  Helper function to build a extended request
+
+  \param ret_req the request structure is returned here (talloced on mem_ctx)
+  \param ldb the context associated with the database (from ldb_init())
+  \param mem_ctx a talloc emmory context (used as parent of ret_req)
+  \param oid the OID of the extended operation.
+  \param data void pointer a the extended operation specific parameters
+  \param controls an array of controls
+  \param context the callback function context
+  \param the callback function to handle the async replies
+
+  \return result code (LDB_SUCCESS on success, or a failure code)
+*/
+int ldb_build_extended_req(struct ldb_request **ret_req,
+			   struct ldb_context *ldb,
+			   void *mem_ctx,
+			   const char *oid,
+			   void *data,
+			   struct ldb_control **controls,
+			   void *context,
+			   ldb_request_callback_t callback);
+
+/**
+  call an extended operation
+
+  This function deletes a record from the database.
+
+  \param ldb the context associated with the database (from ldb_init())
+  \param oid the OID of the extended operation.
+  \param data void pointer a the extended operation specific parameters
+  \param res the result of the extended operation
+
+  \return result code (LDB_SUCCESS if the extended operation returned fine,
+  otherwise a failure code)
+*/
+int ldb_extended(struct ldb_context *ldb, 
+		 const char *oid,
+		 void *data,
+		 struct ldb_result **res);
+
+/**
   start a transaction
 */
 int ldb_transaction_start(struct ldb_context *ldb);



More information about the samba-cvs mailing list