Introduce a libnet_conf context created by libnet_conf_open().
authorMichael Adam <obnox@samba.org>
Sun, 13 Jan 2008 00:40:05 +0000 (01:40 +0100)
committerMichael Adam <obnox@samba.org>
Sun, 13 Jan 2008 01:14:34 +0000 (02:14 +0100)
commitc2a9346faa26e79af5948197a1b322e545f0ed09
treea225a7a47f1a8cc90a4936056e8c8374664de1c5
parent7e75acfdd1910b3b5908c02d5f343f014eb77841
Introduce a libnet_conf context created by libnet_conf_open().

The libnet_conf_ctx stores the information necessary to interoperate
with the configuration. It is created by calling libnet_conf_open()
and destroyed by calling libnet_conf_close(). The context is passed
to all the libnet_conf functions. It currently stores the token to
access the registry. Later, it could store more data, e.g. the server
to connect to, credentials, and so on. For support of other backends
than registry or support of remote configuration, only the open
function will have to be changed.

In net_conf, the calls to the actual net_conf functions is wrapped
into a function that calls libnet_conf_open()/_close(). Thus an
individual variant of net_conf_runfunction2() and functable2 is
used to cope with functions being called by the wrapper with the
additional libnet_conf_ctx argument.

Michael
source/lib/netapi/serverinfo.c
source/libnet/libnet.h
source/libnet/libnet_conf.c
source/libnet/libnet_conf.h [new file with mode: 0644]
source/libnet/libnet_join.c
source/utils/net_conf.c