Palm::StdAppInfo - Handles standard AppInfo block |
Palm::StdAppInfo - Handles standard AppInfo block
package MyPDBHandler; use Palm::StdAppInfo();
@ISA = qw( Palm::StdAppInfo );
Many Palm applications use a common format for keeping track of categories.
The Palm::StdAppInfo
class deals with this common format.
A standard AppInfo block begins with:
short renamed; // Bitmap of renamed category names char labels[16][16]; // Array of category names char uniqueIDs[16]; // Category IDs char lastUniqueID; char padding; // For word alignment
&Palm::StdAppInfo::seed_StdAppInfo(\%appinfo);
Creates the standard fields in an existing AppInfo hash.
$appinfo = Palm::StdAppInfo->newStdAppInfo;
Like seed_StdAppInfo
, but creates the AppInfo hash and returns it.
$pdb = new Palm::StdAppInfo;
Create a new PDB, initialized with nothing but a standard AppInfo block.
There are very few reasons to use this, and even fewer good ones.
$len = &Palm::StdAppInfo::parse_StdAppInfo(\%appinfo, $data);
This function is intended to be called from within a PDB helper class's
ParseAppInfoBlock
method.
parse_StdAppInfo()
parses a standard AppInfo block from the raw
data $data
and fills in the fields in %appinfo
. It returns the
number of bytes parsed.
$pdb = new Palm::StdAppInfo; $pdb->ParseAppInfoBlock($data);
If your application's AppInfo block contains standard category support
and nothing else, you may choose to just inherit this method instead
of writing your own ParseAppInfoBlock
method.
$data = &Palm::StdAppInfo::pack_StdAppInfo(\%appinfo);
This function is intended to be called from within a PDB helper class's
PackAppInfoBlock
method.
pack_StdAppInfo
takes an AppInfo hash and packs it as a string of
raw data that can be written to a PDB.
$pdb = new Palm::StdAppInfo; $data = $pdb->PackAppInfoBlock();
If your application's AppInfo block contains standard category support
and nothing else, you may choose to just inherit this method instead
of writing your own PackAppInfoBlock
method.
Andrew Arensburger <arensb@ooblick.com>
Palm::PDB(3)
Palm::StdAppInfo - Handles standard AppInfo block |