Skip to main content

Name

control_post_control

Synopsis

#include "hooks/core/control_post_control.h"

| void **control_post_control** ( | closure, |   | |   | cc, |   | |   | argc, |   | |   | argv[], |   | |   | input, |   | |   | output); |   |

void * <var class="pdparam">closure</var>; command_construct * <var class="pdparam">cc</var>; int <var class="pdparam">argc</var>; const char * <var class="pdparam">argv[]</var>; ec_control_context * <var class="pdparam">input</var>; ec_control_context * <var class="pdparam">output</var>;

| int **has_core_control_post_control_hook** ( | ); |   |

| void **register_core_control_post_control_hook_first** ( | hook, |   | |   | closure); |   |

ec_hook_core_control_post_control_func_t <var class="pdparam">hook</var>; void *<var class="pdparam">closure</var>;

| void **register_core_control_post_control_hook_last** ( | hook, |   | |   | closure); |   |

ec_hook_core_control_post_control_func_t <var class="pdparam">hook</var>; void *<var class="pdparam">closure</var>;

| void **call_core_control_post_control_hook** ( | cc, |   | |   | argc, |   | |   | argv[], |   | |   | input, |   | |   | output); |   |

command_construct * <var class="pdparam">cc</var>; int <var class="pdparam">argc</var>; const char * <var class="pdparam">argv[]</var>; ec_control_context * <var class="pdparam">input</var>; ec_control_context * <var class="pdparam">output</var>;

Description

This hook allows modules to perform arbitrary tasks after running a command in the console. It differs from control_post_command in that control_post_command is run once for a given input line, whereas control_post_control is run after each sub-command parsed out of the input line has run.

There parameters are identical those for an ec_control_function callback, but bear in mind that the command has already run, and that the output will already be populated.

Was this page helpful?