Creating Queue Filter and Selector objects

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. More...

Modules

 Queue Manager Operations
 The operations which can be performed on the Queue Manager and the objects within that.
 

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

◆ SOMQfilterNew()

struct SOMQfilter* SOMQfilterNew ( void  )

Create new filter object.

Returns
Pointer to filter object, or NULL on error

◆ SOMQfilterChain()

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.

◆ SOMQselectorNew()

struct SOMQselector* SOMQselectorNew ( void  )

Create new selector object.

Returns
Pointer to selector object, or NULL on error

◆ SOMQfilterDelete()

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

◆ SOMQselectorDelete()

int SOMQselectorDelete ( struct SOMQselector *  fp)

Delete selector.

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

◆ SOMQfilterAddStrParam()

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

◆ SOMQfilterAddIntParam()

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

◆ SOMQselectorAddStrParam()

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".

◆ SOMQselectorAddIntParam()

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".

All rights reserved © 2002 - 2024 Isode Ltd.