Files
bshell/bshell.runtime/include/bshell/verb.h
T
2026-05-30 19:51:29 +01:00

147 lines
3.2 KiB
C

#ifndef BSHELL_VERB_H_
#define BSHELL_VERB_H_
#include <fx/collections/hashtable.h>
#include <fx/macros.h>
FX_DECLS_BEGIN;
#define BSHELL_TYPE_VERB (bshell_verb_get_type())
enum bshell_verb_id {
BSHELL_VERB_NONE = 0,
BSHELL_VERB_ADD,
BSHELL_VERB_CLEAR,
BSHELL_VERB_CLOSE,
BSHELL_VERB_COPY,
BSHELL_VERB_ENTER,
BSHELL_VERB_EXIT,
BSHELL_VERB_FIND,
BSHELL_VERB_FORMAT,
BSHELL_VERB_GET,
BSHELL_VERB_HIDE,
BSHELL_VERB_JOIN,
BSHELL_VERB_LOCK,
BSHELL_VERB_MOVE,
BSHELL_VERB_NEW,
BSHELL_VERB_OPEN,
BSHELL_VERB_OPTIMIZE,
BSHELL_VERB_PUSH,
BSHELL_VERB_POP,
BSHELL_VERB_REDO,
BSHELL_VERB_REMOVE,
BSHELL_VERB_RENAME,
BSHELL_VERB_RESET,
BSHELL_VERB_RESIZE,
BSHELL_VERB_SEARCH,
BSHELL_VERB_SELECT,
BSHELL_VERB_SET,
BSHELL_VERB_SHOW,
BSHELL_VERB_SKIP,
BSHELL_VERB_SPLIT,
BSHELL_VERB_STEP,
BSHELL_VERB_SWITCH,
BSHELL_VERB_UNDO,
BSHELL_VERB_UNLOCK,
BSHELL_VERB_WATCH,
BSHELL_VERB_CONNECT,
BSHELL_VERB_DISCONNECT,
BSHELL_VERB_READ,
BSHELL_VERB_RECEIVE,
BSHELL_VERB_SEND,
BSHELL_VERB_WRITE,
BSHELL_VERB_BACKUP,
BSHELL_VERB_CHECKPOINT,
BSHELL_VERB_COMPARE,
BSHELL_VERB_COMPRESS,
BSHELL_VERB_CONVERT,
BSHELL_VERB_CONVERTFROM,
BSHELL_VERB_CONVERTTO,
BSHELL_VERB_DISMOUNT,
BSHELL_VERB_EDIT,
BSHELL_VERB_EXPAND,
BSHELL_VERB_EXPORT,
BSHELL_VERB_GROUP,
BSHELL_VERB_IMPORT,
BSHELL_VERB_INITIALIZE,
BSHELL_VERB_LIMIT,
BSHELL_VERB_MERGE,
BSHELL_VERB_MOUNT,
BSHELL_VERB_OUT,
BSHELL_VERB_PUBLISH,
BSHELL_VERB_RESTORE,
BSHELL_VERB_SAVE,
BSHELL_VERB_SYNC,
BSHELL_VERB_UNPUBLISH,
BSHELL_VERB_UPDATE,
BSHELL_VERB_DEBUG,
BSHELL_VERB_MEASURE,
BSHELL_VERB_REPAIR,
BSHELL_VERB_RESOLVE,
BSHELL_VERB_TEST,
BSHELL_VERB_TRACE,
BSHELL_VERB_APPROVE,
BSHELL_VERB_ASSERT,
BSHELL_VERB_BUILD,
BSHELL_VERB_COMPLETE,
BSHELL_VERB_CONFIRM,
BSHELL_VERB_DENY,
BSHELL_VERB_DEPLOY,
BSHELL_VERB_DISABLE,
BSHELL_VERB_ENABLE,
BSHELL_VERB_INSTALL,
BSHELL_VERB_INVOKE,
BSHELL_VERB_REGISTER,
BSHELL_VERB_REQUEST,
BSHELL_VERB_RESTART,
BSHELL_VERB_RESUME,
BSHELL_VERB_START,
BSHELL_VERB_STOP,
BSHELL_VERB_SUBMIT,
BSHELL_VERB_SUSPEND,
BSHELL_VERB_UNINSTALL,
BSHELL_VERB_UNREGISTER,
BSHELL_VERB_WAIT,
BSHELL_VERB_USE,
BSHELL_VERB_BLOCK,
BSHELL_VERB_GRANT,
BSHELL_VERB_PROTECT,
BSHELL_VERB_REVOKE,
BSHELL_VERB_UNBLOCK,
BSHELL_VERB_UNPROTECT,
/* reserved verbs */
BSHELL_VERB_FOREACH,
BSHELL_VERB_PING,
BSHELL_VERB_SORT,
BSHELL_VERB_TEE,
BSHELL_VERB_WHERE,
__BSHELL_VERB_MAX,
};
FX_DECLARE_TYPE(bshell_verb);
FX_TYPE_CLASS_DECLARATION_BEGIN(bshell_verb)
FX_TYPE_CLASS_DECLARATION_END(bshell_verb)
extern enum bshell_status bshell_init_all_verbs(void);
extern enum bshell_status bshell_cleanup_all_verbs(void);
extern fx_hashtable *bshell_get_all_verbs(void);
extern bshell_verb *bshell_verb_get_by_id(enum bshell_verb_id id);
extern bshell_verb *bshell_verb_get_by_name(const char *name);
extern fx_type_id bshell_verb_get_type(void);
extern bshell_verb *bshell_verb_create(
enum bshell_verb_id id,
const char *name,
const char *alias_prefix,
const char *group,
const char *description);
extern bool bshell_verb_is_reserved(const bshell_verb *verb);
extern enum bshell_verb_id bshell_verb_get_id(const bshell_verb *verb);
extern const char *bshell_verb_get_name(const bshell_verb *verb);
#endif