void *value;
};
-struct event_context;
+struct tevent_context;
struct share_ops {
const char *name;
- NTSTATUS (*init)(TALLOC_CTX *, const struct share_ops*, struct event_context *ev_ctx,
+ NTSTATUS (*init)(TALLOC_CTX *, const struct share_ops*,
struct loadparm_context *lp_ctx,
struct share_context **);
- const char *(*string_option)(struct share_config *, const char *, const char *);
+ char *(*string_option)(TALLOC_CTX *, struct share_config *, const char *, const char *);
int (*int_option)(struct share_config *, const char *, int);
bool (*bool_option)(struct share_config *, const char *, bool);
const char **(*string_list_option)(TALLOC_CTX *, struct share_config *, const char *);
struct loadparm_context;
-#include "param/share_proto.h"
+char *share_string_option(TALLOC_CTX *mem_ctx, struct share_config *scfg, const char *opt_name, const char *defval);
+int share_int_option(struct share_config *scfg, const char *opt_name, int defval);
+bool share_bool_option(struct share_config *scfg, const char *opt_name, bool defval);
+const char **share_string_list_option(TALLOC_CTX *mem_ctx, struct share_config *scfg, const char *opt_name);
+NTSTATUS share_list_all(TALLOC_CTX *mem_ctx, struct share_context *sctx, int *count, const char ***names);
+NTSTATUS share_get_config(TALLOC_CTX *mem_ctx, struct share_context *sctx, const char *name, struct share_config **scfg);
+NTSTATUS share_create(struct share_context *sctx, const char *name, struct share_info *info, int count);
+NTSTATUS share_set(struct share_context *sctx, const char *name, struct share_info *info, int count);
+NTSTATUS share_remove(struct share_context *sctx, const char *name);
+NTSTATUS share_register(const struct share_ops *ops);
+NTSTATUS share_get_context(TALLOC_CTX *mem_ctx,
+ struct loadparm_context *lp_ctx,
+ struct share_context **ctx);
+NTSTATUS share_init(void);
/* list of shares options */
#define SHARE_HOSTS_DENY "hosts-deny"
#define SHARE_NTVFS_HANDLER "ntvfs-handler"
#define SHARE_TYPE "type"
-#define SHARE_VOLUME "volume"
#define SHARE_CSC_POLICY "csc-policy"
#define SHARE_AVAILABLE "available"
#define SHARE_BROWSEABLE "browseable"