API Guide Home (Online version only) |

# HsPhoneMisc.h

Go to the documentation of this file.

    00001 /******************************************************************************
    00002  * Copyright (c) 2004 palmOne, Inc. or its subsidiaries.
    00003  * All rights reserved.
    00004  *****************************************************************************/
    00005 /** @ingroup Telephony
    00006  *
    00007  */
    00008
    00009
    00010 /**
    00011  * @file    HsPhoneMisc.h
    00012  *
    00013  * @brief  Header File for Phone Library API ---- MISC CATEGORY
    00014  *
    00015  * Notes:
    00016  *  All implementations of the Handspring Phone Library support a common API.
    00017  *  This API is broken up into various categories for easier management.  This file
    00018  *  defines the Miscellaneous category.  These API calls are Miscellaneous calls that don't
    00019  *  fit into any other category.  Many of them are device control.
    00020  */
    00021
    00022
    00023 #ifndef HS_PHONEMISC_H
    00024 #define HS_PHONEMISC_H
    00025 #include <PalmOS.h>
    00026 #include <PalmTypes.h>
    00027 #ifndef __CORE_COMPATIBILITY_H__
    00028 #include <PalmCompatibility.h>
    00029     /** workaround for differing header files in sdk-3.5 and sdk-internal */
    00030     #ifndef __CORE_COMPATIBILITY_H__
    00031     #define __CORE_COMPATIBILITY_H__
    00032     #endif
    00033 #endif
    00034 #include <HsPhoneTraps.h>     /** trap table definition for phone library calls */
    00035 #include <HsPhoneErrors.h>    /** error codes returned by phone library functions */
    00036 #include <HsPhoneTypes.h>
    00037
    00038
    00039 /**
    00040  *  @brief Retrieve the Line state.
    00041  *
    00042  *  @param refNum:  IN:  Library reference number obtained from SysLibLoad.
    00043  *  @param line:    IN:  Line to query for
    00044  *  @param lineState:   IN:  State of the Line
    00045  *  @retval 0 for success; otherwise failed and returned an error code as defined in “Phone
    00046  *          Library Error Codes.”
    00047  **/
    00048 extern Err PhnLibGetLineState(UInt16 refNum, UInt16 line, PhnLineStatePtr lineState)
    00049       PHN_LIB_TRAP(PhnLibTrapGetLineState);
    00050
    00051 /**
    00052  *  @brief Retrieve state information about the radio.
    00053  *
    00054  *  @param refNum:  IN:  Library reference number obtained from SysLibLoad.
    00055  *  @param radioState:  IN:  State of the Radio
    00056  *  @retval 0 for success; otherwise failed and returned an error code as defined in “Phone
    00057  *          Library Error Codes.”
    00058  **/
    00059 extern Err PhnLibGetRadioState(UInt16 refNum, PhnRadioStatePtr radioState)
    00060           PHN_LIB_TRAP(PhnLibTrapGetRadioState);
    00061
    00062 /**
    00063  *  @brief
    00064  *
    00065  *  @param refNum:  IN:
    00066  *  @param manufacturer:    IN:
    00067  *  @param model:   IN:
    00068  *  @param version: IN:
    00069  *  @param serial   IN:
    00070  *  @retval Err Error code.
    00071  **/
    00072 extern Boolean PhnLibCardInfo (UInt16 refNum, CharPtr* manufacturer, CharPtr* model, CharPtr* version, CharPtr* serial)
    00073                   PHN_LIB_TRAP(PhnLibTrapCardInfo);
    00074
    00075 /**
    00076  *<chg 09-10-2002 TRS> prototype changed.  NOTE that previously was declared to
    00077  *return Err, but code returned Boolean, so didn't work anyway.
    00078  **/
    00079 /**
    00080  *  @brief Checks to see if a connection can be made
    00081  *
    00082  *  @param refNum:  IN:  Library reference number obtained from SysLibLoad.
    00083  *  @param connection:  IN:  Type of connection to be made.
    00084  *  @param pAvailable:  IN: Result indicating if a connection is available.
    00085  *  @retval 0 for success; otherwise failed and returned an error code as defined in “Phone
    00086  *          Library Error Codes.”
    00087  **/
    00088 extern Err PhnLibConnectionAvailable(UInt16 refNum, PhnConnectionEnum connection, Boolean * pAvailable)
    00089                   PHN_LIB_TRAP(PhnLibTrapConnectionAvailable);
    00090
    00091 /**
    00092  *  @brief This API have been deprecated. Please use “HsIndicatorState.”
    00093  *
    00094  *  @param refNum:  IN:
    00095  *  @param pulse:   IN:
    00096  *  @param repeat:  IN:
    00097  *  @retval Err Error code.
    00098  **/
    00099 extern Err  PhnLibStartVibrate (UInt16 refNum, Boolean pulse, Boolean repeat)
    00100                   PHN_LIB_TRAP(PhnLibTrapStartVibrate);
    00101
    00102 /**
    00103  *  @brief This API have been deprecated. Please use “HsIndicatorState.”
    00104  *
    00105  *  @param refNum:  IN:
    00106  *  @retval Err Error code.
    00107  **/
    00108 extern Err  PhnLibStopVibrate (UInt16 refNum)
    00109                   PHN_LIB_TRAP(PhnLibTrapStopVibrate);
    00110
    00111 /**
    00112  *  @brief
    00113  *
    00114  *  @param refNum:  IN:
    00115  *  @param errorRate:   IN:
    00116  *  @retval Err Error code.
    00117  **/
    00118 extern Err  PhnLibErrorRate (UInt16 refNum, WordPtr errorRate)
    00119                   PHN_LIB_TRAP(PhnLibTrapErrorRate);
    00120
    00121 /**
    00122  *  @brief
    00123  *
    00124  *  @param refNum:  IN:
    00125  *  @param error:   IN:
    00126  *  @param buffer:  IN:
    00127  *  @param bufferLen:   IN:
    00128  *  @retval Err Error code.
    00129  **/
    00130 extern void PhnLibGetErrorText (UInt16 refNum, Err error, CharPtr buffer, UInt16 bufferLen)
    00131                   PHN_LIB_TRAP(PhnLibTrapGetErrorText);
    00132
    00133 /**
    00134  *  @brief Locate the call item that has the specified service if such item exists return
    00135  *         the total number of call items that has the same service.
    00136  *
    00137  *  @param refNum:  IN:  Library reference number obtained from SysLibLoad.
    00138  *  @param service: IN:  The specified connection service (can OR bit combination)
    00139  *  @retval Number of call items that has the same status.
    00140  **/
    00141 extern UInt16     PhnLibGetCallCountByService (UInt16 refNum,
    00142                                              PhoneServiceClassType service)
    00143                 PHN_LIB_TRAP (PhnLibTrapGetCallCountByService);
    00144
    00145 /**
    00146  *  @brief
    00147  *
    00148  *  @param refNum:  IN:
    00149  *  @param echoCancellationOn:  IN:
    00150  *  @retval Err Error code.
    00151  **/
    00152 extern Err PhnLibGetEchoCancellation(UInt16 refNum, Boolean* echoCancellationOn)
    00153               PHN_LIB_TRAP(PhnLibTrapGetEchoCancellation);
    00154
    00155 /**
    00156  *  @brief
    00157  *
    00158  *  @param refNum:  IN:
    00159  *  @param echoCancellationOn:  IN:
    00160  *  @retval Err Error code.
    00161  **/
    00162 extern Err PhnLibSetEchoCancellation(UInt16 refNum, Boolean echoCancellationOn)
    00163               PHN_LIB_TRAP(PhnLibTrapSetEchoCancellation);
    00164
    00165 /**
    00166  *  @brief
    00167  *
    00168  *  @param refNum:  IN:
    00169  *  @param equipmentMode:   IN:
    00170  *  @retval Err Error code.
    00171  **/
    00172 extern Err PhnLibGetEquipmentMode(UInt16 refNum, PhnEquipmentMode* equipmentMode)
    00173               PHN_LIB_TRAP(PhnLibTrapGetEquipmentMode);
    00174
    00175 /**
    00176  *  @brief
    00177  *
    00178  *  @param refNum:  IN:
    00179  *  @param equipmentMode:   IN:
    00180  *  @retval Err Error code.
    00181  **/
    00182 extern Err PhnLibSetEquipmentMode(UInt16 refNum, PhnEquipmentMode equipmentMode)
    00183               PHN_LIB_TRAP(PhnLibTrapSetEquipmentMode);
    00184
    00185 /**
    00186  *  @brief
    00187  *
    00188  *  @param refNum:  IN:
    00189  *  @param headsetConnected:    IN:
    00190  *  @retval 0 for success; otherwise failed and returned an error code as defined in “Phone
    00191  *          Library Error Codes.”
    00192  **/
    00193 extern Err      PhnLibGetHeadsetConnectedInfo (UInt16 refNum, Boolean * headsetConnected)
    00194     PHN_LIB_TRAP (PhnLibTrapGetHeadsetConnectedInfo);
    00195
    00196 /**
    00197  *  @brief
    00198  *
    00199  *  @param refNum:  IN:
    00200  *  @param gain:    IN:
    00201  *  @retval Err Error code.
    00202  **/
    00203 extern Err  PhnLibGetMicrophone (UInt16 refNum, Int16* gain)
    00204                   PHN_LIB_TRAP(PhnLibTrapGetMicrophone);
    00205
    00206 /**
    00207  *  @brief
    00208  *
    00209  *  @param refNum:  IN:
    00210  *  @param gain:    IN:
    00211  *  @retval Err Error code.
    00212  **/
    00213 extern Err    PhnLibSetMicrophone (UInt16 refNum, Int16 gain)
    00214               PHN_LIB_TRAP(PhnLibTrapSetMicrophone);
    00215
    00216 /**
    00217  *  @brief
    00218  *
    00219  *  @param refNum:  IN:
    00220  *  @param manufacturer:    IN:
    00221  *  @param model:   IN:
    00222  *  @param modemSWRev:  IN:
    00223  *  @param esn:     IN:
    00224  *  @param prlRev:  IN:
    00225  *  @param hostSWRev:   IN:
    00226  *  @param modemHWRev:  IN:
    00227  *  @param priChecksum: IN:
    00228  *  @param *eriver: IN:
    00229  *  @param *isEriSet:   IN:
    00230  *  @retval Err Error code.
    00231  **/
    00232  extern Boolean  PhnLibCardInfoEx (UInt16 refNum, CharPtr * manufacturer,
    00233                                   CharPtr * model, CharPtr * modemSWRev,
    00234                                   CharPtr * esn, CharPtr * prlRev, CharPtr * hostSWRev,
    00235                                   CharPtr * modemHWRev, CharPtr *priChecksum, Word *eriVer,
    00236                                   Boolean *isEriSet)
    00237                   PHN_LIB_TRAP (PhnLibTrapCardInfoEx);
    00238
    00239 /**
    00240  *  @brief
    00241  *
    00242  *  @param refNum:  IN:
    00243  *  @param phnFlags:    IN:
    00244  *  @retval Err Error code.
    00245  **/
    00246 extern Err PhnLibGetPhoneCallStatus(UInt16 refNum, UInt32* phnFlags)
    00247                   PHN_LIB_TRAP(PhnLibTrapGetPhoneCallStatus);
    00248
    00249 /**
    00250  *  @brief
    00251  *
    00252  *  @param refNum:  IN:
    00253  *  @param toMute:  IN:
    00254  *  @retval Err Error code.
    00255  **/
    00256 extern Err      PhnLibMute (UInt16 refNum, Boolean toMute)
    00257                 PHN_LIB_TRAP (PhnLibTrapMute);
    00258
    00259 /**
    00260  *  @brief
    00261  *
    00262  *  @param refNum:  IN:
    00263  *  @param isMute:  IN:
    00264  *  @retval Err Error code.
    00265  **/
    00266 extern Err      PhnLibIsCallMuted (UInt16 refNum, Boolean * isMute)
    00267                 PHN_LIB_TRAP (PhnLibTrapIsCallMuted);
    00268
    00269 /**
    00270  *  @brief
    00271  *
    00272  *  @param refNum:  IN:
    00273  *  @retval Err Error code.
    00274  **/
    00275 extern Boolean  PhnLibIsPhoneActivated (UInt16 refNum)
    00276                 PHN_LIB_TRAP (PhnLibTrapIsPhoneActivated);
    00277
    00278 /**
    00279  *  @brief
    00280  *
    00281  *  @param refNum:  IN:
    00282  *  @param bSet:    IN:
    00283  *  @param debugInfoP   IN:
    00284  *  @param infoLen: IN:
    00285  *  @retval Err Error code.
    00286  **/
    00287 extern Err      PhnLibMiscDebugInfo (UInt16 refNum, Boolean bSet, VoidPtr
    00288                                      debugInfoP, UInt16 infoLen)
    00289                 PHN_LIB_TRAP (PhnLibTrapMiscDebugInfo);
    00290
    00291 /**
    00292  *  @brief
    00293  *
    00294  *  @param refNum:  IN:
    00295  *  @param attr:    IN:
    00296  *  @param flags:   IN:
    00297  *  @param dataP:   IN:
    00298  *  @retval Err Error code.
    00299  **/
    00300 extern Err      PhnLibAttrGet (UInt16 refNum, UInt16 attr, UInt32 flags, void* dataP)
    00301                 PHN_LIB_TRAP (PhnLibTrapAttrGet);
    00302
    00303 /**
    00304  *  @brief
    00305  *
    00306  *  @param refNum:  IN:
    00307  *  @param attr:    IN:
    00308  *  @param flags:   IN:
    00309  *  @param dataP:   IN:
    00310  *  @retval Err Error code.
    00311  **/
    00312 extern Err      PhnLibAttrSet (UInt16 refNum, UInt16 attr, UInt32 flags, void* dataP)
    00313                 PHN_LIB_TRAP (PhnLibTrapAttrSet);
    00314
    00315 /**
    00316  *  @brief
    00317  *
    00318  *  @param refNum:  IN:
    00319  *  @param deviceId:    IN:
    00320  *  @retval Err Error code.
    00321  **/
    00322 extern Err      PhnLibGetDeviceID (UInt16 refNum, CharPtr * deviceId)
    00323                 PHN_LIB_TRAP (PhnLibTrapGetDeviceId);
    00324
    00325
    00326
    00327 /**
    00328  *  @brief
    00329  *
    00330  *  @param refNum:  IN:
    00331  *  @param noiseCancellationP:  IN:
    00332  *  @retval Err Error code.
    00333  **/
    00334 extern Err PhnLibGetNoiseCancellation(UInt16 refNum, Boolean* noiseCancellationP)
    00335               PHN_LIB_TRAP(PhnLibTrapGetNoiseCancellation);
    00336
    00337 /**
    00338  *  @brief
    00339  *
    00340  *  @param refNum:  IN:
    00341  *  @param noiseCancellation:   IN:
    00342  *  @retval Err Error code.
    00343  **/
    00344 extern Err PhnLibSetNoiseCancellation(UInt16 refNum, Boolean noiseCancellation)
    00345               PHN_LIB_TRAP(PhnLibTrapSetNoiseCancellation);
    00346
    00347 /**
    00348  *  @brief
    00349  *
    00350  *  @param refNum:  IN:
    00351  *  @param bufferP: OUT: contains MEID or ESN (for non-MEID devices)
    00352  *  @retval Err Error code.
    00353  **/
    00354 extern Err PhnLibGetMEID (UInt16 refNum, CharPtr *bufferP)
    00355     PHN_LIB_TRAP (PhnLibTrapGetMEID);
    00356
    00357 /**
    00358  * @brief
    00359  *
    00360  * @param pointer to base_id, sid, nid storage IN:
    00361  * @param base_id, sid, nid                    OUT: contains the values
    00362  * @retval Err Error code.
    00363  **/
    00364 extern Err PhnLibGetBaseStationIdInfo( UInt16 refNum, UInt16 *base_id, UInt16 *sid, UInt16 *nid )
    00365      PHN_LIB_TRAP (PhnLibTrapGetBaseStationIdInfo);
    00366
    00367 /**
    00368  * @brief
    00369  *
    00370  * @param pointer to buffer of char
    00371  * IN: pUaStr and length of the buffer provided
    00372  * OUT: pUaStr : param pointer to buffer containing values
    00373  * @retval Err Error code.
    00374  */
    00375 extern Err PhnLibGetMMSUAString( UInt16 refNum, char *pUaStr, UInt32 buf_len )
    00376      PHN_LIB_TRAP ( PhnLibTrapGetMMSUAString );
    00377 #endif

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