> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Ralf Dietrich
> Sent: Friday, July 11, 2003 1:24 AM
> To: Palm Developer Forum
> Subject: Re: Repost: exporting file from Card w/o conduit
> 
> 
> Richard Coutts wrote:
> 
> > Sorry about the repost -- I'm a bit stressed about finding 
> an answer 
> > and am not finding much information in my searches on the 
> net and the 
> > documents (though I may be looking in the wrong places).
> > 
> > My app needs to export files on the expansion ard to the desktop 
> > without a conduit.  They're large non-pdb files, ~1Mb.  I'm using
> > VFSRegisterDefaultDirectory() to register a file type so that users 
> > can import files directly to the expansion card using Palm Quick 
> > Install.  That part's working great, but it's not clear to 
> me how to 
> > do the converse -- to export a file of the same type from the card 
> > back to the desktop computer.
> > 
> > Is it possible to do this without developing a custom conduit?
> As i understand your plan, no. The palm desktop software doesn't 
> backup/restore palm database from the expansion card. So i 
> recommend two 
> ways:
> 
> - Set the backup bit of your palm database, to transport this 
> from main 
> memory back to the desktop without a conduit

The difficulty in this approach is that you must -temporarily- copy the
PDB to storage (main) memory.  So if you have "/PALM/Programs/MyApp/My
Database.pdb" on a SD card and you want the next HotSync to back the up
to the desktop, you need to:

1) VFSImportDatabaseFromFile() to copy the file from the SD card onto
the device's storage memory as a database.
2) Set the backup bit on the storage-memory copy.  This way, the next
HotSync that happens will sync the database.
3) After the HotSync, delete the storage-memory copy.  Or, if it has
been updated as a result of the HotSync, overwrite the one on your SD
card with VFSExportDatabaseToFile() and THEN delete the storage-memory
copy.

> - Write a simple conduit, where you can exactly do your needs. Based 
> upon the TxtConduit example (see Conduit SDK). This requires 
> only about 
> 10 lines of sync-manager calls and is not hard to manage. You 
> will not 
> need to bother within synchronisation frameworks (PFC, 
> Generic Conduit).

Yes, this is probably a better solution, but I've found that Palm
developers shy away from conduits because then you have to figure out
how to deploy the conduit for your customers (e.g., write an installer
etc) :)

-Jeff Ishaq



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to