summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/include
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2011-02-20 15:23:27 +0300
committerMatthieu Patou <mat@matws.net>2011-02-21 10:55:59 +0300
commitb1595f40c506bb180758b5ee60122de5e29e0ccd (patch)
treef2db757c55607ce75e7c46bd8657e850a232470d /source4/lib/ldb/include
parent82fa772fa2dd6209d822ce0769364809233b9db7 (diff)
downloadsamba-b1595f40c506bb180758b5ee60122de5e29e0ccd.tar.gz
samba-b1595f40c506bb180758b5ee60122de5e29e0ccd.tar.bz2
samba-b1595f40c506bb180758b5ee60122de5e29e0ccd.zip
ldb: controls marshalling/unmarshalling improvement
Add a function to marshall a control to a string Refactor the code of ldb_control_parse_strings to allow to extract the core code into ldb_control_parse_from_string so that this function can be called for just 1 string
Diffstat (limited to 'source4/lib/ldb/include')
-rw-r--r--source4/lib/ldb/include/ldb.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h
index b52921f4fa..81f1a73168 100644
--- a/source4/lib/ldb/include/ldb.h
+++ b/source4/lib/ldb/include/ldb.h
@@ -2163,6 +2163,25 @@ do { \
/**
+ Convert a control into its string representation.
+
+ \param mem_ctx TALLOC context to return result on, and to allocate error_string on
+ \param control A struct ldb_control to convert
+
+ \return string representation of the control
+*/
+char* ldb_control_to_string(TALLOC_CTX *mem_ctx, const struct ldb_control *control);
+/**
+ Convert a string representing a control into a ldb_control structure
+
+ \param ldb LDB context
+ \param mem_ctx TALLOC context to return result on, and to allocate error_string on
+ \param control_strings A string-formatted control
+
+ \return a ldb_control element
+*/
+struct ldb_control *ldb_parse_control_from_string(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, const char *control_strings);
+/**
Convert an array of string represention of a control into an array of ldb_control structures
\param ldb LDB context