ANNO_registerReceiveFn

- register a callback function to receive annotate requests

SYNOPSIS

#include <$OV_HEADER/ecs/ANNO/ANNO.h>

int32 ANNO_registerReceiveFn (
const ANNO_ConnectionId annoId, 
ANNO_ReceiveFn *receiveFn );

DESCRIPTION

This function is used to register a callback function for a specified annotation connection. The registered function is called for each annotation request received from the specified connection. Only one receive function can be registered for each annotation connection. If a call is made to register a function where one is already registered the existing registration is replaced.

The receive function to be registered has the following prototype:

int32 (ANNO_ReceiveFn) (
ANNO_ConnectionId conId,  /* ConnectionId the request came from */
ANNO_RequestId requestId, /* uniquely identifies the request */
EV_AttrValue *annoRequest /* the annotate request */ ); 

Parameters

const ANNO_ConnectionId annoId
The annotation connection ID that the receiveFn will be registered for (as set by ANNO_open). If ANNO_ALLCON is specified then the receiveFn is called for each annotation request received on annotation connections that do not have a registered receive function.
ANNO_ReceiveFn *receiveFn
Function to call for each annotation request received from the specified annotation connection. If zero is specified any previously registered receive function for the specified annotation connection is deregistered.

RETURNS

ECS_SUCCESS
Succeeded.
ECS_BAD_PARAMETER
Bad annotation connection ID parameter.
ANNO_NOT_INITIALISED
ANNO_stackInit has not been called.
ANNO_BAD_CONNECTION
The specified annotation connection is not open.