mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* assuan-handler.c (assuan_register_input_notify): New.
(assuan_register_output_notify): New.
This commit is contained in:
parent
d9aecd9eb7
commit
5a6a2ca248
4 changed files with 36 additions and 1 deletions
|
@ -107,6 +107,8 @@ std_handler_input (ASSUAN_CONTEXT ctx, char *line)
|
|||
if (rc)
|
||||
return rc;
|
||||
ctx->input_fd = fd;
|
||||
if (ctx->input_notify_fnc)
|
||||
ctx->input_notify_fnc (ctx, line);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -120,6 +122,8 @@ std_handler_output (ASSUAN_CONTEXT ctx, char *line)
|
|||
if (rc)
|
||||
return rc;
|
||||
ctx->output_fd = fd;
|
||||
if (ctx->output_notify_fnc)
|
||||
ctx->output_notify_fnc (ctx, line);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -253,6 +257,26 @@ assuan_register_cancel_notify (ASSUAN_CONTEXT ctx, void (*fnc)(ASSUAN_CONTEXT))
|
|||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
assuan_register_input_notify (ASSUAN_CONTEXT ctx,
|
||||
void (*fnc)(ASSUAN_CONTEXT, const char *))
|
||||
{
|
||||
if (!ctx)
|
||||
return ASSUAN_Invalid_Value;
|
||||
ctx->input_notify_fnc = fnc;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
assuan_register_output_notify (ASSUAN_CONTEXT ctx,
|
||||
void (*fnc)(ASSUAN_CONTEXT, const char *))
|
||||
{
|
||||
if (!ctx)
|
||||
return ASSUAN_Invalid_Value;
|
||||
ctx->output_notify_fnc = fnc;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Helper to register the standards commands */
|
||||
int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue