#include "lib/socket/socket.h"
#include "smbd/service.h"
+#include "smbd/process_model_proto.h"
/* modules can use the following to determine if the interface has changed
* please increment the version number after each interface change
const char *name;
/* called at startup when the model is selected */
- void (*model_init)(struct event_context *);
+ void (*model_init)(void);
/* function to accept new connection */
- void (*accept_connection)(struct event_context *,
+ void (*accept_connection)(struct tevent_context *,
struct loadparm_context *,
struct socket_context *,
- void (*)(struct event_context *,
+ void (*)(struct tevent_context *,
struct loadparm_context *,
struct socket_context *,
- struct server_id , void *),
- void *);
+ struct server_id , void *, void *),
+ void *, void *);
/* function to create a task */
- void (*new_task)(struct event_context *,
- struct loadparm_context *lp_ctx,
+ void (*new_task)(struct tevent_context *,
+ struct loadparm_context *lp_ctx,
const char *service_name,
- void (*)(struct event_context *,
+ struct task_server * (*)(struct tevent_context *,
struct loadparm_context *, struct server_id,
- void *),
- void *);
+ void *, void *),
+ void *,
+ const struct service_details*,
+ const int);
- /* function to terminate a connection or task */
- void (*terminate)(struct event_context *, struct loadparm_context *lp_ctx,
- const char *reason);
+ /* function to terminate a task */
+ void (*terminate_task)(struct tevent_context *,
+ struct loadparm_context *lp_ctx,
+ const char *reason,
+ bool fatal,
+ void *process_context);
+ /* function to terminate a connection */
+ void (*terminate_connection)(struct tevent_context *,
+ struct loadparm_context *lp_ctx,
+ const char *reason,
+ void *process_context);
/* function to set a title for the connection or task */
- void (*set_title)(struct event_context *, const char *title);
+ void (*set_title)(struct tevent_context *, const char *title);
};
/* this structure is used by modules to determine the size of some critical types */
extern const struct model_ops single_ops;
-const struct model_ops *process_model_startup(struct event_context *ev, const char *model);
-NTSTATUS register_process_model(const void *_ops);
+const struct model_ops *process_model_startup(const char *model);
+NTSTATUS register_process_model(const struct model_ops *ops);
NTSTATUS process_model_init(struct loadparm_context *lp_ctx);
#endif /* __PROCESS_MODEL_H__ */