Look in the SDK/Examples/Datebook/DateDB.c::ApptUnpack 
(about line 550).  This routine takes a record
as it is stored in DatebookDB (in "packed") format
and creates the "unpacked" version of it.  The
"unpacked" version returned here is just a set of 
pointers to the constituent pieces within the "packed" 
record.

In short, a ("packed") record is stored 
as a structure with:

6 bytes of date/time information
1 byte of flag bits
        when (0x80), not used
        alarm (0x40)
        repeat (0x20)
        note (0x10)
        exceptions (0x08)
        description (0x04)
1 byte of padding

followed by the optional fields (1 or more bytes of 
alarm-repeat-note-exceptions-description).

Whether or not an optional field is there is 
signaled by its bit being set in the flay byte.

Alarm is a 2-byte, fixed length field.
Repeat is an 8-byte, fixed length field.
Note is a null terminated string.
Exceptions is a 2-byte count, followed by
that many 2-byte dates.
Description is a null terminated string.

You will find the precise format of each of
these elements in DateDB.h.

Hope this helps.

bob (i read the code for you) mckenzie

-----Original Message-----
From: Andrew Francis [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 09, 2001 4:12 AM
To: Palm Developer Forum
Subject: Format of Datebook database


I'm trying to figure out the format of the Datebook database on the Palm,
and I'm getting nowhere. All I've managed to find is source code for things
that use the format (the sample Datebook conduit in the CDK, and source in
the Coldsync and pilot-link utilities) - but while the code may work it's
hardly clear on what exactly it's doing :)

Searching the web and the knowledge base isn't really helping me either.
Does anyone know of a textual description of the datebook format on the
handheld?

Thanks

--
Andrew Francis
[EMAIL PROTECTED]





-- 
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to