Conduit Entry Points

We told you before that a conduit has three required entry points. There are also some optional ones (including some that are only for CDK 3.0), which we look at next.

Required Entry Points

The required entry points are as follows:

GetConduitName

This returns the conduit’s name.

GetConduitVersion

This function returns the version of the conduit as a four-byte value. The minor version is in the low byte. The major version is in the next byte. The upper two bytes are unused. A conduit with Version 2.1 would return 0x21.

OpenConduit

It is from this entry point that the conduit actually does its work. This point passes a parameter that is a class object with information about the sync. The information includes:

  • The username

  • Remote database and filename

  • The type of synchronization to be performed—copy handheld to desktop, copy desktop to PC, fast sync, slow sync, or do nothing

Optional Entry Points

The optional entry points have to do with customization (and File Linking in 3.0):

ConfigureConduit (CfgConduit is a newer version of this)

This is called when the user wants to customize the conduit by pressing Change in the Custom Hotsync dialog (see Figure 11.2). The conduit is responsible for displaying a dialog and saving user choices. A mirror-image synchronization conduit is responsible for displaying the dialog shown in Figure 11.3. The user chooses what action should happen when a sync occurs (unchecking the permanent checkbox in the dialog specifies that the dialog setting ...

Get Palm Programming: The Developer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.