API Guide Home (Online version only) |

# FavoritesDBLib.h

Go to the documentation of this file.

    00001 /******************************************************************************
    00002  * Copyright (c) 2004 palmOne, Inc. or its subsidiaries.
    00003  * All rights reserved.
    00004  *****************************************************************************/
    00005 /**
    00006  * @ingroup Favorites
    00007  */
    00008
    00009 /**
    00010  * @file  FavoritesDBLib.h
    00011  * @brief Contains the API to control the Favorites DB.
    00012  *
    00013  */
    00014
    00015 #ifndef FAVORITESDB_LIB__H__
    00016 #define FAVORITESDB_LIB__H__
    00017
    00018 /** List of different views in the phone applications. */
    00019 typedef enum
    00020 {
    00021   favDBLibPhoneViewCallLog = 0, /**< call log view */
    00022   favDBLibPhoneViewDialPad,     /**< dial pad view */
    00023   favDBLibPhoneViewContacts     /**< contacts view */
    00024 } FavDBLibPhoneViewEnum;
    00025
    00026 #ifdef __cplusplus
    00027 extern "C" {
    00028 #endif
    00029
    00030 /// Standard library open function
    00031 ///
    00032 /// @param refNum: IN: Favorites DB library reference number (from SysLibFind()/SysLibLoad())
    00033 /// @retval Err Error code.
    00034 Err FavDBLibOpen (UInt16 refNum)
    00035                  SYS_TRAP (sysLibTrapOpen);
    00036
    00037 /// Standard library close function
    00038 ///
    00039 /// @param refNum: IN: Favorites DB library reference number (from SysLibFind()/SysLibLoad())
    00040 /// @retval Err Error code.
    00041 Err FavDBLibClose (UInt16 refNum)
    00042                  SYS_TRAP (sysLibTrapClose);
    00043
    00044 /// Standard library wake function
    00045 ///
    00046 /// @param refNum: IN: Favorites DB library reference number (from SysLibFind()/SysLibLoad())
    00047 /// @retval Err Error code.
    00048 Err FavDBLibWake (UInt16 refNum)
    00049                  SYS_TRAP (sysLibTrapWake);
    00050
    00051 /// Standard library sleep function
    00052 ///
    00053 /// @param refNum: IN: Favorites DB library reference number (from SysLibFind()/SysLibLoad())
    00054 /// @retval Err Error code.
    00055 Err FavDBLibSleep (UInt16 refNum)
    00056                  SYS_TRAP (sysLibTrapSleep);
    00057
    00058 /// Create a new favorite application entry.
    00059 ///
    00060 /// @param refNum:      IN:  library reference number.
    00061 /// @param position:    IN:  position of the new favorite app in the entries.
    00062 /// @param labelP:      IN:  pointer to the label of the newly created entry.
    00063 /// @param quickKey:    IN:  shortcut used to start favorite app.
    00064 /// @param flags        IN:  no definition.
    00065 /// @param appCreator   IN:  Creator ID of the new favorite app.
    00066 /// @param indexP       OUT: index of the new entry in the DB.
    00067 /// @retval Err Error code.
    00068 Err FavDBLibNewAppFavorite (UInt16 refNum,
    00069                             Word position,
    00070                             CharPtr labelP,
    00071                             WChar quickKey,
    00072                             Word flags,
    00073                             UInt32 appCreator,
    00074                             WordPtr indexP)
    00075                  SYS_TRAP (favoritesDBLibTrapNewAppFavorite);
    00076
    00077 /// Create a new favorite phone number.
    00078 ///
    00079 /// @param refNum:              IN:  library reference number.
    00080 /// @param position:            IN:  position of the new favorite phone number in the entries.
    00081 /// @param labelP:              IN:  pointer to the label of the newly created entry.
    00082 /// @param quickKey:            IN:  shortcut used to call the number.
    00083 /// @param flags:               IN:  no definition.
    00084 /// @param numberP:             IN:  New favorite phone number in string.
    00085 /// @param extraDigitsP:        IN:  Extra digits.
    00086 /// @param autoDialExtraDigits: IN:  Always include extra digit when dialing if true.
    00087 /// @param ringID:              IN:  Ring tone ID for this number.
    00088 /// @param ringToneType:        IN:  Ring tone type for this number.
    00089 /// @param indexP:              OUT: index of the new entry in the DB.
    00090 /// @retval Err Error code.
    00091 Err FavDBLibNewPhoneFavorite (UInt16 refNum,
    00092                               Word position,
    00093                               CharPtr labelP,
    00094                               WChar quickKey,
    00095                               Word flags,
    00096                               CharPtr numberP,
    00097                               CharPtr extraDigitsP,
    00098                               Boolean autoDialExtraDigits,
    00099                               UInt32 ringID,
    00100                               UInt16 ringToneType,
    00101                               WordPtr indexP)
    00102                  SYS_TRAP (favoritesDBLibTrapNewPhoneFavorite);
    00103
    00104 /// Create a new favorite messaging destination.
    00105 ///
    00106 /// @param refNum:      IN:  library reference number.
    00107 /// @param position:    IN:  position of the new favorite contact in the entries.
    00108 /// @param labelP:      IN:  pointer to the label of the newly created entry.
    00109 /// @param quickKey:    IN:  shortcut used to start composing message to the contact.
    00110 /// @param flags:       IN:  No definition.
    00111 /// @param contactIdP   IN:  Mobile number/ Email address of the new favorites messaging contact.
    00112 /// @param indexP       OUT: index of the new entry in the DB.
    00113 /// @retval Err Error code.
    00114 Err FavDBLibNewMsgFavorite (UInt16 refNum,
    00115                             Word position,
    00116                             CharPtr labelP,
    00117                             WChar quickKey,
    00118                             Word flags,
    00119                             CharPtr contactIdP,
    00120                             WordPtr indexP)
    00121                  SYS_TRAP (favoritesDBLibTrapNewMsgFavorite);
    00122
    00123 /// Create a new favorite URL.
    00124 ///
    00125 /// @param refNum:      IN:  library reference number.
    00126 /// @param position:    IN:  position of the new favorite URL.
    00127 /// @param labelP:      IN:  pointer to the label of the newly created entry.
    00128 /// @param quickKey:    IN:  shortcut used to launch the URL.
    00129 /// @param flags:       IN:  no definition.
    00130 /// @param urlP:        IN:  the URL in string.
    00131 /// @param indexP:      OUT: index of the new entry in the DB.
    00132 /// @retval Err Error code.
    00133 Err FavDBLibNewWebFavorite (UInt16 refNum,
    00134                             Word position,
    00135                             CharPtr labelP,
    00136                             WChar quickKey,
    00137                             Word flags,
    00138                             CharPtr urlP,
    00139                             WordPtr indexP)
    00140                  SYS_TRAP (favoritesDBLibTrapNewWebFavorite);
    00141
    00142 /// Create a new favorite email entry.
    00143 ///
    00144 /// @param refNum:      IN:  library reference number.
    00145 /// @param position:    IN:  position of the new favorite email in the entries.
    00146 /// @param labelP:      IN:  pointer to the label of the newly created entry.
    00147 /// @param quickKey:    IN:  shortcut used to start sending email to the new favorite .
    00148 /// @param flags:       IN:  no definition.
    00149 /// @param contactIdP:  IN:  Email address in string.
    00150 /// @param indexP:      OUT: index of the new entry in the DB.
    00151 /// @retval Err Error code.
    00152 Err FavDBLibNewEmailFavorite (UInt16 refNum,
    00153                               Word position,
    00154                               CharPtr labelP,
    00155                               WChar quickKey,
    00156                               Word flags,
    00157                               CharPtr contactIdP,
    00158                               WordPtr indexP)
    00159                  SYS_TRAP (favoritesDBLibTrapNewEmailFavorite);
    00160
    00161 /// Create a new favorite phone app view.
    00162 ///
    00163 /// @param refNum:          IN:  library reference number.
    00164 /// @param position:        IN:  position of the new favorite in the entries.
    00165 /// @param labelP:          IN:  pointer to the label of the newly created entry.
    00166 /// @param quickKey:        IN:  shortcut used to launch phone app in the favorite view.
    00167 /// @param flags:           IN:  no definition.
    00168 /// @param phoneView:       IN:  See FavDBLibPhoneViewEnum for values.
    00169 /// @param indexP:          OUT: index of the new entry in the DB.
    00170 /// @retval Err Error code.
    00171 Err
    00172 FavDBLibNewPhoneViewFavorite (UInt16 refNum,
    00173                               Word position,
    00174                               CharPtr labelP,
    00175                               WChar quickKey,
    00176                               Word flags,
    00177                               UInt16 phoneView,
    00178                               WordPtr indexP)
    00179                   SYS_TRAP (favoritesDBLibTrapNewPhoneViewFavorite);
    00180
    00181 /// No definition.
    00182 ///
    00183 /// @param refNum:      IN: library reference number.
    00184 /// @param addressP:    IN: pointer to the address string to be resolved.
    00185 /// @param kind:        IN: no definition.
    00186 /// @retval CharPtr no definition.
    00187 CharPtr
    00188 FavDBLibResolveAddress (UInt16 refNum,
    00189                         CharPtr addressP,
    00190                         Word kind)
    00191                   SYS_TRAP (favoritesDBLibTrapResolveAddress);
    00192
    00193 /// No definition.
    00194 ///
    00195 /// @param refNum:      IN: library reference number.
    00196 /// @param indexP:      IN,OUT: no definition.
    00197 /// @param offset:      IN: offset in the DB record indeces to start search from.
    00198 /// @param direction:   IN: Forward/backward search from offset.
    00199 /// @retval Boolean     True if found. Otherwise, false.
    00200 Boolean
    00201 FavDBLibSeekSpeedDialRecord(UInt16 refNum,
    00202                             UInt16 * indexP,
    00203                             Int16 offset,
    00204                             Int16 direction)
    00205                   SYS_TRAP (favoritesDBLibTrapSeekSpeedDialRecord);
    00206
    00207 /// Get the label from the favorite item given the record index.
    00208 ///
    00209 /// @param refNum:      IN:  library reference number.
    00210 /// @param index:       IN:  index of the record to get label from.
    00211 /// @param labelPP:     OUT: pointer to the label string.
    00212 /// @retval Boolean True if found. Otherwise, false.
    00213 Boolean
    00214 FavDBLibGetRecordLabel (UInt16 refNum,
    00215                            UInt16 index,
    00216                            CharPtr *labelPP)
    00217                   SYS_TRAP (favoritesDBLibTrapGetRecordLabel);
    00218
    00219 /// Get the unique ID of an entry given the record index in the Favorites DB.
    00220 ///
    00221 /// @param refNum:      IN:  library reference number.
    00222 /// @param index:       IN:  index of the record to get unique id from.
    00223 /// @param uniqueIdP:   OUT: unique ID of the record.
    00224 /// @retval Err Error code.
    00225 Err
    00226 FavDBLibGetRecordId (UInt16 refNum,
    00227                      UInt16 index,
    00228                      UInt32 *uniqueIdP)
    00229                   SYS_TRAP (favoritesDBLibTrapGetRecordId);
    00230
    00231 /// Determine whether item with keyId is in the favorites DB.
    00232 ///
    00233 /// @param refNum:      IN:  library reference number.
    00234 /// @param keyId:       IN:  unique id of the item whose info is to be obtained.
    00235 /// @param existsP:     OUT: true if item is found among favorites.
    00236 /// @retval Err Error code.
    00237 Err
    00238 FavDBLibIsFavoriteWithId(UInt16 refNum,
    00239                          UInt32 keyId,
    00240                          BooleanPtr existsP)
    00241                   SYS_TRAP (favoritesDBLibIsFavoriteWithId);
    00242
    00243 /// Get full info about the favorite phone number given the record index.
    00244 ///
    00245 /// @param refNum:              IN:  library reference number.
    00246 /// @param index:               IN:  index of the item in the DB.
    00247 /// @param numberPP:            OUT: pointer to the speed dial phone number.
    00248 /// @param extraDigitsPP:       OUT: pointer to the extra digits in the phone number.
    00249 /// @param autoExtraDigitsP:    OUT: if true, extra digits are auto-dialed.
    00250 /// @param isVoicemailP:        OUT: if true, phone number is a voicemail number.
    00251 /// @retval Boolean True if found.
    00252 Boolean
    00253 FavDBLibGetSpeedDialInfo (UInt16 refNum,
    00254                            UInt16  index,
    00255                            CharPtr *numberPP,
    00256                            CharPtr *extraDigitsPP,
    00257                            BooleanPtr autoExtraDigitsP,
    00258                            BooleanPtr isVoicemailP)
    00259                   SYS_TRAP (favoritesDBLibTrapGetSpeedDialInfo);
    00260
    00261 /// no definition.
    00262 ///
    00263 /// @param refNum:  IN:  library reference number.
    00264 /// @param keyP:    IN:  no definition.
    00265 /// @param nameP:   OUT: no definition.
    00266 /// @retval Boolean True if found.
    00267 Boolean
    00268 FavDBLibLookupInSpeedDialDB (UInt16 refNum,
    00269                              CharPtr keyP,
    00270                              CharPtr *nameP)
    00271                   SYS_TRAP (favoritesDBLibTrapLookupInSpeedDialDB);
    00272
    00273 #ifdef __cplusplus
    00274 }
    00275 #endif
    00276
    00277 #endif  // FAVORITESDB_LIB__H__

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