edfb3e24a3
bshell: the front-end binary bshell.runtime: contains the parser, compiler, and classes needed to run bshell scripts bshell.core: contains the builtin commandlets and aliases
50 lines
1.2 KiB
C
50 lines
1.2 KiB
C
#ifndef BSHELL_RUNTIME_PIPELINE_H_
|
|
#define BSHELL_RUNTIME_PIPELINE_H_
|
|
|
|
#include "../command/command.h"
|
|
#include "../runtime/cmdcall.h"
|
|
#include "../status.h"
|
|
|
|
#include <fx/macros.h>
|
|
#include <fx/value.h>
|
|
|
|
FX_DECLS_BEGIN;
|
|
|
|
struct bshell_runtime;
|
|
|
|
#define BSHELL_TYPE_PIPELINE (bshell_pipeline_get_type())
|
|
|
|
FX_DECLARE_TYPE(bshell_pipeline);
|
|
|
|
FX_TYPE_CLASS_DECLARATION_BEGIN(bshell_pipeline)
|
|
FX_TYPE_CLASS_DECLARATION_END(bshell_pipeline)
|
|
|
|
extern fx_type_id bshell_pipeline_get_type(void);
|
|
|
|
FX_TYPE_DEFAULT_CONSTRUCTOR(bshell_pipeline, BSHELL_TYPE_PIPELINE);
|
|
|
|
extern enum bshell_status bshell_pipeline_add_input_value(
|
|
bshell_pipeline *pipeline,
|
|
fx_value value,
|
|
bool enumerate);
|
|
extern enum bshell_status bshell_pipeline_add_cmdcall(
|
|
bshell_pipeline *pipeline,
|
|
bshell_cmdcall *cmd);
|
|
extern enum bshell_status bshell_pipeline_execute_single(
|
|
bshell_pipeline *pipeline);
|
|
extern enum bshell_status bshell_pipeline_pump_record(
|
|
bshell_pipeline *pipeline,
|
|
struct bshell_runtime *rt,
|
|
fx_value *out,
|
|
int *out_end_of_data);
|
|
|
|
extern fx_value bshell_pipeline_read_value(bshell_pipeline *pipeline);
|
|
extern enum bshell_status bshell_pipeline_write_value(
|
|
bshell_pipeline *pipeline,
|
|
fx_value val,
|
|
bool enumerate);
|
|
|
|
FX_DECLS_END;
|
|
|
|
#endif
|