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

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


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
  • msg   A pointer to an a_palm_msg instance.

  • configPDBName   A character array containing the name of the configuration database. You can obtain the configuration database name using the PalmLsnGetConfigFileName function.

    See PalmLsnGetConfigFileName.

  • problematicRecNum   An output parameter identifying the index of a problematic or malformed record in the configuration database.

  • handled   An output parameter indicating if PalmLsnProcess successfully processed the message.

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 );