Blame tools/tools.h

Packit Service 6d40f9
/*
Packit Service 6d40f9
 * adcli
Packit Service 6d40f9
 *
Packit Service 6d40f9
 * Copyright (C) 2013 Red Hat Inc.
Packit Service 6d40f9
 *
Packit Service 6d40f9
 * This program is free software; you can redistribute it and/or modify
Packit Service 6d40f9
 * it under the terms of the GNU Lesser General Public License as
Packit Service 6d40f9
 * published by the Free Software Foundation; either version 2.1 of
Packit Service 6d40f9
 * the License, or (at your option) any later version.
Packit Service 6d40f9
 *
Packit Service 6d40f9
 * This program is distributed in the hope that it will be useful, but
Packit Service 6d40f9
 * WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 6d40f9
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service 6d40f9
 * Lesser General Public License for more details.
Packit Service 6d40f9
 *
Packit Service 6d40f9
 * You should have received a copy of the GNU Lesser General Public
Packit Service 6d40f9
 * License along with this program; if not, write to the Free Software
Packit Service 6d40f9
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
Packit Service 6d40f9
 * MA 02110-1301 USA
Packit Service 6d40f9
 *
Packit Service 6d40f9
 * Author: Stef Walter <stefw@redhat.com>
Packit Service 6d40f9
 */
Packit Service 6d40f9
Packit Service 6d40f9
#ifndef _ADCLI_TOOLS_H_
Packit Service 6d40f9
#define _ADCLI_TOOLS_H_
Packit Service 6d40f9
Packit Service 6d40f9
#include "adcli.h"
Packit Service 6d40f9
Packit Service 6d40f9
#include <getopt.h>
Packit Service 6d40f9
Packit Service 6d40f9
#define EFAIL  (-ADCLI_ERR_FAIL)
Packit Service 6d40f9
#define EUSAGE (-ADCLI_ERR_CONFIG)
Packit Service 6d40f9
Packit Service 6d40f9
typedef struct  {
Packit Service 6d40f9
	int option;
Packit Service 6d40f9
	const char *text;
Packit Service 6d40f9
	const char *arg;
Packit Service 6d40f9
} adcli_tool_desc;
Packit Service 6d40f9
Packit Service 6d40f9
int       adcli_tool_getopt            (int argc,
Packit Service 6d40f9
                                        char *argv[],
Packit Service 6d40f9
                                        const struct option *longopts);
Packit Service 6d40f9
Packit Service 6d40f9
void      adcli_tool_usage             (const struct option *longopts,
Packit Service 6d40f9
                                        const adcli_tool_desc *usages);
Packit Service 6d40f9
Packit Service 6d40f9
char *    adcli_prompt_password_func   (adcli_login_type login_type,
Packit Service 6d40f9
                                        const char *name,
Packit Service 6d40f9
                                        int flags,
Packit Service 6d40f9
                                        void *unused_data);
Packit Service 6d40f9
Packit Service 6d40f9
char *    adcli_read_password_func     (adcli_login_type login_type,
Packit Service 6d40f9
                                        const char *name,
Packit Service 6d40f9
                                        int flags,
Packit Service 6d40f9
                                        void *unused_data);
Packit Service 6d40f9
Packit Service 6d40f9
int       adcli_tool_computer_preset   (adcli_conn *conn,
Packit Service 6d40f9
                                        int argc,
Packit Service 6d40f9
                                        char *argv[]);
Packit Service 6d40f9
Packit Service 6d40f9
int       adcli_tool_computer_reset    (adcli_conn *conn,
Packit Service 6d40f9
                                        int argc,
Packit Service 6d40f9
                                        char *argv[]);
Packit Service 6d40f9
Packit Service 6d40f9
int       adcli_tool_computer_join     (adcli_conn *conn,
Packit Service 6d40f9
                                        int argc,
Packit Service 6d40f9
                                        char *argv[]);
Packit Service 6d40f9
Packit Service 6d40f9
int       adcli_tool_computer_update   (adcli_conn *conn,
Packit Service 6d40f9
                                        int argc,
Packit Service 6d40f9
                                        char *argv[]);
Packit Service 6d40f9
Packit Service ed710c
int       adcli_tool_computer_testjoin (adcli_conn *conn,
Packit Service ed710c
                                        int argc,
Packit Service ed710c
                                        char *argv[]);
Packit Service ed710c
Packit Service 6d40f9
int       adcli_tool_computer_delete   (adcli_conn *conn,
Packit Service 6d40f9
                                        int argc,
Packit Service 6d40f9
                                        char *argv[]);
Packit Service 6d40f9
Packit Service 6d40f9
int       adcli_tool_user_create       (adcli_conn *conn,
Packit Service 6d40f9
                                        int argc,
Packit Service 6d40f9
                                        char *argv[]);
Packit Service 6d40f9
Packit Service 6d40f9
int       adcli_tool_user_delete       (adcli_conn *conn,
Packit Service 6d40f9
                                        int argc,
Packit Service 6d40f9
                                        char *argv[]);
Packit Service 6d40f9
Packit Service 6d40f9
int       adcli_tool_group_create      (adcli_conn *conn,
Packit Service 6d40f9
                                        int argc,
Packit Service 6d40f9
                                        char *argv[]);
Packit Service 6d40f9
Packit Service 6d40f9
int       adcli_tool_group_delete      (adcli_conn *conn,
Packit Service 6d40f9
                                        int argc,
Packit Service 6d40f9
                                        char *argv[]);
Packit Service 6d40f9
Packit Service 6d40f9
int       adcli_tool_member_add        (adcli_conn *conn,
Packit Service 6d40f9
                                        int argc,
Packit Service 6d40f9
                                        char *argv[]);
Packit Service 6d40f9
Packit Service 6d40f9
int       adcli_tool_member_remove     (adcli_conn *conn,
Packit Service 6d40f9
                                        int argc,
Packit Service 6d40f9
                                        char *argv[]);
Packit Service 6d40f9
Packit Service 6d40f9
int       adcli_tool_info              (adcli_conn *conn,
Packit Service 6d40f9
                                        int argc,
Packit Service 6d40f9
                                        char *argv[]);
Packit Service 6d40f9
Packit Service 6d40f9
#endif /* _ADCLI_TOOLS_H_ */