void *data;
};
-#include "ldb_parse.h"
-
-
/* these flags are used in ldd_message_element.flags fields. The
LDA_FLAGS_MOD_* flags are used in ldap_modify() calls to specify
whether attributes are being added, deleted or modified */
for pool allocators
*/
struct ldb_alloc_ops {
- void *(*alloc)(void *context, void *ptr, size_t size);
+ void *(*alloc)(const void *context, void *ptr, size_t size);
void *context;
};
/*
ldif manipulation functions
*/
-int ldif_write(struct ldb_context *ldb,
- int (*fprintf_fn)(void *, const char *, ...),
- void *private_data,
- const struct ldb_ldif *ldif);
-void ldif_read_free(struct ldb_context *ldb, struct ldb_ldif *);
-struct ldb_ldif *ldif_read(struct ldb_context *ldb,
- int (*fgetc_fn)(void *), void *private_data);
-struct ldb_ldif *ldif_read_file(struct ldb_context *ldb, FILE *f);
-struct ldb_ldif *ldif_read_string(struct ldb_context *ldb, const char *s);
-int ldif_write_file(struct ldb_context *ldb, FILE *f, const struct ldb_ldif *msg);
+int ldb_ldif_write(struct ldb_context *ldb,
+ int (*fprintf_fn)(void *, const char *, ...),
+ void *private_data,
+ const struct ldb_ldif *ldif);
+void ldb_ldif_read_free(struct ldb_context *ldb, struct ldb_ldif *);
+struct ldb_ldif *ldb_ldif_read(struct ldb_context *ldb,
+ int (*fgetc_fn)(void *), void *private_data);
+struct ldb_ldif *ldb_ldif_read_file(struct ldb_context *ldb, FILE *f);
+struct ldb_ldif *ldb_ldif_read_string(struct ldb_context *ldb, const char *s);
+int ldb_ldif_write_file(struct ldb_context *ldb, FILE *f, const struct ldb_ldif *msg);
/* useful functions for ldb_message structure manipulation */
int default_value);
unsigned int ldb_msg_find_uint(const struct ldb_message *msg,
const char *attr_name,
- int default_value);
+ unsigned int default_value);
double ldb_msg_find_double(const struct ldb_message *msg,
const char *attr_name,
double default_value);
which often take a context argument
*/
int ldb_set_alloc(struct ldb_context *ldb,
- void *(*alloc)(void *context, void *ptr, size_t size),
+ void *(*alloc)(const void *context, void *ptr, size_t size),
void *context);
/*