libpdb(3)

NAME

libpdb - library for reading and writing Palm database files

SYNOPSIS

#include <palm.h>
#include <pdb.h>
Function prototypes are given in their respective man pages.
If
libpdb was built with I18N support, you  may  need  to  link
with -lintl

DESCRIPTION

The libpdb library provides functions for reading and writ
ing Palm database files, both PDB (record database) and PRC (re
source database).

INTRODUCTION

A Palm database file has the following overall structure:

· Header.
This includes the database's name; attribute flags; ver
sion; creation, modification, and backup time; modification num
ber; type; creator; and unique ID number seed. It also specifies
whether or not the database has an AppInfo and/or sort block.
The creator field identifies the application with which
the database is associated: it will be the same as the creator
field of the application database.
· Index header.
· Record/resource index.

The index lists the locations of records or resources in
the database. The index header specifies the number of records
in the index, and may optionally point to another index in the
database. libpdb manages the index and index header.
· Optional AppInfo block.

The AppInfo block contains application-specific data
that pertains to the database as a whole. Typically, it contains
category information, as well as user preference settings.
· Optional sort block.

I'm not sure what this is. I think it specifies the or
der in which to display the records.
· Records/resources.

FUNCTIONS

libpdb includes the following functions, which are described
in their respective manual pages:
void free_pdb(struct pdb *db)
struct pdb * new_Record(const ubyte flags, const ubyte
category, const udword id, const uword len, const ubyte *data)
struct pdb_resource * new_Resource(const udword type, const
uword id, const uword len, const ubyte *data)
void pdb_FreeRecord(struct pdb_record *rec)
void pdb_FreeResource(struct pdb_resource *rsrc)
struct pdb * pdb_Read(int fd)
int pdb_Write(const struct pdb *db, int fd)
struct pdb_record * pdb_FindRecordByID(const struct pdb *db,
const udword id)
struct pdb_record * pdb_FindRecordByIndex(const struct pdb
*db, const uword index)
int pdb_DeleteRecordByID(struct pdb *db, const udword id)
int pdb_AppendRecord(struct pdb *db, struct pdb_record
*newrec)
int pdb_AppendResource(struct pdb *db, struct pdb_resource
*newrsrc)
int pdb_InsertRecord(struct pdb *db, struct pdb_record
*prev, struct pdb_record *newrec)
int pdb_InsertResource(struct pdb *db, struct pdb_resource
*prev, struct pdb_resource *newrsrc)
struct pdb_record * new_Record(const ubyte attributes, const
ubyte category, const udword id, const uword len, const ubyte
*data)
struct pdb_record * pdb_CopyRecord(const struct pdb *db,
const struct pdb_record *rec)
struct pdb_resource * pdb_CopyResource(const struct pdb *db,
const struct pdb_resource *rsrc)
int pdb_LoadHeader(int fd, struct pdb *db)

AUTHORS

Andrew Arensburger <arensb@ooblick.com>

LIMITATIONS

Does not support multiple indexes in one database.
BSD July 10, 2001
Copyright © 2010-2025 Platon Technologies, s.r.o.           Home | Man pages | tLDP | Documents | Utilities | About
Design by styleshout