API Guide Home (Online version only) |

# HsPhoneEvent.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    HsPhoneEvent.h
    00013  *
    00014  * @brief  Header file for the phone library (CDMA or GSM)
    00015  *
    00016  * NOTES:
    00017  * Header file for the phone library (CDMA or GSM)
    00018  *
    00019  * This file defines the Notification Events between the Phone Library
    00020  * (either GSM or CDMA) and applications.  These events allow applications
    00021  * to react to changes of state in the Phone Library.
    00022  *
    00023  * Applications wishing to receive notification events from the Phone Library
    00024  * must register using the PhnLibRegister call.  The services parameter to
    00025  * PhnLibRegister is a bitmap identifying the classes of events that are of
    00026  * interest.  To unregister for notifications the app can call PhnLibRegister
    00027  * with the services parameter set to zero.
    00028  *
    00029  * Notifications are sent to applications based on their unique creatorID.
    00030  * Confusion may occur if multiple versions of a single app exist with the same
    00031  * creatorID.  In this case notifications will be sent to the latest version of
    00032  * the app (even if this app was not the one that registered).  In general,
    00033  * you should try to avoid this situation where possible.
    00034  *
    00035  * Each notification event is identified by a unique event code (see PhnEventCode).
    00036  * The event code then determines the contents of the remainder of the
    00037  * event.
    00038  *
    00039  * There are three styles of notifications from the Phone Library:
    00040  *
    00041  *  (1) universal broadcast notifications are sent to all registrants for
    00042  *      a given service.  (for example, a change in the network registration
    00043  *      status)
    00044  *
    00045  *  (2) exclusive broadcast notifications are sent to registrations one at a time.
    00046  *      The first app that acknowledges the notification by setting the
    00047  *      acknowedge flag will be presumed to own that notification.  Only this
    00048  *      app should handle and respond to the notification.  For example, an
    00049  *      incoming call or incoming SMS message will be acknowleged by an app
    00050  *      that wants to answer the call or process the SMS message.
    00051  *
    00052  *  (3) direct notifications are sent directly to a specific app with a known
    00053  *      interest in some occurence in the phone library.  These are typically
    00054  *      used after an application has taken ownership of a particular call,
    00055  *      message, or dialog.  By sending notifications directly to the owning
    00056  *      app we avoid confusion with multiple apps sending competing instructions.
    00057  */
    00058
    00059 #ifndef HS_PHONEEVENT_H
    00060 #define HS_PHONEEVENT_H
    00061 #include <PalmOS.h>
    00062 #include <PalmTypes.h>
    00063 #ifndef __CORE_COMPATIBILITY_H__
    00064 #include <PalmCompatibility.h>
    00065     // workaround for differing header files in sdk-3.5 and sdk-internal
    00066     #ifndef __CORE_COMPATIBILITY_H__
    00067     #define __CORE_COMPATIBILITY_H__
    00068     #endif
    00069 #endif
    00070
    00071 // this is not a good struct
    00072 //#define USE_PHNSMSMESSAGETYPE
    00073
    00074 //Keep it same as defined in HICMSMS.h
    00075 #define phnAddressDigitsMax 32
    00076 #define phnUserDataMax      255
    00077
    00078 // Notification Types
    00079 #define phnNotifySubscriber 'CLIP'          /**< GSM notification with caller ID  */
    00080 #define phnNotifyEquipMode  'Heqp'      /**< GSM notificaiton for equip mode change  */
    00081
    00082 // Notification of a phone event
    00083 #define phnLibLaunchCmdEvent        0xabad  /**< Phone Event notification. Used
    00084                              to be 0x2bad, which is less than
    00085                              Palm's custom base. Have to get
    00086                              Palm to allow that.     */
    00087
    00088 #define phnLibLaunchCmdRegister     0xabae    /**< Sent to application to register with GSM library  */
    00089
    00090
    00091 /**
    00092  * unique identifier for Indication notification.   This value will be
    00093  * contained in PhnEventType notification events of phnEvtIndication type.
    00094  **/
    00095 typedef enum {
    00096     indicationSIMReady,         /**<        */
    00097     indicationSIMMessages,      /**<        */
    00098     indicationNetworkSearch,        /**< to display Network search banner */
    00099     indicationPasswordAccepted, /**<        */
    00100     indicationNetworkAvailable, /**<        */
    00101     indicationStartingRadio,        /**< to update UI from radio being off */
    00102     indicationPoweringOffRadio,     /**< notify app that the radio is turning off. */
    00103     indicationResettingRadio,       /**< tell the app that the radio is resetting. */
    00104     indicationAuthFailure,      /**< notify app that network authentication failed. */
    00105     indicationSIMChanged,       /**< sent when the GSM library detects that the IMSI value has changed */
    00106     indicationInitComplete,     /**< sent when the GSM library is done with it initialization when the radio is powered on */
    00107   indicationOtaspMsg            /**< sent otasp msg from network */
    00108 } PhnIndicationKind;
    00109
    00110 #define isValidPhnIndicationKind(i) ((i >= indicationSIMReady) && (i <= indicationSIMChanged))  /**<        */
    00111
    00112 /**
    00113  * PhnEventCode is unique identifier for notifications between the Phone Library
    00114  * and applications.  It is used in the eventType field in the header of notification
    00115  * events (PhnEventType).
    00116  **/
    00117 typedef enum
    00118   {
    00119   phnEvtCardInsertion,      /**< 0x0000 < NOT USED.  OBSOLETE */
    00120
    00121   /** Network Registration has changed.
    00122    *
    00123    *  The Phone Library is responsible for registering the device to
    00124    *  the carrier network, including handling roaming and losses of service.
    00125    *  This notification occurs when the network registration state has changed.
    00126    *  See PhnRegistrationStatus for possible state values.
    00127    *
    00128    *  This notification will be universally broadcast to applications
    00129    * registered for any service.
    00130    */
    00131   phnEvtRegistration,       /**< 0x0001 < Phone able to find service  */
    00132
    00133   /** Error detected
    00134    *
    00135    *  This notification occurs on various error scenarios in the Phone Library.
    00136    *  These may occur when unexpected errors are reported from the radio, or when
    00137    *  an operation in progress has failed.
    00138    *
    00139    *  This notification is universally broadcast to applications in the
    00140    *  service area where the error was detected (e.g. Voice, SMS, ...).
    00141    */
    00142   phnEvtError,              /**< 0x0002 < indicator of something important happens to the phone that needs to bring up alert */
    00143
    00144   /** phone-related keypress has occured on device
    00145    *
    00146    *  This notification occurs when the user presses a phone-related key on the device.
    00147    *  Currently the only supported key is the headset button that can be used for
    00148    *  basic call control.  In general, buttons available will be device dependent.
    00149    *
    00150    *  This notification is exclusively broadcast to all applications registered for the
    00151    *  Voice Service.
    00152    */
    00153   phnEvtKeyPress,           /**< 0x0003 < Headset button pressed. */
    00154
    00155   /** change in power state of radio
    00156    *
    00157    *  This notification occurs when the power state of the radio is changing.  Applications
    00158    *  may want to change their state, and take action based on the expected availability
    00159    *  of the radio.
    00160    *
    00161    *  This notification is universally broadcast to all registered applications.
    00162    */
    00163   phnEvtPower,              /**< 0x0004  */
    00164
    00165   /** Password Dialog Control
    00166    *
    00167    *  This notification helps an application control the entry of a PIN on a
    00168    *  device that is locked.
    00169    *
    00170    *  This notification is exclusively broadcast to all registered applications.
    00171    *  Application that acknowledges the notification is presumed to own handling
    00172    *  the password situation.
    00173    */
    00174   phnEvtPassword,           /**< 0x0005  */
    00175
    00176   /** outgoing call progress dialog
    00177    *
    00178    *  This notification is sent to help applications display the progress of an
    00179    *  oubound call operation.
    00180    *
    00181    *  This notification is exclusively broadcast to all registered applications.
    00182    *  Application that acknowledges the notification is presumed to be the only one
    00183    *  to take any action on the outgoing call.
    00184    */
    00185   phnEvtProgress,           /**< 0x0006  */
    00186
    00187   /** indication of various changes of state in Phone Library
    00188    *
    00189    *  This notification is sent on various changes of state in the Phone Library.
    00190    *  Most of these are related to activation and registration with the carrier
    00191    *  network.  Applications that display gauges with state info will often need
    00192    *  to be updated after this notification.
    00193    *
    00194    *  Indications are often used to direct GUI interactions in applications
    00195    *  that interact with the user.  For example, the Network Search notification
    00196    *  might cause an app to put up a special Network Search dialog.
    00197    *
    00198    *  See PhnIndicationKind for list of available indications.
    00199    *
    00200    *  The broadcast rules for indications vary depending on the type of indication.
    00201    */
    00202   phnEvtIndication,         /**< 0x0007  */
    00203
    00204   /** incoming call received
    00205    *
    00206    *  This notification is exclusively broadcast to applications registered for
    00207    *  the Voice Service.  First application to acknowledge the notification will
    00208    *  be presumed to control the call.  Normally application would answer the call,
    00209    *  or forward it to another destination.
    00210    *
    00211    */
    00212   phnEvtConnectInd,         /**< 0x0008  */
    00213
    00214   /** call has connected
    00215    *
    00216    *  Despite the name, this event is used BOTH when a call goes into
    00217    *  connected state (e.g. is answered), and when a call joins a conference.
    00218    *
    00219    *  This notification is exclusively broadcast to applications registered for
    00220    *  the Voice Service.  First application to acknowledge the notification will
    00221    *  be presumed to control the call or conference.
    00222    */
    00223   phnEvtConnectConf,        /**< 0x0009  */
    00224
    00225   /** Number/name of call has changed
    00226    *
    00227    *  This notification is universally broadcast to all applications registered for
    00228    *  the Voice Service.
    00229    */
    00230   phnEvtSubscriber,         /**< 0x000A  */
    00231
    00232   /** call has disconnected
    00233    *
    00234    *  This notification occurs when the remote party of an active voice call
    00235    *  disconnects.  Note that if the call is in conference (or 3-way calling) mode, then
    00236    *  a different phnEvtDisconnectConf notification will be sent instead (see below).
    00237    *
    00238    *  This notification is universally broadcast to all applications registered for
    00239    *  the Voice or Data Services.
    00240    */
    00241   phnEvtDisconnectInd,      /**< 0x000B  */
    00242
    00243   /** call in conference (or 3-way calling) mode has disconnected
    00244    *
    00245    *  This notification occurs when a conference call is in progress, and one of the
    00246    *  remote parties disconnects.
    00247    *
    00248    *  This notification is universally broadcast to all applications registered for
    00249    *  the Voice Service.
    00250    */
    00251   phnEvtDisconnectConf,     /**< 0x000C An ACK for a disconnection command on a specific connection ID is received */
    00252
    00253   /** Outbound call attempt failed because remote party (or network) reported busy
    00254    *
    00255    *  This notification is universally broadcast to all applications registered for
    00256    *  the Voice Service.
    00257    */
    00258   phnEvtBusy,               /**< 0x000D  */
    00259
    00260   /** Change in Call Status;  Application may need to update its state
    00261    *
    00262    *  This notification is sent on various changes in call state in the Phone Library.
    00263    *  An application receiving this notification should poll for the connection status
    00264    *  of any calls of interest, and update its own state as needed.
    00265    *
    00266    *  This notification is universally broadcast to all applications registered
    00267    *  for the Voice Service.
    00268    *********************************************************************/
    00269   phnEvtUpdate,             /**< 0x000E  */
    00270
    00271   /** 3-way call mode
    00272    *
    00273    *  This notification occurs when a call goes into conferrence (or 3-way calling) mode.
    00274    *
    00275    *  This notification is universally broadcast to all applications registered
    00276    *  for the Voice Service.
    00277    */
    00278   phnEvtConference,         /**< 0x000F  */
    00279
    00280   /** Incoming VoiceMail Message
    00281    *
    00282    *  This notification occurs when the Phone Library detects that there are
    00283    *  pending VoiceMail messages available.
    00284    *
    00285    *  This notification is universally broadcast to all applications registered
    00286    *  for the Voice Service.
    00287    */
    00288   phnEvtVoiceMail,          /**< 0x0010  */
    00289
    00290   /** Incoming SMS message received
    00291    *
    00292    * This notification occurs when the Phone Library receives an
    00293    * incoming SMS (Simple Message Service) message.
    00294    *
    00295    * This notification will be exclusively broadcast to applications
    00296    * registered for the SMS service.  The Application that acknowledges
    00297    * the notification is assumed to own the message, and should take
    00298    * any appropriate actions.
    00299    */
    00300   phnEvtMessageInd,         /**< 0x0011  */
    00301
    00302   /** Incoming segment of SMS Message received
    00303    *
    00304    * This notification occurs when the Phone Library receives a segment
    00305    * of a multi-segment SMS (Simple Message Service) message.  Single
    00306    * segment SMS messages will generate a MessageInd notification (see
    00307    * above).
    00308    *
    00309    * This notification will be exclusively broadcast to applications
    00310    * registered for the SMS service.  The Application that acknowledges
    00311    * the notification is assumed to own the segment, and should take
    00312    * any appropriate actions.
    00313    */
    00314   phnEvtSegmentInd,         /**< 0x0012  */
    00315
    00316   /** Status of outgoing SMS message has changed
    00317    *
    00318    * This notification occurs when the status of a particular SMS
    00319    * message has changed.  For example, an SMS message might move from
    00320    * the pending queue to the sent queue after being successfully
    00321    * delivered.
    00322    *
    00323    * This notification will be sent directly to the application that
    00324    * created the message, and is NOT broadcast based on app registrations.
    00325    */
    00326   phnEvtMessageStat,        /**< 0x0013  */
    00327
    00328   /** SMS message deleted from local DB on device
    00329    *
    00330    * This notification occurs when an SMS message is deleted from the
    00331    * local Database on the device.
    00332    *
    00333    * This notification will be sent directly to the application that
    00334    * created the message, and is NOT broadcast based on app registrations.
    00335    */
    00336   phnEvtMessageDel,         /**< 0x0014  */
    00337
    00338   /** SIM Contains SMS Messages
    00339    *
    00340    *  This notification indicates that the SIM (Subscriber Information
    00341    *  Module) on a GSM phone contains SMS (Simple Messaging Service)
    00342    *  messages.  This is not an indication of new messages, just that
    00343    *  messages are stored.  This notification is typically sent during
    00344    *  Phone Library activation.  In many cases, the application may want
    00345    *  to move the SMS messages to a local DB on the device, freeing memory
    00346    *  for future incoming messages.
    00347    *
    00348    *  This notification will use exclusive broadcast to applications
    00349    *  registered for the SMS service.  The application that acknowledges
    00350    *  the notification is responsible for taking any action on moving
    00351    *  the SMS messages on the SIM (if desired).
    00352    */
    00353   phnEvtMessageMoved,       /**< 0x0015  */
    00354
    00355   /** SIM Application Toolkit (SAT) event
    00356    *
    00357    * The SIM Application Toolkit allows for simple applications that
    00358    * can be placed on the SIM (Subscriber Identity Module) in a GSM
    00359    * phone.  This notification will be sent when a SAT application is
    00360    * requesting input/output to/from the user.
    00361    *
    00362    * This notification will use exclusive broadcast to applications
    00363    * registered for the SIM Toolkit Service.  The Application that first
    00364    * acknowedges the notification will be presumed to own the SAT session,
    00365    * and should handle needed user dialog as appropriate.
    00366    */
    00367   phnEvtSATNotification,    /**< 0x0016  */
    00368
    00369   /** USSD input/output requested from network
    00370    *
    00371    * USSD (Unstructured Supplementary Services Data) is a supplementary
    00372    * service to GSM networks that allows simple text dialogs
    00373    * with applications based in the network.  This notification
    00374    * is sent when the network is requesting USSD input/output to/from the user.
    00375    * (see +CUSD event in radio documentation for more details)
    00376    *
    00377    * This notification will use exclusive broadcast to applications
    00378    * registered for the Voice Service.  The Application that first
    00379    * acknowledges the notification will be presumed to own the USSD session.
    00380    * Typically, that app will want to display any USSD message to the user,
    00381    * and handle any response from the user back to the network.
    00382    */
    00383   phnEvtUSSDInd,            /**< 0x0017  */
    00384
    00385   /** Phone Equipment state has changed
    00386    *
    00387    * On communicator devices there are pieces of equipment that directly
    00388    * impact how the radio is used.  Examples of equipment include headset
    00389    * jacks, car kits, lids, etc.  The equipment modes available will vary
    00390    * with the model of communicator being used.  This notification will be
    00391    * sent when ever the Phone Library detects that an available equipment
    00392    * mode has changed.  See the type PhnEquipmentMode for the available
    00393    * set of mode values.
    00394    *
    00395    * This notification will be universally broadcast to all applications
    00396    * registered for any service.
    00397    */
    00398   phnEvtPhoneEquipmentMode, /**< 0x0018  */
    00399
    00400   /** GPRS Attach Registration has changed. (GSM/GPRS systems only)
    00401    *
    00402    *  GPRS (General Packet Radio Services) is an extension to the GSM
    00403    *  wireless network that provides higher speed, always on data connections.
    00404    *  The radio must attach to the GPRS network before any GPRS sessions
    00405    *  can be established.  This notification will be sent when ever the
    00406    *  status of the GPRS attach registration changes.   See type
    00407    *  PhnRegistrationStatus for available registration states.
    00408    *
    00409    *  This notification will be universally broadcast to applications
    00410    * registered for any service.
    00411    */
    00412   phnEvtGPRSRegistration,   /**< 0x0019  */
    00413
    00414   /** incoming MMS message available
    00415    *
    00416    *  This notification will be sent when the Phone Library receives an
    00417    *  incoming MMS (Multi-media Message Service) message.
    00418    *
    00419    *  This notification will use exclusive broadcast to applications registered
    00420    *  for the MMS service.  Application that first acknowledges the notification
    00421    *  will be presumed to own the message.  Typically, that app will want
    00422    *  to notify the user that there is a message available, and move the
    00423    *  message into a system DB, freeing memory for future messages.
    00424    */
    00425   phnEvtMMSInd,             /**< 0x001A  */
    00426
    00427   /************************************************************
    00428   * CDMA Events
    00429   *************************************************************/
    00430
    00431
    00432   /** SMS Memory Full
    00433    *
    00434    *  This notification indicates that memory for SMS messages is
    00435    *  currently full, and no new SMS messages can be received until
    00436    *  some memory is freed.  A phnEvtMemoryOK notification will be sent
    00437    *  when memory becomes available.
    00438    *
    00439    *  CURRENTLY USED BY CDMA PHONE LIBRARY ONLY
    00440    */
    00441   phnEvtMemoryFull,         /**< 0x001B  */
    00442
    00443   /** SMS Memory no longer full
    00444    *
    00445    *  This notification indicates that memory for SMS messages is
    00446    *  no longer full, and new SMS messages can be received.
    00447    *
    00448    *  CURRENTLY USED BY CDMA PHONE LIBRARY ONLY
    00449    */
    00450   phnEvtMemoryOK,           /**< 0x001C - < Memory is not full anymore, can receive messages Description  */
    00451
    00452   /** WAP Message received via SMS (WAP in IS-637 standard)
    00453    *
    00454    *  NOT CURRENTLY USED (WAP notifications use standard Palm notifications)
    00455    */
    00456   phnEvtWAPInd,             /**< 0x001D  */
    00457
    00458   /** Radio Debug Info
    00459    *
    00460    *  Periodically sent from Phone Library to Activation App when
    00461    *  in debug mode.
    00462    *
    00463    *  CURRENTLY USED BY CDMA PHONE LIBRARY ONLY
    00464    */
    00465   phnEvtDebugReport,        /**< 0x001E  */
    00466
    00467   /** System Selection mode has changed
    00468    *
    00469    *  Radio mode has changed (e.g. to PCS mode)
    00470    *
    00471    *  CURRENTLY USED BY CDMA PHONE LIBRARY ONLY
    00472    */
    00473   phnEvtSSModeChanged,      /**< 0x001F  */
    00474
    00475   /** Position Info has changed
    00476    *
    00477    *  indication of change in physical location of device.  This may
    00478    *  be determined by GPS, network triangulation (AFLT), or some other
    00479    *  technique.
    00480    *
    00481    *  \TODO - rename this event & some of its data structures to be cleaner.
    00482    *
    00483    *  CURRENTLY USED BY CDMA PHONE LIBRARY ONLY
    00484    */
    00485   phnEvtPDDataChanged,      /**< 0x0020  */
    00486
    00487   /** 1XRTT Status has changed
    00488    *
    00489    *  1XRTT is a high speed data protocol used in CDMA radios.  This
    00490    *  notification indicates that the status of the 1XRTT connection
    00491    *  has changed.
    00492    *
    00493    *  CURRENTLY USED BY CDMA PHONE LIBRARY ONLY
    00494    */
    00495   phnEvtOneXStatus,         /**< 0x0021  */
    00496
    00497   /** Mobile IP connection failed
    00498    *
    00499    *  Mobile IP is a flavor of the TCP/IP protocol for use on mobile
    00500    *  devices.  It allows applications to use a single IP address while
    00501    *  in motion.  This notification occurs when a Mobile IP session
    00502    *  fails to be established.
    00503    *
    00504    *  CURRENTLY USED BY CDMA PHONE LIBRARY ONLY
    00505    */
    00506   phnEvtMIPFailed,          /**< 0x0022  */
    00507
    00508   /** IOTA Status has changed
    00509    *
    00510    *  Internet Over The Air (IOTA) is a protocol for a network to
    00511    *  update the radio using an internet connection (as opposed to
    00512    *  Over The Air (OTA)).  This notification occurs as an IOTA
    00513    *  session changes (e.g. is established, committed, ended, etc).
    00514    *
    00515    *  CURRENTLY GENERATED BY CDMA PHONE LIBRARY ONLY
    00516    */
    00517   phnEvtIOTAStatus,         /**< 0x0023  */
    00518
    00519   /** Data Channel availability has changed
    00520    *
    00521    *  This notification occurs if there is a change in the ability
    00522    *  for an application to send/receive data using the radio.  For
    00523    *  example on Class B radios, data is not available when a voice
    00524    *  call is in progress.
    00525    *
    00526    * \TODO - this notification should be generated by GSM Phone Library too.
    00527    *
    00528    *  CURRENTLY GENERATED BY CDMA PHONE LIBRARY ONLY
    00529    */
    00530   phnEvtDataChannel,        /**< 0x0024  */
    00531
    00532   /** Mobile IP Registration successful
    00533    *
    00534    *  Mobile IP is a flavor of the TCP/IP protocol for use on mobile
    00535    *  devices.  It allows applications to use a single IP address while
    00536    *  in motion.  This notification occurs when a Mobile IP session
    00537    *  is successfully established.  The notification phnEvtMIPFailed
    00538    *  will occur if the session fails.
    00539    *
    00540    *  CURRENTLY GENERATED BY CDMA PHONE LIBRARY ONLY
    00541    */
    00542   phnEvtOneXMipRRQInd,      /**< 0x0025  */
    00543
    00544   /** 1XRTT Session has failed (mid-session)
    00545    *
    00546    *  1XRTT is a high speed data protocol used in CDMA radios.  This
    00547    *  notification indicates that the 1XRTT session has failed, and
    00548    *  is not available.  Note that 1XRTT session may be left in Dormant
    00549    *  state.
    00550    *
    00551    *  CURRENTLY GENERATED BY CDMA PHONE LIBRARY ONLY
    00552    */
    00553   phnEvtOneXDataFail,       /**< 0x0026  */
    00554
    00555   /** Start Dialing of Outbound Call
    00556    *
    00557    *   This notification is sent when an outbound call begins dialing before
    00558    *   the call is connected.  This notification is universally broadcast to
    00559    *   all applications registered for the Voice service.  Notification
    00560    *   uses same notification data as Connect indication.
    00561    */
    00562   phnEvtStartDial,          /**< 0x0027  */
    00563
    00564   /** Start of incoming call
    00565    *
    00566    *   This notification is sent when an incoming call if first detected.
    00567    *   This notification is used to perform special pre-call processing
    00568    *   like turning off of MMS playback before a call.  Any processing on
    00569    *   this notification must be very quick (less than a few hundred miliseconds)
    00570    *   as it could potentially delay an incoming call from being answered.
    00571    *
    00572    *   APPLICATIONS MUST NOT ANSWER THE CALL OR DO ANY CALL CONTROL BASED
    00573    *   ON THIS NOTIFICATION.  A separate phnEvtConnectInd notification will
    00574    *   be follow for this purpose.  The phnEvtConnectInd notification is normally
    00575    *   processed by the Phone App, and uses exclusive broadcast.  Thus it may
    00576    *   not be received by all applications.  The phnEvtStartIncomingCall
    00577    *   notification is sent to all applications registered for Voice Service
    00578    *   using Universal Broadcast.  The acknowledgement flag is NOT used.
    00579    */
    00580   phnEvtStartIncomingCall,  /**< 0x0028  */
    00581
    00582   /** Alerting/Preconnected of Outbound Call
    00583    *
    00584    *   This notification is sent when an outbound call is alerting or
    00585    *   preconnected.  This notification is universally broadcast to
    00586    *   all applications registered for the Voice service.  Notification
    00587    *   uses same notification data as Connect indication.
    00588    */
    00589   phnEvtAlertingPreConnected,   /**< 0x0029  */
    00590
    00591   /** Alerting of Outbound Call (NOT USED, for future implementation)
    00592    *
    00593    *   NOT USED
    00594    *   This notification is sent when an outbound call is alerting.
    00595    *   This notification is universally broadcast to
    00596    *   all applications registered for the Voice service.  Notification
    00597    *   uses same notification data as Connect indication.
    00598    */
    00599   phnEvtAlerting,               /**< 0x002A  */
    00600
    00601   /** Preconnected of Outbound Call (NOT USED, for future implementation)
    00602    *
    00603    *   NOT USED
    00604    *   This notification is sent when an outbound call is preconnected.
    00605    *   This notification is universally broadcast to
    00606    *   all applications registered for the Voice service.  Notification
    00607    *   uses same notification data as Connect indication.
    00608    */
    00609   phnEvtPreConnected,           /**< 0x002B  */
    00610
    00611   /** Data session status change
    00612    *  This should replace the OneXStatus, as this will encompass more info
    00613    *  than OneXStatus
    00614    */
    00615   phnEvtDataSessionStatus,           /**< 0x002C   */
    00616
    00617   /** Data session disconnected
    00618    *  This is sent up when the data call is disconnected.
    00619    *  We can't use the phnEvtDisconnectInd because the structure uses the
    00620    *  Err class.
    00621    */
    00622   phnEvtDataSessionDisconnected,     /**< 0x002D   */
    00623
    00624   /** Returns the network time and DST obtained from network to date time panel
    00625    */
    00626
    00627   phnEvtNetworkTime, /**< 0x002E   */
    00628
    00629   kMaxPhnEvtSupported  /**< Must be at last position*/
    00630 } PhnEventCode;
    00631
    00632 #define isValidPhnEventCode(e) ((e >= phnEvtCardInsertion) && (e < kMaxPhnEvtSupported)) /**<       */
    00633
    00634
    00635 /**
    00636  *
    00637  */
    00638 typedef struct
    00639   {
    00640     PhoneServiceClassType service;      /**< type of call being disconnected */
    00641     Err code;                           /**< cause of disconnect (0 for normal hangup) */
    00642   }
    00643 PhnDisconnectEventType;
    00644
    00645 /**
    00646  *
    00647  **/
    00648 typedef struct
    00649   {
    00650     PhnAddressHandle caller;        /**<        */
    00651     PhoneServiceClassType service;  /**<        */
    00652     Int16 lineNumber;               /**<        */
    00653   }
    00654 PhnSubscriberAddrInfo;
    00655
    00656 /**
    00657  *
    00658  **/
    00659 typedef struct
    00660   {
    00661       PhnConnectionID call1ID;      /**<        */
    00662       PhnConnectionID call2ID;      /**<        */
    00663       PhnConnectionID conferenceID;     /**<        */
    00664   }
    00665 PhnConferenceDesc;
    00666
    00667
    00668 /**
    00669  *
    00670  **/
    00671 typedef struct
    00672   {
    00673       Err code;     /**<        */
    00674       UInt32 id;        /**<        */
    00675       // removed Count from CDMA structure to make GSM and CDMA the same. Must update library.
    00676       // dont think we use the count now anyway. That was added to debug CRC errors as far as
    00677       // I know
    00678       UInt16 networkError;  /**< Error code returned by the network. If this
    00679                      field is non-zero it contains that error code
    00680                      returned by the network. The 'code' above will be
    00681                      the Phone Library version of this error. */
    00682   }
    00683 PhnError;
    00684
    00685 /**
    00686  * SMS Replacement types
    00687  **/
    00688 typedef UInt8 PhnSMSType;
    00689 typedef enum
    00690 {
    00691   defaultType = 0,
    00692   discardType0 = 0x40,          /**< Type 0 messages should be discarded. */
    00693     replaceType1 = 0x41,        /**< Replace Short Message Type 1. */
    00694     replaceType2 = 0x42,        /**< Replace Short Message Type 2. */
    00695     replaceType3 = 0x43,        /**< Replace Short Message Type 3. */
    00696     replaceType4 = 0x44,        /**< Replace Short Message Type 4. */
    00697     replaceType5 = 0x45,        /**< Replace Short Message Type 5. */
    00698     replaceType6 = 0x46,        /**< Replace Short Message Type 6. */
    00699     replaceType7 = 0x47     /**< Replace Short Message Type 7. */
    00700
    00701 } PhnSMSTypeEnum;
    00702
    00703 /**
    00704  * SMS Class types
    00705  **/
    00706 typedef UInt8 PhnSMSClass;
    00707 typedef enum
    00708 {
    00709   classUnknown = 0, /**<        */
    00710   class0,           /**< immediate display */
    00711   class1,           /**<        */
    00712   class2,       /**<        */
    00713   class3        /**<        */
    00714 } PhnSMSClassEnum;
    00715
    00716 /**
    00717  * Struct that is sent when a new sms message event
    00718  *   id                 - Unique id
    00719  *   oldStatus          -
    00720  *   newStatus          -
    00721  *
    00722  *   version            - Version number of the struct
    00723  *   size               - Size of the struct
    00724  *   msgType            - Indicates if message should be discarded or replaced
    00725  *   msgClass           - Indicates msg class
    00726  *   msgInd             - True if msg contains an indicator msg
    00727  *   indicator.store    - True = store msg; False = may delete msg
    00728  *   indicator.activate - True then activate indicator; False = deactivate indicator
    00729  *   indicator.indType  - Type of indicator to display
    00730  *   trasactionID       -
    00731  *   timeStamp          - Time in seconds
    00732  *   serviceCenterNumber- Service Center Number
    00733  *   senderNumber       - Number of sender
    00734  *   callbackAddress    - CallBack number
    00735  *   destPort           -
    00736  *   sourcePort         -
    00737  **/
    00738 typedef struct PhnSMSParams
    00739 {
    00740   UInt32 id;            /**<        */
    00741   UInt8  oldStatus;     /**<        */
    00742   UInt8  newStatus;     /**<        */
    00743
    00744   // new params
    00745   UInt16  version;      /**<        */
    00746   UInt16  size;         /**<        */
    00747   PhnSMSType msgType;       /**<        */
    00748   PhnSMSClass msgClass;     /**<        */
    00749   Boolean moveRequested;    /**<        */
    00750   Boolean msgInd;       /**<        */
    00751   struct {
    00752     Boolean store;      /**<        */
    00753     Boolean activate;       /**<        */
    00754     PhnMsgBoxType indType;  /**<        */
    00755   } indicator;
    00756
    00757   UInt8   trasactionID;     /**<        */
    00758   UInt32 timeStamp;         /**<        */
    00759
    00760   char serviceCenterNumber[kMaxPhoneNumberLen+1];   /**<        */
    00761   char senderNumber[kMaxPhoneNumberLen+1];      /**<        */
    00762   char callbackAddress[kMaxPhoneNumberLen+1];       /**<        */
    00763
    00764   Int32 destPort;       /**<        */
    00765   Int32 sourcePort;     /**<        */
    00766
    00767   UInt16 networkMsgId;      /**<        */
    00768   UInt8 priority;       /**<        */
    00769   UInt8 privacy;        /**<        */
    00770
    00771 } PhnSMSParams;
    00772
    00773 #define PhnSMSParamsVersion 2       /**<        */
    00774
    00775
    00776 /**
    00777  * Phone buttons
    00778  **/
    00779 // <chg 11-04-2002 TRS> eliminate phone & data buttons.  These were from VisorPhone.
    00780 typedef enum  {
    00781     phnButtonHeadset,       /**<        */
    00782     phnButtonRedial,        /**<        */
    00783     phnButtonAnswerCall,        /**<        */
    00784     phnButtonRejectCall,        /**<        */
    00785     phnButtonIgnoreCall,        /**<        */
    00786     phnButtonHoldCall,      /**<        */
    00787     phnButtonConferenceCall,    /**<        */
    00788     phnButtonLast           /**<        */
    00789 } PhnModuleButtonType;
    00790
    00791 #define isValidPhnModuleButtonType(m) (m < phnButtonLast)   /**<        */
    00792
    00793 /**
    00794  *
    00795  **/
    00796 typedef struct
    00797   {
    00798     PhnModuleButtonType key;        /**<        */
    00799     UInt16            modifiers;    /**<        */
    00800   }
    00801 PhnKeyPressedParams;
    00802
    00803 /**
    00804  *
    00805  **/
    00806 typedef struct
    00807   {
    00808     PhnRegistrationStatus status;   /**<        */
    00809   }
    00810 PhnRegistrationType;
    00811
    00812 /**
    00813  *
    00814  **/
    00815 typedef struct
    00816   {
    00817     PhnPowerType    state;      /**<        */
    00818   }
    00819 PhnPowerEventType;
    00820
    00821 typedef Err (* ContinuePowerOnOffCallback) (UInt16 refNum); /**<        */
    00822
    00823 /**
    00824  *
    00825  **/
    00826 typedef struct
    00827   {
    00828     PhnIndicationKind kind;         /**<        */
    00829     char            filler;         /**<        */
    00830     union
    00831         {
    00832         struct
    00833             {
    00834             Boolean state;      /**<        */
    00835             } simReady;
    00836         struct
    00837             {
    00838             GSMSIMMessagesDialogKind dialog;    /**<        */
    00839             Boolean moveMessages;           /**<        */
    00840         DWord mSIMMessagesAcknowledge;      /**< creator of move msg dialog for subsequent events */
    00841             } simMessages;
    00842         struct
    00843             {
    00844             PhnPasswordType type;       /**<        */
    00845             } passwordAccepted;
    00846         struct
    00847             {
    00848             Boolean state;          /**<        */
    00849             } networkAvailable;
    00850         struct
    00851             {
    00852               ContinuePowerOnOffCallback continuePowerOnOff;    /**<        */
    00853             } powerOnOffContinueCallback;
    00854     struct
    00855         {
    00856             UInt32 indicationCode;  /**<        */
    00857         } otaspMsg;
    00858
    00859     } data;
    00860
    00861   }
    00862 PhnIndicationType;
    00863
    00864
    00865 typedef char PhnPassword[maxPasswordLen+2];     /**<        */
    00866
    00867 /**
    00868  *
    00869  **/
    00870 typedef struct  {
    00871     PhnPasswordType     type;       /**<        */
    00872     PhnPasswordType     prevType;   /**<        */
    00873     Err         error;      /**<        */
    00874     PhnPassword     pin;        /**<        */
    00875     PhnPassword     puk;        /**<        */
    00876 } PhnPasswordEventType;
    00877
    00878
    00879 /**
    00880  *
    00881  **/
    00882 typedef enum  {
    00883     kOpenDialog,        /**<        */
    00884     kCloseDialog,       /**<        */
    00885     kSetText,       /**<        */
    00886     kSetRecipient,      /**<        */
    00887     kShowSegment        /**<        */
    00888 } PhnProgressType;
    00889
    00890 #define isValidPhnProgressType(p) (p <= kShowSegment)       /**<        */
    00891 //#define isValidPhnProgressType(p) ((p >= kOpenDialog) && (p <= kShowSegment))
    00892
    00893 /**
    00894  *
    00895  **/
    00896 typedef enum  {
    00897     kDialogSetBarring,      /**<        */
    00898     kDialogGetBarring,      /**<        */
    00899     kDialogSetForwarding,       /**<        */
    00900     kDialogGetForwarding,       /**<        */
    00901     kDialogSetCallWaiting,      /**<        */
    00902     kDialogGetCallWaiting,      /**<        */
    00903     kDialogGetOperatorList,     /**<        */
    00904     kDialogSetOperator,     /**<        */
    00905     kDialogOperatorSelection,   /**<        */
    00906     kDialogImmediateSend,       /**<        */
    00907     kDialogDeferredSend,        /**<        */
    00908     kDialogSendUSSD         /**<        */
    00909 } PhnOpenDialogType;
    00910
    00911 #define isValidPhnOpenDialogType(o) (o <= kDialogSendUSSD)      /**<        */
    00912 //#define isValidPhnOpenDialogType(o) ((o >= kDialogSetBarring) && (o <= kDialogSendUSSD))
    00913
    00914 /**
    00915  *
    00916  **/
    00917 typedef struct {
    00918     PhnProgressType     progress;   /**<        */
    00919     PhnOpenDialogType   dialog;     /**<        */
    00920     DWord           data;       /**< only for SMS progress */
    00921 } PhnProgressEventType;
    00922
    00923 /**
    00924  *
    00925  **/
    00926 typedef struct {
    00927     PhnDatabaseID msgID;    /**<        */
    00928     DWord msgOwner;     /**<        */
    00929     Err error;      /**<        */
    00930     UInt8 event;        /**<        */
    00931 } PhnMovedMsgDescType;
    00932
    00933 /**
    00934  *
    00935  **/
    00936 typedef struct {
    00937     UInt16 count;           /**<        */
    00938     PhnMovedMsgDescType* list;  /**<        */
    00939 } PhnMovedMsgsParamsType;
    00940
    00941 /**
    00942  *
    00943  **/
    00944 typedef struct {
    00945     long    result;     /**<        */
    00946     CharPtr string;     /**<        */
    00947 } PhnUSSDEventType;
    00948
    00949 /**
    00950  *
    00951  **/
    00952 typedef struct {
    00953     MemHandle   dataH;          /**<        */
    00954     UInt32      notificationType;   /**<        */
    00955 } PhnSATEventType;
    00956
    00957 // for notificationType = kSATDisplayText
    00958 /**
    00959  *
    00960  **/
    00961 typedef struct {
    00962     UInt32  signature;      /**<        */
    00963     UInt32  notificationType;   /**<        */
    00964
    00965     UInt32  textOffset;     /**<        */
    00966     UInt16  priority;       /**<        */
    00967     UInt16  clearMode;      /**<        */
    00968 } PhnSATEventDisplayText;
    00969
    00970 // for notificationType = kSATGetInkey
    00971 /**
    00972  *
    00973  **/
    00974 typedef struct {
    00975     UInt32  signature;      /**<        */
    00976     UInt32  notificationType;   /**<        */
    00977
    00978     UInt32  textOffset;     /**<        */
    00979     UInt16  format;         /**< See GSMSATEventInputFormatEnum */
    00980     UInt16  helpInfo;       /**<        */
    00981 } PhnSATEventGetInkey;
    00982
    00983 // header for all SATEvents
    00984 /**
    00985  *
    00986  **/
    00987 typedef struct PhnSATEventHeader        PhnSATEventHeader;  /**<        */
    00988 struct PhnSATEventHeader {
    00989     UInt32  signature;      /**<        */
    00990     UInt32  notificationType;   /**<        */
    00991 };
    00992
    00993 // for notificationType = kSATGetInput
    00994 /**
    00995  *
    00996  **/
    00997 typedef struct {
    00998     UInt32  signature;      /**<        */
    00999     UInt32  notificationType;   /**<        */
    01000
    01001     UInt32  textOffset;     /**<        */
    01002     UInt16  format;         /**< See GSMSATEventInputFormatEnum */
    01003     UInt16  helpInfo;       /**<        */
    01004     UInt16  echoMode;       /**<        */
    01005     UInt16  minSize;        /**<        */
    01006     UInt32  defaultOffset;      /**< offset of default value string at end of cmd block (0 if none) <chg 05-13-2002 TRS> bug # 13829 */
    01007     UInt16  maxSize;        /**<        */
    01008     UInt16 pad;
    01009 } PhnSATEventGetInput;
    01010
    01011 // for notificationType = kSATSetupCall
    01012 /**
    01013  *
    01014  **/
    01015 typedef struct {
    01016     UInt32  signature;      /**<        */
    01017     UInt32  notificationType;   /**<        */
    01018
    01019     UInt32  numberOffset;       /**<        */
    01020     UInt32  promptOffset;       /**<        */
    01021     UInt16  type;           /**<        */
    01022     UInt16  callType;
    01023 } PhnSATEventSetupCall;
    01024
    01025 // for notificationType = kSATPlayTone
    01026 /**
    01027  *
    01028  **/
    01029 typedef struct {
    01030     UInt32  signature;      /**<        */
    01031     UInt32  notificationType;   /**<        */
    01032
    01033     UInt32  textOffset;     /**<        */
    01034     UInt16  toneType;       /**<        */
    01035     UInt16  timeUnit;       /**< valid only if timeInterval > 0 */
    01036     UInt16  timeInterval;       /**<        */
    01037     UInt16  pad;
    01038 } PhnSATEventPlayTone;
    01039
    01040 // contain info for one menu item
    01041 /**
    01042  *
    01043  **/
    01044 typedef struct {
    01045     UInt32  labelOffset;    /**<        */
    01046     UInt32  features;   /**<        */
    01047     UInt16  id;     /**<        */
    01048     UInt16  nextAction; /**<        */
    01049 } PhnSATEventMenuRec;
    01050
    01051 // for notificationType = kSATDisplaySubmenus
    01052 /**
    01053  *
    01054  **/
    01055 typedef struct {
    01056     UInt32  signature;      /**<        */
    01057     UInt32  notificationType;   /**<        */
    01058
    01059     UInt32  titleOffset;        /**<        */
    01060     UInt32  defaultItem;        /**< only valid in submenu */
    01061     UInt32  recordCount;        /**<        */
    01062     PhnSATEventMenuRec  record[1];  /**<        */
    01063 } PhnSATEventMenu;
    01064
    01065
    01066 // for notificationType = kSATSendSS, kSATSendSMS, and kSATSendUSSD
    01067 /**
    01068  *
    01069  **/
    01070 typedef struct {
    01071     UInt32  signature;      /**<        */
    01072     UInt32  notificationType;   /**<        */
    01073
    01074     UInt32  textOffset;     /**<        */
    01075 } PhnSATEventSendSMS;
    01076
    01077
    01078 // for notificationType = kSATRefresh
    01079 /**
    01080  *
    01081  **/
    01082 typedef struct {
    01083     UInt32  signature;      /**<        */
    01084     UInt32  notificationType;   /**<        */
    01085     UInt32  EFList;       /**< This is a bitmap of the efs to be refreshed*/
    01086     UInt16  refreshType;  /**<        */
    01087     UInt16  pad;
    01088   } PhnSATEventRefresh;
    01089
    01090
    01091 // for notificationType = kSATLaunchBrowser
    01092 /**
    01093  *
    01094  **/
    01095 typedef struct {
    01096     UInt32  signature;      /**<        */
    01097     UInt32  notificationType;   /**<        */
    01098     UInt32  action;         /**<        */
    01099     UInt32  urlOffset;          /**<        */
    01100     UInt32  bearerOffset;       /**<        */
    01101     UInt32  provOffset;         /**<        */
    01102     UInt32  gatewayProxyOffset;     /**<        */
    01103     UInt32  alphaIdOffset;      /**<        */
    01104   } PhnSATEventLaunchBrowser;
    01105
    01106 // for notificationType = kSATIdleModeText
    01107 /**
    01108  *
    01109  **/
    01110 typedef struct {
    01111     UInt32  signature;
    01112     UInt32  notificationType;
    01113
    01114     UInt32  alphaIdOffset;
    01115 } PhnSATEventIdleModeText;
    01116
    01117 // for notificationType = kSATIdleRunAT
    01118 /**
    01119  *
    01120  **/
    01121 typedef struct {
    01122     UInt32  signature;
    01123     UInt32  notificationType;
    01124
    01125     UInt32  alphaIdOffset;
    01126 } PhnSATEventRunAT;
    01127
    01128
    01129 // for notificationType = kSATDataSvc
    01130 /**
    01131  *
    01132  **/
    01133 typedef struct {
    01134   UInt32  signature;
    01135   UInt32  notificationType;
    01136
    01137   UInt8   chanId;
    01138   UInt8   serviceType;      /** See GSMSATDataSvcType */
    01139   UInt8 loginNeeded;
    01140   UInt8 passwdNeeded;
    01141   UInt32  alphaIdOffset;
    01142 } PhnSATEventDataSvc;
    01143
    01144 // for notificationType = kSATSendDTMF
    01145 /**
    01146  *
    01147  **/
    01148 typedef struct {
    01149   UInt32  signature;
    01150   UInt32  notificationType;
    01151
    01152   UInt32  alphaIdOffset;
    01153   UInt32  dtmfChar;
    01154 } PhnSATEventSendDTMF;
    01155
    01156
    01157 /**
    01158  *
    01159  **/
    01160 typedef struct {
    01161     long    mode;       /**<        */
    01162 } PhnPhoneEquipmentMode;
    01163
    01164
    01165 /**
    01166  *
    01167  **/
    01168 typedef enum
    01169   {
    01170     eDbgUpdateNone,     /**<        */
    01171     eDbgUpdateYes,      /**<        */
    01172     eDbgUpdateQuit      /**<        */
    01173   }
    01174 PhnMiscDbgUpdateKind;
    01175
    01176 #define isValidPhnMiscDbgUpdateKind(x) ((x >= eDbgUpdateNone) && (x <= eDbgUpdateQuit)) /**<        */
    01177
    01178 /**
    01179  *
    01180  **/
    01181 typedef struct
    01182   {
    01183     PhnMiscDbgUpdateKind miscUpdate;    /**<        */
    01184   }
    01185 PhnMiscDbgRptType;
    01186
    01187
    01188 /**
    01189  *
    01190  **/
    01191 typedef enum
    01192   {
    01193     kMsgIdReserved,     /**<        */
    01194     kMsgIdDeliverMT,        /**<        */
    01195     kMsgIdSubmitMO,     /**<        */
    01196     kMsgIdcancelMO,     /**<        */
    01197     kMsgIdDeliveryMTAck,    /**<        */
    01198     kMsgIdUserAck       /**<        */
    01199   }
    01200 PhnMsgIDType;
    01201
    01202 #define isValidPhnMsgIDType(m) ((m >= kMsgIdReserved) && (m <= kMsgIdUserAck))  /**<        */
    01203
    01204
    01205 /**
    01206  *
    01207  **/
    01208 typedef enum
    01209   {
    01210     phnDataAvailable,       /**<        */
    01211     phnDataNotAvailable     /**< Used by apps that need to know when they can use the data channel */
    01212   }
    01213 PhnDataChannelType;
    01214
    01215 #define isValidPhnDataChannelType(x) ((x == phnDataAvailable) || (x == phnDataNotAvailable))    /**<        */
    01216
    01217
    01218 /**
    01219  *
    01220  **/
    01221 typedef struct
    01222   {
    01223     Boolean init_rrq;           /**< true if initial registration, false if reregistration */
    01224     DWord   life_timer;         /**< new lifetime value in seconds */
    01225     DWord   rrq_timer;          /**< new reregistration time value in seconds */
    01226     DWord   traffic_ck_delay_timer; /**< time in seconds to delay checking for data to trigger re-registration */
    01227   }
    01228 PhnOnexMipRRQType, *PhnOnexMipRRQPtr;
    01229
    01230
    01231 /**
    01232  * @name Palm Notifications
    01233  *
    01234  **/
    01235 /*@{*/
    01236 #define NAITextLength       72              /**<        */
    01237 #define NAITextSize         (NAITextLength + 1)     /**<        */
    01238 #define PasswordLength      16              /**<        */
    01239 #define PasswordSize        (PasswordLength + 1)    /**<        */
    01240 /*@}*/
    01241
    01242 /**
    01243  * @name WAP defines
    01244  *       Text Header elements
    01245  *
    01246  **/
    01247 /*@{*/
    01248 #define phnWAPEvent         'Hwap'      /**<        */
    01249
    01250 #define WAPMsgLength        160         /**<        */
    01251 #define WAPMsgSize          (WAPMsgLength + 1)  /**<        */
    01252 /*@}*/
    01253
    01254 /**
    01255  * @name WakeUp notification
    01256  *
    01257  **/
    01258 /*@{*/
    01259 #define WUHeaderEscapeSeq     "//"              /**< start sequence of the header */
    01260 #define WUTextHeader          "//WU"            /**< beginning of an wakeup header */
    01261 #define WUTextHeaderLength    4                 /**< length of the header */
    01262
    01263 #define WUFieldDelimiter     ';'                /**< wakeup message fields are separated by a semi-colon */
    01264
    01265 #define phnWUEvent         'Hwak'           /**<        */
    01266 /*@}*/
    01267
    01268 /**
    01269  * @name UP stuff
    01270  * Text Header elements
    01271  **/
    01272 /*@{*/
    01273 #define UPHeaderEscapeSeq     "//"              /**< start sequence of the header */
    01274 #define UPTextHeader          "//UP"            /**< beginning of an UP header */
    01275 #define UPTextHeaderLength    4                 /**< length of the header */
    01276
    01277 #define phnUPEvent         'Hsup'       /**<        */
    01278
    01279 #define UPDataSize            160               /**< maximum size of the data sent from this message */
    01280 /*@}*/
    01281
    01282 /**
    01283   *  Network Wakeup Stuff
    01284   *  Text Header elements
    01285   **/
    01286
    01287 /** Structure passed to the callbacks registered for incoming wakeup notifications */
    01288 struct WUNotificationEventType
    01289 {
    01290     UInt16 version;     /**< version number to provide future backwards compatibility */
    01291
    01292     void *headerP;      /**< pointer to raw header */
    01293     UInt8 headerLen;    /**< length of headerP */
    01294
    01295     /** Network wakeup fields */
    01296     char  NAI[NAITextSize];       /**< stores the NAI */
    01297     char  _filler1_;              /**< for 16 bit allignment */
    01298     UInt32 netTimeStamp;          /**< timestamp from the message */
    01299     UInt8 reasonCode;             /**< a reason code from the message */
    01300     char  _filler2_;              /**< for 16 bit allignment */
    01301     char  password[PasswordSize]; /**< the password (encrypted) */
    01302     char  _filler3_;              /**< for 16 bit allignment */
    01303
    01304     /** SMS related fields */
    01305     UInt32 msgID; /**< ID into the SMS database to reference this
    01306                   * message this ID is not gauranteed to be
    01307                   * valid once the notification callback
    01308                   * returns.  Users should make a copy of the
    01309                   * msg if they want to work on it after the
    01310                   * callback returns.
    01311                   */
    01312     UInt32 datetime;   /**< date/time stamp */
    01313     Int32  reserved2;  /**< reserved*/
    01314     Int32  reserved3;  /**< reserved*/
    01315 };
    01316
    01317 #ifndef _cplusplus
    01318 typedef struct WUNotificationEventType WUNotificationEventType; /**<        */
    01319 #endif
    01320
    01321
    01322 // UP Stuff
    01323
    01324
    01325
    01326 /** Structure passed to the callbacks registered for incoming UP notifications */
    01327 struct UPNotificationEventType
    01328 {
    01329     UInt16 version;  /**< version number to provide future backwards compatibility */
    01330
    01331     void *headerP;    /**< pointer to raw header */
    01332     UInt8 headerLen;  /**< length of headerP */
    01333
    01334     /** Network wakeup fields */
    01335     char  UPData[UPDataSize + 1];        /**< stores the raw data */
    01336     UInt8 _filler100_;
    01337
    01338     /** SMS related fields */
    01339     UInt32 msgID; /**< ID into the SMS database to reference this
    01340                   * message this ID is not gauranteed to be
    01341                   * valid once the notification callback
    01342                   * returns.  Users should make a copy of the
    01343                   * msg if they want to work on it after the
    01344                   * callback returns.
    01345                   */
    01346     UInt32 datetime;   /**< date/time stamp */
    01347     Int32  reserved2;  /**< reserved*/
    01348     Int32  reserved3;  /**< reserved*/
    01349 };
    01350
    01351 #ifndef _cplusplus
    01352 typedef struct UPNotificationEventType UPNotificationEventType; /**<        */
    01353 #endif
    01354
    01355
    01356 // WAP Stuff
    01357
    01358 /**
    01359  * WAP push message - message content type
    01360  **/
    01361 typedef enum {
    01362   kWAPContentTypeUnknown = 0,       /**<        */
    01363   kWAPContentTypeIOTA,          /**<        */
    01364   kWAPContentTypeMMS,           /**<        */
    01365   kWAPContentTypeMMSText,       /**<        */
    01366   kWAPContentTypeServiceLoad,       /**<        */
    01367   kWAPContentTypeServiceLoadText,   /**<        */
    01368   kWAPContentTypeServiceIndicator,  /**<        */
    01369   kWAPContentTypeServiceIndicatorText   /**<        */
    01370 } PhnWAPPushContentType;
    01371
    01372 typedef UInt8 PhnWAPPushContent;
    01373 /**
    01374  * WAP push message - message type
    01375  * http://www.wapforum.org/wina/push-app-id.htm
    01376  **/
    01377 typedef enum {
    01378   //URN                   //Number  //  Description
    01379   kWAPAnyApp              = 0x00,   /**< Any Application */
    01380   kWAPPushSIA             = 0x01,   /**< WAP Push SIA  */
    01381   kWAPWmlUa               = 0x02,   /**< WML User Agent  */
    01382   kWAPWtaUa               = 0x03,   /**< WTA User Agent  */
    01383   kWAPMmsUa               = 0x04,   /**< This ID will used for application dispatching  to MMS User Agent in the handling of MMS notfication using WAP Push. See WAP-206-MMSCTR for more detail.  */
    01384   kWAPPushSyncml          = 0x05,   /**< SyncML PUSH Application ID: used to push a SyncML Alert from a SyncML server side. The SyncML Alert is an indication for starting a SyncML session e.g., for data synchronization. Requested by the WAP WAG Synchronisation Drafting Committee.  */
    01385   kWAPLocUa               = 0x06,   /**< This ID is used for application dispatching to Location User Agent in the handling of Location Invocation document. See WAP-257-LOCPROT for details. Requested by the WAP WAG Location Drafting Committee.   */
    01386   kWAPSyncmlDm            = 0x07,   /**< This ID is used for SyncML Device Management. Requested by the SyncML Device Management Expert Group.   */
    01387   kWAPDrmUa               = 0x08,   /**< This ID is used for DRM User Agent. Requested by the WAP WAG Download DC.   */
    01388   kWAPEmnUa               = 0x09,   /**< This ID is used for Email Notification (EMN) User Agent. Requested by the WAP WAG PUSH DC.   */
    01389   kWAPWvUa                = 0x0A,   /**< This ID is used for Wireless Village (EMN) User Agent. Requested by Wireless Village.   */
    01390
    01391   // Registered Values -----------------------------
    01392   kWAPMsLocalcontentUa    = 0x8000, /**< An application to receive pages to be stored and access locally. These are not wta channels. Usually the pages will be downloaded as multi-part mime.   */
    01393   kWAPMsIMclientUa        = 0x8001, /**< An application which will act as an instant messaging client on a phone.   */
    01394   kWAPdocomoImodeMailUa   = 0x8002, /**< Used to identify the i-mode mail application user agent on a mobile device.   */
    01395   kWAPdocomoImodeMrUa     = 0x8003, /**< Used to identify the i-mode message request application user agent on a mobile device.   */
    01396   kWAPdocomoImodeMfUa     = 0x8004, /**< Used to identify the i-mode message free application user agent on a mobile device.   */
    01397   kWAPMotorolaLocationUa  = 0x8005, /**< An application that receives message notifications from the location server.   */
    01398   kWAPMotorolaNowUa       = 0x8006, /**< An application that presents personalized information to the user.   */
    01399   kWAPMotorolaOtaprovUa   = 0x8007, /**< An application that receives provisioning messages from the server.   */
    01400   kWAPMotorolaBrowserUa   = 0x8008, /**< A web browsing application.   */
    01401   kWAPMotorolaSplashUa    = 0x8009, /**< An application that receives splash screen content from the server.   */
    01402   kWAPUnused              = 0x800A, /**<        */
    01403   kWAPNaiMvswCommand      = 0x800B, /**< Used by administrators to issue commands to individual devices.   */
    01404   // unused  0x800C through 0x800F  /**<        */
    01405   kWAPopenwaveIotaUa      = 0x8010  /**< Used for application dispatching to the IP-based OTA Provisioning Service Agent in the handling of IOTA notfications using WAP Push.   */
    01406 } PhnWAPPushAppIdType;
    01407
    01408
    01409 typedef UInt16 PhnWAPPushAppId;
    01410
    01411 /**
    01412  * Structure passed to the callbacks registered for WAP notifications
    01413  **/
    01414 #define WAPNotificationTypeVersion   3      /**<        */
    01415 struct WAPNotificationEventType
    01416 {
    01417     UInt16 version;         /**< version number to provide future backwards compatibility */
    01418
    01419     /** Network wakeup fields */
    01420     char  *wapMsg;
    01421     char  _filler1_;                    /**< for 16 bit allignment */
    01422
    01423     /** SMS related fields */
    01424     UInt32 length;                      /**< originally the msgID, now it stores the length of the wapMsg */
    01425     UInt32 datetime;                    /**< date/time stamp */
    01426
    01427     /** VERSION 3 ADDITION */
    01428     UInt32 id;                      /**< msgID */
    01429     PhnWAPPushContent contentType;  /**< WAP push message content type */
    01430     PhnWAPPushAppId   appId;        /**< WAP push message application id */
    01431 };
    01432
    01433 #ifndef _cplusplus
    01434 typedef struct WAPNotificationEventType WAPNotificationEventType;   /**<        */
    01435 #endif
    01436
    01437
    01438 /**
    01439  *  Phone Event Structure
    01440  **/
    01441 typedef struct
    01442 {
    01443   UInt8    eventType;     /**< PhnEventCode */
    01444   Boolean  acknowledge;   /**<              */
    01445   UInt16   connectionID;  /**<              */
    01446   UInt16   launchCode;    /**<              */
    01447   Ptr      launchParams;  /**<              */
    01448   union Data
    01449     {
    01450       PhnDisconnectEventType   disconnect;              /**<        */
    01451       PhnSubscriberAddrInfo    info;                    /**<        */
    01452       PhnConferenceDesc        conference;              /**<        */
    01453       PhnError                 error;                   /**<        */
    01454       PhnSMSParams             params;                  /**<        */
    01455       PhnKeyPressedParams      keyPressed;              /**<        */
    01456       PhnRegistrationType      registration;            /**<        */
    01457       PhnMsgBoxDataType        msgBox;                  /**<        */
    01458       PhnPowerEventType        power;                   /**<        */
    01459       PhnPasswordEventType     password;                /**<        */
    01460       PhnProgressEventType     progress;                /**<        */
    01461       PhnIndicationType        indication;              /**<        */
    01462       PhnMovedMsgsParamsType   moved;                   /**<        */
    01463       PhnUSSDEventType         ussd;                    /**<        */
    01464       PhnSATEventType          sat;                     /**<        */
    01465       PhnPhoneEquipmentMode    phoneEquipmentMode;      /**<        */
    01466       PhnMiscDbgRptType        miscDbgRpt;              /**<        */
    01467       PhnPDDataType            PDDataInfo;              /**< sent asynchronously by the modem */
    01468       PhnOneXStatus            oneXStatus;              /**<        */
    01469       PhnMIPFailType           mipSessionFailReason;    /**<        */
    01470       PhnIOTAReportType        iotaInfo;                /**<        */
    01471       PhnDataChannelType       dataChannelAvailability; /**< phnEvtDataChannel event <currently not used> */
    01472       PhnOnexMipRRQType        PhnOnxMipRRQ;            /**<        */
    01473       PhnOneXDataFailType      oneXFailReason;          /**<        */
    01474       WAPNotificationEventType wapEvtParams;            /**<        */
    01475       PhnDataSessionStateType  dataSesstionStatus;      /**< Sent when the data session state changes */
    01476       PhnNetworkTime           networkTime;  /**< GSM Only, phnEvtNetworkTime */
    01477
    01478     }
    01479   data;
    01480 }
    01481 PhnEventType, * PhnEventPtr;
    01482
    01483 #define PhnEventRecord PhnEventType
    01484
    01485 #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