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_legacy/gps_ni.h> 33 34 #define LOC_NI_NO_RESPONSE_TIME 20 /* secs */ 35 36 extern const GpsNiInterface sLocEngNiInterface; 37 38 typedef struct { 39 pthread_t loc_ni_thread; /* NI thread */ 40 pthread_mutex_t loc_ni_lock; 41 int response_time_left; /* examine time for NI response */ 42 boolean notif_in_progress; /* NI notification/verification in progress */ 43 rpc_loc_ni_event_s_type loc_ni_request; 44 int current_notif_id; /* ID to check against response */ 45 } loc_eng_ni_data_s_type; 46 47 // Functions for sLocEngNiInterface 48 extern void loc_eng_ni_init(GpsNiCallbacks *callbacks); 49 extern void loc_eng_ni_respond(int notif_id, GpsUserResponseType user_response); 50 51 extern int loc_eng_ni_callback ( 52 rpc_loc_event_mask_type loc_event, /* event mask */ 53 const rpc_loc_event_payload_u_type* loc_event_payload /* payload */ 54 ); 55 56 #endif /* LOC_ENG_NI_H */ 57