The APPINFO block of a CASL pdb file. /* User defined AppInfo block */ #define dmRecNumCategories 16 #define dmCategoryLength 16 /* bit flag in status_word indicating DB changed by CASL conduit */ #define CASL_DB_SYNCED 1 /* bit flag in status_word indicating there is an ODBC data_source_name for the DBFILE */ /* if this is set then the data source name follows casl_app_info */ #define CASL_DATA_SOURCE_NAME_PRESENT 2 /* number of bytes in the data source name area */ #define CASL_DATA_SOURCE_NAME_SIZE 32 typedef struct { CASL_WORD renamedCategories; /* bitfield of categories with a changed name */ char categoryLabels[dmRecNumCategories][dmCategoryLength]; CASL_BYTE categoryUniqIDs[dmRecNumCategories]; CASL_BYTE lastUniqID; /* Uniq IDs for categories generated by device */ /* are 0 - 127. Those from PC are 128 - 255. */ CASL_BYTE reserved1; /* from the compiler word aligning things */ CASL_WORD reserved2; CASL_WORD status_word; /* LSB is dirty (from sync) bit for the DBFILE */ CASL_WORD sync_pref; /* sync preference (SYNC_PREF_UNDEFINED, */ /* SYNC_PREF_PDA_TO_PC, */ /* (see casltabl.h) SYNC_PREF_MERGE, */ /* SYNC_PREF_PC_TO_PDA */ CASL_DWORD sync_version; /* sync version should be 2 */ CASL_DWORD spare2; /* spares for future use */ CASL_DWORD spare3; CASL_WORD num_casl_fields; /* number of CASL record fields for DBFILE */ /* the records for each FIELD on the DBFILE */ /* alloced here at the end of app info blk */ } casl_app_info; /* CASL DB Field - info about fields that make up a record in a CASL DB Follows casl_app_info if CASL_DATA_SOURCE_NAME_PRESENT set then data source name follows casl_app_info then fields follow that (note data source name is always CASL_DATA_SOURCE_NAME_SIZE and is null terminated (so max size is really 31 characters plus one for null). */ typedef struct { CASL_WORD cdf_sym_index; CASL_WORD cdf_sym_type; CASL_WORD cdf_sym_size; } CASL_db_field; /* sync_pref */ #define SYNC_PREF_UNDEFINED 0 #define SYNC_PREF_PDA_TO_PC 1 #define SYNC_PREF_PC_TO_PDA 2 #define SYNC_PREF_MERGE 3 #define SYNC_PREF_NONE 4 /* Each record is a standard PalmPilot records with the following data content defined by the casl_app_info and structures contained in the PalmPilot user defined AppInfo block For example if there where two numeric fields then the first 8 bytes (after the standard Palm record header) would be the first field and the next 8 bytes would be the second field */ /* Data type symbolic definitions */ #define DT_NUM 0 /* Numeric type def (double) */ #define DT_STR 1 /* Null termed string */ #define DT_ARRAY 2 /* Numeric array type (double) */ #define DT_STR_ARRAY 3 /* Array of strings (not used in database)*/ #define DT_BYTE_ARRAY 4 /* Array of bytes */ /* going from PDA to PC */ DT_NUM is a C double (byte swap when going to PDA->PC) DT_STR is a C null terminated string (add carriage returns for line feeds with out CR's, even #bytes long) DT_ARRAY is an array of doubles with CASL_db_field->m_wSymSize elements DT_BYTE_ARRAY is a byte array that is CASL_db_field->m_wSymSize long. /* going from PC to PDA */ DT_NUM is a C double (byte swap when going to PC->PDA) DT_STR is a C null terminated string (strip carriage returns from CR-LF, even #bytes long) DT_ARRAY is an array of doubles with CASL_db_field->m_wSymSize elements DT_BYTE_ARRAY is a byte array that is CASL_db_field->m_wSymSize long.