O'Reilly logo

Palm OS Programming, 2nd Edition by Neil Rhodes, Julie McKeehan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

When the HotSync Button Is Pressed

We left off in the previous discussion ready to exchange information between the conduit on the desktop and the handheld unit. Let’s continue walking through the chain of events (see Table 15-1).

Table 15-1. When the HotSync button is pressed

Action (by the user or by the system)

What is happening programmatically

The Sync Manager gets the conduit name so that it can display information in the Status dialog box.

GetConduitName is called and returns.

The Sync Manager prepares to sync by passing the synchronization off to the conduit.

The conduit’s DLL is loaded into memory and its OpenConduit is called. It is told whether to do a fast sync, a slow sync, a copy from handheld to desktop, a copy from desktop to handheld, or to do nothing. When OpenConduit returns, it will have completed the task.

The conduit registers with the Sync Manager.

SyncRegisterConduit returns a handle.

The conduit notifies the log that syncing is about to start.

Conduit calls LogAddEntry("", slSyncStarted, false).

The conduit opens the remote order database on the handheld.

Conduit calls SyncOpenDB, which returns a handle to the remote order database.

The user sees that the Sales application is being synced.

All the data is written from the handheld to the desktop.

The conduit closes the remote database.

Conduit calls SyncCloseDB to close the Sales order database.

Conduit calls SyncOpenDB, which returns a handle to the product database.

The conduit ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required