diff --git a/src/common/options.h b/src/common/options.h --- a/src/common/options.h +++ b/src/common/options.h @@ -27,15 +27,15 @@ #include -/* +/** incomplete: maybe remoteio.h should define its own struct which is injected into this struct and have its own handlers that parse its section of the confuse config file... (it'd be more modular)? */ struct options_common { - char *remoteio_rsh; - char *remoteio_user; struct remoteio_opts *remoteio; + struct client_opts *client; + struct daemon_opts *daemon; }; /** @@ -44,11 +44,14 @@ struct options_common Options should be kept alive during the program's life. \param mycfg will be set to the section of the configuration file specific to the caller (client or server specific section) + \param myopts holds the caller's confuse option declarations + \param myname holds the name of the section of the config file that refers to mycfg and myopts + \param allopts will be set to a pointer that many functions need for operation \param argc the argc that was passed to main() \param argv the argv that was passed to main() */ -int options_init(int argc, char *argv[], cfg_t **mycfg, struct options_common **allopts); +int options_init(int argc, char *argv[], cfg_t **mycfg, cfg_opt_t *myopts, const char *myname, struct options_common **allopts); /** Frees the struct options_common. This should be run before the program exits.