Palm::StdAppInfo - Handles standard AppInfo block


NAME

Palm::StdAppInfo - Handles standard AppInfo block


SYNOPSIS

    package MyPDBHandler;
    use Palm::StdAppInfo();
    @ISA = qw( Palm::StdAppInfo );


DESCRIPTION

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


FUNCTIONS

seed_StdAppInfo

    &Palm::StdAppInfo::seed_StdAppInfo(\%appinfo);

Creates the standard fields in an existing AppInfo hash.

newStdAppInfo

    $appinfo = Palm::StdAppInfo->newStdAppInfo;

Like seed_StdAppInfo, but creates the AppInfo hash and returns it.

new

    $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.

parse_StdAppInfo

    $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.

ParseAppInfoBlock

    $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.

pack_StdAppInfo

    $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.

PackAppInfoBlock

    $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.


AUTHOR

Andrew Arensburger <arensb@ooblick.com>


SEE ALSO

Palm::PDB(3)

 Palm::StdAppInfo - Handles standard AppInfo block