Private Records
 

 < Home   < Developers   < Development Support   < Documentation

16 Private Records


 Table of Contents  |  < Previous  |  Next >  |  Index
   
   

Title -
Palm OS® Programmer's API Reference

Part I: User Interface

16 Private Records

Private Record Data Structures

privateRecordViewEnum

Private Record Functions

SecSelectViewStatus

SecVerifyPW

       

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

Private Record Data Structures

Private Record Functions

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

None

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

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