Home | History | Annotate | Download | only in libloc_api
      1 /******************************************************************************
      2   @file:  loc_eng_ni.cpp
      3   @brief:  module for network initiated interactions
      4 
      5   DESCRIPTION
      6      LOC_API network initiated operation support
      7 
      8   INITIALIZATION AND SEQUENCING REQUIREMENTS
      9 
     10   -----------------------------------------------------------------------------
     11   Copyright (c) 2009 QUALCOMM Incorporated.
     12   All Rights Reserved. QUALCOMM Proprietary and Confidential.
     13   -----------------------------------------------------------------------------
     14 ******************************************************************************/
     15 
     16 /*=====================================================================
     17                         EDIT HISTORY FOR MODULE
     18 
     19   This section contains comments describing changes made to the module.
     20   Notice that changes are listed in reverse chronological order.
     21 
     22 when       who      what, where, why
     23 --------   ---      -------------------------------------------------------
     24 07/30/09   dx       Initial version
     25 
     26 $Id:
     27 ======================================================================*/
     28 
     29 #ifndef LOC_ENG_NI_H
     30 #define LOC_ENG_NI_H
     31 
     32 #include <hardware/gps.h>
     33 
     34 #define LOC_NI_NO_RESPONSE_TIME            20                      /* secs */
     35 
     36 extern const GpsNiInterface sLocEngNiInterface;
     37 
     38 typedef struct {
     39     pthread_mutex_t         loc_ni_lock;
     40     int                     response_time_left;       /* examine time for NI response */
     41     boolean                 notif_in_progress;        /* NI notification/verification in progress */
     42     rpc_loc_ni_event_s_type loc_ni_request;
     43     int                     current_notif_id;         /* ID to check against response */
     44 } loc_eng_ni_data_s_type;
     45 
     46 // Functions for sLocEngNiInterface
     47 extern void loc_eng_ni_init(GpsNiCallbacks *callbacks);
     48 extern void loc_eng_ni_respond(int notif_id, GpsUserResponseType user_response);
     49 
     50 extern int loc_eng_ni_callback (
     51         rpc_loc_event_mask_type               loc_event,              /* event mask           */
     52         const rpc_loc_event_payload_u_type*   loc_event_payload       /* payload              */
     53 );
     54 
     55 #endif /* LOC_ENG_NI_H */
     56