Summary: Isode provides a number of APIs which allow integrators and product developers to build components that access the Isode Messaging server products or other products supporting the same protocols.
Creating Queue Filter and Selector objects

Functions

struct SOMQfilter * SOMQfilterNew (void)
 Create new filter object. More...
 
struct SOMQfilter * SOMQfilterChain (struct SOMQfilter *fp, struct SOMQfilter *newp)
 Add filter to chain. More...
 
struct SOMQselector * SOMQselectorNew (void)
 Create new selector object. More...
 
int SOMQfilterDelete (struct SOMQfilter *fp)
 Delete filter chain. More...
 
int SOMQselectorDelete (struct SOMQselector *fp)
 Delete selector. More...
 
int SOMQfilterAddStrParam (struct SOMQfilter *fp, int paramtype, const char *value, size_t length)
 Add string-valued parameter to the filter. More...
 
int SOMQfilterAddIntParam (struct SOMQfilter *fp, int paramtype, int value)
 Add integer-valued parameter to the filter. More...
 
int SOMQselectorAddStrParam (struct SOMQselector *fp, int paramtype, const char *value, size_t length)
 Add string-valued parameter to the selector. More...
 
int SOMQselectorAddIntParam (struct SOMQselector *fp, int paramtype, int value)
 Add integer-valued parameter to the selector. More...
 

Detailed Description

The Queue interface uses Filters and Selectors for choosing objects to operate on. Filters are used to select messages based on various properties. Selectors are used for channels, MTAs and messages based on the channel/MTA/message hierarchy.

Filters are grouped into a set by chaining the individual filters.

Function Documentation

struct SOMQfilter* SOMQfilterNew ( void  )

Create new filter object.

Returns
Pointer to filter object, or NULL on error
struct SOMQfilter* SOMQfilterChain ( struct SOMQfilter *  fp,
struct SOMQfilter *  newp 
)

Add filter to chain.

Parameters
fp[in] Pointer to chain. Can be NULL for empty chain
newp[in] Pointer to filter to add to chain
Returns
New chain pointer.
struct SOMQselector* SOMQselectorNew ( void  )

Create new selector object.

Returns
Pointer to selector object, or NULL on error
int SOMQfilterDelete ( struct SOMQfilter *  fp)

Delete filter chain.

Parameters
fp[in] Pointer to filter
Returns
Zero on success or non-zero error code

Note: deletes whole chain

int SOMQselectorDelete ( struct SOMQselector *  fp)

Delete selector.

Parameters
fp[in] Selector to delete
Returns
Zero on success or non-zero error code
int SOMQfilterAddStrParam ( struct SOMQfilter *  fp,
int  paramtype,
const char *  value,
size_t  length 
)

Add string-valued parameter to the filter.

Parameters
fp[in] Filter pointer
paramtype[in] Type of parameter
value[in] Value of parameter
length[in] Length of parameter, -1 if NUL terminated
Returns
Zero on success or non-zero error code
int SOMQfilterAddIntParam ( struct SOMQfilter *  fp,
int  paramtype,
int  value 
)

Add integer-valued parameter to the filter.

Parameters
fp[in] Filter pointer
paramtype[in] Type of parameter
value[in] Value of parameter
Returns
Zero on success or non-zero error code
int SOMQselectorAddStrParam ( struct SOMQselector *  fp,
int  paramtype,
const char *  value,
size_t  length 
)

Add string-valued parameter to the selector.

Parameters
fp[in] Selector pointer
paramtype[in] Type of parameter
value[in] Value of parameter
length[in] Length of parameter, -1 if NUL terminated
Returns
Zero on success or non-zero error code

You can add multiple values at each level in the channel/mta/msg/recipient hierarchy. But, you cannot mix literal values and regular expression values for names.

In building a selector, adding no selector items for a given 'level' means "all".

int SOMQselectorAddIntParam ( struct SOMQselector *  fp,
int  paramtype,
int  value 
)

Add integer-valued parameter to the selector.

Parameters
fp[in] Selector pointer
paramtype[in] Type of parameter
value[in] Value of parameter
Returns
Zero on success or non-zero error code

You can add multiple values at each level in the channel/mta/msg/recipient hierarchy. But, you cannot mix literal values and regular expression values for names.

In building a selector, adding no selector items for a given 'level' means "all".