[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [coldsync-hackers] Design logic of Sync conduits
On Wednesday 03 March 2004 04:30, Janssen, B.J. wrote:
> I just wrote a Fetch/Dump Conduit combination using the Datebook Perl
> Module and would like to add something like this (sshkey identification)
> to my conduit. How can I do something like that?
Good question. I was thinking from the perspective of a sync conduit, where
you'd create a one-record database with something like:
my $ssh_key = ...
my $dbh = dlp_CreateDB( $creator, $type, ... "MyKeyDB" );
dlp_WriteRecord( $dbh, 0, $ssh_key );
dlp_Close( $dbh );
and later you could retrieve the key via:
my $dbh = dlp_OpenDB( "MyKeyDB", 0x80 );
my $record = dlp_ReadRecordByIndex( $dbh, 0, 0, -1 );
my $ssh_key = $record->{'data'};
To use Palm::PDB to write a raw database file with that record is a little
tougher, since I believe you have to code up a minimalist helper class.
Palm::PDB is more structured than DLP...
I don't have time right now to whip up an example of how that would work,
but you could probably use Palm::Memo as a guideline.
> Can I get information
> from another prc file while I'm fetching from the Datebook?
Sure. Coldsync passes a $HEADERS{PDA-Directory}, so all the databases are
under "$HEADERS{PDA-Directory}/backup".
c.
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.