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

The HotSync Log

The CDK provides routines that add to a HotSync log. There are several of them that are quite useful; the main one is LogAddEntry.

long LogAddEntry(LPCTSTR logString, Activity act, BOOL timestamp)

You will continually use this routine to add entries to the HotSync log. Here are the parameters:

logstring

The string displayed in the log.

timestamp

This is a Boolean. True means that the log entry will be timestamped.

act

This is an enumerated type. Many different enumeration constants are available for your use. The enumerated types used most often as a value for activity are as follows:

slSyncStarted

Tells the log that your conduit is beginning synchronization. Call the following when you begin the sync process:

LogAddEntry("", slSyncStarted, false)
slSyncAborted

Tells the log that your conduit is done and that there was an error. Call:

LogAddEntry("
your conduit name",
    slSyncAborted, false)

when you finish syncing with an error.

slSyncFinished

Tells the log that your conduit is done without errors. Call:

LogAddEntry("
your conduit name", slSyncFinished, false)

when you finish syncing without an error.

slWarning

Adds the specified logString to the log and tells the user at the end of the HotSync that there are messages in the log.

slText

Adds the specified logString to the log, but doesn’t tell the user about the message.

long LogAddFormattedEntry(Activity act, BOOL timestamp,const char* dataString, ...)

Another useful routine is LogAddFormattedEntry . It acts as ...

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