On Mon, Jan 22, 2001 at 09:52:49AM -0800, Jeremy Evans wrote:
> I have a file stream db that I would like to beam in it's raw format
> to a non palm device.
> Any pointers on the best way to use this?
> It would be run on Palm OS 3.1 or higher.

If the far end supports IrOBEX, you can use the standard stuff (though
not the ExgDBread/write - ZBoxZ - palmboxer.sourceforge.net beams
filestreams), but might have to set a MIME type or something so the
far end knows what to do with it.

Then it is a matter of doing the send, but instead of doing ExgDBRead,
you do file reads: (this is from my beambox routine in
zboxz/handlers.c)

  MemSet(&exgSocket, sizeof(exgSocket), 0);

//The following have to be set for the target to know the type of file, and possibly 
more:

  exgSocket.description = filelp[i] + SORTPREFIX;
  exgSocket.name = filelp[i] + SORTPREFIX;
  exgSocket.length = len;
  exgSocket.target = 'BOXR';

  if (!ExgPut(&exgSocket)) {
    xcnt = 0;
    while (xcnt < len) {
      tlen = FileRead(fd, ibuf, 1, BSIZ, NULL);
      xcnt += tlen;
      px = ibuf;
      while (tlen) {
        outhis = ExgSend(&exgSocket, px, tlen, &err);
        if (err)
          break;
        tlen -= outhis;
        px += outhis;
        EvtResetAutoOffTimer();
      }
    }


If you use IrCOMM, you can use YModem or something similar.

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

Reply via email to