swap_out_multi

March 26, 2020

Name

swap_out_multi — Override or augment the internal call to swap_out_multi

Synopsis

#include "hooks/core/swap_out_multi.h"

| int **core_swap_out_multi** ( | closure, |   |
|   | head, |   |
|   | success); |   |

void * <var class="pdparam">closure</var>;
sp_async_message * <var class="pdparam">head</var>;
int * <var class="pdparam">success</var>;

Description

The swap_out_multi hook allows modules to override or augment the internal call to swap_out_multi. This hook is useful for having simultaneous access to all messages in a potentially multi-recipient setting, after reception has been confirmed, but before delivery takes place.

Parameters

closure

A pointer to the closure.

head

An sp_async_message. See “sp_async_message”.

success

This parameter is an output parameter for the provider. Set this parameter to 1 for success or 0 for failure.

Return Values

If this hook returns non-zero, then the core swap-out-multi hook will not be run, and the success parameter passed by reference as the third argument will be returned to the system.

Threading

This hook will be invoked in any thread.