API Guide Home (Online version only) |

# FavoritesDBLib.h File Reference

## Detailed Description

Contains the API to control the Favorites DB.

Definition in file FavoritesDBLib.h.

Go to the source code of this file.

## Enumerations

- enum FavDBLibPhoneViewEnum {
  favDBLibPhoneViewCallLog = 0,
  favDBLibPhoneViewDialPad,
  favDBLibPhoneViewContacts
  }

## Functions

- Err FavDBLibOpen (UInt16 refNum)
- Err FavDBLibClose (UInt16 refNum)
- Err FavDBLibWake (UInt16 refNum)
- Err FavDBLibSleep (UInt16 refNum)
- Err FavDBLibNewAppFavorite (UInt16 refNum, Word position, CharPtr labelP, WChar quickKey, Word flags, UInt32 appCreator, WordPtr indexP)
- Err FavDBLibNewPhoneFavorite (UInt16 refNum, Word position, CharPtr labelP, WChar quickKey, Word flags, CharPtr numberP, CharPtr extraDigitsP, Boolean autoDialExtraDigits, UInt32 ringID, UInt16 ringToneType, WordPtr indexP)
- Err FavDBLibNewMsgFavorite (UInt16 refNum, Word position, CharPtr labelP, WChar quickKey, Word flags, CharPtr contactIdP, WordPtr indexP)
- Err FavDBLibNewWebFavorite (UInt16 refNum, Word position, CharPtr labelP, WChar quickKey, Word flags, CharPtr urlP, WordPtr indexP)
- Err FavDBLibNewEmailFavorite (UInt16 refNum, Word position, CharPtr labelP, WChar quickKey, Word flags, CharPtr contactIdP, WordPtr indexP)
- Err FavDBLibNewPhoneViewFavorite (UInt16 refNum, Word position, CharPtr labelP, WChar quickKey, Word flags, UInt16 phoneView, WordPtr indexP)
- CharPtr FavDBLibResolveAddress (UInt16 refNum, CharPtr addressP, Word kind)
- Boolean FavDBLibSeekSpeedDialRecord (UInt16 refNum, UInt16 *indexP, Int16 offset, Int16 direction)
- Boolean FavDBLibGetRecordLabel (UInt16 refNum, UInt16 index, CharPtr *labelPP)
- Err FavDBLibGetRecordId (UInt16 refNum, UInt16 index, UInt32 *uniqueIdP)
- Err FavDBLibIsFavoriteWithId (UInt16 refNum, UInt32 keyId, BooleanPtr existsP)
- Boolean FavDBLibGetSpeedDialInfo (UInt16 refNum, UInt16 index, CharPtr *numberPP, CharPtr *extraDigitsPP, BooleanPtr autoExtraDigitsP, BooleanPtr isVoicemailP)
- Boolean FavDBLibLookupInSpeedDialDB (UInt16 refNum, CharPtr keyP, CharPtr *nameP)

## Enumeration Type Documentation

enum FavDBLibPhoneViewEnum

List of different views in the phone applications.

Enumerator:

  favDBLibPhoneViewCallLog | call log view
  favDBLibPhoneViewDialPad | dial pad view
  favDBLibPhoneViewContacts | contacts view

Definition at line 19 of file FavoritesDBLib.h.

    00020 {
    00021   favDBLibPhoneViewCallLog = 0, /**< call log view */
    00022   favDBLibPhoneViewDialPad,     /**< dial pad view */
    00023   favDBLibPhoneViewContacts     /**< contacts view */
    00024 } FavDBLibPhoneViewEnum;

## Function Documentation

Err FavDBLibClose | ( | UInt16 | refNum | ) |

Standard library close function

Parameters:

  | refNum,: | IN: Favorites DB library reference number (from SysLibFind()/SysLibLoad())

Return values:

  | Err | Error code.

Err FavDBLibGetRecordId | ( | UInt16 | refNum,
|  | UInt16 | index,
|  | UInt32 * | uniqueIdP |
| ) |  |  |

Get the unique ID of an entry given the record index in the Favorites DB.

Parameters:

  | refNum,: | IN: library reference number.
  | index,: | IN: index of the record to get unique id from.
  | uniqueIdP,: | OUT: unique ID of the record.

Return values:

  | Err | Error code.

Boolean FavDBLibGetRecordLabel | ( | UInt16 | refNum,
|  | UInt16 | index,
|  | CharPtr * | labelPP |
| ) |  |  |

Get the label from the favorite item given the record index.

Parameters:

  | refNum,: | IN: library reference number.
  | index,: | IN: index of the record to get label from.
  | labelPP,: | OUT: pointer to the label string.

Return values:

  | Boolean | True if found. Otherwise, false.

Boolean FavDBLibGetSpeedDialInfo | ( | UInt16 | refNum,
|  | UInt16 | index,
|  | CharPtr * | numberPP,
|  | CharPtr * | extraDigitsPP,
|  | BooleanPtr | autoExtraDigitsP,
|  | BooleanPtr | isVoicemailP |
| ) |  |  |

Get full info about the favorite phone number given the record index.

Parameters:

  | refNum,: | IN: library reference number.
  | index,: | IN: index of the item in the DB.
  | numberPP,: | OUT: pointer to the speed dial phone number.
  | extraDigitsPP,: | OUT: pointer to the extra digits in the phone number.
  | autoExtraDigitsP,: | OUT: if true, extra digits are auto-dialed.
  | isVoicemailP,: | OUT: if true, phone number is a voicemail number.

Return values:

  | Boolean | True if found.

Err FavDBLibIsFavoriteWithId | ( | UInt16 | refNum,
|  | UInt32 | keyId,
|  | BooleanPtr | existsP |
| ) |  |  |

Determine whether item with keyId is in the favorites DB.

Parameters:

  | refNum,: | IN: library reference number.
  | keyId,: | IN: unique id of the item whose info is to be obtained.
  | existsP,: | OUT: true if item is found among favorites.

Return values:

  | Err | Error code.

Boolean FavDBLibLookupInSpeedDialDB | ( | UInt16 | refNum,
|  | CharPtr | keyP,
|  | CharPtr * | nameP |
| ) |  |  |

no definition.

Parameters:

  | refNum,: | IN: library reference number.
  | keyP,: | IN: no definition.
  | nameP,: | OUT: no definition.

Return values:

  | Boolean | True if found.

Err FavDBLibNewAppFavorite | ( | UInt16 | refNum,
|  | Word | position,
|  | CharPtr | labelP,
|  | WChar | quickKey,
|  | Word | flags,
|  | UInt32 | appCreator,
|  | WordPtr | indexP |
| ) |  |  |

Create a new favorite application entry.

Parameters:

  | refNum,: | IN: library reference number.
  | position,: | IN: position of the new favorite app in the entries.
  | labelP,: | IN: pointer to the label of the newly created entry.
  | quickKey,: | IN: shortcut used to start favorite app.
  | flags | IN: no definition.
  | appCreator | IN: Creator ID of the new favorite app.
  | indexP | OUT: index of the new entry in the DB.

Return values:

  | Err | Error code.

Err FavDBLibNewEmailFavorite | ( | UInt16 | refNum,
|  | Word | position,
|  | CharPtr | labelP,
|  | WChar | quickKey,
|  | Word | flags,
|  | CharPtr | contactIdP,
|  | WordPtr | indexP |
| ) |  |  |

Create a new favorite email entry.

Parameters:

  | refNum,: | IN: library reference number.
  | position,: | IN: position of the new favorite email in the entries.
  | labelP,: | IN: pointer to the label of the newly created entry.
  | quickKey,: | IN: shortcut used to start sending email to the new favorite .
  | flags,: | IN: no definition.
  | contactIdP,: | IN: Email address in string.
  | indexP,: | OUT: index of the new entry in the DB.

Return values:

  | Err | Error code.

Err FavDBLibNewMsgFavorite | ( | UInt16 | refNum,
|  | Word | position,
|  | CharPtr | labelP,
|  | WChar | quickKey,
|  | Word | flags,
|  | CharPtr | contactIdP,
|  | WordPtr | indexP |
| ) |  |  |

Create a new favorite messaging destination.

Parameters:

  | refNum,: | IN: library reference number.
  | position,: | IN: position of the new favorite contact in the entries.
  | labelP,: | IN: pointer to the label of the newly created entry.
  | quickKey,: | IN: shortcut used to start composing message to the contact.
  | flags,: | IN: No definition.
  | contactIdP | IN: Mobile number/ Email address of the new favorites messaging contact.
  | indexP | OUT: index of the new entry in the DB.

Return values:

  | Err | Error code.

Err FavDBLibNewPhoneFavorite | ( | UInt16 | refNum,
|  | Word | position,
|  | CharPtr | labelP,
|  | WChar | quickKey,
|  | Word | flags,
|  | CharPtr | numberP,
|  | CharPtr | extraDigitsP,
|  | Boolean | autoDialExtraDigits,
|  | UInt32 | ringID,
|  | UInt16 | ringToneType,
|  | WordPtr | indexP |
| ) |  |  |

Create a new favorite phone number.

Parameters:

  | refNum,: | IN: library reference number.
  | position,: | IN: position of the new favorite phone number in the entries.
  | labelP,: | IN: pointer to the label of the newly created entry.
  | quickKey,: | IN: shortcut used to call the number.
  | flags,: | IN: no definition.
  | numberP,: | IN: New favorite phone number in string.
  | extraDigitsP,: | IN: Extra digits.
  | autoDialExtraDigits,: | IN: Always include extra digit when dialing if true.
  | ringID,: | IN: Ring tone ID for this number.
  | ringToneType,: | IN: Ring tone type for this number.
  | indexP,: | OUT: index of the new entry in the DB.

Return values:

  | Err | Error code.

Err FavDBLibNewPhoneViewFavorite | ( | UInt16 | refNum,
|  | Word | position,
|  | CharPtr | labelP,
|  | WChar | quickKey,
|  | Word | flags,
|  | UInt16 | phoneView,
|  | WordPtr | indexP |
| ) |  |  |

Create a new favorite phone app view.

Parameters:

  | refNum,: | IN: library reference number.
  | position,: | IN: position of the new favorite in the entries.
  | labelP,: | IN: pointer to the label of the newly created entry.
  | quickKey,: | IN: shortcut used to launch phone app in the favorite view.
  | flags,: | IN: no definition.
  | phoneView,: | IN: See FavDBLibPhoneViewEnum for values.
  | indexP,: | OUT: index of the new entry in the DB.

Return values:

  | Err | Error code.

Err FavDBLibNewWebFavorite | ( | UInt16 | refNum,
|  | Word | position,
|  | CharPtr | labelP,
|  | WChar | quickKey,
|  | Word | flags,
|  | CharPtr | urlP,
|  | WordPtr | indexP |
| ) |  |  |

Create a new favorite URL.

Parameters:

  | refNum,: | IN: library reference number.
  | position,: | IN: position of the new favorite URL.
  | labelP,: | IN: pointer to the label of the newly created entry.
  | quickKey,: | IN: shortcut used to launch the URL.
  | flags,: | IN: no definition.
  | urlP,: | IN: the URL in string.
  | indexP,: | OUT: index of the new entry in the DB.

Return values:

  | Err | Error code.

Err FavDBLibOpen | ( | UInt16 | refNum | ) |

Standard library open function

Parameters:

  | refNum,: | IN: Favorites DB library reference number (from SysLibFind()/SysLibLoad())

Return values:

  | Err | Error code.

CharPtr FavDBLibResolveAddress | ( | UInt16 | refNum,
|  | CharPtr | addressP,
|  | Word | kind |
| ) |  |  |

No definition.

Parameters:

  | refNum,: | IN: library reference number.
  | addressP,: | IN: pointer to the address string to be resolved.
  | kind,: | IN: no definition.

Return values:

  | CharPtr | no definition.

Boolean FavDBLibSeekSpeedDialRecord | ( | UInt16 | refNum,
|  | UInt16 * | indexP,
|  | Int16 | offset,
|  | Int16 | direction |
| ) |  |  |

No definition.

Parameters:

  | refNum,: | IN: library reference number.
  | indexP,: | IN,OUT: no definition.
  | offset,: | IN: offset in the DB record indeces to start search from.
  | direction,: | IN: Forward/backward search from offset.

Return values:

  | Boolean | True if found. Otherwise, false.

Err FavDBLibSleep | ( | UInt16 | refNum | ) |

Standard library sleep function

Parameters:

  | refNum,: | IN: Favorites DB library reference number (from SysLibFind()/SysLibLoad())

Return values:

  | Err | Error code.

Err FavDBLibWake | ( | UInt16 | refNum | ) |

Standard library wake function

Parameters:

  | refNum,: | IN: Favorites DB library reference number (from SysLibFind()/SysLibLoad())

Return values:

  | Err | Error code.

Top | Palm Developer Network © 2004-2008, Palm, Inc. All rights reserved. Generated on Fri Jun 13 10:06:57 2008 for Palm API Guide