Documentation  |   Table of Contents   |  < Previous   |  Next >   |  Index

16    Private Records

Palm OS® Programmer's API Reference

Palm OS® 68K SDK

     

This chapter describes the private records API as declared in PrivateRecords.h. It discusses the following topics:

Private Record Data Structures ^TOP^

privateRecordViewEnum Enum ^TOP^

Purpose

The privateRecordViewEnum enumerated type provides the available choices for displaying private records.

Prototype

typedef enum privateRecordViewEnum {
showPrivateRecords = 0x00,
maskPrivateRecords,
hidePrivateRecords
} privateRecordViewEnum;

Constants

showPrivateRecords
Display private records in the user interface.
maskPrivateRecords
Show a shaded rectangle in place of a private record.
hidePrivateRecords
Hide private records and provide no indication in the user interface that they exist.

Private Record Functions ^TOP^

SecSelectViewStatus Function ^TOP^

Purpose

Display a form that allows the user to select whether to hide, show, or mask private records.

Declared In

PrivateRecords.h

Prototype

privateRecordViewEnum SecSelectViewStatus (
   void
)

Parameters

None

Returns

Returns a constant that indicates which option the user selected. See privateRecordViewEnum.

Comments

This function displays a dialog that allows users to change the preference prefShowPrivateRecords, which controls how private records are displayed.

When the user taps the OK button in this dialog, SecVerifyPW() is called to see if the user changed the preference setting and, if so, to prompt the user to enter the appropriate password.

After calling this function, your code should check the return value or the value of prefShowPrivateRecords and mask, display, or hide the private records accordingly. See the description of TblSetRowMasked() for a partial example.

Compatibility

Implemented only if 3.5 New Feature Set is present.

SecVerifyPW Function ^TOP^

Purpose

Display a password dialog, verify the password, and change the private records preference.

Declared In

PrivateRecords.h

Prototype

Boolean SecVerifyPW(
   privateRecordViewEnumnewSecLevel
)

Parameters

newSecLevel
The security level (display, hide, or mask) selected on the private records dialog.

Returns

Returns true if the prefShowPrivateRecords preference was successfully changed, false if not.

Comments

This function checks newSecLevel against the current value for the preference. If the two values differ and newSecLevel indicates a decrease in security, a dialog is displayed prompting the user to enter a password. (Hidden is considered the most secure, followed by masked. Showing private records is considered the least secure.) If the password is entered successfully, the preference is changed.

This function also displays an alert message if the security level has changed to either hidden or masked.

Compatibility

Implemented only if 3.5 New Feature Set is present.