2010-01-01 19:44:19 +01:00
|
|
|
/*
|
2022-04-28 21:47:00 +02:00
|
|
|
** Copyright (C) 2008-2022-Jan C. Binnema <djcb@djcbsoftware.nl>
|
2010-01-01 19:44:19 +01:00
|
|
|
**
|
|
|
|
** This program is free software; you can redistribute it and/or modify it
|
|
|
|
** under the terms of the GNU General Public License as published by the
|
|
|
|
** Free Software Foundation; either version 3, 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, write to the Free Software Foundation,
|
|
|
|
** Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
**
|
|
|
|
*/
|
|
|
|
|
2020-11-28 09:16:43 +01:00
|
|
|
#ifndef MU_CMD_HH__
|
|
|
|
#define MU_CMD_HH__
|
2010-01-01 19:44:19 +01:00
|
|
|
|
|
|
|
#include <glib.h>
|
2020-06-08 22:04:05 +02:00
|
|
|
#include <mu-config.hh>
|
2019-07-28 13:25:19 +02:00
|
|
|
#include <mu-store.hh>
|
2022-03-28 21:36:32 +02:00
|
|
|
#include <utils/mu-result.hh>
|
2010-01-01 19:44:19 +01:00
|
|
|
|
2020-11-28 09:16:43 +01:00
|
|
|
namespace Mu {
|
2010-08-20 20:07:36 +02:00
|
|
|
/**
|
|
|
|
* execute the 'find' command
|
2011-08-30 20:57:59 +02:00
|
|
|
*
|
|
|
|
* @param store store object to use
|
2010-08-20 20:07:36 +02:00
|
|
|
* @param opts configuration options
|
2011-08-30 20:57:59 +02:00
|
|
|
*
|
2022-04-28 21:47:00 +02:00
|
|
|
* @return Ok() or some error
|
2010-08-20 20:07:36 +02:00
|
|
|
*/
|
2022-04-28 21:47:00 +02:00
|
|
|
Result<void> mu_cmd_find(const Mu::Store& store, const MuConfig* opts);
|
2010-08-20 20:07:36 +02:00
|
|
|
|
2010-08-20 20:38:54 +02:00
|
|
|
/**
|
|
|
|
* execute the 'extract' command
|
2011-08-30 20:57:59 +02:00
|
|
|
*
|
2010-08-20 20:38:54 +02:00
|
|
|
* @param opts configuration options
|
2011-08-30 20:57:59 +02:00
|
|
|
*
|
2022-03-28 21:36:32 +02:00
|
|
|
* @return Ok() or some error
|
2010-08-20 20:38:54 +02:00
|
|
|
*/
|
2022-03-28 21:36:32 +02:00
|
|
|
Result<void> mu_cmd_extract(const MuConfig* opts);
|
2010-08-20 20:38:54 +02:00
|
|
|
|
2022-04-30 00:10:31 +02:00
|
|
|
/**
|
|
|
|
* execute the 'fields' command
|
|
|
|
*
|
|
|
|
* @param opts configuration options
|
|
|
|
*
|
|
|
|
* @return Ok() or some error
|
|
|
|
*/
|
|
|
|
Result<void> mu_cmd_fields(const MuConfig* opts);
|
|
|
|
|
2012-10-17 22:56:47 +02:00
|
|
|
/**
|
2012-10-22 22:16:01 +02:00
|
|
|
* execute the 'script' command
|
2012-10-17 22:56:47 +02:00
|
|
|
*
|
|
|
|
* @param opts configuration options
|
|
|
|
* @param err receives error information, or NULL
|
|
|
|
*
|
2022-05-12 07:48:28 +02:00
|
|
|
* @return Ok() or some error
|
2012-10-17 22:56:47 +02:00
|
|
|
*/
|
2022-05-12 07:48:28 +02:00
|
|
|
Result<void> mu_cmd_script(const MuConfig* opts);
|
2012-10-17 22:56:47 +02:00
|
|
|
|
2011-03-02 22:26:54 +01:00
|
|
|
/**
|
|
|
|
* execute the cfind command
|
2011-08-30 20:57:59 +02:00
|
|
|
*
|
2019-04-28 12:58:34 +02:00
|
|
|
* @param store store object to use
|
2011-03-02 22:26:54 +01:00
|
|
|
* @param opts configuration options
|
2011-08-30 20:57:59 +02:00
|
|
|
*
|
2022-05-12 07:48:28 +02:00
|
|
|
* @return Ok() or some error
|
2011-08-03 22:00:48 +02:00
|
|
|
*/
|
2022-05-12 07:48:28 +02:00
|
|
|
Result<void> mu_cmd_cfind(const Mu::Store& store, const MuConfig* opts);
|
2011-08-03 22:00:48 +02:00
|
|
|
|
2017-01-14 12:09:17 +01:00
|
|
|
/**
|
2020-02-06 19:22:43 +01:00
|
|
|
* execute the 'index' command
|
2017-01-14 12:09:17 +01:00
|
|
|
*
|
|
|
|
* @param store store object to use
|
|
|
|
* @param opts configuration options
|
|
|
|
*
|
2022-05-12 07:48:28 +02:00
|
|
|
* @return Ok() or some error
|
2017-01-14 12:09:17 +01:00
|
|
|
*/
|
2022-05-12 07:48:28 +02:00
|
|
|
Result<void> mu_cmd_index(Mu::Store& store, const MuConfig* opt);
|
2011-08-29 22:38:55 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* execute the server command
|
2012-07-17 18:17:49 +02:00
|
|
|
* @param opts configuration options
|
|
|
|
* @param err receives error information, or NULL
|
|
|
|
*
|
2020-02-06 19:22:43 +01:00
|
|
|
* @return MU_OK (0) if the command succeeds, some error code otherwise
|
2012-07-17 18:17:49 +02:00
|
|
|
*/
|
2022-05-12 07:48:28 +02:00
|
|
|
Result<void> mu_cmd_server(const MuConfig* opts);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* execute some mu command, based on 'opts'
|
|
|
|
*
|
|
|
|
* @param opts configuration option
|
|
|
|
* @param err receives error information, or NULL
|
|
|
|
*
|
|
|
|
* @return Ok() or some error
|
|
|
|
*/
|
|
|
|
Result<void> mu_cmd_execute(const MuConfig* opts);
|
2020-11-28 09:16:43 +01:00
|
|
|
|
|
|
|
} // namespace Mu
|
2010-01-01 19:44:19 +01:00
|
|
|
|
|
|
|
#endif /*__MU_CMD_H__*/
|