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

Re: [coldsync-hackers] Sync conduit



On Mon, Jun 04, 2001 at 11:18:02AM +0200, Wocjciech Godyński wrote:
> How does sync conduit make *.pdb file in backup directory?

	If you're using the ColdSync.pm Perl module, then $PDB will
automatically be written at the end of the sync. It will be written to
the file given by the "OutputDB" conduit header.
	Otherwise, you can always use

	$PDB->Write("/path/to/file.pdb");

> How to delete all records in easiest way? (Andrew said that there is
> special argument which tells dlpdeleterecord to delete all records, but
> I cannot find out).

	Look in the Palm Software Developer's Kit (SDK). Specifically,
in the file Incs/System/DLCommon.h:

    //////////////////////////////////////////////////////////////////////////
    // dlpDeleteRecord
    //////////////////////////////////////////////////////////////////////////
    //
    //    Possible error codes
    //       dlpRespErrSystem,
    //       dlpRespErrParam,
    //       dlpRespErrNotFound
    //       dlpRespErrNotSupported
    //       dlpRespErrReadOnly
    //       dlpRespErrNoneOpen
    //

    // Request argument structure:
    //
    #define dlpDeleteRecordReqArgID  dlpFirstArgID

    // Argument structure to delete by record
    ID(dlpDeleteRecordReqIDArgID):
    typedef struct DlpDeleteRecordReqType {
                                    // OFFSET
       Byte              dbID;          // 0;    database id
       Byte              flags;         // 1;    flags (dlpDeleteRecFlagDeleteAll)
       DWord             recordID;      // 2;    unique record id (see flags)
                                        // TOTAL: 6 bytes;
       } DlpDeleteRecordReqType;

    // dlpDeleteRecFlagDeleteAll: if this flag is set, the reocordID field
    // is ignored and all database records will be deleted
    #define dlpDeleteRecFlagDeleteAll      0x80

    // dlpDeleteRecFlagByCategory: if this flag is set, the least significant byte
    // of the reocordID field contains the category id of records to be deleted
    #define dlpDeleteRecFlagByCategory     0x40

    // Response argument structure:
    //
    //    none.

So set 'flags' to 0x80.

-- 
Andrew Arensburger                      This message *does* represent the
arensb@ooblick.com                      views of ooblick.com
	     My commitment is to truth, not consistency.
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.