[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [coldsync-hackers] p5-palm: private records in datebook?



On Sat, 16 Sep 2000, Grant Taylor wrote:
> Hi there.  I'm trying to write a little datebook program using
> Palm::Datebook (1.1.12), and I can't figure out how to identify
> private/secret appointment records.
> 
> The usual secret bit in the attributes from the PDB record list
> doesn't seem to be set by the datebook program.  Or at least the
> attributes value there is zero for every appointment I have.  I even
> went and read the Palm PDB format documentation, and I swear the
> Palm::PDB code is correct.

	Weird. One thing you can do is to run 'pdbdump' on your
DatebookDB.pdb file. The record index entries at the top will list entries
marked as private (at least, it does for me). This might help you narrow
things down and see if it's a bug in your code or mine.

	And in case the manual wasn't clear, the following script will
list the private and non-private records:

#!/usr/bin/perl
use Palm::Datebook;

my $pdb = new Palm::PDB;
my $record;

$pdb->Load("DatebookDB.pdb");
foreach $record (@{$pdb->{records}})
{
	if ($record->{attributes}{private})
	{
		print "Record $record->{id} is private.\n";
	} else {
		print "Record $record->{id} is not private.\n";
	}
}

> There is also no obvious bit elsewhere in the actual record that might
> tell me this; no one bit in the other_flags value which ::Datebook
> returns seems to correspond to the appointment's being secret or not.

	I think "other_flags" is sort of a dummy field. The "flags" field
is a long with a bunch of (Datebook-specific) flags defined. A lot of them
are documented, but most of it is unused. The "other_flags" field is
mainly there so that, even if Palm adds new flags, Palm::Datebook will
still work.

> Are there official Palm docs on the Datebook format somewhere?  I only
> found the generic PDB/PRC/PQA manual, but none documenting the pdb
> formats for the "big four" Palm apps.

	I don't remember where I originally got the descriptions of the
various formats, but the source to the "big four" are in the latest
version of the SDK, so I probably got it from there.

-- 
Andrew Arensburger                      This message *does* represent the
arensb@ooblick.com			views of ooblick.com
  A mathematician is a machine for converting coffee into theorems.



--
This message was sent through the coldsync-hackers mailing list.  To remove
yourself from this mailing list, send a message to majordomo@thedotin.net
with the words "unsubscribe coldsync-hackers" in the message body.  For more
information on Coldsync, send mail to coldsync-hackers-owner@thedotin.net.