Logo Search packages:      
Sourcecode: ldb version File versions  Download package

struct ldb_ldif* ldb_ldif_read_string ( struct ldb_context *  ldb,
const char **  s 
) [read]

Read an LDIF message from a string

This function reads the next LDIF message from the contents of a char array. If you want to get all of the LDIF messages, you will need to repeatedly call this function, until it returns NULL.

ldb the ldb context (from ldb_init())
s pointer to the char array to read from
See also:
ldb_ldif_read_file for an equivalent function that will read from a file stream.

ldb_ldif_write for a more general (arbitrary read function) version of this function.

Definition at line 720 of file ldb_ldif.c.

      struct ldif_read_string_state state;
      struct ldb_ldif *ldif;
      state.s = *s;
      ldif = ldb_ldif_read(ldb, fgetc_string, &state);
      *s = state.s;
      return ldif;

Generated by  Doxygen 1.6.0   Back to index