diff options
author | Michael Adam <obnox@samba.org> | 2008-07-16 17:12:04 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-08-01 16:04:39 +0200 |
commit | 16c2190b149a2232aa49a16a41e570410edd2eaf (patch) | |
tree | c8e4c451fa4966586a2ff2825bd1dd810b4df402 /source3/libnet/libnet_dssync.h | |
parent | b0fbdbc1bfdc69e116551f75f2fd5eb85a14ecdd (diff) | |
download | samba-16c2190b149a2232aa49a16a41e570410edd2eaf.tar.gz |
dssync: replace the processing_fn by startup/process/finish ops.
This remove static a variable for the keytab context in the keytab
processing function and simplifies the signature. The keytab context
is instead in the new private data member of the dssync_context struct.
This is in preparation of adding support for keeping track of the
up-to-date-ness vector, in order to be able to sync diffs instead
of the whole database.
Michael
(This used to be commit c51c3339f35e3bd921080d2e226e2422fc23e1e6)
Diffstat (limited to 'source3/libnet/libnet_dssync.h')
-rw-r--r-- | source3/libnet/libnet_dssync.h | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/source3/libnet/libnet_dssync.h b/source3/libnet/libnet_dssync.h index c98e650fcca..9b18dae4f57 100644 --- a/source3/libnet/libnet_dssync.h +++ b/source3/libnet/libnet_dssync.h @@ -19,11 +19,14 @@ struct dssync_context; -typedef NTSTATUS (*dssync_processing_fn_t)(TALLOC_CTX *, - struct drsuapi_DsReplicaObjectListItemEx *, - struct drsuapi_DsReplicaOIDMapping_Ctr *, - bool, - struct dssync_context *ctx); +struct dssync_ops { + NTSTATUS (*startup)(struct dssync_context *ctx, TALLOC_CTX *mem_ctx); + NTSTATUS (*process_objects)(struct dssync_context *ctx, + TALLOC_CTX *mem_ctx, + struct drsuapi_DsReplicaObjectListItemEx *objects, + struct drsuapi_DsReplicaOIDMapping_Ctr *mappings); + NTSTATUS (*finish)(struct dssync_context *ctx, TALLOC_CTX *mem_ctx); +}; struct dssync_context { const char *domain_name; @@ -34,14 +37,12 @@ struct dssync_context { DATA_BLOB session_key; const char *output_filename; - dssync_processing_fn_t processing_fn; + void *private_data; + + const struct dssync_ops *ops; char *result_message; char *error_message; }; -NTSTATUS libnet_dssync_dump_keytab(TALLOC_CTX *mem_ctx, - struct drsuapi_DsReplicaObjectListItemEx *cur, - struct drsuapi_DsReplicaOIDMapping_Ctr *mapping_ctr, - bool last_query, - struct dssync_context *ctx); +extern const struct dssync_ops libnet_dssync_keytab_ops; |