NAME
DlpDeleteRecord, DlpDeleteResource – delete a record or resource from a PalmOS device
LIBRARY
libpconn
SYNOPSIS
#include <palm.h>
#include <pconn/pconn.h>
int
DlpDeleteRecord(PConnection *pconn, const ubyte handle, const ubyte flags, const udword recid);
int
DlpDeleteResource(PConnection *pconn, const ubyte handle, const ubyte flags, const udword type, const uword id);
DESCRIPTION
DlpDeleteRecord deletes a record in a database. The database must already be open for writing.
handle specifies the database handle, as returned by DlpOpenDB(3).
recid specifies the ID of the record to delete; this identifier is usually gotten with DlpReadRecordIDList().
flags specifies flags:
- DLPCMD_DELRECFLAG_ALL
-
Deletes all records in the database. recid is ignored.
- DLPCMD_DELRECFLAG_CATEGORY
-
Deletes all records in a given category. The least-significant byte of recid specifies the category ID.
DlpDeleteResource deletes a resource in a database. The database must already be open for writing.
handle specifies the database handle, as returned by DlpOpenDB(3).
type and id specify the type and ID, respectively, of the resource to delete.
flags specifies flags. The only useful flag is DLPCMD_DELRSRCFLAG_ALL. When this flag is specified, the type and id arguments are ignored, and DlpDeleteResource deletes all resources in the database.
RETURN VALUE
DlpDeleteRecord and DlpDeleteResource return 0 if successful, or a negative value in case of error.
SEE ALSO
libpconn(3), DlpOpenDB.