[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [coldsync-hackers] Categories in conduits
- To: coldsync-hackers at lusars dot net
- Subject: Re: [coldsync-hackers] Categories in conduits
- From: Christophe Beauregard <christophe dot beauregard at sympatico.ca>
- Date: Sat, 21 Feb 2004 23:40:11 -0500
- In-reply-to: <4037EEA1.904@84andahalf.com>
- References: <4037EEA1.904@84andahalf.com>
- Reply-to: coldsync-hackers at lusars dot net
- Sender: owner-coldsync-hackers at lusars dot net
- User-agent: KMail/1.6
On Saturday 21 February 2004 18:49, Marco van Beek wrote:
> Hi All,
>
> I have added some code in one of my conduits to synchronise (fetch, dump
> actually) an application's categories (in this case Memo), and it would
> appear that I can write to the PDB file during the fetch phase (using
> both addCategory and renameCategory), and those changes are there in the
> dump phase. They are still there on the next cycle.
>
> However, this data is not being send down to the palm.
Yeah, I've had to restore a lot from backup lately and I've really noticed
that categories aren't synched. It's been something that I've wanted to
fix, but it's a very thorny problem.
> The only conduit I can find is in CVS (std-categories), and that would
> seem to infer that I have to mark the category record as dirty (as you
> would with a standard data record).
>
> If this is the case, is it just a matter of something like:
Not so simple, unless I'm reading wrong. coldsync's generic sync
(coldsync/src/conduits/generic.cc) ignores the appinfo block. So even if
you set the dirty flags, your changes won't get sent to the PDA or vice
versa.
The only way to "sync" the PDA and backup databases is to actually copy the
AppInfo block directly.
std-categories includes some (commented out) code to handle uploading
appinfo changes to the PDA. As it's written, it's a one-way copy from the
PDA to the backup. Actually, it's worse than that because everything up to
that commented out line seems to assume that all the changes will go all
the way through.
The copy-appinfo conduit shows how to copy the categories _from_ the PDA,
although it doesn't try the more sophisticated merge algorithm that
std-categories does. Copying to the PDA should be about as easy. That might
be adequate if all you'rem doing is renaming categories.
In any case, you'll need an actual sync conduit to do the work. You won't be
able to make it happen with just fetch and dump conduits.
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.