palm.h File Reference

Read Palm Desktop (for PC) files: address,datebook,memopad,todo. More...

Go to the source code of this file.

Functions

void ReadPalm ()
 Read Palm Desktop (for PC) files: address,datebook,memopad,todo.


Detailed Description

Read Palm Desktop (for PC) files: address,datebook,memopad,todo.

Author:
Bryan Jacobson, 2006.

Function Documentation

void ReadPalm  ) 
 

Read Palm Desktop (for PC) files: address,datebook,memopad,todo.

This function reads the datebook file.

DATEBOOK FILE FORMAT for Palm Desktop (for PC) version 4.1.4

Thank you to Scott Leighton (helphand@pacbell.net) for information describing the format of Palm Desktop files. Scott's information described an earlier file version, but much of the format is the same. URL: http://www.geocities.com/Heartland/Acres/3216/palmrecs.htm.

Notes: 1. File is located at: "c:/Program files/palmOne/<USER>/datebook/datebook.dat"; 2. Mostly the data seems very stream oriented with little or no alignment padding. 3. There are many fields I do not understand. The information here is what I've deduced from files on my PC, from my Palm data. Conclusions I've reached may not be correct, and/or may not apply to other people's Palm data. 4. Palm does not document this file format, recommends against programming to this file format, and indicates the format may change at any time. 5. USE OF THIS INFORMATION IS STRICTLY AT YOUR OWN RISK.

Palm file data types: Int: 32 bit integer, stored LSB first. Short: 16 bit integer, stored LSB first. Byte: 8 bit integer CString:

  • If length < 255: Byte with length, then length of chars
  • If length >= 255: Byte with 0xFF, then short with length of chars, then length chars.

Field types: 1: Int 3: Time: Int with number of seconds since Jan 1, 1900. 5: Int with 0x0000 padding, followed by CString. 6: Boolean: Int containing 0x0 or 0x1. 8: Repeating calendar entry - format described below. 64: Int, ?Purpose unknown 65: Int, ?Purpose unknown 66: Int, ?Purpose unknown 67: Int, ?Purpose unknown

Datebook file format:

Type Contents Description ------- ---------- ----------- Int 0xCAFEBABE Content 0xCAFEBABE indicate Palm Desktop file. CString "PalmSG Database" Byte 0x0 Padding? CString "BD" BD means Datebook Int 0x0 Padding? (or Future use TBD) Int 0x0 Padding? (or Future use TBD) Int 0x0 Padding? (or Future use TBD) Int 0x1947 ?Purpose unknown Int 0x0 Padding? (or Future use TBD) Int 0x0 Padding? (or Future use TBD) CString "C:\Program Files\palmOne\<USER>\datebook\datebook.dat" Byte 0x0 Padding? Byte 0x0 Padding? Byte 0x1 ?Purpose unknown Int 0x2 ?Purpose unknown Int 0x0 Padding? (or Future use TBD) Int 0x0 Padding? (or Future use TBD) Int 0x1000000 ?Purpose unknown Int 0x1 ?Purpose unknown Int 0x0 Padding? (or Future use TBD) Int 0x0 Padding? (or Future use TBD) Int 0x0 Padding? (or Future use TBD) Int 0x0 Padding? (or Future use TBD) Int 0x0 Padding? (or Future use TBD)

Categories: Int 128+n Next available category ID, 128 + # of categories Int n Number of categories

Repeat n times, for each category Int ID Category ID (0x128, 0x129, . . .) Int index Category index (1, 2, . . .) CString Long name of category CString Short name of category (note: for me, same as long)

Int 54 ? 2*Number of schema fields? Int 27 ? Number of schema fields? Int 0x0 Offset to Record Id Int 0x2 Offset to Record sync status Int 0x4 Offset to Record line number

Schema: Short 27 Number of field per row (entry) in schema Short with field data type for each of 27 fields: Short[27] { 1, 1, 1, 1, 1, 1, 6, 64, 65, 66, 67, 5, 5, 3, 3, 5, 6, 6, 1, 1, 8, 5, 1, 5, 5 } Int N*27 Total fields: 27 * N entries Int N # of Datebook (calendar) entries

N Datebook entry records, one for each datebook entry -----------------------------------------------------

  • Each record has 27 fields
  • Each field starts with an Int containing the field type (1, 3, 5, 6 etc.)
  • The field type is then followed by data.
  • Field types 1, 3, 6, 64, 65, 66, 67 are followed by an Int.
  • Field type 5 is followed by an Int with 0x0000 (?padding) and then a CString.
  • Field type 8 (repeating datebook entry) is variable length and has a complex format described below.

Field Data # Type Type Description -- ----- ---- ------------ 0 1 Int Record Id (example: 0x80c85b, 0x80c7ae, etc.) 1 1 Int Record number (example: 4096, 4097, 4098, ...) 2 1 Int Record sync status bits: 0x08=Pending, 0x04=Delete, 0x02=Update, 0x01=Add, 0x80=Archive 3 1 Int Record position by line (0, 27, 54, ...) 4 1 Int Contents=0x7FFFFFF, ?Purpose unknown 5 1 Int Category index (0=unfiled) 6 6 Int Private flag (1=private) 7 64 Int Contents=0, ?Purpose unknown 8 65 Int Contents=0, ?Purpose unknown 9 66 Int Contents=0, ?Purpose unknown 10 65 Int Contents=0, ?Purpose unknown. (Note: Schema indicates 67 at this position, but field type is 65. In any case, it appears to be unused.) 11 5 CString "" (Empty string - ?Purpose unknown.) 12 5 CString "" (Empty string - ?Purpose unknown.) 13 3 Int Start time in seconds since 1/1/1900 14 3 Int End time in seconds since 1/1/1900 15 5 CString Description (title) of entry. 16 1 Int Contents=0, ?Purpose unknown 17 5 CString Note (longer text description) 18 6 Int Untimed flag (day event - not tied to time during day) Note: When Untimed=1, start, end set to 12 noon. 19 6 Int Alarm set flag (0x0=no alarm, 0x1=alarm on) 20 1 Int Alarm advance (example: 5 to sound alarm 5 minutes prior) Note: Alarm advance is -1 if Alarm set=0 21 1 Int Alarm Advance Units: 0=minutes, 1=hours, 2=days 22 8 VARIES Repeat information Short X=Number of exceptions (usually 0) X*Int X Int with time (seconds since 1/1/1900) of exceptions Short Repeat event flag: 0x0: Does not repeate 0xFFFF: Repeat, Class name entry follows 0x80??: Repeat, no class name, ?? is or'd in Brand Note: Following fields *not* present if flag=0x0

Class name entry (only if repeat flag == -1) Short 0x1 (always present as 0x1) Short Number of bytes in class name Char[len] Class name (example: CWeekly, CDateOfYear) Note: Names this repeat brand.

Int Brand of repeat: 1=Daily 3=MonthlyByDay 5=YearlyByDate 2=Weekly 4=MonthlyByDate 6=YearlyByDay Note: Is YearlyByDay used? Unknown how to specify it. Int Interval (Example: 1=every week, 2=every other, etc.) Int End date (or 12/31/2031 if no end date specified) Int First day of week. Means? Apparently always 0.

Brand 1: Daily Int Day Index: Day it starts 0=Sun, 1=Mon ... 6=Sat

Brand 2: Weekly Int Index: meaning unknown, apparently always 1 Int Days Mask: Sun=0x1 Mon=0x2 Tues=0x4 Wed=0x8 Thur=0x10 Fri=0x20 Sat=0x40

Brand 3: MonthlyByDay Int Day of week (0=Sun, 1=Mon, ... 6=Sat) Int Week of month (0=1st week, 1=2nd, 4=last) Note: 3=4th week, 4=last week (sometimes 5th week)

Brand 4: MonthlyByDate Int Day Index: The day of month 1..31

Brand 5: YearlyByDate Int Day number (i.e. Day of month) Int Month index (0=Jan, 1=Feb ... 11=Dec)

Brand 6: YearlyByDate None specified

23 5 CString Location (Note: Entered in PC app, not palm) 24 1 Int Contents=0, ?Purpose unknown 25 5 CString "" (Empty string - ?Purpose unknown.) 26 5 CString "" (Empty string - ?Purpose unknown.)


Generated on Sun Oct 8 09:32:10 2006 for gabbie by  doxygen 1.4.6