runtime: command: add an arg to begin_processing() to indicate pipeline position
This commit is contained in:
@@ -57,6 +57,11 @@ static const fx_value *command_get_arg(
|
||||
return &cmd->cmd_args[index];
|
||||
}
|
||||
|
||||
static size_t command_get_arg_count(struct bshell_command_p *cmd)
|
||||
{
|
||||
return cmd->cmd_nr_args;
|
||||
}
|
||||
|
||||
static fx_status get_command_type(
|
||||
const fx_value *cmd_v,
|
||||
const fx_property *prop,
|
||||
@@ -236,14 +241,25 @@ const fx_value *bshell_command_get_arg(bshell_command *cmd, size_t index)
|
||||
index);
|
||||
}
|
||||
|
||||
enum bshell_status bshell_command_begin_processing(bshell_command *command)
|
||||
size_t bshell_command_get_arg_count(const bshell_command *cmd)
|
||||
{
|
||||
FX_CLASS_DISPATCH_VIRTUAL_0(
|
||||
FX_CLASS_DISPATCH_STATIC_0(
|
||||
BSHELL_TYPE_COMMAND,
|
||||
command_get_arg_count,
|
||||
cmd);
|
||||
}
|
||||
|
||||
enum bshell_status bshell_command_begin_processing(
|
||||
bshell_command *command,
|
||||
enum bshell_command_position position)
|
||||
{
|
||||
FX_CLASS_DISPATCH_VIRTUAL(
|
||||
bshell_command,
|
||||
BSHELL_TYPE_COMMAND,
|
||||
BSHELL_ERR_NOT_SUPPORTED,
|
||||
c_begin_processing,
|
||||
command);
|
||||
command,
|
||||
position);
|
||||
}
|
||||
|
||||
enum bshell_status bshell_command_process_record(
|
||||
|
||||
@@ -43,7 +43,9 @@ static enum bshell_status get_callable_name(
|
||||
return BSHELL_SUCCESS;
|
||||
}
|
||||
|
||||
static enum bshell_status begin_processing(bshell_command *cmd)
|
||||
static enum bshell_status begin_processing(
|
||||
bshell_command *cmd,
|
||||
enum bshell_command_position position)
|
||||
{
|
||||
return BSHELL_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user