diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-04-03 12:29:21 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2004-04-03 12:29:21 +0000 |
commit | ee44733f94864fb0a1ae15d48e3335c0705a82ae (patch) | |
tree | 8f9691975aab7a6ce3736e64283e66a69db3c194 /source4/lib/ldb/include | |
parent | f1c3fa060efcecde404d0bfb55c359ef7fe36ed8 (diff) | |
download | samba-ee44733f94864fb0a1ae15d48e3335c0705a82ae.tar.gz samba-ee44733f94864fb0a1ae15d48e3335c0705a82ae.tar.bz2 samba-ee44733f94864fb0a1ae15d48e3335c0705a82ae.zip |
added the rest of the ldb_modify() code, which required a fairly large
change in the ldb API. The API is now much closer to LDAP.
(This used to be commit e9e85c464411c561c5073d262a2e3533fec175ca)
Diffstat (limited to 'source4/lib/ldb/include')
-rw-r--r-- | source4/lib/ldb/include/ldb.h | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h index 35474d23c5..12064bbf75 100644 --- a/source4/lib/ldb/include/ldb.h +++ b/source4/lib/ldb/include/ldb.h @@ -73,7 +73,8 @@ struct ldb_val { struct ldb_message_element { unsigned int flags; char *name; - struct ldb_val value; + unsigned int num_values; + struct ldb_val *values; }; @@ -88,6 +89,20 @@ struct ldb_message { void *private; /* private to the backend */ }; +enum ldb_changetype { + LDB_CHANGETYPE_NONE=0, + LDB_CHANGETYPE_ADD, + LDB_CHANGETYPE_DELETE, + LDB_CHANGETYPE_MODIFY +}; + +/* + a ldif record - from ldif_read +*/ +struct ldb_ldif { + enum ldb_changetype changetype; + struct ldb_message msg; +}; enum ldb_scope {LDB_SCOPE_DEFAULT=-1, LDB_SCOPE_BASE=0, @@ -196,9 +211,9 @@ const char *ldb_errstring(struct ldb_context *ldb); */ int ldif_write(int (*fprintf_fn)(void *, const char *, ...), void *private, - const struct ldb_message *msg); -void ldif_read_free(struct ldb_message *msg); -struct ldb_message *ldif_read(int (*fgetc_fn)(void *), void *private); -struct ldb_message *ldif_read_file(FILE *f); -struct ldb_message *ldif_read_string(const char *s); -int ldif_write_file(FILE *f, const struct ldb_message *msg); + const struct ldb_ldif *ldif); +void ldif_read_free(struct ldb_ldif *); +struct ldb_ldif *ldif_read(int (*fgetc_fn)(void *), void *private); +struct ldb_ldif *ldif_read_file(FILE *f); +struct ldb_ldif *ldif_read_string(const char *s); +int ldif_write_file(FILE *f, const struct ldb_ldif *msg); |