Previous Page Table of Contents Index Next Page

Palm OS SDK Reference


Palm Logo 15 Private Records

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

Private Record Data Structures

privateRecordViewEnum

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

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

Value Descriptions

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




SecSelectViewStatus

Purpose

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

Prototype

privateRecordViewEnum SecSelectViewStatus (void)

Parameters

 

Result

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

Purpose

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

Prototype

Boolean SecVerifyPW (privateRecordViewEnum newSecLevel)

Parameters

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

Result

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.



Palm OS SDK Reference

  Previous Page Table of Contents Index Next Page  

This is page 17 of 85 in this book

Palm Computing Platform Development Zone
Copyright © 2000, Palm, Inc. All rights reserved.