API Guide Home (Online version only) |

# HsPhoneTypes.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  *
    00012  * @file    HsPhoneTypes.h
    00013  *
    00014  * @brief  Telephony data types that are common between ARM and 68K
    00015  *
    00016  */
    00017
    00018
    00019 #ifndef __HS_PHONE_TYPES_H__
    00020
    00021 #define __HS_PHONE_TYPES_H__
    00022
    00023 #include <PalmTypes.h>
    00024 #include <PalmCompatibility.h>  /** For VoidHand */
    00025
    00026 /******************************************************************************
    00027  * Defines
    00028  *****************************************************************************/
    00029 /**
    00030  *  @name Type and creator of CDMA and GSM phone libraries.
    00031  *
    00032  **/
    00033 /*@{*/
    00034 #define phnLibDbType            'libr'              /**< Phone Library type  */
    00035
    00036 #define phnLibCDMADbCreator       'PIL!'            /**< CDMA Library creator  */
    00037 #define phnLibCDMAName            "Phone Library"       /**< CDMA Library name  */
    00038
    00039 #define phnLibOldCDMADbCreator    hsFileCCDMAPhoneLib       /**< Old CDMA Library creator  */
    00040 #define phnLibOldCDMAName         "PhoneLib.prc"        /**< Old CDMA Library name  */
    00041
    00042
    00043 #define phnLibGSMDbCreator      hsFileCGSMPhoneLib             /**< GSM Library creator  */
    00044 #define phnLibGSMDbName         "Phone Library"                /**< GSM Library database name  */
    00045 #define phnLibGSMName               "GSMLibrary.lib"        /**< GSM Library name  */
    00046
    00047
    00048 #define phnVoiceCall1Active   0x0001 /**< There is a voice call active on line1  */
    00049 #define phnVoiceCall2Active   0x0002 /**< There is a voice call active on line2 */
    00050 #define phnCSDCallActive      0x0004 /**< There is a data call currently active */
    00051                                          // Note: Actually the virtual modem has
    00052                                          // control but does not neccessarily
    00053                                          // have an active data call
    00054 #define phnGPRSCallActive     0x0008 /**< There is a GPRS (GSM) session active  */
    00055 #define phnPacketDataCallActive   0x0008 /**< There is an active 1X (CDMA) call  */
    00056 #define phnPacketDataCallDormant  0x0010 /**< There is a dormany 1X (CDMA) call  */
    00057
    00058 #define phnCall1StatusActive      0x0020 /**< The first  call's status is phnConnectionActive */
    00059 #define phnCall2StatusActive      0x0040 /**< The second call's status is phnConnectionActive */
    00060 #define phnCall1StatusDialing     0x0080 /**< The first  call's status is phnConnectionDialing */
    00061 #define phnCall2StatusDialing     0x0100 /**< The second call's status is phnConnectionDialing */
    00062 #define phnCall1StatusIncoming    0x0200 /**< The first  call's status is phnConnectionIncoming */
    00063 #define phnCall2StatusIncoming    0x0400 /**< The second call's status is phnConnectionIncoming */
    00064 #define phnCall1StatusAlerting    0x0800 /**< The first  call's status is phnConnectionIncoming */
    00065 #define phnCall2StatusAlerting    0x1000 /**< The second call's status is phnConnectionIncoming */
    00066 /*@}*/
    00067
    00068 /**
    00069  *  @name CDMA Threshold level for signal bar (based on Generic Handset requirement)
    00070  *
    00071  **/
    00072 /*@{*/
    00073 #define maxDBm4signalLevel0     105 /**<  will display no bar, mid percent = 10 */
    00074 #define maxDBm4signalLevel1     95  /**<  will display 1 bar, mid percent = 30 */
    00075 #define maxDBm4signalLevel2     85  /**<  will display 2 bars, mid percent = 50 */
    00076 #define maxDBm4signalLevel3     75  /**<  will display 3 bars, mid percent = 70 */
    00077 /*@}*/
    00078
    00079
    00080 /**
    00081  *  if below maxDBm4signalLevel3 then display 4 bars, mid percent = 90
    00082  *  Threshold ecio level for signal bar (based on Generic Handset requirement)
    00083  **/
    00084 /*@{*/
    00085 #define maxDB4ecioLevel0     15 /**<  will display no bar */
    00086 #define maxDB4ecioLevel1     13 /**<  will display 1 bar */
    00087 #define maxDB4ecioLevel2     11 /**<  will display 2 bars */
    00088 #define maxDB4ecioLevel3     9  /**<  will display 3 bars */
    00089 /*@}*/
    00090
    00091 /**
    00092  *  @name Volume
    00093  *
    00094  **/
    00095 /*@{*/
    00096 #define phnVolumeMin        0       /**< Minimum volume level */
    00097 #define phnVolumeMax        7       /**< Maximum volume level */
    00098 /*@}*/
    00099
    00100
    00101 /**
    00102  *  @name Enumerations and Typedefs
    00103  *
    00104  **/
    00105 /*@{*/
    00106 #define phnLibUnknownID         0xff000000  /**<        */
    00107 #define phnLibNoLookupNeededID  0xff000001      /**<        */
    00108 #define phnLibFtrNumResetFlag   10      /**<        */
    00109 #define phnLibFtrNumBottomBRate 11      /**<        */
    00110 #define phnLibFtrNumBlockATCmd  12      /**<        */
    00111 #define phnLibFtrValBlockATCmd  'noAT'      /**<        */
    00112 /*@}*/
    00113
    00114 typedef UInt16      PhnConnectionID;    /**< Connection ID  */
    00115 typedef UInt32      PhnDatabaseID;       /**< Database ID  */
    00116 typedef VoidHand    PhnAddressHandle;    /**<       */
    00117 typedef VoidHand    PhnAddressList;      /**<       */
    00118 typedef UInt32      PhnOperatorID;       /**<       */
    00119
    00120
    00121 /******************************************************************************
    00122  * Enumerations
    00123  *****************************************************************************/
    00124 /**
    00125  *  Classes of service for which applications can register
    00126  **/
    00127 enum _PhoneServiceClassType
    00128   {
    00129     phnServiceVoice = 1,        /**< 0x0001 */
    00130     phnServiceSMS = 2,          /**< 0x0002 */
    00131     phnServiceActivation = 4,       /**< 0x0004 */
    00132     phnServiceData = 8,         /**< 0x0008 */
    00133     phnServiceIOTA = 16,        /**< 0x0010 */
    00134     phnServiceSIMToolkit = 32,  /**< 0x0020 */
    00135     phnServiceAFLT = 64,        /**< 0x0040 */
    00136     phnServiceMisc = 128,       /**< 0x0080 */
    00137     phnServiceEssentials = 256, /**< 0x0100 */
    00138     phnServiceMMS = 512,            /**< 0x200 */
    00139     phnServiceWAP = 1024,           /**< 0x400 */
    00140     phnServiceAll = phnServiceVoice | phnServiceSMS | phnServiceAFLT |
    00141                     phnServiceData | phnServiceActivation | phnServiceMisc | phnServiceIOTA |
    00142                     phnServiceEssentials | phnServiceSIMToolkit | phnServiceMMS | phnServiceWAP,
    00143     phnServiceMax = 0xFFFF          /**< Reserved. */
    00144   };
    00145
    00146 typedef UInt16 PhoneServiceClassType;       /**<        */
    00147
    00148 #define isValidPhoneServiceClassType(s) ((s & phnServiceAll) != 0)  /**<        */
    00149
    00150 /**
    00151  *  Phone address fields
    00152  **/
    00153 typedef enum {
    00154     phnAddrFldPhone,        /**<        */
    00155     phnAddrFldFirstName,        /**<        */
    00156     phnAddrFldLastName      /**<        */
    00157 } _PhnAddressField;
    00158
    00159 #define isValidPhnAddressField(a) ((a >= phnAddrFldPhone) && (a <= phnAddrFldLastName)) /**<        */
    00160
    00161 // make sure that size of enum is same across all compilers
    00162 typedef UInt8 PhnAddressField;      /**<        */
    00163
    00164 /**
    00165  *  GSM CLIR Mode
    00166  **/
    00167 typedef enum  {
    00168     gsmDialCLIRDefault,             /**<        */
    00169     gsmDialCLIRTemporaryInvocation,     /**<        */
    00170     gsmDialCLIRTemporarySuppression     /**<        */
    00171 } _GSMDialCLIRMode;
    00172
    00173 #define isValidGSMDialCLIRMode(d) ((d >= gsmDialCLIRDefault) && (d <= gsmDialCLIRTemporarySuppression))     /**<        */
    00174
    00175 // make sure that size of enum is same across all compilers
    00176 typedef UInt8 GSMDialCLIRMode;      /**<        */
    00177
    00178
    00179 /**
    00180  *  Power state of the radio
    00181  **/
    00182 enum _PhnPowerType
    00183   {
    00184     phnPowerOff,        /**<        */
    00185     phnPowerOn,         /**<        */
    00186     phnPowerStartCharging,  /**<        */
    00187     phnPowerStopCharging,   /**<        */
    00188     phnPowerLow,        /**<        */
    00189     phnPowerSave                /**< Modem goes to deep sleep after failing to search for service */
    00190   };
    00191
    00192 typedef UInt8 PhnPowerType;     /**<        */
    00193
    00194 #define isValidPhnPowerType(p) (p <= phnPowerSave)      /**<        */
    00195 //#define isValidPhnPowerType(p) ((p >= phnPowerOff) && (p <= phnPowerSave))
    00196
    00197 /**
    00198  *  Status of the SIM on GSM radio only
    00199  **/
    00200 enum _GSMSIMStatus {
    00201     simMissing,         /**<        */
    00202     simFailure,         /**<        */
    00203     simWrong,       /**<        */
    00204     simNotReady,        /**<        */
    00205     simReady,       /**<        */
    00206     simUnknown,         /**<        */
    00207     simPresent      /**<        */
    00208     // <chg 05-05-2002 TRS> bug # 13072
    00209 };
    00210
    00211 typedef UInt8 GSMSIMStatus;     /**<        */
    00212
    00213
    00214 /**
    00215  *  LifeTimer Enums
    00216  **/
    00217 enum
    00218 {
    00219   lifeTimeVoice,    /**<        */
    00220   lifeTimeData      /**<        */
    00221 };
    00222
    00223 typedef UInt8 PhnLifeTimer; /**<        */
    00224
    00225 /**
    00226  *  Currently on the GSM side there is no way for the control channel to know
    00227  *  that a data call has gone active. To resolove this issue there are two
    00228  *  posibble solutions.
    00229  *
    00230  *  1. Have the radio send an unoslicted event accorss all channels to indicate a
    00231  *     data call has gone active
    00232  *  2. Have the NetLib post a notification to the GSM Library that a data call is
    00233  *     going active.
    00234  **/
    00235
    00236 /**
    00237  *
    00238  **/
    00239 typedef enum
    00240   {
    00241     autoLockMode,               /**< option Lock Phone on Power Down is chosen */
    00242     immediateLockMode           /**< option Lock Phone immediately is chosen */
    00243   }
    00244 PhnLockModeEnum;
    00245 typedef UInt8 PhnLockMode;
    00246 #define isValidPhnLockMode(m) ((m >= autoLockMode) && (m <= immediateLockMode))     /**<        */
    00247
    00248 #endif // ifndef __HS_PHONE_TYPES_H__

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