blob: d211df86f2061c0ecbbdfa74bd86e77864279b1f (
plain) (
tree)
|
|
/* actionhelper.h - helper routines for ck actions --------------------*- C -*-
*
* This file is part of ck, the config keeper
*
* -----------------------------------------------------------------------------
*
* Copyright (C) 2018 Anastasis Grammenos
* GPLv3 (see LICENCE for the full notice)
*
* -----------------------------------------------------------------------------
*
* Here reside helper routines for the actions.
*
* -------------------------------------------------------------------------- */
#ifndef ACTIONHELPER_H
#define ACTIONHELPER_H
#include "actions.h"
#include "ckutil.h"
#include "cklist.h"
#include "dblayer.h"
/*******/
/* ADD */
/*******/
/* if add_err is set, return true
* along with a copy of the error message.
* Pass NULL if you don't care about the message */
extern int add_err_message(char *err);
extern AddOpt add_make_options(cklist *args);
extern void add_print_opts(AddOpt *opt);
extern void add_make_link(const AddOpt *opt, const Conf *conf);
/*******/
/* DEL */
/*******/
extern DelOpt del_make_options(cklist *args);
/********/
/* EDIT */
/********/
extern void edit_print_suggested_configs(DB *db, const char *pName);
/********/
/* LIST */
/********/
extern ListOpt list_make_options(cklist *args);
/*****************/
/* PRINT RESULTS */
/*****************/
#define X(ACTION) \
extern void print_##ACTION##_result(int err);
CK_ACTIONS
#undef X
#endif /* ACTIONHELPER_H */
|