Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » MobiLink - Server-Initiated Synchronization » MobiLink Listener SDK for Palm » Message processing interface

PalmLsnDupTime function Next Page

PalmLsnProcess function

Processes a message according to the records in a configuration database.


palm_lsn_ret PalmLsnProcess(
struct a_palm_msg * msg,
Char const * configPDBName,
UInt16 * const problematicRecNum,
Boolean * handled

Return Value

Return codes defined in the palm_lsn_ret enumeration.

See palm_lsn_ret enumeration.


PalmLsnProcess determines the appropriate action to take in response to an incoming message. It compares the message's fields to filters stored in a configuration database.

For more information about creating the Palm Listener configuration database, see Palm Listener Configuration utility.

The records contained in the configuration database store information about message filters and what actions should result from an accepted message.

A configuration record has the following format:

[subject=<string>;] [content=<string>;]
[message|message_start=<string>;] [sender=<string>;]
action=run <app name> [arguments]

arguments is an application dependent string which may contain action variables.

See also

The following is a partial listing used to handle a message. The example allocates the message structure, initializes fields, and processes the message using PalmLsnProcess.

a_palm_msg * ulMsg;
Boolean * handled 
Char configDb[ dmDBNameLength ];

// Allocate the message structure
ulMsg = PalmLsnAllocate();

// Fill the message fields
ret = PalmLsnDupMessage( ulMsg, msgBody );

// Get the configuration database name
PalmLsnGetConfigFileName( configDb );

// Process the message
ret = PalmLsnProcess( ulMsg, configDb, NULL, handled );

// Free the message
PalmLsnFree( ulMsg );