Samba4/LDB/API: Difference between revisions
From SambaWiki
(→DN) |
|||
Line 60: | Line 60: | ||
* mem_ctx: TALLOC context to return resulting ldb_dn structure on |
* mem_ctx: TALLOC context to return resulting ldb_dn structure on |
||
* dn: The new DN |
* dn: The new DN |
||
The DN will not be parsed at this time. Use ldb_dn_validate to tell if the DN is syntacticly correct |
|||
== ldb_dn_new_fmt() == |
|||
struct ldb_dn *ldb_dn_new_fmt(TALLOC_CTX *mem_ctx, struct ldb_context *ldb, const char *new_fmt, ...) PRINTF_ATTRIBUTE(3,4); |
|||
Allocate a new DN from a printf style format string and arguments |
|||
Parameters: |
|||
* mem_ctx: TALLOC context to return resulting ldb_dn structure on |
|||
* new_fms: The new DN as a format string (plus arguments) |
|||
The DN will not be parsed at this time. Use ldb_dn_validate to tell if the DN is syntacticly correct |
The DN will not be parsed at this time. Use ldb_dn_validate to tell if the DN is syntacticly correct |
Revision as of 23:12, 23 September 2009
DN
ldb_dn_get_linearized()
const char *ldb_dn_get_linearized(struct ldb_dn *dn);
Get the linear form of a DN (without any extended components)
Parameters:
- dn: The DN to linearize
ldb_dn_alloc_linearized()
char *ldb_dn_alloc_linearized(TALLOC_CTX *mem_ctx, struct ldb_dn *dn);
Allocate a copy of the linear form of a DN (without any extended components) onto the supplied memory context
Parameters:
- dn: The DN to linearize
- mem_ctx: TALLOC context to return result on
ldb_dn_get_extended_linearized()
char *ldb_dn_get_extended_linearized(void *mem_ctx, struct ldb_dn *dn, int mode);
Get the linear form of a DN (with any extended components)
Parameters:
- mem_ctx: TALLOC context to return result on
- dn: The DN to linearize
- mode: Style of extended DN to return (0 is HEX representation of binary form, 1 is a string form)
ldb_dn_get_extended_component()
const struct ldb_val *ldb_dn_get_extended_component(struct ldb_dn *dn, const char *name);
ldb_dn_set_extended_component()
int ldb_dn_set_extended_component(struct ldb_dn *dn, const char *name, const struct ldb_val *val);
ldb_dn_remove_extended_components()
void ldb_dn_remove_extended_components(struct ldb_dn *dn);
ldb_dn_has_extended()
bool ldb_dn_has_extended(struct ldb_dn *dn);
ldb_dn_extended_add_syntax()
int ldb_dn_extended_add_syntax(struct ldb_context *ldb, unsigned flags, const struct ldb_dn_extended_syntax *syntax);
ldb_dn_new()
struct ldb_dn *ldb_dn_new(TALLOC_CTX *mem_ctx, struct ldb_context *ldb, const char *dn);
Allocate a new DN from a string
Parameters:
- mem_ctx: TALLOC context to return resulting ldb_dn structure on
- dn: The new DN
The DN will not be parsed at this time. Use ldb_dn_validate to tell if the DN is syntacticly correct
ldb_dn_new_fmt()
struct ldb_dn *ldb_dn_new_fmt(TALLOC_CTX *mem_ctx, struct ldb_context *ldb, const char *new_fmt, ...) PRINTF_ATTRIBUTE(3,4);
Allocate a new DN from a printf style format string and arguments
Parameters:
- mem_ctx: TALLOC context to return resulting ldb_dn structure on
- new_fms: The new DN as a format string (plus arguments)
The DN will not be parsed at this time. Use ldb_dn_validate to tell if the DN is syntacticly correct