/*
Authors:
Pavel Březina <pbrezina@redhat.com>
Copyright (C) 2015 Red Hat
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SSS_TOOLS_H_
#define _SSS_TOOLS_H_
#include <talloc.h>
#include <popt.h>
struct sss_tool_ctx {
bool print_help;
char *default_domain;
};
struct sss_tool_ctx **_tool_ctx);
struct sss_cmdline {
const char **argv;
};
typedef errno_t
struct sss_tool_ctx *tool_ctx,
void *pvt);
struct sss_route_cmd {
const char *command;
const char *description;
int flags;
};
void sss_tool_usage(const char *tool_name,
struct sss_route_cmd *commands);
struct sss_tool_ctx *tool_ctx,
struct sss_route_cmd *commands,
void *pvt);
enum sss_tool_opt {
};
struct poptOption *options,
enum sss_tool_opt require_option,
void *popt_fn_pvt,
const char *fopt_name,
const char *fopt_help,
const char **_fopt,
bool *_opt_set);
struct poptOption *options,
enum sss_tool_opt require_option,
void *popt_fn_pvt);
struct sss_route_cmd *commands,
void *pvt);
struct sss_tool_ctx *tool_ctx,
const char *input,
const char **_username,
struct sss_domain_info **_domain);
#endif /* SRC_TOOLS_COMMON_SSS_TOOLS_H_ */