From 32b1baae2ba3b4c33615dc1f20090f2e751301ee Mon Sep 17 00:00:00 2001 From: Kevin Tang Date: Mon, 15 Dec 2014 10:51:42 -0800 Subject: [PATCH 01/37] Enable "auto" target for APQ8960 Automotive ADP platform APQ8960 Automotive platforms use "auto" as a target name for ro.baseband property. Appropriate GPS driver changes were, 1. define GNSS_AUTO enum constant 2. Enable GNSS drivers for "auto" target. Change-Id: I463db7ac1c3e2dd6101e457ad723bb16adf5aacb CRs-Fixed: 771597 --- loc_api/libloc_api_50001/loc.cpp | 1 + utils/loc_log.cpp | 1 + utils/loc_target.cpp | 6 ++++++ utils/loc_target.h | 2 ++ 4 files changed, 10 insertions(+) diff --git a/loc_api/libloc_api_50001/loc.cpp b/loc_api/libloc_api_50001/loc.cpp index 2bcfc7b0..158176f5 100644 --- a/loc_api/libloc_api_50001/loc.cpp +++ b/loc_api/libloc_api_50001/loc.cpp @@ -247,6 +247,7 @@ extern "C" const GpsInterface* get_gps_interface() switch (gnssType) { case GNSS_GSS: + case GNSS_AUTO: //APQ8064 gps_conf.CAPABILITIES &= ~(GPS_CAPABILITY_MSA | GPS_CAPABILITY_MSB); gss_fd = open("/dev/gss", O_RDONLY); diff --git a/utils/loc_log.cpp b/utils/loc_log.cpp index 392966ee..18182b74 100644 --- a/utils/loc_log.cpp +++ b/utils/loc_log.cpp @@ -113,6 +113,7 @@ loc_name_val_s_type target_name[] = NAME_VAL(GNSS_GSS), NAME_VAL(GNSS_MDM), NAME_VAL(GNSS_QCA1530), + NAME_VAL(GNSS_AUTO), NAME_VAL(GNSS_UNKNOWN) }; diff --git a/utils/loc_target.cpp b/utils/loc_target.cpp index 8dbe885e..080e5768 100644 --- a/utils/loc_target.cpp +++ b/utils/loc_target.cpp @@ -53,6 +53,7 @@ #define STR_SURF "Surf" #define STR_MTP "MTP" #define STR_APQ "apq" +#define STR_AUTO "auto" #define IS_STR_END(c) ((c) == '\0' || (c) == '\n' || (c) == '\r') #define LENGTH(s) (sizeof(s) - 1) #define GPS_CHECK_NO_ERROR 0 @@ -207,6 +208,11 @@ unsigned int loc_get_target(void) } else { read_a_line(id_dep, rd_id, LINE_LEN); } + if( !memcmp(baseband, STR_AUTO, LENGTH(STR_AUTO)) ) + { + gTarget = TARGET_AUTO; + goto detected; + } if( !memcmp(rd_hw_platform, STR_MTP, LENGTH(STR_MTP)) ){ if( !memcmp(rd_id, PDS_ID_1, LENGTH(PDS_ID_1)) && IS_STR_END(rd_id[LENGTH(PDS_ID_1)]) ) diff --git a/utils/loc_target.h b/utils/loc_target.h index 208a34cb..d7364e91 100644 --- a/utils/loc_target.h +++ b/utils/loc_target.h @@ -36,6 +36,7 @@ #define TARGET_MSM_NO_SSC TARGET_SET(GNSS_MSM, NO_SSC) #define TARGET_QCA1530 TARGET_SET(GNSS_QCA1530, NO_SSC) #define TARGET_PDS TARGET_SET(GNSS_PDS, NO_SSC) +#define TARGET_AUTO TARGET_SET(GNSS_AUTO, NO_SSC) #define TARGET_UNKNOWN TARGET_SET(GNSS_UNKNOWN, NO_SSC) #define getTargetGnssType(target) (target>>1) @@ -62,6 +63,7 @@ typedef enum { GNSS_MDM, GNSS_QCA1530, GNSS_PDS, + GNSS_AUTO, GNSS_UNKNOWN }GNSS_TARGET; From 2794061c7357903ddeb092f7628ad6c1dceb1c05 Mon Sep 17 00:00:00 2001 From: Kevin Tang Date: Fri, 16 Jan 2015 06:24:40 +0000 Subject: [PATCH 02/37] Propagate DR enablement feature from LNX.LA.2.7.3 Change Summary: * Changes taken from change#812357; * Structure definitions for GNSS SV Measurement and GNSS SV Polynomial to report it to ULP and to external DR module; * New function additions in LocApiBase, LocAdapterBase and LocEngAdapter to report SV Measurement and SV Polynomial; * definition and changes to detect "auto" platform in loc_target; * enable SV Measurement and SV Polynomial report for "auto" platform; Change-Id: I5ac5ee5c44e72e657b16515e37637c9a5c64e638 --- core/LocAdapterBase.cpp | 7 + core/LocAdapterBase.h | 2 + core/LocApiBase.cpp | 16 + core/LocApiBase.h | 2 + core/UlpProxyBase.h | 12 + core/gps_extended_c.h | 587 +++++++++++++++++++++ loc_api/libloc_api_50001/LocEngAdapter.cpp | 17 + loc_api/libloc_api_50001/LocEngAdapter.h | 2 + loc_api/libloc_api_50001/loc.cpp | 10 + loc_api/libloc_api_50001/loc_eng.cpp | 3 + 10 files changed, 658 insertions(+) diff --git a/core/LocAdapterBase.cpp b/core/LocAdapterBase.cpp index eea8eddf..e0050611 100644 --- a/core/LocAdapterBase.cpp +++ b/core/LocAdapterBase.cpp @@ -78,6 +78,13 @@ void LocAdapterBase:: void* svExt) DEFAULT_IMPL() +void LocAdapterBase:: + reportSvMeasurement(GnssSvMeasurementSet &svMeasurementSet) +DEFAULT_IMPL() + +void LocAdapterBase:: + reportSvPolynomial(GnssSvPolynomial &svPolynomial) +DEFAULT_IMPL() void LocAdapterBase:: reportStatus(GpsStatusValue status) diff --git a/core/LocAdapterBase.h b/core/LocAdapterBase.h index 2fec3128..a3d81220 100644 --- a/core/LocAdapterBase.h +++ b/core/LocAdapterBase.h @@ -95,6 +95,8 @@ public: virtual void reportSv(GpsSvStatus &svStatus, GpsLocationExtended &locationExtended, void* svExt); + virtual void reportSvMeasurement(GnssSvMeasurementSet &svMeasurementSet); + virtual void reportSvPolynomial(GnssSvPolynomial &svPolynomial); virtual void reportStatus(GpsStatusValue status); virtual void reportNmea(const char* nmea, int length); virtual bool reportXtraServer(const char* url1, const char* url2, diff --git a/core/LocApiBase.cpp b/core/LocApiBase.cpp index 43332dcf..f574e87a 100644 --- a/core/LocApiBase.cpp +++ b/core/LocApiBase.cpp @@ -254,6 +254,22 @@ void LocApiBase::reportSv(GpsSvStatus &svStatus, ); } +void LocApiBase::reportSvMeasurement(GnssSvMeasurementSet &svMeasurementSet) +{ + // loop through adapters, and deliver to all adapters. + TO_ALL_LOCADAPTERS( + mLocAdapters[i]->reportSvMeasurement(svMeasurementSet) + ); +} + +void LocApiBase::reportSvPolynomial(GnssSvPolynomial &svPolynomial) +{ + // loop through adapters, and deliver to all adapters. + TO_ALL_LOCADAPTERS( + mLocAdapters[i]->reportSvPolynomial(svPolynomial) + ); +} + void LocApiBase::reportStatus(GpsStatusValue status) { // loop through adapters, and deliver to all adapters. diff --git a/core/LocApiBase.h b/core/LocApiBase.h index f68cf739..8d90ff2a 100644 --- a/core/LocApiBase.h +++ b/core/LocApiBase.h @@ -116,6 +116,8 @@ public: void reportSv(GpsSvStatus &svStatus, GpsLocationExtended &locationExtended, void* svExt); + void reportSvMeasurement(GnssSvMeasurementSet &svMeasurementSet); + void reportSvPolynomial(GnssSvPolynomial &svPolynomial); void reportStatus(GpsStatusValue status); void reportNmea(const char* nmea, int length); void reportXtraServer(const char* url1, const char* url2, diff --git a/core/UlpProxyBase.h b/core/UlpProxyBase.h index b9a8224f..5270cfb3 100644 --- a/core/UlpProxyBase.h +++ b/core/UlpProxyBase.h @@ -63,6 +63,14 @@ public: void* svExt) { return false; } + inline virtual bool reportSvMeasurement(GnssSvMeasurementSet &svMeasurementSet) { + return false; + } + + inline virtual bool reportSvPolynomial(GnssSvPolynomial &svPolynomial) + { + return false; + } inline virtual bool reportStatus(GpsStatusValue status) { return false; } @@ -78,6 +86,10 @@ public: LocPosTechMask techMask) { return false; } + inline virtual bool reportDeleteAidingData(GpsAidingData aidingData) + { + return false; + } }; } // namespace loc_core diff --git a/core/gps_extended_c.h b/core/gps_extended_c.h index 5140a6c6..7f374bab 100644 --- a/core/gps_extended_c.h +++ b/core/gps_extended_c.h @@ -63,6 +63,8 @@ extern "C" { /** Positioin is from Hardware FLP */ #define ULP_LOCATION_IS_FROM_HW_FLP 0x0010 #define ULP_LOCATION_IS_FROM_NLP 0x0020 +/** Position is from external DR solution*/ +#define ULP_LOCATION_IS_FROM_EXT_DR 0X0040 #define ULP_MIN_INTERVAL_INVALID 0xffffffff @@ -345,6 +347,8 @@ enum loc_api_adapter_event_index { LOC_API_ADAPTER_BATCH_FULL, // Batching on full LOC_API_ADAPTER_BATCHED_POSITION_REPORT, // Batching on fix LOC_API_ADAPTER_BATCHED_GENFENCE_BREACH_REPORT, // + LOC_API_ADAPTER_GNSS_MEASUREMENT_REPORT, //GNSS Measurement Report + LOC_API_ADAPTER_GNSS_SV_POLYNOMIAL_REPORT, //GNSS SV Polynomial Report LOC_API_ADAPTER_EVENT_MAX }; @@ -371,6 +375,8 @@ enum loc_api_adapter_event_index { #define LOC_API_ADAPTER_BIT_REQUEST_WIFI_AP_DATA (1<reportSvMeasurement(svMeasurementSet)) { + //Send to Internal Adapter later if needed by LA + } +} + +void LocEngAdapter::reportSvPolynomial(GnssSvPolynomial &svPolynomial) +{ + // We send SvMeasurementSet to AmtProxy/ULPProxy to be forwarded as necessary. + if (! mUlp->reportSvPolynomial(svPolynomial)) { + //Send to Internal Adapter later if needed by LA + } +} + void LocEngAdapter::setInSession(bool inSession) { mNavigating = inSession; diff --git a/loc_api/libloc_api_50001/LocEngAdapter.h b/loc_api/libloc_api_50001/LocEngAdapter.h index b857d198..ae5e514c 100644 --- a/loc_api/libloc_api_50001/LocEngAdapter.h +++ b/loc_api/libloc_api_50001/LocEngAdapter.h @@ -272,6 +272,8 @@ public: virtual void reportSv(GpsSvStatus &svStatus, GpsLocationExtended &locationExtended, void* svExt); + virtual void reportSvMeasurement(GnssSvMeasurementSet &svMeasurementSet); + virtual void reportSvPolynomial(GnssSvPolynomial &svPolynomial); virtual void reportStatus(GpsStatusValue status); virtual void reportNmea(const char* nmea, int length); virtual bool reportXtraServer(const char* url1, const char* url2, diff --git a/loc_api/libloc_api_50001/loc.cpp b/loc_api/libloc_api_50001/loc.cpp index 158176f5..4f4f61e4 100644 --- a/loc_api/libloc_api_50001/loc.cpp +++ b/loc_api/libloc_api_50001/loc.cpp @@ -297,6 +297,7 @@ static int loc_init(GpsCallbacks* callbacks) static int mdm_index = -1; int peripheral_mgr_ret = PM_RET_FAILED; #endif /*MODEM_POWER_VOTE*/ + unsigned int target = (unsigned int) -1; ENTRY_LOG(); LOC_API_ADAPTER_EVENT_MASK_T event; @@ -315,6 +316,15 @@ static int loc_init(GpsCallbacks* callbacks) LOC_API_ADAPTER_BIT_NMEA_1HZ_REPORT | LOC_API_ADAPTER_BIT_NI_NOTIFY_VERIFY_REQUEST; + target = loc_get_target(); + + /*For "auto" platform enable Measurement report and SV Polynomial report*/ + if(GNSS_AUTO == getTargetGnssType(target)) + { + event |= LOC_API_ADAPTER_BIT_GNSS_MEASUREMENT_REPORT | + LOC_API_ADAPTER_BIT_GNSS_SV_POLYNOMIAL_REPORT; + } + LocCallbacks clientCallbacks = {local_loc_cb, /* location_cb */ callbacks->status_cb, /* status_cb */ local_sv_cb, /* sv_status_cb */ diff --git a/loc_api/libloc_api_50001/loc_eng.cpp b/loc_api/libloc_api_50001/loc_eng.cpp index 1b301060..2c52087d 100644 --- a/loc_api/libloc_api_50001/loc_eng.cpp +++ b/loc_api/libloc_api_50001/loc_eng.cpp @@ -2070,6 +2070,9 @@ void loc_eng_delete_aiding_data(loc_eng_data_s_type &loc_eng_data, GpsAidingData ENTRY_LOG_CALLFLOW(); INIT_CHECK(loc_eng_data.adapter, return); + //report delete aiding data to ULP to send to DRPlugin + loc_eng_data.adapter->getUlpProxy()->reportDeleteAidingData(f); + loc_eng_data.adapter->sendMsg(new LocEngDelAidData(&loc_eng_data, f)); EXIT_LOG(%s, VOID_RET); From 1777a2fe166188b9048e3eeffff2a3b8cf7bf635 Mon Sep 17 00:00:00 2001 From: Tushar Janefalkar Date: Tue, 3 Feb 2015 12:13:05 -0800 Subject: [PATCH 03/37] Fix bug with switch case The switch case inside setXtraVersionCheck does not have breaks after the cases and the default label is misspelled. This will always cause the check to be disabled Change-Id: Ibcc3703c98e561e0bdfbcc5c8802d1b45c9a511a CRs-Fixed: 790623 --- loc_api/libloc_api_50001/LocEngAdapter.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/loc_api/libloc_api_50001/LocEngAdapter.cpp b/loc_api/libloc_api_50001/LocEngAdapter.cpp index 5fca5bfc..ffe6090d 100644 --- a/loc_api/libloc_api_50001/LocEngAdapter.cpp +++ b/loc_api/libloc_api_50001/LocEngAdapter.cpp @@ -391,13 +391,17 @@ enum loc_api_adapter_err LocEngAdapter::setXtraVersionCheck(int check) switch (check) { case 0: eCheck = DISABLED; + break; case 1: eCheck = AUTO; + break; case 2: eCheck = XTRA2; + break; case 3: eCheck = XTRA3; - defaul: + break; + default: eCheck = DISABLED; } ret = mLocApi->setXtraVersionCheck(eCheck); From d5389169281474a3a3b3a2817ddb6271897607a3 Mon Sep 17 00:00:00 2001 From: Jiafei Wen Date: Tue, 20 Jan 2015 14:42:26 -0800 Subject: [PATCH 04/37] Send GPS tracking fixes to FLP HAL FLP HAL accepts GPS tracking fixes for tracking, so this change sends the tracking fixes to FLP HAL while flp tracking is undergoing. Also, this change adds batching options flags and batching succeed/failure definitions. CRs-fixed: 748687 Change-Id: I11a2ba337433d9a42c903d36fc980ee1a3983a1e --- core/LocAdapterBase.cpp | 10 ++++++++-- core/LocAdapterProxyBase.h | 5 +++++ core/gps_extended_c.h | 24 ++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 2 deletions(-) diff --git a/core/LocAdapterBase.cpp b/core/LocAdapterBase.cpp index 1c0c1bc0..9eb75ec1 100644 --- a/core/LocAdapterBase.cpp +++ b/core/LocAdapterBase.cpp @@ -69,8 +69,14 @@ void LocAdapterBase:: GpsLocationExtended &locationExtended, void* locationExt, enum loc_sess_status status, - LocPosTechMask loc_technology_mask) -DEFAULT_IMPL() + LocPosTechMask loc_technology_mask) { + if (mLocAdapterProxyBase == NULL || + !mLocAdapterProxyBase->reportPosition(location, + status, + loc_technology_mask)) { + DEFAULT_IMPL() + } +} void LocAdapterBase:: reportSv(GpsSvStatus &svStatus, diff --git a/core/LocAdapterProxyBase.h b/core/LocAdapterProxyBase.h index df5a48bd..f6c22afa 100644 --- a/core/LocAdapterProxyBase.h +++ b/core/LocAdapterProxyBase.h @@ -57,6 +57,11 @@ protected: public: inline virtual void handleEngineUpEvent() {}; inline virtual void handleEngineDownEvent() {}; + inline virtual bool reportPosition(UlpLocation &location, + enum loc_sess_status status, + LocPosTechMask loc_technology_mask) { + return false; + } }; } // namespace loc_core diff --git a/core/gps_extended_c.h b/core/gps_extended_c.h index 3db36c47..9cfe12f5 100644 --- a/core/gps_extended_c.h +++ b/core/gps_extended_c.h @@ -74,6 +74,30 @@ extern "C" { #define AGPS_CERTIFICATE_MAX_LENGTH 2000 #define AGPS_CERTIFICATE_MAX_SLOTS 10 +/** Batching default ID for dummy batching session*/ +#define GPS_BATCHING_DEFAULT_ID 1 + +/** This cap is used to decide the FLP session cache +size on AP. If the BATCH_SIZE in flp.conf is less than +GPS_AP_BATCHING_SIZE_CAP, FLP session cache size will +be twice the BATCH_SIZE defined in flp.conf. Otherwise, +FLP session cache size will be equal to the BATCH_SIZE.*/ +#define GPS_AP_BATCHING_SIZE_CAP 40 + +#define GPS_BATCHING_OPERATION_SUCCEESS 1 +#define GPS_BATCHING_OPERATION_FAILURE 0 + +/** GPS extended batching flags*/ +#define GPS_EXT_BATCHING_ON_FULL 0x0000001 +#define GPS_EXT_BATCHING_ON_FIX 0x0000002 + +/** Reasons of GPS reports batched locations*/ +typedef enum loc_batching_reported_type { + LOC_BATCHING_ON_FULL_IND_REPORT, + LOC_BATCHING_ON_FIX_IND_REPORT, + LOC_BATCHING_ON_QUERY_REPORT +}LocBatchingReportedType; + enum loc_registration_mask_status { LOC_REGISTRATION_MASK_ENABLED, LOC_REGISTRATION_MASK_DISABLED From f3444670b81fb399c7ef3862e0f101340413b74e Mon Sep 17 00:00:00 2001 From: Kevin Tang Date: Fri, 20 Mar 2015 09:30:39 -0700 Subject: [PATCH 05/37] Add Course TimeStamp & asso. unc to Measurement We need to add the course time stamp when the measurements are received in GNSS driver to align the measurements and sensor samples received from SLIM. Change-Id: I4ef067890e16c2585f8a9c7809c4d7421b895cd0 --- core/gps_extended_c.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/gps_extended_c.h b/core/gps_extended_c.h index 9cfe12f5..7a359823 100644 --- a/core/gps_extended_c.h +++ b/core/gps_extended_c.h @@ -36,6 +36,7 @@ extern "C" { #include #include #include +#include /** Location has valid source information. */ #define LOCATION_HAS_SOURCE_INFO 0x0020 @@ -905,6 +906,14 @@ typedef struct */ } Gnss_ClockMeasurementStructType; +typedef struct +{ + struct timespec apTimeStamp; + /*boottime received from pps-ktimer*/ + float apTimeStampUncertaintyMs; + /* timestamp uncertainty in milli seconds */ +}Gnss_ApTimeStampStructType; + typedef struct { size_t size; @@ -932,6 +941,8 @@ typedef struct Gnss_LocRcvrClockFrequencyInfoStructType clockFreq; /* Freq */ bool gnssMeasValid; Gnss_ClockMeasurementStructType gnssMeas; + Gnss_ApTimeStampStructType timeStamp; + } GnssSvMeasurementSet; typedef enum From 7fa3b1bd2a4f1c192007e140475ab29ae0223f25 Mon Sep 17 00:00:00 2001 From: Jiafei Wen Date: Wed, 8 Apr 2015 18:02:42 -0700 Subject: [PATCH 06/37] Adding Mutex for Creating Context Adding lock for creating foreground context and background context, preventing any possible race condition. CRs-fixed: 820078 Change-Id: I7ace685622904ee2aa12f317540f9c04880acc70 --- core/LocDualContext.cpp | 22 ++++++++++++++++++++-- core/LocDualContext.h | 1 + 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/core/LocDualContext.cpp b/core/LocDualContext.cpp index 41ad4f0a..d68cb3bc 100644 --- a/core/LocDualContext.cpp +++ b/core/LocDualContext.cpp @@ -61,6 +61,8 @@ ContextBase* LocDualContext::mInjectContext = NULL; const char* LocDualContext::mLocationHalName = "Loc_hal_worker"; const char* LocDualContext::mLBSLibName = "liblbs_core.so"; +pthread_mutex_t LocDualContext::mGetLocContextMutex = PTHREAD_MUTEX_INITIALIZER; + const MsgTask* LocDualContext::getMsgTask(MsgTask::tCreate tCreator, const char* name) { @@ -84,22 +86,30 @@ const MsgTask* LocDualContext::getMsgTask(MsgTask::tAssociate tAssociate, ContextBase* LocDualContext::getLocFgContext(MsgTask::tCreate tCreator, const char* name) { + pthread_mutex_lock(&LocDualContext::mGetLocContextMutex); + LOC_LOGD("%s:%d]: querying ContextBase with tCreator", __func__, __LINE__); if (NULL == mFgContext) { + LOC_LOGD("%s:%d]: creating msgTask with tCreator", __func__, __LINE__); const MsgTask* msgTask = getMsgTask(tCreator, name); mFgContext = new LocDualContext(msgTask, mFgExclMask); } if(NULL == mInjectContext) { + LOC_LOGD("%s:%d]: mInjectContext is FgContext", __func__, __LINE__); mInjectContext = mFgContext; injectFeatureConfig(mInjectContext); } + pthread_mutex_unlock(&LocDualContext::mGetLocContextMutex); return mFgContext; } ContextBase* LocDualContext::getLocFgContext(MsgTask::tAssociate tAssociate, - const char* name) + const char* name) { + pthread_mutex_lock(&LocDualContext::mGetLocContextMutex); + LOC_LOGD("%s:%d]: querying ContextBase with tAssociate", __func__, __LINE__); if (NULL == mFgContext) { + LOC_LOGD("%s:%d]: creating msgTask with tAssociate", __func__, __LINE__); const MsgTask* msgTask = getMsgTask(tAssociate, name); mFgContext = new LocDualContext(msgTask, mFgExclMask); @@ -109,14 +119,17 @@ ContextBase* LocDualContext::getLocFgContext(MsgTask::tAssociate tAssociate, mInjectContext = mFgContext; injectFeatureConfig(mInjectContext); } + pthread_mutex_unlock(&LocDualContext::mGetLocContextMutex); return mFgContext; - } ContextBase* LocDualContext::getLocBgContext(MsgTask::tCreate tCreator, const char* name) { + pthread_mutex_lock(&LocDualContext::mGetLocContextMutex); + LOC_LOGD("%s:%d]: querying ContextBase with tCreator", __func__, __LINE__); if (NULL == mBgContext) { + LOC_LOGD("%s:%d]: creating msgTask with tCreator", __func__, __LINE__); const MsgTask* msgTask = getMsgTask(tCreator, name); mBgContext = new LocDualContext(msgTask, mBgExclMask); @@ -126,13 +139,17 @@ ContextBase* LocDualContext::getLocBgContext(MsgTask::tCreate tCreator, mInjectContext = mBgContext; injectFeatureConfig(mInjectContext); } + pthread_mutex_unlock(&LocDualContext::mGetLocContextMutex); return mBgContext; } ContextBase* LocDualContext::getLocBgContext(MsgTask::tAssociate tAssociate, const char* name) { + pthread_mutex_lock(&LocDualContext::mGetLocContextMutex); + LOC_LOGD("%s:%d]: querying ContextBase with tAssociate", __func__, __LINE__); if (NULL == mBgContext) { + LOC_LOGD("%s:%d]: creating msgTask with tAssociate", __func__, __LINE__); const MsgTask* msgTask = getMsgTask(tAssociate, name); mBgContext = new LocDualContext(msgTask, mBgExclMask); @@ -142,6 +159,7 @@ ContextBase* LocDualContext::getLocBgContext(MsgTask::tAssociate tAssociate, mInjectContext = mBgContext; injectFeatureConfig(mInjectContext); } + pthread_mutex_unlock(&LocDualContext::mGetLocContextMutex); return mBgContext; } diff --git a/core/LocDualContext.h b/core/LocDualContext.h index cdc4df3e..1e96ea56 100644 --- a/core/LocDualContext.h +++ b/core/LocDualContext.h @@ -45,6 +45,7 @@ class LocDualContext : public ContextBase { const char* name); static const MsgTask* getMsgTask(MsgTask::tAssociate tAssociate, const char* name); + static pthread_mutex_t mGetLocContextMutex; protected: LocDualContext(const MsgTask* msgTask, From 8a3533bd4a5f9dbedfed62723e0049044e2d3e94 Mon Sep 17 00:00:00 2001 From: Dante Russo Date: Mon, 27 Apr 2015 11:15:07 -0700 Subject: [PATCH 07/37] Remove reporting gps status from loc eng layer GPS Status is reported from Loc Api layer, so reporting it in Loc Eng layer in addition is redundant. Also, SSR should not send engine on status when not in a session. Change-Id: I10bc2d112574de0016110e193d6c2cd071b00b2a CRs-fixed: 826256 --- loc_api/libloc_api_50001/loc_eng.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/loc_api/libloc_api_50001/loc_eng.cpp b/loc_api/libloc_api_50001/loc_eng.cpp index f6b8cbf3..d3b06bff 100644 --- a/loc_api/libloc_api_50001/loc_eng.cpp +++ b/loc_api/libloc_api_50001/loc_eng.cpp @@ -1955,7 +1955,6 @@ static int loc_eng_start_handler(loc_eng_data_s_type &loc_eng_data) ret_val == LOC_API_ADAPTER_ERR_INTERNAL) { loc_eng_data.adapter->setInSession(TRUE); - loc_inform_gps_status(loc_eng_data, GPS_STATUS_SESSION_BEGIN); } } @@ -2001,11 +2000,6 @@ static int loc_eng_stop_handler(loc_eng_data_s_type &loc_eng_data) if (loc_eng_data.adapter->isInSession()) { ret_val = loc_eng_data.adapter->stopFix(); - if (ret_val == LOC_API_ADAPTER_ERR_SUCCESS) - { - loc_inform_gps_status(loc_eng_data, GPS_STATUS_SESSION_END); - } - loc_eng_data.adapter->setInSession(FALSE); } @@ -2889,8 +2883,6 @@ void loc_eng_handle_engine_up(loc_eng_data_s_type &loc_eng_data) loc_eng_agps_reinit(loc_eng_data); } - loc_eng_report_status(loc_eng_data, GPS_STATUS_ENGINE_ON); - // modem is back up. If we crashed in the middle of navigating, we restart. if (loc_eng_data.adapter->isInSession()) { // This sets the copy in adapter to modem From b8e9ad34cd1c0b2932f776fd6cf9c37e3dd4f0af Mon Sep 17 00:00:00 2001 From: Qiang Chen Date: Tue, 5 May 2015 14:09:00 -0700 Subject: [PATCH 08/37] Removed unused code and unnecessary notice files libloc_api-rpc code is not built for any targets, so it's removed. NOTICE file is unnecessary and can be remvoed. Change-Id: I7da6f0d5a7d90fd4ad7ef51d9eaee88d2a7a20ac CRs-fixed: 827856 --- loc_api/NOTICE | 13 - loc_api/libloc_api-rpc/Android.mk | 61 - loc_api/libloc_api-rpc/gen-1240/Makefile.xdr | 29 - loc_api/libloc_api-rpc/gen-1240/loc_api.xdr | 172 -- .../libloc_api-rpc/gen-1240/loc_api_cb.xdr | 85 - .../libloc_api-rpc/gen-1240/loc_api_cb_svc.c | 64 - .../libloc_api-rpc/gen-1240/loc_api_cb_xdr.c | 32 - .../libloc_api-rpc/gen-1240/loc_api_clnt.c | 91 - .../gen-1240/loc_api_common.xdr | 906 --------- .../gen-1240/loc_api_common_xdr.c | 1650 ----------------- .../libloc_api-rpc/gen-1240/loc_api_fixup.c | 48 - .../gen-1240/loc_api_rpc_glue.c | 339 ---- loc_api/libloc_api-rpc/gen-1240/loc_api_xdr.c | 171 -- loc_api/libloc_api-rpc/gen-3200/Makefile.xdr | 29 - loc_api/libloc_api-rpc/gen-3200/loc_api.xdr | 164 -- .../libloc_api-rpc/gen-3200/loc_api_cb.xdr | 90 - .../libloc_api-rpc/gen-3200/loc_api_cb_svc.c | 64 - .../libloc_api-rpc/gen-3200/loc_api_cb_xdr.c | 32 - .../libloc_api-rpc/gen-3200/loc_api_clnt.c | 82 - .../gen-3200/loc_api_common.xdr | 803 -------- .../gen-3200/loc_api_common_xdr.c | 1441 -------------- .../libloc_api-rpc/gen-3200/loc_api_fixup.c | 48 - .../gen-3200/loc_api_rpc_glue.c | 339 ---- loc_api/libloc_api-rpc/gen-3200/loc_api_xdr.c | 171 -- loc_api/libloc_api-rpc/inc-1240/loc_api.h | 210 --- loc_api/libloc_api-rpc/inc-1240/loc_api_cb.h | 64 - .../libloc_api-rpc/inc-1240/loc_api_common.h | 1154 ------------ .../libloc_api-rpc/inc-1240/loc_api_fixup.h | 188 -- .../inc-1240/loc_apicb_appinit.h | 34 - loc_api/libloc_api-rpc/inc-3200/loc_api.h | 198 -- loc_api/libloc_api-rpc/inc-3200/loc_api_cb.h | 64 - .../libloc_api-rpc/inc-3200/loc_api_common.h | 1031 ---------- .../libloc_api-rpc/inc-3200/loc_api_fixup.h | 188 -- .../inc-3200/loc_apicb_appinit.h | 34 - loc_api/libloc_api-rpc/inc/debug.h | 57 - loc_api/libloc_api-rpc/inc/loc_api_rpc_glue.h | 100 - .../libloc_api-rpc/src/loc_apicb_appinit.c | 61 - 37 files changed, 10307 deletions(-) delete mode 100644 loc_api/NOTICE delete mode 100644 loc_api/libloc_api-rpc/Android.mk delete mode 100644 loc_api/libloc_api-rpc/gen-1240/Makefile.xdr delete mode 100644 loc_api/libloc_api-rpc/gen-1240/loc_api.xdr delete mode 100644 loc_api/libloc_api-rpc/gen-1240/loc_api_cb.xdr delete mode 100644 loc_api/libloc_api-rpc/gen-1240/loc_api_cb_svc.c delete mode 100644 loc_api/libloc_api-rpc/gen-1240/loc_api_cb_xdr.c delete mode 100644 loc_api/libloc_api-rpc/gen-1240/loc_api_clnt.c delete mode 100644 loc_api/libloc_api-rpc/gen-1240/loc_api_common.xdr delete mode 100644 loc_api/libloc_api-rpc/gen-1240/loc_api_common_xdr.c delete mode 100644 loc_api/libloc_api-rpc/gen-1240/loc_api_fixup.c delete mode 100644 loc_api/libloc_api-rpc/gen-1240/loc_api_rpc_glue.c delete mode 100644 loc_api/libloc_api-rpc/gen-1240/loc_api_xdr.c delete mode 100644 loc_api/libloc_api-rpc/gen-3200/Makefile.xdr delete mode 100644 loc_api/libloc_api-rpc/gen-3200/loc_api.xdr delete mode 100644 loc_api/libloc_api-rpc/gen-3200/loc_api_cb.xdr delete mode 100644 loc_api/libloc_api-rpc/gen-3200/loc_api_cb_svc.c delete mode 100644 loc_api/libloc_api-rpc/gen-3200/loc_api_cb_xdr.c delete mode 100644 loc_api/libloc_api-rpc/gen-3200/loc_api_clnt.c delete mode 100644 loc_api/libloc_api-rpc/gen-3200/loc_api_common.xdr delete mode 100644 loc_api/libloc_api-rpc/gen-3200/loc_api_common_xdr.c delete mode 100644 loc_api/libloc_api-rpc/gen-3200/loc_api_fixup.c delete mode 100644 loc_api/libloc_api-rpc/gen-3200/loc_api_rpc_glue.c delete mode 100644 loc_api/libloc_api-rpc/gen-3200/loc_api_xdr.c delete mode 100644 loc_api/libloc_api-rpc/inc-1240/loc_api.h delete mode 100644 loc_api/libloc_api-rpc/inc-1240/loc_api_cb.h delete mode 100644 loc_api/libloc_api-rpc/inc-1240/loc_api_common.h delete mode 100644 loc_api/libloc_api-rpc/inc-1240/loc_api_fixup.h delete mode 100644 loc_api/libloc_api-rpc/inc-1240/loc_apicb_appinit.h delete mode 100644 loc_api/libloc_api-rpc/inc-3200/loc_api.h delete mode 100644 loc_api/libloc_api-rpc/inc-3200/loc_api_cb.h delete mode 100644 loc_api/libloc_api-rpc/inc-3200/loc_api_common.h delete mode 100644 loc_api/libloc_api-rpc/inc-3200/loc_api_fixup.h delete mode 100644 loc_api/libloc_api-rpc/inc-3200/loc_apicb_appinit.h delete mode 100644 loc_api/libloc_api-rpc/inc/debug.h delete mode 100644 loc_api/libloc_api-rpc/inc/loc_api_rpc_glue.h delete mode 100644 loc_api/libloc_api-rpc/src/loc_apicb_appinit.c diff --git a/loc_api/NOTICE b/loc_api/NOTICE deleted file mode 100644 index 85b5740d..00000000 --- a/loc_api/NOTICE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2009, QUALCOMM USA, INC. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -· Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -· Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -· Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/loc_api/libloc_api-rpc/Android.mk b/loc_api/libloc_api-rpc/Android.mk deleted file mode 100644 index 06e46948..00000000 --- a/loc_api/libloc_api-rpc/Android.mk +++ /dev/null @@ -1,61 +0,0 @@ -ifneq ($(BUILD_TINY_ANDROID),true) - -ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_AMSS_VERSION),50001) - -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -AMSS_VERSION:=$(BOARD_VENDOR_QCOM_GPS_LOC_API_AMSS_VERSION) -RPC_INC:=inc-$(AMSS_VERSION) - -generated_files:= \ - gen-$(AMSS_VERSION)/loc_api_clnt.c \ - gen-$(AMSS_VERSION)/loc_api_cb_xdr.c \ - gen-$(AMSS_VERSION)/loc_api_common_xdr.c \ - gen-$(AMSS_VERSION)/loc_api_cb_svc.c \ - gen-$(AMSS_VERSION)/loc_api_xdr.c \ - gen-$(AMSS_VERSION)/loc_api_fixup.c \ - gen-$(AMSS_VERSION)/loc_api_rpc_glue.c \ - src/loc_apicb_appinit.c - -LOCAL_SRC_FILES:= $(generated_files) - -# removed from library build since the client should implement this code. -# src/loc_api_cb_server.c - -LOCAL_CFLAGS:=-fno-short-enums -LOCAL_CFLAGS+=-include $(RPC_INC)/loc_api_common.h -LOCAL_CFLAGS+=-DDEBUG -# LOCAL_CFLAGS+=-DDEBUG -DVERBOSE - -LOCAL_CFLAGS+=-DADD_XDR_FLOAT -DADD_XDR_BOOL - -LOCAL_SHARED_LIBRARIES:= librpc -LOCAL_STATIC_LIBRARIES:= libcommondefs-rpc - - - -LOCAL_COPY_HEADERS_TO:= libloc_api-rpc/inc -LOCAL_COPY_HEADERS:= \ - $(RPC_INC)/loc_api_cb.h \ - $(RPC_INC)/loc_api_common.h \ - $(RPC_INC)/loc_api.h \ - $(RPC_INC)/loc_api_fixup.h \ - $(RPC_INC)/loc_apicb_appinit.h \ - inc/debug.h \ - inc/loc_api_rpc_glue.h - -LOCAL_C_INCLUDES:= \ - $(LOCAL_PATH) \ - $(LOCAL_PATH)/inc \ - $(LOCAL_PATH)/$(RPC_INC) \ - $(TARGET_OUT_HEADERS)/libcommondefs-rpc \ - $(TARGET_OUT_HEADERS)/librpc - -LOCAL_MODULE:= libloc_api-rpc -LOCAL_MODULE_OWNER := qcom - -include $(BUILD_STATIC_LIBRARY) - -endif -endif diff --git a/loc_api/libloc_api-rpc/gen-1240/Makefile.xdr b/loc_api/libloc_api-rpc/gen-1240/Makefile.xdr deleted file mode 100644 index 5d9cf6c8..00000000 --- a/loc_api/libloc_api-rpc/gen-1240/Makefile.xdr +++ /dev/null @@ -1,29 +0,0 @@ -CLIENTS:= loc_api -SERVERS:= loc_api_cb -COMMON:= loc_api_common -RPC_INC:= inc-$(AMSS_VERSION) - -all: $(CLIENTS) $(SERVERS) $(COMMON) fixup - -$(CLIENTS) $(SERVERS) $(COMMON):: xdr = $(@:=.xdr) - -$(CLIENTS) $(SERVERS) $(COMMON):: - rpcgen -h -M $(xdr) -o ../$(RPC_INC)/$(addsuffix .h, $@) - rpcgen -c -M $(xdr) -o $(addsuffix _xdr.c, $@) - -$(CLIENTS):: - rpcgen -l -M $(xdr) -o $(addsuffix _clnt.c, $@) - -$(SERVERS):: - rpcgen -m -M $(xdr) -o $(addsuffix _svc.c, $@) - -fixup: - mv ../$(RPC_INC)/loc_api_common.h ../$(RPC_INC)/loc_api_common.h.bak - sed ../$(RPC_INC)/loc_api_common.h.bak -e "/#include ../$(RPC_INC)/loc_api_common.h - rm -f ../$(RPC_INC)/loc_api_common.h.bak - -clean: - rm -f $(addsuffix _clnt.c, $(CLIENTS)) - rm -f $(addsuffix _svc.c, $(SERVERS)) - rm -f $(addsuffix _xdr.c, $(CLIENTS) $(SERVERS) $(COMMON)) - rm -f $(addprefix ../$(RPC_INC)/, $(addsuffix .h, $(CLIENTS) $(SERVERS) $(COMMON))) diff --git a/loc_api/libloc_api-rpc/gen-1240/loc_api.xdr b/loc_api/libloc_api-rpc/gen-1240/loc_api.xdr deleted file mode 100644 index a9d60aa4..00000000 --- a/loc_api/libloc_api-rpc/gen-1240/loc_api.xdr +++ /dev/null @@ -1,172 +0,0 @@ -/* LOC_API TOOL VERSION: 4.36 */ -/*============================================================================= - L O C _ A P I . X D R - -GENERAL DESCRIPTION - This is an AUTO GENERATED file that provides an xdr compatible definition of - the loc_api API. - - --------------------------------------------------------------------------- - Copyright (c) 2010 QUALCOMM Incorporated. - All Rights Reserved. QUALCOMM Proprietary and Confidential. - --------------------------------------------------------------------------- -=============================================================================*/ - -/*============================================================================= - - Edit History - - AUTO GENERATED - -Generated by following versions of Htorpc modules: -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/htorpc.pl#20 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/Start.pm#3 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/Htoxdr.pm#1 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/XDR.pm#7 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/Output.pm#29 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/Parser.pm#2 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/Metacomments.pm#6 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/SymbolTable.pm#3 - -loc_api Definition File(s): -Id: //source/qcom/qct/modem/api/gps/main/latest/loc_api.h#16 -=============================================================================*/ -/*============================================================================= -$Header$ -=============================================================================*/ - - - -typedef rpc_uint32 rpc_loc_api_api_versions_return_type<>; - -/* - * Declare an rpc_uint32 type for each callback type in the API - */ -typedef rpc_uint32 rpc_loc_event_cb_f_type; - - - -/* - * These are struct declarations for the function arguments - */ - -struct rpc_loc_open_args { - rpc_loc_event_mask_type event_reg_mask; - rpc_loc_event_cb_f_type event_callback; -}; - -struct rpc_loc_close_args { - rpc_loc_client_handle_type handle; -}; - -struct rpc_loc_start_fix_args { - rpc_loc_client_handle_type handle; -}; - -struct rpc_loc_stop_fix_args { - rpc_loc_client_handle_type handle; -}; - -struct rpc_loc_ioctl_args { - rpc_loc_client_handle_type handle; - rpc_loc_ioctl_e_type ioctl_type; - rpc_loc_ioctl_data_u_type *ioctl_data; -}; - - - -struct rpc_loc_api_api_version_s_args { - rpc_boolean len_not_null; -}; - -/* - * These are struct declarations for the function results - */ - -struct rpc_loc_api_rpc_glue_code_info_remote_rets { - rpc_uint32 toolvers; /* Tool version */ - rpc_uint32 features; /* Features turned on in the code. - * 0x00000001 ONCRPC Server Cleanup Support - */ - rpc_uint32 proghash; /* Unique hash value for the API XDR definition */ - rpc_uint32 cbproghash; /* Unique hash value for the Callbacks' XDR definition */ -}; - -struct rpc_loc_open_rets { - rpc_loc_client_handle_type loc_open_result; -}; - -struct rpc_loc_close_rets { - rpc_int32 loc_close_result; -}; - -struct rpc_loc_start_fix_rets { - rpc_int32 loc_start_fix_result; -}; - -struct rpc_loc_stop_fix_rets { - rpc_int32 loc_stop_fix_result; -}; - -struct rpc_loc_ioctl_rets { - rpc_int32 loc_ioctl_result; -}; - - struct rpc_loc_api_api_versions_rets { - rpc_loc_api_api_versions_return_type loc_api_api_versions_result; - rpc_uint32 *len; -}; - -/* - * XDR definition of the LOC_API program ( vers. 0x00040002 ) - */ - -program LOC_APIPROG { - version LOC_APIVERS_0001 { - - void - rpc_loc_api_null( void ) = 0; - - rpc_loc_api_rpc_glue_code_info_remote_rets - rpc_loc_api_rpc_glue_code_info_remote( void ) = 1; - - rpc_loc_open_rets - rpc_loc_open( rpc_loc_open_args ) = 2; - - rpc_loc_close_rets - rpc_loc_close( rpc_loc_close_args ) = 3; - - rpc_loc_start_fix_rets - rpc_loc_start_fix( rpc_loc_start_fix_args ) = 4; - - rpc_loc_stop_fix_rets - rpc_loc_stop_fix( rpc_loc_stop_fix_args ) = 5; - - rpc_loc_ioctl_rets - rpc_loc_ioctl( rpc_loc_ioctl_args ) = 6; - - rpc_loc_api_api_versions_rets - rpc_loc_api_api_versions( void ) = 0xFFFFFFFF; - - - - - } = 0x00040001; - - - - version LOC_APIVERS_0002 { - -/* Following elements added in enum rpc_loc_ni_event_e_type in 0x00040002 -RPC_LOC_NI_EVENT_VX_SERVICE_INTERACTION_REQ -*/ - - void - rpc_loc_api_null( void ) = 0; - - } = 0x00040002; - - -} = 0x3000008c; - -const LOC_APIVERS = 0x00040002; diff --git a/loc_api/libloc_api-rpc/gen-1240/loc_api_cb.xdr b/loc_api/libloc_api-rpc/gen-1240/loc_api_cb.xdr deleted file mode 100644 index 1bd4e151..00000000 --- a/loc_api/libloc_api-rpc/gen-1240/loc_api_cb.xdr +++ /dev/null @@ -1,85 +0,0 @@ -/* LOC_API TOOL VERSION: 4.36 */ -/*============================================================================= - L O C _ A P I _ C B . X D R - -GENERAL DESCRIPTION - This is an AUTO GENERATED file that provides an xdr compatible definition of - an api that represents the grouping of the different callback functions the - loc_api API supports. - - --------------------------------------------------------------------------- - Copyright (c) 2010 QUALCOMM Incorporated. - All Rights Reserved. QUALCOMM Proprietary and Confidential. - --------------------------------------------------------------------------- -=============================================================================*/ - -/*============================================================================= - - Edit History - - AUTO GENERATED - -Generated by following versions of Htorpc modules: -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/htorpc.pl#20 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/Start.pm#3 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/Htoxdr.pm#1 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/XDR.pm#7 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/Output.pm#29 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/Parser.pm#2 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/Metacomments.pm#6 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/SymbolTable.pm#3 - -loc_api Definition File(s): -Id: //source/qcom/qct/modem/api/gps/main/latest/loc_api.h#16 -=============================================================================*/ -/*============================================================================= -$Header$ -=============================================================================*/ - - - - -/* - * These are struct declarations for the function arguments - */ - -struct rpc_loc_event_cb_f_type_args { - rpc_uint32 cb_id; - rpc_loc_client_handle_type loc_handle; - rpc_loc_event_mask_type loc_event; - rpc_loc_event_payload_u_type *loc_event_payload; -}; - - - - - -/* - * These are struct declaratios for the function results - */ - -struct rpc_loc_event_cb_f_type_rets { - rpc_int32 loc_event_cb_f_type_result; -}; - - - -/* - * XDR definition of the LOC_API callback program ( vers. 0x00040002 ) - */ - -program LOC_APICBPROG { - version LOC_APICBVERS_0001 { - - rpc_loc_event_cb_f_type_rets - rpc_loc_event_cb_f_type( rpc_loc_event_cb_f_type_args ) = 1; - - - - - } = 0x00040001; - - -} = 0x3100008c; - -const LOC_APICBVERS = 0x00040002; diff --git a/loc_api/libloc_api-rpc/gen-1240/loc_api_cb_svc.c b/loc_api/libloc_api-rpc/gen-1240/loc_api_cb_svc.c deleted file mode 100644 index 52a0d15b..00000000 --- a/loc_api/libloc_api-rpc/gen-1240/loc_api_cb_svc.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#include "loc_api_cb.h" -#include -#include -#include -#include -#include -#include -#include - -#ifndef SIG_PF -#define SIG_PF void(*)(int) -#endif - -void -loc_apicbprog_0x00040001(struct svc_req *rqstp, register SVCXPRT *transp) -{ - union { - rpc_loc_event_cb_f_type_args rpc_loc_event_cb_f_type_0x00040001_arg; - } argument; - union { - rpc_loc_event_cb_f_type_rets rpc_loc_event_cb_f_type_0x00040001_res; - } result; - bool_t retval; - xdrproc_t _xdr_argument, _xdr_result; - bool_t (*local)(char *, void *, struct svc_req *); - - switch (rqstp->rq_proc) { - case NULLPROC: - (void) svc_sendreply (transp, (xdrproc_t) xdr_void, (char *)NULL); - return; - - case rpc_loc_event_cb_f_type: - _xdr_argument = (xdrproc_t) xdr_rpc_loc_event_cb_f_type_args; - _xdr_result = (xdrproc_t) xdr_rpc_loc_event_cb_f_type_rets; - local = (bool_t (*) (char *, void *, struct svc_req *))rpc_loc_event_cb_f_type_0x00040001_svc; - break; - - default: - svcerr_noproc (transp); - return; - } - memset ((char *)&argument, 0, sizeof (argument)); - if (!svc_getargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) { - svcerr_decode (transp); - return; - } - retval = (bool_t) (*local)((char *)&argument, (void *)&result, rqstp); - if (retval > 0 && !svc_sendreply(transp, (xdrproc_t) _xdr_result, (char *)&result)) { - svcerr_systemerr (transp); - } - if (!svc_freeargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) { - fprintf (stderr, "%s", "unable to free arguments"); - exit (1); - } - if (!loc_apicbprog_0x00040001_freeresult (transp, _xdr_result, (caddr_t) &result)) - fprintf (stderr, "%s", "unable to free results"); - - return; -} diff --git a/loc_api/libloc_api-rpc/gen-1240/loc_api_cb_xdr.c b/loc_api/libloc_api-rpc/gen-1240/loc_api_cb_xdr.c deleted file mode 100644 index 1d7795ed..00000000 --- a/loc_api/libloc_api-rpc/gen-1240/loc_api_cb_xdr.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#include "loc_api_cb.h" - -bool_t -xdr_rpc_loc_event_cb_f_type_args (XDR *xdrs, rpc_loc_event_cb_f_type_args *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, &objp->cb_id)) - return FALSE; - if (!xdr_rpc_loc_client_handle_type (xdrs, &objp->loc_handle)) - return FALSE; - if (!xdr_rpc_loc_event_mask_type (xdrs, &objp->loc_event)) - return FALSE; - if (!xdr_pointer (xdrs, (char **)&objp->loc_event_payload, sizeof (rpc_loc_event_payload_u_type), (xdrproc_t) xdr_rpc_loc_event_payload_u_type)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_event_cb_f_type_rets (XDR *xdrs, rpc_loc_event_cb_f_type_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_int32 (xdrs, &objp->loc_event_cb_f_type_result)) - return FALSE; - return TRUE; -} diff --git a/loc_api/libloc_api-rpc/gen-1240/loc_api_clnt.c b/loc_api/libloc_api-rpc/gen-1240/loc_api_clnt.c deleted file mode 100644 index dca1e8d5..00000000 --- a/loc_api/libloc_api-rpc/gen-1240/loc_api_clnt.c +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#include /* for memset */ -#include "loc_api.h" - -/* Default timeout can be changed using clnt_control() */ -static struct timeval TIMEOUT = { 25, 0 }; - -enum clnt_stat -rpc_loc_api_null_0x00040001(void *argp, void *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_api_null, - (xdrproc_t) xdr_void, (caddr_t) argp, - (xdrproc_t) xdr_void, (caddr_t) clnt_res, - TIMEOUT)); -} - -enum clnt_stat -rpc_loc_api_rpc_glue_code_info_remote_0x00040001(void *argp, rpc_loc_api_rpc_glue_code_info_remote_rets *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_api_rpc_glue_code_info_remote, - (xdrproc_t) xdr_void, (caddr_t) argp, - (xdrproc_t) xdr_rpc_loc_api_rpc_glue_code_info_remote_rets, (caddr_t) clnt_res, - TIMEOUT)); -} - -enum clnt_stat -rpc_loc_open_0x00040001(rpc_loc_open_args *argp, rpc_loc_open_rets *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_open, - (xdrproc_t) xdr_rpc_loc_open_args, (caddr_t) argp, - (xdrproc_t) xdr_rpc_loc_open_rets, (caddr_t) clnt_res, - TIMEOUT)); -} - -enum clnt_stat -rpc_loc_close_0x00040001(rpc_loc_close_args *argp, rpc_loc_close_rets *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_close, - (xdrproc_t) xdr_rpc_loc_close_args, (caddr_t) argp, - (xdrproc_t) xdr_rpc_loc_close_rets, (caddr_t) clnt_res, - TIMEOUT)); -} - -enum clnt_stat -rpc_loc_start_fix_0x00040001(rpc_loc_start_fix_args *argp, rpc_loc_start_fix_rets *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_start_fix, - (xdrproc_t) xdr_rpc_loc_start_fix_args, (caddr_t) argp, - (xdrproc_t) xdr_rpc_loc_start_fix_rets, (caddr_t) clnt_res, - TIMEOUT)); -} - -enum clnt_stat -rpc_loc_stop_fix_0x00040001(rpc_loc_stop_fix_args *argp, rpc_loc_stop_fix_rets *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_stop_fix, - (xdrproc_t) xdr_rpc_loc_stop_fix_args, (caddr_t) argp, - (xdrproc_t) xdr_rpc_loc_stop_fix_rets, (caddr_t) clnt_res, - TIMEOUT)); -} - -enum clnt_stat -rpc_loc_ioctl_0x00040001(rpc_loc_ioctl_args *argp, rpc_loc_ioctl_rets *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_ioctl, - (xdrproc_t) xdr_rpc_loc_ioctl_args, (caddr_t) argp, - (xdrproc_t) xdr_rpc_loc_ioctl_rets, (caddr_t) clnt_res, - TIMEOUT)); -} - -enum clnt_stat -rpc_loc_api_api_versions_0x00040001(void *argp, rpc_loc_api_api_versions_rets *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_api_api_versions, - (xdrproc_t) xdr_void, (caddr_t) argp, - (xdrproc_t) xdr_rpc_loc_api_api_versions_rets, (caddr_t) clnt_res, - TIMEOUT)); -} - -enum clnt_stat -rpc_loc_api_null_0x00040002(void *argp, void *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_api_null, - (xdrproc_t) xdr_void, (caddr_t) argp, - (xdrproc_t) xdr_void, (caddr_t) clnt_res, - TIMEOUT)); -} diff --git a/loc_api/libloc_api-rpc/gen-1240/loc_api_common.xdr b/loc_api/libloc_api-rpc/gen-1240/loc_api_common.xdr deleted file mode 100644 index 4e01607d..00000000 --- a/loc_api/libloc_api-rpc/gen-1240/loc_api_common.xdr +++ /dev/null @@ -1,906 +0,0 @@ -/* LOC_API TOOL VERSION: 4.36 */ -/*============================================================================= - L O C _ A P I _ C O M M O N . X D R - -GENERAL DESCRIPTION - This is an AUTO GENERATED file that provides an xdr compatible definition of - an api that represents the grouping of the different callback functions the - loc_api API supports. - - --------------------------------------------------------------------------- - Copyright (c) 2010 QUALCOMM Incorporated. - All Rights Reserved. QUALCOMM Proprietary and Confidential. - --------------------------------------------------------------------------- -=============================================================================*/ - -/*============================================================================= - - Edit History - - AUTO GENERATED - -Generated by following versions of Htorpc modules: -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/htorpc.pl#20 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/Start.pm#3 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/Htoxdr.pm#1 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/XDR.pm#7 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/Output.pm#29 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/Parser.pm#2 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/Metacomments.pm#6 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/SymbolTable.pm#3 - -loc_api Definition File(s): -Id: //source/qcom/qct/modem/api/gps/main/latest/loc_api.h#16 -=============================================================================*/ -/*============================================================================= -$Header$ -=============================================================================*/ - - - -const LOC_API_TOOLVERS = 0x00040024; -const LOC_API_FEATURES = 0x00000001; - -const RPC_LOC_EVENT_NI_NOTIFY_VERIFY_REQUEST = 0x00000010; - -const RPC_LOC_EVENT_WPS_NEEDED_REQUEST = 0x00000200; - -const RPC_LOC_EVENT_IOCTL_REPORT = 0x00000080; - -const RPC_LOC_EVENT_LOCATION_SERVER_REQUEST = 0x00000040; - -const RPC_LOC_EVENT_RESERVED = 0x8000000000000000; - -const RPC_LOC_EVENT_PARSED_POSITION_REPORT = 0x00000001; - -const RPC_LOC_EVENT_ASSISTANCE_DATA_REQUEST = 0x00000020; - -const RPC_LOC_EVENT_NMEA_POSITION_REPORT = 0x00000008; - -const RPC_LOC_EVENT_SATELLITE_REPORT = 0x00000002; - -const RPC_LOC_EVENT_STATUS_REPORT = 0x00000100; - -const RPC_LOC_EVENT_CB_F_TYPE_VERSION = 0x00040001; -const RPC_LOC_OPEN_VERSION = 0x00040001; -const RPC_LOC_API_RPC_GLUE_CODE_INFO_REMOTE_VERSION = 0x00040001; -const RPC_LOC_API_NULL_VERSION = 0x00040001; -const RPC_LOC_STOP_FIX_VERSION = 0x00040001; -const RPC_LOC_IOCTL_VERSION = 0x00040001; -const RPC_LOC_START_FIX_VERSION = 0x00040001; -const RPC_LOC_CLOSE_VERSION = 0x00040001; -const RPC_LOC_API_API_VERSIONS_VERSION = 0x00040001; -const RPC_LOC_API_API_MAJOR_NUM = 0x0004; -const RPC_LOC_APIAPI_VERSION_IS_HASHKEY = 0; - -typedef bool rpc_boolean; - -typedef unsigned long rpc_uint32; - -typedef unsigned short rpc_uint16; - -typedef unsigned char rpc_uint8; - -typedef long rpc_int32; - -typedef unsigned char rpc_byte; - -typedef unsigned hyper rpc_uint64; - -typedef rpc_int32 rpc_loc_client_handle_type; - -typedef rpc_uint64 rpc_loc_event_mask_type; - -typedef rpc_uint64 rpc_loc_position_valid_mask_type; - -typedef rpc_uint32 rpc_loc_pos_technology_mask_type; - -enum rpc_loc_session_status_e_type { - RPC_LOC_SESS_STATUS_SUCCESS = 0, - RPC_LOC_SESS_STATUS_IN_PROGESS = 1, - RPC_LOC_SESS_STATUS_GENERAL_FAILURE = 2, - RPC_LOC_SESS_STATUS_TIMEOUT = 3, - RPC_LOC_SESS_STATUS_USER_END = 4, - RPC_LOC_SESS_STATUS_BAD_PARAMETER = 5, - RPC_LOC_SESS_STATUS_PHONE_OFFLINE = 6, - RPC_LOC_SESS_STATUS_ENGINE_LOCKED = 7, - RPC_LOC_SESS_STATUS_MAX = 268435456 -}; - -struct rpc_loc_calendar_time_s_type { - rpc_uint16 year; - unsigned char month; - unsigned char day_of_week; - unsigned char day; - unsigned char hour; - unsigned char minute; - unsigned char second; - rpc_uint16 millisecond; -}; - -struct rpc_loc_parsed_position_s_type { - rpc_loc_position_valid_mask_type valid_mask; - rpc_loc_session_status_e_type session_status; - rpc_loc_calendar_time_s_type timestamp_calendar; - rpc_uint64 timestamp_utc; - rpc_uint8 leap_seconds; - float time_unc; - double latitude; - double longitude; - float altitude_wrt_ellipsoid; - float altitude_wrt_mean_sea_level; - float speed_horizontal; - float speed_vertical; - float heading; - float hor_unc_circular; - float hor_unc_ellipse_semi_major; - float hor_unc_ellipse_semi_minor; - float hor_unc_ellipse_orient_azimuth; - float vert_unc; - float speed_unc; - float heading_unc; - unsigned char confidence_horizontal; - unsigned char confidence_vertical; - float magnetic_deviation; - rpc_loc_pos_technology_mask_type technology_mask; -}; - -enum rpc_loc_sv_system_e_type { - RPC_LOC_SV_SYSTEM_GPS = 1, - RPC_LOC_SV_SYSTEM_GALILEO = 2, - RPC_LOC_SV_SYSTEM_SBAS = 3, - RPC_LOC_SV_SYSTEM_COMPASS = 4, - RPC_LOC_SV_SYSTEM_GLONASS = 5, - RPC_LOC_SV_SYSTEM_MAX = 268435456 -}; - -enum rpc_loc_sv_status_e_type { - RPC_LOC_SV_STATUS_IDLE = 1, - RPC_LOC_SV_STATUS_SEARCH = 2, - RPC_LOC_SV_STATUS_TRACK = 3, - RPC_LOC_SV_STATUS_MAX = 268435456 -}; - -typedef rpc_uint32 rpc_loc_sv_info_valid_mask_type; - -struct rpc_loc_sv_info_s_type { - rpc_loc_sv_info_valid_mask_type valid_mask; - rpc_loc_sv_system_e_type system; - rpc_uint8 prn; - rpc_uint8 health_status; - rpc_loc_sv_status_e_type process_status; - rpc_boolean has_eph; - rpc_boolean has_alm; - float elevation; - float azimuth; - float snr; -}; - -typedef rpc_uint32 rpc_loc_gnss_info_valid_mask_type; - -struct rpc_loc_gnss_info_s_type { - rpc_loc_gnss_info_valid_mask_type valid_mask; - float position_dop; - float horizontal_dop; - float vertical_dop; - rpc_boolean altitude_assumed; - rpc_uint16 sv_count; - rpc_loc_sv_info_s_type sv_list<80>; /* EVAL:[LOC_API_MAX_SV_COUNT]*/ -}; - -struct rpc_loc_nmea_report_s_type { - rpc_uint16 length; - opaque nmea_sentences[1200]; /* EVAL:[1200]*/ -}; - -enum rpc_loc_status_event_e_type { - RPC_LOC_STATUS_EVENT_ENGINE_STATE = 1, - RPC_LOC_STATUS_EVENT_FIX_SESSION_STATE = 2, - RPC_LOC_STATUS_EVENT_MAX = 268435456 -}; - -enum rpc_loc_engine_state_e_type { - RPC_LOC_ENGINE_STATE_ON = 1, - RPC_LOC_ENGINE_STATE_OFF = 2, - RPC_LOC_ENGINE_STATE_MAX = 268435456 -}; - -enum rpc_loc_fix_session_state_e_type { - RPC_LOC_FIX_SESSION_STATE_BEGIN = 1, - RPC_LOC_FIX_SESSION_STATE_END = 2, - RPC_LOC_FIX_SESSION_STATE_MAX = 268435456 -}; - -union rpc_loc_status_event_payload_u_type switch (rpc_loc_status_event_e_type disc) { - case RPC_LOC_STATUS_EVENT_ENGINE_STATE: - rpc_loc_engine_state_e_type engine_state; - case RPC_LOC_STATUS_EVENT_FIX_SESSION_STATE: - rpc_loc_fix_session_state_e_type fix_session_state; - default: - void; -}; - -struct rpc_loc_status_event_s_type { - rpc_loc_status_event_e_type event; - rpc_loc_status_event_payload_u_type payload; -}; - -enum rpc_loc_server_addr_e_type { - RPC_LOC_SERVER_ADDR_IPV4 = 1, - RPC_LOC_SERVER_ADDR_URL = 2, - RPC_LOC_SERVER_ADDR_MAX = 268435456 -}; - -struct rpc_loc_server_addr_ipv4_type { - rpc_uint32 addr; - rpc_uint16 port; -}; - -struct rpc_loc_server_addr_url_type { - rpc_uint16 length; - opaque addr[256]; /* EVAL:[256]*/ -}; - -union rpc_loc_server_addr_u_type switch (rpc_loc_server_addr_e_type disc) { - case RPC_LOC_SERVER_ADDR_IPV4: - rpc_loc_server_addr_ipv4_type ipv4; - case RPC_LOC_SERVER_ADDR_URL: - rpc_loc_server_addr_url_type url; - default: - void; -}; - -struct rpc_loc_server_info_s_type { - rpc_loc_server_addr_e_type addr_type; - rpc_loc_server_addr_u_type addr_info; -}; - -enum rpc_loc_ni_notify_verify_e_type { - RPC_LOC_NI_USER_NO_NOTIFY_NO_VERIFY = 1, - RPC_LOC_NI_USER_NOTIFY_ONLY = 2, - RPC_LOC_NI_USER_NOTIFY_VERIFY_ALLOW_NO_RESP = 3, - RPC_LOC_NI_USER_NOTIFY_VERIFY_NOT_ALLOW_NO_RESP = 4, - RPC_LOC_NI_USER_PRIVACY_OVERRIDE = 5, - RPC_LOC_NI_USER_NOTIFY_VERITY_TYPE_MAX = 268435456 -}; - -enum rpc_loc_ni_event_e_type { - RPC_LOC_NI_EVENT_VX_NOTIFY_VERIFY_REQ = 1, - RPC_LOC_NI_EVENT_SUPL_NOTIFY_VERIFY_REQ = 2, - RPC_LOC_NI_EVENT_UMTS_CP_NOTIFY_VERIFY_REQ = 3, - RPC_LOC_NI_EVENT_VX_SERVICE_INTERACTION_REQ = 4, - RPC_LOC_NI_EVENT_MAX = 268435456 -}; - -enum rpc_loc_ni_datacoding_scheme_e_type { - RPC_LOC_NI_PRESUPL_ISO646IRV = 0, - RPC_LOC_NI_PRESUPL_ISO8859 = 1, - RPC_LOC_NI_PRESUPL_UTF8 = 2, - RPC_LOC_NI_PRESUPL_UTF16 = 3, - RPC_LOC_NI_PRESUPL_UCS2 = 4, - RPC_LOC_NI_PRESUPL_GSM_DEFAULT = 5, - RPC_LOC_NI_PRESUPL_SHIFT_JIS = 6, - RPC_LOC_NI_PRESUPL_JIS = 7, - RPC_LOC_NI_PRESUPL_EUC = 8, - RPC_LOC_NI_PRESUPL_GB2312 = 9, - RPC_LOC_NI_PRESUPL_CNS11643 = 10, - RPC_LOC_NI_PRESUPL_KSC1001 = 11, - RPC_LOC_NI_PRESUPL_ENCODING_UNKNOWN = 2147483647, - RPC_LOC_NI_SS_GERMAN = 12, - RPC_LOC_NI_SS_ENGLISH = 13, - RPC_LOC_NI_SS_ITALIAN = 14, - RPC_LOC_NI_SS_FRENCH = 15, - RPC_LOC_NI_SS_SPANISH = 16, - RPC_LOC_NI_SS_DUTCH = 17, - RPC_LOC_NI_SS_SWEDISH = 18, - RPC_LOC_NI_SS_DANISH = 19, - RPC_LOC_NI_SS_PORTUGUESE = 20, - RPC_LOC_NI_SS_FINNISH = 21, - RPC_LOC_NI_SS_NORWEGIAN = 22, - RPC_LOC_NI_SS_GREEK = 23, - RPC_LOC_NI_SS_TURKISH = 24, - RPC_LOC_NI_SS_HUNGARIAN = 25, - RPC_LOC_NI_SS_POLISH = 26, - RPC_LOC_NI_SS_LANGUAGE_UNSPEC = 27, - RPC_LOC_NI_SUPL_UTF8 = 28, - RPC_LOC_NI_SUPL_UCS2 = 29, - RPC_LOC_NI_SUPL_GSM_DEFAULT = 30, - RPC_LOC_NI_SUPL_ENCODING_UNKNOWN = 2147483647 -}; - -enum rpc_loc_ni_vx_requester_id_encoding_scheme_e_type { - RPC_LOC_NI_VX_OCTET = 0, - RPC_LOC_NI_VX_EXN_PROTOCOL_MSG = 1, - RPC_LOC_NI_VX_ASCII = 2, - RPC_LOC_NI_VX_IA5 = 3, - RPC_LOC_NI_VX_UNICODE = 4, - RPC_LOC_NI_VX_SHIFT_JIS = 5, - RPC_LOC_NI_VX_KOREAN = 6, - RPC_LOC_NI_VX_LATIN_HEBREW = 7, - RPC_LOC_NI_VX_LATIN = 8, - RPC_LOC_NI_VX_GSM = 9, - RPC_LOC_NI_VX_ENCODING_TYPE_MAX = 268435456 -}; - -enum rpc_loc_ni_vx_pos_mode_e_type { - RPC_LOC_VX_MS_ASSISTED_ONLY = 1, - RPC_LOC_VX_MS_BASED_ONLY = 2, - RPC_LOC_VX_MS_ASSISTED_PREF_MSBASED_ALLWD = 3, - RPC_LOC_VX_MS_BASED_PREF_ASSISTED_ALLWD = 4, - RPC_LOC_VX_POS_MODE_MAX = 268435456 -}; - -struct rpc_loc_ni_vx_requester_id_s_type { - unsigned char requester_id_length; - opaque requester_id[200]; /* EVAL:[200]*/ -}; - -struct rpc_loc_ni_vx_notify_verify_req_s_type { - rpc_loc_ni_notify_verify_e_type notification_priv_type; - unsigned char pos_qos_incl; - unsigned char pos_qos; - rpc_uint32 num_fixes; - rpc_uint32 tbf; - rpc_loc_ni_vx_pos_mode_e_type pos_mode; - rpc_loc_ni_vx_requester_id_encoding_scheme_e_type encoding_scheme; - rpc_loc_ni_vx_requester_id_s_type requester_id; - rpc_uint16 user_resp_timer_val; -}; - -enum rpc_loc_ni_supl_pos_method_e_type { - RPC_LOC_NI_POSMETHOD_AGPS_SETASSISTED = 1, - RPC_LOC_NI_POSMETHOD_AGPS_SETBASED = 2, - RPC_LOC_NI_POSMETHOD_AGPS_SETASSISTED_PREF = 3, - RPC_LOC_NI_POSMETHOD_AGPS_SETBASED_PREF = 4, - RPC_LOC_NI_POSMETHOD_AUTONOMOUS_GPS = 5, - RPC_LOC_NI_POSMETHOD_AFLT = 6, - RPC_LOC_NI_POSMETHOD_ECID = 7, - RPC_LOC_NI_POSMETHOD_EOTD = 8, - RPC_LOC_NI_POSMETHOD_OTDOA = 9, - RPC_LOC_NI_POSMETHOD_NO_POSITION = 10, - RPC_LOC_NI_POSMETHOD_MAX = 268435456 -}; - -struct rpc_loc_ni_supl_slp_session_id_s_type { - unsigned char presence; - opaque session_id[4]; /* EVAL:[4]*/ - rpc_loc_server_info_s_type slp_address; -}; - -struct rpc_loc_ni_requestor_id_s_type { - unsigned char data_coding_scheme; - opaque requestor_id_string[200]; /* EVAL:[200]*/ - unsigned char string_len; -}; - -struct rpc_loc_ni_supl_client_name_s_type { - unsigned char data_coding_scheme; - opaque client_name_string[64]; /* EVAL:[64]*/ - unsigned char string_len; -}; - -struct rpc_loc_ni_supl_qop_s_type { - unsigned char bit_mask; - unsigned char horacc; - unsigned char veracc; - rpc_uint16 maxLocAge; - unsigned char delay; -}; - -struct rpc_loc_ni_supl_notify_verify_req_s_type { - rpc_loc_ni_notify_verify_e_type notification_priv_type; - rpc_uint16 flags; - rpc_loc_ni_supl_slp_session_id_s_type supl_slp_session_id; - opaque supl_hash[8]; /* EVAL:[8]*/ - rpc_loc_ni_datacoding_scheme_e_type datacoding_scheme; - rpc_loc_ni_supl_pos_method_e_type pos_method; - rpc_loc_ni_requestor_id_s_type requestor_id; - rpc_loc_ni_supl_client_name_s_type client_name; - rpc_loc_ni_supl_qop_s_type supl_qop; - rpc_uint16 user_response_timer; -}; - -struct rpc_loc_ni_ext_client_address_s_type { - unsigned char ext_client_address_len; - opaque ext_client_address[20]; /* EVAL:[20]*/ -}; - -enum rpc_loc_ni_location_type_e_type { - RPC_LOC_NI_LOCATIONTYPE_CURRENT_LOCATION = 1, - RPC_LOC_NI_LOCATIONTYPE_CURRENT_OR_LAST_KNOWN_LOCATION = 2, - RPC_LOC_NI_LOCATIONTYPE_INITIAL_LOCATION = 3, - RPC_LOC_NI_LOCATIONTYPE_MAX = 268435456 -}; - -struct rpc_loc_ni_deferred_location_s_type { - unsigned char unused_bits; - unsigned char ms_available; -}; - -struct rpc_loc_ni_codeword_string_s_type { - unsigned char data_coding_scheme; - opaque lcs_codeword_string[20]; /* EVAL:[20]*/ - unsigned char string_len; -}; - -struct rpc_loc_ni_service_type_id_s_type { - unsigned char lcs_service_type_id; -}; - -struct rpc_loc_ni_umts_cp_notify_verify_req_s_type { - rpc_loc_ni_notify_verify_e_type notification_priv_type; - unsigned char invoke_id; - rpc_uint16 flags; - unsigned char notification_length; - opaque notification_text[64]; /* EVAL:[64]*/ - rpc_loc_ni_datacoding_scheme_e_type datacoding_scheme; - rpc_loc_ni_ext_client_address_s_type ext_client_address_data; - rpc_loc_ni_location_type_e_type location_type; - rpc_loc_ni_deferred_location_s_type deferred_location; - rpc_loc_ni_requestor_id_s_type requestor_id; - rpc_loc_ni_codeword_string_s_type codeword_string; - rpc_loc_ni_service_type_id_s_type service_type_id; - rpc_uint16 user_response_timer; -}; - -enum rpc_loc_ni_service_interaction_e_type { - RPC_LOC_NI_SERVICE_INTERACTION_ONGOING_NI_INCOMING_MO = 1, - RPC_LOC_NI_SERVICE_INTERACTION_MAX = 268435456 -}; - -struct rpc_loc_ni_vx_service_interaction_req_s_type { - rpc_loc_ni_vx_notify_verify_req_s_type ni_vx_req; - rpc_loc_ni_service_interaction_e_type service_interation_type; -}; - -union rpc_loc_ni_event_payload_u_type switch (rpc_loc_ni_event_e_type disc) { - case RPC_LOC_NI_EVENT_VX_NOTIFY_VERIFY_REQ: - rpc_loc_ni_vx_notify_verify_req_s_type vx_req; - case RPC_LOC_NI_EVENT_SUPL_NOTIFY_VERIFY_REQ: - rpc_loc_ni_supl_notify_verify_req_s_type supl_req; - case RPC_LOC_NI_EVENT_UMTS_CP_NOTIFY_VERIFY_REQ: - rpc_loc_ni_umts_cp_notify_verify_req_s_type umts_cp_req; - case RPC_LOC_NI_EVENT_VX_SERVICE_INTERACTION_REQ: - rpc_loc_ni_vx_service_interaction_req_s_type service_interaction_req; - default: - void; -}; - -struct rpc_loc_ni_event_s_type { - rpc_loc_ni_event_e_type event; - rpc_loc_ni_event_payload_u_type payload; -}; - -enum rpc_loc_assist_data_request_e_type { - RPC_LOC_ASSIST_DATA_TIME_REQ = 1, - RPC_LOC_ASSIST_DATA_PREDICTED_ORBITS_REQ = 2, - RPC_LOC_ASSIST_DATA_MAX = 268435456 -}; - - typedef string rpc_struct_loc_time_download_source_s_type_servers_ptr<256>; /* EVAL:[LOC_API_MAX_SERVER_ADDR_LENGTH]*/ - - typedef rpc_struct_loc_time_download_source_s_type_servers_ptr rpc_struct_loc_time_download_source_s_type_servers[3]; /* EVAL:[3]*/ - -struct rpc_loc_time_download_source_s_type { - rpc_uint32 delay_threshold; - rpc_struct_loc_time_download_source_s_type_servers servers; -}; - - typedef string rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr<256>; /* EVAL:[LOC_API_MAX_SERVER_ADDR_LENGTH]*/ - - typedef rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr rpc_struct_loc_predicted_orbits_data_source_s_type_servers[3]; /* EVAL:[3]*/ - -struct rpc_loc_predicted_orbits_data_source_s_type { - rpc_uint32 max_file_size; - rpc_uint32 max_part_size; - rpc_struct_loc_predicted_orbits_data_source_s_type_servers servers; -}; - -union rpc_loc_assist_data_request_payload_u_type switch (rpc_loc_assist_data_request_e_type disc) { - case RPC_LOC_ASSIST_DATA_TIME_REQ: - rpc_loc_time_download_source_s_type time_download; - case RPC_LOC_ASSIST_DATA_PREDICTED_ORBITS_REQ: - rpc_loc_predicted_orbits_data_source_s_type data_download; - default: - void; -}; - -struct rpc_loc_assist_data_request_s_type { - rpc_loc_assist_data_request_e_type event; - rpc_loc_assist_data_request_payload_u_type payload; -}; - -typedef rpc_uint32 rpc_loc_server_connection_handle; - -enum rpc_loc_server_protocol_e_type { - RPC_LOC_SERVER_PROTOCOL_DEFAULT = 0, - RPC_LOC_SERVER_PROTOCOL_SUPL = 1, - RPC_LOC_SERVER_PROTOCOL_VX_MPC = 2, - RPC_LOC_SERVER_PROTOCOL_VX_PDE = 3, - RPC_LOC_SERVER_PROTOCOL_MAX = 16777216 -}; - -enum rpc_loc_server_request_e_type { - RPC_LOC_SERVER_REQUEST_OPEN = 1, - RPC_LOC_SERVER_REQUEST_CLOSE = 2, - RPC_LOC_SERVER_REQUEST_MAX = 268435456 -}; - -struct rpc_loc_server_open_req_s_type { - rpc_loc_server_connection_handle conn_handle; - rpc_loc_server_protocol_e_type protocol; -}; - -struct rpc_loc_server_close_req_s_type { - rpc_loc_server_connection_handle conn_handle; -}; - -union rpc_loc_server_request_u_type switch (rpc_loc_server_request_e_type disc) { - case RPC_LOC_SERVER_REQUEST_OPEN: - rpc_loc_server_open_req_s_type open_req; - case RPC_LOC_SERVER_REQUEST_CLOSE: - rpc_loc_server_close_req_s_type close_req; - default: - void; -}; - -struct rpc_loc_server_request_s_type { - rpc_loc_server_request_e_type event; - rpc_loc_server_request_u_type payload; -}; - -enum rpc_loc_qwip_request_e_type { - RPC_LOC_QWIP_START_PERIODIC_HI_FREQ_FIXES = 0, - RPC_LOC_QWIP_START_PERIODIC_KEEP_WARM, - RPC_LOC_QWIP_STOP_PERIODIC_FIXES, - RPC_LOC_QWIP_SUSPEND, - RPC_LOC_QWIP_REQUEST_MAX = 268435456 -}; - -struct rpc_loc_qwip_request_s_type { - rpc_loc_qwip_request_e_type request_type; - rpc_uint16 tbf_ms; -}; - -struct rpc_loc_reserved_payload_s_type { - rpc_uint16 data_size; - opaque data<>; -}; - -enum rpc_loc_ioctl_e_type { - RPC_LOC_IOCTL_GET_API_VERSION = 1, - RPC_LOC_IOCTL_SET_FIX_CRITERIA = 2, - RPC_LOC_IOCTL_GET_FIX_CRITERIA = 3, - RPC_LOC_IOCTL_SERVICE_START_INDEX = 400, - RPC_LOC_IOCTL_INFORM_NI_USER_RESPONSE = 400, - RPC_LOC_IOCTL_INJECT_PREDICTED_ORBITS_DATA = 401, - RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_VALIDITY = 402, - RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_SOURCE = 403, - RPC_LOC_IOCTL_SET_PREDICTED_ORBITS_DATA_AUTO_DOWNLOAD = 404, - RPC_LOC_IOCTL_INJECT_UTC_TIME = 405, - RPC_LOC_IOCTL_INJECT_RTC_VALUE = 406, - RPC_LOC_IOCTL_INJECT_POSITION = 407, - RPC_LOC_IOCTL_QUERY_ENGINE_STATE = 408, - RPC_LOC_IOCTL_INFORM_SERVER_OPEN_STATUS = 409, - RPC_LOC_IOCTL_INFORM_SERVER_CLOSE_STATUS = 410, - RPC_LOC_IOCTL_SEND_WIPER_POSITION_REPORT = 411, - RPC_LOC_IOCTL_NOTIFY_WIPER_STATUS = 412, - RPC_LOC_IOCTL_ACCESS_EFS_DATA = 413, - RPC_LOC_IOCTL_NV_SETTINGS_START_INDEX = 800, - RPC_LOC_IOCTL_SET_ENGINE_LOCK = 800, - RPC_LOC_IOCTL_GET_ENGINE_LOCK = 801, - RPC_LOC_IOCTL_SET_SBAS_CONFIG = 802, - RPC_LOC_IOCTL_GET_SBAS_CONFIG = 803, - RPC_LOC_IOCTL_SET_NMEA_TYPES = 804, - RPC_LOC_IOCTL_GET_NMEA_TYPES = 805, - RPC_LOC_IOCTL_SET_CDMA_PDE_SERVER_ADDR = 806, - RPC_LOC_IOCTL_GET_CDMA_PDE_SERVER_ADDR = 807, - RPC_LOC_IOCTL_SET_CDMA_MPC_SERVER_ADDR = 808, - RPC_LOC_IOCTL_GET_CDMA_MPC_SERVER_ADDR = 809, - RPC_LOC_IOCTL_SET_UMTS_SLP_SERVER_ADDR = 810, - RPC_LOC_IOCTL_GET_UMTS_SLP_SERVER_ADDR = 811, - RPC_LOC_IOCTL_SET_ON_DEMAND_LPM = 812, - RPC_LOC_IOCTL_GET_ON_DEMAND_LPM = 813, - RPC_LOC_IOCTL_PROPRIETARY_START_INDEX = 1000, - RPC_LOC_IOCTL_DELETE_ASSIST_DATA = 1000, - RPC_LOC_IOCTL_SET_CUSTOM_PDE_SERVER_ADDR = 1001, - RPC_LOC_IOCTL_GET_CUSTOM_PDE_SERVER_ADDR = 1002, - RPC_LOC_IOCTL_THIRD_PARTY_START_INDEX = 1073741824 -}; - -struct rpc_loc_api_version_s_type { - unsigned char major; - unsigned char minor; -}; - -enum rpc_loc_fix_recurrence_e_type { - RPC_LOC_PERIODIC_FIX = 1, - RPC_LOC_SINGLE_FIX = 2, - RPC_LOC_FIX_SESSION_TYPE_MAX = 268435456 -}; - -enum rpc_loc_operation_mode_e_type { - RPC_LOC_OPER_MODE_DEFAULT = 1, - RPC_LOC_OPER_MODE_MSB = 2, - RPC_LOC_OPER_MODE_MSA = 3, - RPC_LOC_OPER_MODE_STANDALONE = 4, - RPC_LOC_OPER_MODE_SPEED_OPTIMAL = 5, - RPC_LOC_OPER_MODE_ACCURACY_OPTIMAL = 6, - RPC_LOC_OPER_MODE_DATA_OPTIMAL = 7, - RPC_LOC_OPER_MODE_CELL_ID = 8, - RPC_LOC_OPER_MODE_MAX = 268435456 -}; - -enum rpc_loc_notify_e_type { - RPC_LOC_NOTIFY_ON_INTERVAL = 1, - RPC_LOC_NOTIFY_ON_DISTANCE = 2, - RPC_LOC_NOTIFY_ON_ANY = 3, - RPC_LOC_NOTIFY_ON_ALL = 4, - RPC_LOC_NOTIFY_TYPE_MAX = 268435456 -}; - -struct rpc_loc_fix_criteria_s_type { - rpc_uint32 valid_mask; - rpc_loc_fix_recurrence_e_type recurrence_type; - rpc_loc_operation_mode_e_type preferred_operation_mode; - rpc_uint32 preferred_accuracy; - rpc_uint32 preferred_response_time; - rpc_boolean intermediate_pos_report_enabled; - rpc_loc_notify_e_type notify_type; - rpc_uint32 min_interval; - float min_distance; - rpc_uint32 min_dist_sample_interval; -}; - -enum rpc_loc_ni_user_resp_e_type { - RPC_LOC_NI_LCS_NOTIFY_VERIFY_ACCEPT = 1, - RPC_LOC_NI_LCS_NOTIFY_VERIFY_DENY = 2, - RPC_LOC_NI_LCS_NOTIFY_VERIFY_NORESP = 3, - RPC_LOC_NI_LCS_NOTIFY_VERIFY_MAX = 268435456 -}; - -struct rpc_loc_user_verify_s_type { - rpc_loc_ni_user_resp_e_type user_resp; - rpc_loc_ni_event_s_type ni_event_pass_back; -}; - -enum rpc_loc_predicted_orbits_data_format_e_type { - RPC_LOC_PREDICTED_ORBITS_XTRA = 0, - RPC_LOC_PREDICTED_ORBITS_FORMAT_MAX = 268435456 -}; - -struct rpc_loc_predicted_orbits_data_s_type { - rpc_loc_predicted_orbits_data_format_e_type format_type; - rpc_uint32 total_size; - rpc_uint8 total_parts; - rpc_uint8 part; - rpc_uint16 part_len; - opaque data_ptr<>; -}; - -struct rpc_loc_predicted_orbits_data_validity_report_s_type { - rpc_uint64 start_time_utc; - rpc_uint16 valid_duration_hrs; -}; - -struct rpc_loc_predicted_orbits_auto_download_config_s_type { - rpc_boolean enable; - unsigned char auto_check_every_hrs; -}; - -struct rpc_loc_assist_data_time_s_type { - rpc_uint64 time_utc; - rpc_uint32 uncertainty; -}; - -typedef rpc_uint64 rpc_loc_assist_pos_valid_mask_type; - -struct rpc_loc_assist_data_pos_s_type { - rpc_loc_assist_pos_valid_mask_type valid_mask; - rpc_uint64 timestamp_utc; - double latitude; - double longitude; - float altitude_wrt_ellipsoid; - float altitude_wrt_mean_sea_level; - float hor_unc_circular; - float vert_unc; - unsigned char confidence_horizontal; - unsigned char confidence_vertical; - rpc_int32 timestamp_age; -}; - -enum rpc_loc_server_open_status_e_type { - RPC_LOC_SERVER_OPEN_SUCCESS = 1, - RPC_LOC_SERVER_OPEN_FAIL = 2, - RPC_LOC_SERVER_OPEN_STATUS_MAX = 268435456 -}; - -struct rpc_loc_server_open_status_s_type { - rpc_loc_server_connection_handle conn_handle; - rpc_loc_server_open_status_e_type open_status; - opaque apn_name[100]; /* EVAL:[100]*/ -}; - -enum rpc_loc_server_close_status_e_type { - RPC_LOC_SERVER_CLOSE_SUCCESS = 1, - RPC_LOC_SERVER_CLOSE_FAIL = 2, - RPC_LOC_SERVER_CLOSE_STATUS_MAX = 268435456 -}; - -struct rpc_loc_server_close_status_s_type { - rpc_loc_server_connection_handle conn_handle; - rpc_loc_server_close_status_e_type close_status; -}; - -struct rpc_loc_wiper_fix_time_s_type { - rpc_uint32 slow_clock_count; -}; - -struct rpc_loc_wiper_fix_pos_s_type { - rpc_int32 lat; - rpc_int32 lon; - rpc_uint16 HEPE; - rpc_uint8 num_of_aps_used; - rpc_uint8 fix_error_code; -}; - -struct rpc_loc_wiper_ap_info_s_type { - opaque mac_addr[6]; /* EVAL:[6]*/ - rpc_int32 rssi; - rpc_uint16 channel; - rpc_uint8 ap_qualifier; -}; - -struct rpc_loc_wiper_ap_set_s_type { - rpc_uint8 num_of_aps; - rpc_loc_wiper_ap_info_s_type ap_info[50]; /* EVAL:[50]*/ -}; - -struct rpc_loc_wiper_position_report_s_type { - rpc_uint8 wiper_valid_info_flag; - rpc_loc_wiper_fix_time_s_type wiper_fix_time; - rpc_loc_wiper_fix_pos_s_type wiper_fix_position; - rpc_loc_wiper_ap_set_s_type wiper_ap_set; -}; - -enum rpc_loc_wiper_status_e_type { - RPC_LOC_WIPER_STATUS_AVAILABLE = 1, - RPC_LOC_WIPER_STATUS_UNAVAILABLE = 2, - RPC_LOC_WIPER_STATUS_E_SIZE = 268435456 -}; - -enum rpc_loc_fs_operation_e_type { - RPC_LOC_FS_CREATE_WRITE_FILE = 1, - RPC_LOC_FS_APPEND_FILE = 2, - RPC_LOC_FS_DELETE_FILE = 3, - RPC_LOC_FS_READ_FILE = 4, - RPC_LOC_FS_MAX = 268435456 -}; - -struct rpc_loc_efs_data_s_type { - opaque filename[64]; /* EVAL:[64]*/ - rpc_loc_fs_operation_e_type operation; - rpc_uint32 total_size; - opaque data_ptr<>; - rpc_uint32 part_len; - rpc_uint8 part; - rpc_uint8 total_parts; - rpc_uint32 reserved; -}; - -enum rpc_loc_lock_e_type { - RPC_LOC_LOCK_NONE = 1, - RPC_LOC_LOCK_MI = 2, - RPC_LOC_LOCK_MT = 3, - RPC_LOC_LOCK_ALL = 4, - RPC_LOC_LOCK_MAX = 268435456 -}; - -typedef rpc_uint32 rpc_loc_nmea_sentence_type; - -typedef rpc_uint32 rpc_loc_assist_data_type; - -struct rpc_loc_assist_data_delete_s_type { - rpc_loc_assist_data_type type; - rpc_uint32 reserved[8]; /* EVAL:[8]*/ -}; - -union rpc_loc_ioctl_data_u_type switch (rpc_loc_ioctl_e_type disc) { - case RPC_LOC_IOCTL_SET_FIX_CRITERIA: - rpc_loc_fix_criteria_s_type fix_criteria; - case RPC_LOC_IOCTL_INFORM_NI_USER_RESPONSE: - rpc_loc_user_verify_s_type user_verify_resp; - case RPC_LOC_IOCTL_INJECT_PREDICTED_ORBITS_DATA: - rpc_loc_predicted_orbits_data_s_type predicted_orbits_data; - case RPC_LOC_IOCTL_SET_PREDICTED_ORBITS_DATA_AUTO_DOWNLOAD: - rpc_loc_predicted_orbits_auto_download_config_s_type predicted_orbits_auto_download; - case RPC_LOC_IOCTL_INJECT_UTC_TIME: - rpc_loc_assist_data_time_s_type assistance_data_time; - case RPC_LOC_IOCTL_INJECT_POSITION: - rpc_loc_assist_data_pos_s_type assistance_data_position; - case RPC_LOC_IOCTL_INFORM_SERVER_OPEN_STATUS: - rpc_loc_server_open_status_s_type conn_open_status; - case RPC_LOC_IOCTL_INFORM_SERVER_CLOSE_STATUS: - rpc_loc_server_close_status_s_type conn_close_status; - case RPC_LOC_IOCTL_SEND_WIPER_POSITION_REPORT: - rpc_loc_wiper_position_report_s_type wiper_pos; - case RPC_LOC_IOCTL_NOTIFY_WIPER_STATUS: - rpc_loc_wiper_status_e_type wiper_status; - case RPC_LOC_IOCTL_SET_ENGINE_LOCK: - rpc_loc_lock_e_type engine_lock; - case RPC_LOC_IOCTL_SET_SBAS_CONFIG: - rpc_boolean sbas_mode; - case RPC_LOC_IOCTL_SET_NMEA_TYPES: - rpc_loc_nmea_sentence_type nmea_types; - case RPC_LOC_IOCTL_SET_ON_DEMAND_LPM: - rpc_boolean on_demand_lpm; - case RPC_LOC_IOCTL_SET_CDMA_PDE_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_CDMA_MPC_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_UMTS_SLP_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_CUSTOM_PDE_SERVER_ADDR: - rpc_loc_server_info_s_type server_addr; - case RPC_LOC_IOCTL_DELETE_ASSIST_DATA: - rpc_loc_assist_data_delete_s_type assist_data_delete; - case RPC_LOC_IOCTL_ACCESS_EFS_DATA: - rpc_loc_efs_data_s_type efs_data; - default: - void; -}; - -union rpc_loc_ioctl_callback_data_u_type switch (rpc_loc_ioctl_e_type disc) { - case RPC_LOC_IOCTL_GET_API_VERSION: - rpc_loc_api_version_s_type api_version; - case RPC_LOC_IOCTL_GET_FIX_CRITERIA: - rpc_loc_fix_criteria_s_type fix_criteria; - case RPC_LOC_IOCTL_GET_ENGINE_LOCK: - rpc_loc_lock_e_type engine_lock; - case RPC_LOC_IOCTL_GET_SBAS_CONFIG: - rpc_boolean sbas_mode; - case RPC_LOC_IOCTL_GET_NMEA_TYPES: - rpc_loc_nmea_sentence_type nmea_types; - case RPC_LOC_IOCTL_GET_ON_DEMAND_LPM: - rpc_boolean on_demand_lpm; - case RPC_LOC_IOCTL_GET_CDMA_PDE_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_CDMA_MPC_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_UMTS_SLP_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_CUSTOM_PDE_SERVER_ADDR: - rpc_loc_server_info_s_type server_addr; - case RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_SOURCE: - rpc_loc_predicted_orbits_data_source_s_type predicted_orbits_data_source; - case RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_VALIDITY: - rpc_loc_predicted_orbits_data_validity_report_s_type predicted_orbits_data_validity; - default: - void; -}; - -struct rpc_loc_ioctl_callback_s_type { - rpc_loc_ioctl_e_type type; - rpc_int32 status; - rpc_loc_ioctl_callback_data_u_type data; -}; - -union rpc_loc_event_payload_u_type switch (unsigned hyper disc) { - case RPC_LOC_EVENT_PARSED_POSITION_REPORT: - rpc_loc_parsed_position_s_type parsed_location_report; - case RPC_LOC_EVENT_SATELLITE_REPORT: - rpc_loc_gnss_info_s_type gnss_report; - case RPC_LOC_EVENT_NMEA_POSITION_REPORT: - rpc_loc_nmea_report_s_type nmea_report; - case RPC_LOC_EVENT_NI_NOTIFY_VERIFY_REQUEST: - rpc_loc_ni_event_s_type ni_request; - case RPC_LOC_EVENT_ASSISTANCE_DATA_REQUEST: - rpc_loc_assist_data_request_s_type assist_data_request; - case RPC_LOC_EVENT_LOCATION_SERVER_REQUEST: - rpc_loc_server_request_s_type loc_server_request; - case RPC_LOC_EVENT_IOCTL_REPORT: - rpc_loc_ioctl_callback_s_type ioctl_report; - case RPC_LOC_EVENT_STATUS_REPORT: - rpc_loc_status_event_s_type status_report; - case RPC_LOC_EVENT_WPS_NEEDED_REQUEST: - rpc_loc_qwip_request_s_type qwip_request; - case RPC_LOC_EVENT_RESERVED: - rpc_loc_reserved_payload_s_type reserved; - default: - void; -}; - diff --git a/loc_api/libloc_api-rpc/gen-1240/loc_api_common_xdr.c b/loc_api/libloc_api-rpc/gen-1240/loc_api_common_xdr.c deleted file mode 100644 index 7c860bf3..00000000 --- a/loc_api/libloc_api-rpc/gen-1240/loc_api_common_xdr.c +++ /dev/null @@ -1,1650 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#include "loc_api_common.h" - -bool_t -xdr_rpc_boolean (XDR *xdrs, rpc_boolean *objp) -{ - register int32_t *buf; - - if (!xdr_bool (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_uint32 (XDR *xdrs, rpc_uint32 *objp) -{ - register int32_t *buf; - - if (!xdr_u_long (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_uint16 (XDR *xdrs, rpc_uint16 *objp) -{ - register int32_t *buf; - - if (!xdr_u_short (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_uint8 (XDR *xdrs, rpc_uint8 *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_int32 (XDR *xdrs, rpc_int32 *objp) -{ - register int32_t *buf; - - if (!xdr_long (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_byte (XDR *xdrs, rpc_byte *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_uint64 (XDR *xdrs, rpc_uint64 *objp) -{ - register int32_t *buf; - - if (!xdr_u_quad_t (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_client_handle_type (XDR *xdrs, rpc_loc_client_handle_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_int32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_event_mask_type (XDR *xdrs, rpc_loc_event_mask_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint64 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_position_valid_mask_type (XDR *xdrs, rpc_loc_position_valid_mask_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint64 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_pos_technology_mask_type (XDR *xdrs, rpc_loc_pos_technology_mask_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_session_status_e_type (XDR *xdrs, rpc_loc_session_status_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_calendar_time_s_type (XDR *xdrs, rpc_loc_calendar_time_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint16 (xdrs, &objp->year)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->month)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->day_of_week)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->day)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->hour)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->minute)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->second)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->millisecond)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_parsed_position_s_type (XDR *xdrs, rpc_loc_parsed_position_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_position_valid_mask_type (xdrs, &objp->valid_mask)) - return FALSE; - if (!xdr_rpc_loc_session_status_e_type (xdrs, &objp->session_status)) - return FALSE; - if (!xdr_rpc_loc_calendar_time_s_type (xdrs, &objp->timestamp_calendar)) - return FALSE; - if (!xdr_rpc_uint64 (xdrs, &objp->timestamp_utc)) - return FALSE; - if (!xdr_rpc_uint8 (xdrs, &objp->leap_seconds)) - return FALSE; - if (!xdr_float (xdrs, &objp->time_unc)) - return FALSE; - if (!xdr_double (xdrs, &objp->latitude)) - return FALSE; - if (!xdr_double (xdrs, &objp->longitude)) - return FALSE; - if (!xdr_float (xdrs, &objp->altitude_wrt_ellipsoid)) - return FALSE; - if (!xdr_float (xdrs, &objp->altitude_wrt_mean_sea_level)) - return FALSE; - if (!xdr_float (xdrs, &objp->speed_horizontal)) - return FALSE; - if (!xdr_float (xdrs, &objp->speed_vertical)) - return FALSE; - if (!xdr_float (xdrs, &objp->heading)) - return FALSE; - if (!xdr_float (xdrs, &objp->hor_unc_circular)) - return FALSE; - if (!xdr_float (xdrs, &objp->hor_unc_ellipse_semi_major)) - return FALSE; - if (!xdr_float (xdrs, &objp->hor_unc_ellipse_semi_minor)) - return FALSE; - if (!xdr_float (xdrs, &objp->hor_unc_ellipse_orient_azimuth)) - return FALSE; - if (!xdr_float (xdrs, &objp->vert_unc)) - return FALSE; - if (!xdr_float (xdrs, &objp->speed_unc)) - return FALSE; - if (!xdr_float (xdrs, &objp->heading_unc)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->confidence_horizontal)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->confidence_vertical)) - return FALSE; - if (!xdr_float (xdrs, &objp->magnetic_deviation)) - return FALSE; - if (!xdr_rpc_loc_pos_technology_mask_type (xdrs, &objp->technology_mask)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_sv_system_e_type (XDR *xdrs, rpc_loc_sv_system_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_sv_status_e_type (XDR *xdrs, rpc_loc_sv_status_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_sv_info_valid_mask_type (XDR *xdrs, rpc_loc_sv_info_valid_mask_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_sv_info_s_type (XDR *xdrs, rpc_loc_sv_info_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_sv_info_valid_mask_type (xdrs, &objp->valid_mask)) - return FALSE; - if (!xdr_rpc_loc_sv_system_e_type (xdrs, &objp->system)) - return FALSE; - if (!xdr_rpc_uint8 (xdrs, &objp->prn)) - return FALSE; - if (!xdr_rpc_uint8 (xdrs, &objp->health_status)) - return FALSE; - if (!xdr_rpc_loc_sv_status_e_type (xdrs, &objp->process_status)) - return FALSE; - if (!xdr_rpc_boolean (xdrs, &objp->has_eph)) - return FALSE; - if (!xdr_rpc_boolean (xdrs, &objp->has_alm)) - return FALSE; - if (!xdr_float (xdrs, &objp->elevation)) - return FALSE; - if (!xdr_float (xdrs, &objp->azimuth)) - return FALSE; - if (!xdr_float (xdrs, &objp->snr)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_gnss_info_valid_mask_type (XDR *xdrs, rpc_loc_gnss_info_valid_mask_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_gnss_info_s_type (XDR *xdrs, rpc_loc_gnss_info_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_gnss_info_valid_mask_type (xdrs, &objp->valid_mask)) - return FALSE; - if (!xdr_float (xdrs, &objp->position_dop)) - return FALSE; - if (!xdr_float (xdrs, &objp->horizontal_dop)) - return FALSE; - if (!xdr_float (xdrs, &objp->vertical_dop)) - return FALSE; - if (!xdr_rpc_boolean (xdrs, &objp->altitude_assumed)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->sv_count)) - return FALSE; - if (!xdr_array (xdrs, (char **)&objp->sv_list.sv_list_val, (u_int *) &objp->sv_list.sv_list_len, 80, - sizeof (rpc_loc_sv_info_s_type), (xdrproc_t) xdr_rpc_loc_sv_info_s_type)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_nmea_report_s_type (XDR *xdrs, rpc_loc_nmea_report_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_rpc_uint16 (xdrs, &objp->length)) - return FALSE; - if (!xdr_opaque (xdrs, objp->nmea_sentences, 1200)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_status_event_e_type (XDR *xdrs, rpc_loc_status_event_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_engine_state_e_type (XDR *xdrs, rpc_loc_engine_state_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_fix_session_state_e_type (XDR *xdrs, rpc_loc_fix_session_state_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_status_event_payload_u_type (XDR *xdrs, rpc_loc_status_event_payload_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_status_event_e_type (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_STATUS_EVENT_ENGINE_STATE: - if (!xdr_rpc_loc_engine_state_e_type (xdrs, &objp->rpc_loc_status_event_payload_u_type_u.engine_state)) - return FALSE; - break; - case RPC_LOC_STATUS_EVENT_FIX_SESSION_STATE: - if (!xdr_rpc_loc_fix_session_state_e_type (xdrs, &objp->rpc_loc_status_event_payload_u_type_u.fix_session_state)) - return FALSE; - break; - default: - break; - } - return TRUE; -} - -bool_t -xdr_rpc_loc_status_event_s_type (XDR *xdrs, rpc_loc_status_event_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_status_event_e_type (xdrs, &objp->event)) - return FALSE; - if (!xdr_rpc_loc_status_event_payload_u_type (xdrs, &objp->payload)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_addr_e_type (XDR *xdrs, rpc_loc_server_addr_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_addr_ipv4_type (XDR *xdrs, rpc_loc_server_addr_ipv4_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, &objp->addr)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->port)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_addr_url_type (XDR *xdrs, rpc_loc_server_addr_url_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_rpc_uint16 (xdrs, &objp->length)) - return FALSE; - if (!xdr_opaque (xdrs, objp->addr, 256)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_addr_u_type (XDR *xdrs, rpc_loc_server_addr_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_server_addr_e_type (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_SERVER_ADDR_IPV4: - if (!xdr_rpc_loc_server_addr_ipv4_type (xdrs, &objp->rpc_loc_server_addr_u_type_u.ipv4)) - return FALSE; - break; - case RPC_LOC_SERVER_ADDR_URL: - if (!xdr_rpc_loc_server_addr_url_type (xdrs, &objp->rpc_loc_server_addr_u_type_u.url)) - return FALSE; - break; - default: - break; - } - return TRUE; -} - -bool_t -xdr_rpc_loc_server_info_s_type (XDR *xdrs, rpc_loc_server_info_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_server_addr_e_type (xdrs, &objp->addr_type)) - return FALSE; - if (!xdr_rpc_loc_server_addr_u_type (xdrs, &objp->addr_info)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_notify_verify_e_type (XDR *xdrs, rpc_loc_ni_notify_verify_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_event_e_type (XDR *xdrs, rpc_loc_ni_event_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_datacoding_scheme_e_type (XDR *xdrs, rpc_loc_ni_datacoding_scheme_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_vx_requester_id_encoding_scheme_e_type (XDR *xdrs, rpc_loc_ni_vx_requester_id_encoding_scheme_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_vx_pos_mode_e_type (XDR *xdrs, rpc_loc_ni_vx_pos_mode_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_vx_requester_id_s_type (XDR *xdrs, rpc_loc_ni_vx_requester_id_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_u_char (xdrs, &objp->requester_id_length)) - return FALSE; - if (!xdr_opaque (xdrs, objp->requester_id, 200)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_vx_notify_verify_req_s_type (XDR *xdrs, rpc_loc_ni_vx_notify_verify_req_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ni_notify_verify_e_type (xdrs, &objp->notification_priv_type)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->pos_qos_incl)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->pos_qos)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->num_fixes)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->tbf)) - return FALSE; - if (!xdr_rpc_loc_ni_vx_pos_mode_e_type (xdrs, &objp->pos_mode)) - return FALSE; - if (!xdr_rpc_loc_ni_vx_requester_id_encoding_scheme_e_type (xdrs, &objp->encoding_scheme)) - return FALSE; - if (!xdr_rpc_loc_ni_vx_requester_id_s_type (xdrs, &objp->requester_id)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->user_resp_timer_val)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_supl_pos_method_e_type (XDR *xdrs, rpc_loc_ni_supl_pos_method_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_supl_slp_session_id_s_type (XDR *xdrs, rpc_loc_ni_supl_slp_session_id_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_u_char (xdrs, &objp->presence)) - return FALSE; - if (!xdr_opaque (xdrs, objp->session_id, 4)) - return FALSE; - if (!xdr_rpc_loc_server_info_s_type (xdrs, &objp->slp_address)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_requestor_id_s_type (XDR *xdrs, rpc_loc_ni_requestor_id_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_u_char (xdrs, &objp->data_coding_scheme)) - return FALSE; - if (!xdr_opaque (xdrs, objp->requestor_id_string, 200)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->string_len)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_supl_client_name_s_type (XDR *xdrs, rpc_loc_ni_supl_client_name_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_u_char (xdrs, &objp->data_coding_scheme)) - return FALSE; - if (!xdr_opaque (xdrs, objp->client_name_string, 64)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->string_len)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_supl_qop_s_type (XDR *xdrs, rpc_loc_ni_supl_qop_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, &objp->bit_mask)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->horacc)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->veracc)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->maxLocAge)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->delay)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_supl_notify_verify_req_s_type (XDR *xdrs, rpc_loc_ni_supl_notify_verify_req_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_rpc_loc_ni_notify_verify_e_type (xdrs, &objp->notification_priv_type)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->flags)) - return FALSE; - if (!xdr_rpc_loc_ni_supl_slp_session_id_s_type (xdrs, &objp->supl_slp_session_id)) - return FALSE; - if (!xdr_opaque (xdrs, objp->supl_hash, 8)) - return FALSE; - if (!xdr_rpc_loc_ni_datacoding_scheme_e_type (xdrs, &objp->datacoding_scheme)) - return FALSE; - if (!xdr_rpc_loc_ni_supl_pos_method_e_type (xdrs, &objp->pos_method)) - return FALSE; - if (!xdr_rpc_loc_ni_requestor_id_s_type (xdrs, &objp->requestor_id)) - return FALSE; - if (!xdr_rpc_loc_ni_supl_client_name_s_type (xdrs, &objp->client_name)) - return FALSE; - if (!xdr_rpc_loc_ni_supl_qop_s_type (xdrs, &objp->supl_qop)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->user_response_timer)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_ext_client_address_s_type (XDR *xdrs, rpc_loc_ni_ext_client_address_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_u_char (xdrs, &objp->ext_client_address_len)) - return FALSE; - if (!xdr_opaque (xdrs, objp->ext_client_address, 20)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_location_type_e_type (XDR *xdrs, rpc_loc_ni_location_type_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_deferred_location_s_type (XDR *xdrs, rpc_loc_ni_deferred_location_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, &objp->unused_bits)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->ms_available)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_codeword_string_s_type (XDR *xdrs, rpc_loc_ni_codeword_string_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_u_char (xdrs, &objp->data_coding_scheme)) - return FALSE; - if (!xdr_opaque (xdrs, objp->lcs_codeword_string, 20)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->string_len)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_service_type_id_s_type (XDR *xdrs, rpc_loc_ni_service_type_id_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, &objp->lcs_service_type_id)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_umts_cp_notify_verify_req_s_type (XDR *xdrs, rpc_loc_ni_umts_cp_notify_verify_req_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_rpc_loc_ni_notify_verify_e_type (xdrs, &objp->notification_priv_type)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->invoke_id)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->flags)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->notification_length)) - return FALSE; - if (!xdr_opaque (xdrs, objp->notification_text, 64)) - return FALSE; - if (!xdr_rpc_loc_ni_datacoding_scheme_e_type (xdrs, &objp->datacoding_scheme)) - return FALSE; - if (!xdr_rpc_loc_ni_ext_client_address_s_type (xdrs, &objp->ext_client_address_data)) - return FALSE; - if (!xdr_rpc_loc_ni_location_type_e_type (xdrs, &objp->location_type)) - return FALSE; - if (!xdr_rpc_loc_ni_deferred_location_s_type (xdrs, &objp->deferred_location)) - return FALSE; - if (!xdr_rpc_loc_ni_requestor_id_s_type (xdrs, &objp->requestor_id)) - return FALSE; - if (!xdr_rpc_loc_ni_codeword_string_s_type (xdrs, &objp->codeword_string)) - return FALSE; - if (!xdr_rpc_loc_ni_service_type_id_s_type (xdrs, &objp->service_type_id)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->user_response_timer)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_service_interaction_e_type (XDR *xdrs, rpc_loc_ni_service_interaction_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_vx_service_interaction_req_s_type (XDR *xdrs, rpc_loc_ni_vx_service_interaction_req_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ni_vx_notify_verify_req_s_type (xdrs, &objp->ni_vx_req)) - return FALSE; - if (!xdr_rpc_loc_ni_service_interaction_e_type (xdrs, &objp->service_interation_type)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_event_payload_u_type (XDR *xdrs, rpc_loc_ni_event_payload_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ni_event_e_type (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_NI_EVENT_VX_NOTIFY_VERIFY_REQ: - if (!xdr_rpc_loc_ni_vx_notify_verify_req_s_type (xdrs, &objp->rpc_loc_ni_event_payload_u_type_u.vx_req)) - return FALSE; - break; - case RPC_LOC_NI_EVENT_SUPL_NOTIFY_VERIFY_REQ: - if (!xdr_rpc_loc_ni_supl_notify_verify_req_s_type (xdrs, &objp->rpc_loc_ni_event_payload_u_type_u.supl_req)) - return FALSE; - break; - case RPC_LOC_NI_EVENT_UMTS_CP_NOTIFY_VERIFY_REQ: - if (!xdr_rpc_loc_ni_umts_cp_notify_verify_req_s_type (xdrs, &objp->rpc_loc_ni_event_payload_u_type_u.umts_cp_req)) - return FALSE; - break; - case RPC_LOC_NI_EVENT_VX_SERVICE_INTERACTION_REQ: - if (!xdr_rpc_loc_ni_vx_service_interaction_req_s_type (xdrs, &objp->rpc_loc_ni_event_payload_u_type_u.service_interaction_req)) - return FALSE; - break; - default: - break; - } - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_event_s_type (XDR *xdrs, rpc_loc_ni_event_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ni_event_e_type (xdrs, &objp->event)) - return FALSE; - if (!xdr_rpc_loc_ni_event_payload_u_type (xdrs, &objp->payload)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_data_request_e_type (XDR *xdrs, rpc_loc_assist_data_request_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_struct_loc_time_download_source_s_type_servers_ptr (XDR *xdrs, rpc_struct_loc_time_download_source_s_type_servers_ptr *objp) -{ - register int32_t *buf; - - if (!xdr_string (xdrs, objp, 256)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_struct_loc_time_download_source_s_type_servers (XDR *xdrs, rpc_struct_loc_time_download_source_s_type_servers objp) -{ - register int32_t *buf; - - if (!xdr_vector (xdrs, (char *)objp, 3, - sizeof (rpc_struct_loc_time_download_source_s_type_servers_ptr), (xdrproc_t) xdr_rpc_struct_loc_time_download_source_s_type_servers_ptr)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_time_download_source_s_type (XDR *xdrs, rpc_loc_time_download_source_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, &objp->delay_threshold)) - return FALSE; - if (!xdr_rpc_struct_loc_time_download_source_s_type_servers (xdrs, objp->servers)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr (XDR *xdrs, rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr *objp) -{ - register int32_t *buf; - - if (!xdr_string (xdrs, objp, 256)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers (XDR *xdrs, rpc_struct_loc_predicted_orbits_data_source_s_type_servers objp) -{ - register int32_t *buf; - - if (!xdr_vector (xdrs, (char *)objp, 3, - sizeof (rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr), (xdrproc_t) xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_predicted_orbits_data_source_s_type (XDR *xdrs, rpc_loc_predicted_orbits_data_source_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, &objp->max_file_size)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->max_part_size)) - return FALSE; - if (!xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers (xdrs, objp->servers)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_data_request_payload_u_type (XDR *xdrs, rpc_loc_assist_data_request_payload_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_assist_data_request_e_type (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_ASSIST_DATA_TIME_REQ: - if (!xdr_rpc_loc_time_download_source_s_type (xdrs, &objp->rpc_loc_assist_data_request_payload_u_type_u.time_download)) - return FALSE; - break; - case RPC_LOC_ASSIST_DATA_PREDICTED_ORBITS_REQ: - if (!xdr_rpc_loc_predicted_orbits_data_source_s_type (xdrs, &objp->rpc_loc_assist_data_request_payload_u_type_u.data_download)) - return FALSE; - break; - default: - break; - } - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_data_request_s_type (XDR *xdrs, rpc_loc_assist_data_request_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_assist_data_request_e_type (xdrs, &objp->event)) - return FALSE; - if (!xdr_rpc_loc_assist_data_request_payload_u_type (xdrs, &objp->payload)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_connection_handle (XDR *xdrs, rpc_loc_server_connection_handle *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_protocol_e_type (XDR *xdrs, rpc_loc_server_protocol_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_request_e_type (XDR *xdrs, rpc_loc_server_request_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_open_req_s_type (XDR *xdrs, rpc_loc_server_open_req_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_server_connection_handle (xdrs, &objp->conn_handle)) - return FALSE; - if (!xdr_rpc_loc_server_protocol_e_type (xdrs, &objp->protocol)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_close_req_s_type (XDR *xdrs, rpc_loc_server_close_req_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_server_connection_handle (xdrs, &objp->conn_handle)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_request_u_type (XDR *xdrs, rpc_loc_server_request_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_server_request_e_type (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_SERVER_REQUEST_OPEN: - if (!xdr_rpc_loc_server_open_req_s_type (xdrs, &objp->rpc_loc_server_request_u_type_u.open_req)) - return FALSE; - break; - case RPC_LOC_SERVER_REQUEST_CLOSE: - if (!xdr_rpc_loc_server_close_req_s_type (xdrs, &objp->rpc_loc_server_request_u_type_u.close_req)) - return FALSE; - break; - default: - break; - } - return TRUE; -} - -bool_t -xdr_rpc_loc_server_request_s_type (XDR *xdrs, rpc_loc_server_request_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_server_request_e_type (xdrs, &objp->event)) - return FALSE; - if (!xdr_rpc_loc_server_request_u_type (xdrs, &objp->payload)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_qwip_request_e_type (XDR *xdrs, rpc_loc_qwip_request_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_qwip_request_s_type (XDR *xdrs, rpc_loc_qwip_request_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_qwip_request_e_type (xdrs, &objp->request_type)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->tbf_ms)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_reserved_payload_s_type (XDR *xdrs, rpc_loc_reserved_payload_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint16 (xdrs, &objp->data_size)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->data.data_val, (u_int *) &objp->data.data_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ioctl_e_type (XDR *xdrs, rpc_loc_ioctl_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_api_version_s_type (XDR *xdrs, rpc_loc_api_version_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, &objp->major)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->minor)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_fix_recurrence_e_type (XDR *xdrs, rpc_loc_fix_recurrence_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_operation_mode_e_type (XDR *xdrs, rpc_loc_operation_mode_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_notify_e_type (XDR *xdrs, rpc_loc_notify_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_fix_criteria_s_type (XDR *xdrs, rpc_loc_fix_criteria_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, &objp->valid_mask)) - return FALSE; - if (!xdr_rpc_loc_fix_recurrence_e_type (xdrs, &objp->recurrence_type)) - return FALSE; - if (!xdr_rpc_loc_operation_mode_e_type (xdrs, &objp->preferred_operation_mode)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->preferred_accuracy)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->preferred_response_time)) - return FALSE; - if (!xdr_rpc_boolean (xdrs, &objp->intermediate_pos_report_enabled)) - return FALSE; - if (!xdr_rpc_loc_notify_e_type (xdrs, &objp->notify_type)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->min_interval)) - return FALSE; - if (!xdr_float (xdrs, &objp->min_distance)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->min_dist_sample_interval)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_user_resp_e_type (XDR *xdrs, rpc_loc_ni_user_resp_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_user_verify_s_type (XDR *xdrs, rpc_loc_user_verify_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ni_user_resp_e_type (xdrs, &objp->user_resp)) - return FALSE; - if (!xdr_rpc_loc_ni_event_s_type (xdrs, &objp->ni_event_pass_back)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_predicted_orbits_data_format_e_type (XDR *xdrs, rpc_loc_predicted_orbits_data_format_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_predicted_orbits_data_s_type (XDR *xdrs, rpc_loc_predicted_orbits_data_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_predicted_orbits_data_format_e_type (xdrs, &objp->format_type)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->total_size)) - return FALSE; - if (!xdr_rpc_uint8 (xdrs, &objp->total_parts)) - return FALSE; - if (!xdr_rpc_uint8 (xdrs, &objp->part)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->part_len)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->data_ptr.data_ptr_val, (u_int *) &objp->data_ptr.data_ptr_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_predicted_orbits_data_validity_report_s_type (XDR *xdrs, rpc_loc_predicted_orbits_data_validity_report_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint64 (xdrs, &objp->start_time_utc)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->valid_duration_hrs)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_predicted_orbits_auto_download_config_s_type (XDR *xdrs, rpc_loc_predicted_orbits_auto_download_config_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_boolean (xdrs, &objp->enable)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->auto_check_every_hrs)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_data_time_s_type (XDR *xdrs, rpc_loc_assist_data_time_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint64 (xdrs, &objp->time_utc)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->uncertainty)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_pos_valid_mask_type (XDR *xdrs, rpc_loc_assist_pos_valid_mask_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint64 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_data_pos_s_type (XDR *xdrs, rpc_loc_assist_data_pos_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_assist_pos_valid_mask_type (xdrs, &objp->valid_mask)) - return FALSE; - if (!xdr_rpc_uint64 (xdrs, &objp->timestamp_utc)) - return FALSE; - if (!xdr_double (xdrs, &objp->latitude)) - return FALSE; - if (!xdr_double (xdrs, &objp->longitude)) - return FALSE; - if (!xdr_float (xdrs, &objp->altitude_wrt_ellipsoid)) - return FALSE; - if (!xdr_float (xdrs, &objp->altitude_wrt_mean_sea_level)) - return FALSE; - if (!xdr_float (xdrs, &objp->hor_unc_circular)) - return FALSE; - if (!xdr_float (xdrs, &objp->vert_unc)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->confidence_horizontal)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->confidence_vertical)) - return FALSE; - if (!xdr_rpc_int32 (xdrs, &objp->timestamp_age)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_open_status_e_type (XDR *xdrs, rpc_loc_server_open_status_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_open_status_s_type (XDR *xdrs, rpc_loc_server_open_status_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_rpc_loc_server_connection_handle (xdrs, &objp->conn_handle)) - return FALSE; - if (!xdr_rpc_loc_server_open_status_e_type (xdrs, &objp->open_status)) - return FALSE; - if (!xdr_opaque (xdrs, objp->apn_name, 100)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_close_status_e_type (XDR *xdrs, rpc_loc_server_close_status_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_close_status_s_type (XDR *xdrs, rpc_loc_server_close_status_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_server_connection_handle (xdrs, &objp->conn_handle)) - return FALSE; - if (!xdr_rpc_loc_server_close_status_e_type (xdrs, &objp->close_status)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_wiper_fix_time_s_type (XDR *xdrs, rpc_loc_wiper_fix_time_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, &objp->slow_clock_count)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_wiper_fix_pos_s_type (XDR *xdrs, rpc_loc_wiper_fix_pos_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_int32 (xdrs, &objp->lat)) - return FALSE; - if (!xdr_rpc_int32 (xdrs, &objp->lon)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->HEPE)) - return FALSE; - if (!xdr_rpc_uint8 (xdrs, &objp->num_of_aps_used)) - return FALSE; - if (!xdr_rpc_uint8 (xdrs, &objp->fix_error_code)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_wiper_ap_info_s_type (XDR *xdrs, rpc_loc_wiper_ap_info_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_opaque (xdrs, objp->mac_addr, 6)) - return FALSE; - if (!xdr_rpc_int32 (xdrs, &objp->rssi)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->channel)) - return FALSE; - if (!xdr_rpc_uint8 (xdrs, &objp->ap_qualifier)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_wiper_ap_set_s_type (XDR *xdrs, rpc_loc_wiper_ap_set_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_rpc_uint8 (xdrs, &objp->num_of_aps)) - return FALSE; - if (!xdr_vector (xdrs, (char *)objp->ap_info, 50, - sizeof (rpc_loc_wiper_ap_info_s_type), (xdrproc_t) xdr_rpc_loc_wiper_ap_info_s_type)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_wiper_position_report_s_type (XDR *xdrs, rpc_loc_wiper_position_report_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint8 (xdrs, &objp->wiper_valid_info_flag)) - return FALSE; - if (!xdr_rpc_loc_wiper_fix_time_s_type (xdrs, &objp->wiper_fix_time)) - return FALSE; - if (!xdr_rpc_loc_wiper_fix_pos_s_type (xdrs, &objp->wiper_fix_position)) - return FALSE; - if (!xdr_rpc_loc_wiper_ap_set_s_type (xdrs, &objp->wiper_ap_set)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_wiper_status_e_type (XDR *xdrs, rpc_loc_wiper_status_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_fs_operation_e_type (XDR *xdrs, rpc_loc_fs_operation_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_efs_data_s_type (XDR *xdrs, rpc_loc_efs_data_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_opaque (xdrs, objp->filename, 64)) - return FALSE; - if (!xdr_rpc_loc_fs_operation_e_type (xdrs, &objp->operation)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->total_size)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->data_ptr.data_ptr_val, (u_int *) &objp->data_ptr.data_ptr_len, ~0)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->part_len)) - return FALSE; - if (!xdr_rpc_uint8 (xdrs, &objp->part)) - return FALSE; - if (!xdr_rpc_uint8 (xdrs, &objp->total_parts)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->reserved)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_lock_e_type (XDR *xdrs, rpc_loc_lock_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_nmea_sentence_type (XDR *xdrs, rpc_loc_nmea_sentence_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_data_type (XDR *xdrs, rpc_loc_assist_data_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_data_delete_s_type (XDR *xdrs, rpc_loc_assist_data_delete_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_rpc_loc_assist_data_type (xdrs, &objp->type)) - return FALSE; - if (!xdr_vector (xdrs, (char *)objp->reserved, 8, - sizeof (rpc_uint32), (xdrproc_t) xdr_rpc_uint32)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ioctl_data_u_type (XDR *xdrs, rpc_loc_ioctl_data_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ioctl_e_type (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_IOCTL_SET_FIX_CRITERIA: - if (!xdr_rpc_loc_fix_criteria_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.fix_criteria)) - return FALSE; - break; - case RPC_LOC_IOCTL_INFORM_NI_USER_RESPONSE: - if (!xdr_rpc_loc_user_verify_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.user_verify_resp)) - return FALSE; - break; - case RPC_LOC_IOCTL_INJECT_PREDICTED_ORBITS_DATA: - if (!xdr_rpc_loc_predicted_orbits_data_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.predicted_orbits_data)) - return FALSE; - break; - case RPC_LOC_IOCTL_SET_PREDICTED_ORBITS_DATA_AUTO_DOWNLOAD: - if (!xdr_rpc_loc_predicted_orbits_auto_download_config_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.predicted_orbits_auto_download)) - return FALSE; - break; - case RPC_LOC_IOCTL_INJECT_UTC_TIME: - if (!xdr_rpc_loc_assist_data_time_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.assistance_data_time)) - return FALSE; - break; - case RPC_LOC_IOCTL_INJECT_POSITION: - if (!xdr_rpc_loc_assist_data_pos_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.assistance_data_position)) - return FALSE; - break; - case RPC_LOC_IOCTL_INFORM_SERVER_OPEN_STATUS: - if (!xdr_rpc_loc_server_open_status_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.conn_open_status)) - return FALSE; - break; - case RPC_LOC_IOCTL_INFORM_SERVER_CLOSE_STATUS: - if (!xdr_rpc_loc_server_close_status_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.conn_close_status)) - return FALSE; - break; - case RPC_LOC_IOCTL_SEND_WIPER_POSITION_REPORT: - if (!xdr_rpc_loc_wiper_position_report_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.wiper_pos)) - return FALSE; - break; - case RPC_LOC_IOCTL_NOTIFY_WIPER_STATUS: - if (!xdr_rpc_loc_wiper_status_e_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.wiper_status)) - return FALSE; - break; - case RPC_LOC_IOCTL_SET_ENGINE_LOCK: - if (!xdr_rpc_loc_lock_e_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.engine_lock)) - return FALSE; - break; - case RPC_LOC_IOCTL_SET_SBAS_CONFIG: - if (!xdr_rpc_boolean (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.sbas_mode)) - return FALSE; - break; - case RPC_LOC_IOCTL_SET_NMEA_TYPES: - if (!xdr_rpc_loc_nmea_sentence_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.nmea_types)) - return FALSE; - break; - case RPC_LOC_IOCTL_SET_ON_DEMAND_LPM: - if (!xdr_rpc_boolean (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.on_demand_lpm)) - return FALSE; - break; - case RPC_LOC_IOCTL_SET_CDMA_PDE_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_CDMA_MPC_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_UMTS_SLP_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_CUSTOM_PDE_SERVER_ADDR: - if (!xdr_rpc_loc_server_info_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.server_addr)) - return FALSE; - break; - case RPC_LOC_IOCTL_DELETE_ASSIST_DATA: - if (!xdr_rpc_loc_assist_data_delete_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.assist_data_delete)) - return FALSE; - break; - case RPC_LOC_IOCTL_ACCESS_EFS_DATA: - if (!xdr_rpc_loc_efs_data_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.efs_data)) - return FALSE; - break; - default: - break; - } - return TRUE; -} - -bool_t -xdr_rpc_loc_ioctl_callback_data_u_type (XDR *xdrs, rpc_loc_ioctl_callback_data_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ioctl_e_type (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_IOCTL_GET_API_VERSION: - if (!xdr_rpc_loc_api_version_s_type (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.api_version)) - return FALSE; - break; - case RPC_LOC_IOCTL_GET_FIX_CRITERIA: - if (!xdr_rpc_loc_fix_criteria_s_type (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.fix_criteria)) - return FALSE; - break; - case RPC_LOC_IOCTL_GET_ENGINE_LOCK: - if (!xdr_rpc_loc_lock_e_type (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.engine_lock)) - return FALSE; - break; - case RPC_LOC_IOCTL_GET_SBAS_CONFIG: - if (!xdr_rpc_boolean (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.sbas_mode)) - return FALSE; - break; - case RPC_LOC_IOCTL_GET_NMEA_TYPES: - if (!xdr_rpc_loc_nmea_sentence_type (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.nmea_types)) - return FALSE; - break; - case RPC_LOC_IOCTL_GET_ON_DEMAND_LPM: - if (!xdr_rpc_boolean (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.on_demand_lpm)) - return FALSE; - break; - case RPC_LOC_IOCTL_GET_CDMA_PDE_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_CDMA_MPC_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_UMTS_SLP_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_CUSTOM_PDE_SERVER_ADDR: - if (!xdr_rpc_loc_server_info_s_type (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.server_addr)) - return FALSE; - break; - case RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_SOURCE: - if (!xdr_rpc_loc_predicted_orbits_data_source_s_type (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.predicted_orbits_data_source)) - return FALSE; - break; - case RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_VALIDITY: - if (!xdr_rpc_loc_predicted_orbits_data_validity_report_s_type (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.predicted_orbits_data_validity)) - return FALSE; - break; - default: - break; - } - return TRUE; -} - -bool_t -xdr_rpc_loc_ioctl_callback_s_type (XDR *xdrs, rpc_loc_ioctl_callback_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ioctl_e_type (xdrs, &objp->type)) - return FALSE; - if (!xdr_rpc_int32 (xdrs, &objp->status)) - return FALSE; - if (!xdr_rpc_loc_ioctl_callback_data_u_type (xdrs, &objp->data)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_event_payload_u_type (XDR *xdrs, rpc_loc_event_payload_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_u_quad_t (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_EVENT_PARSED_POSITION_REPORT: - if (!xdr_rpc_loc_parsed_position_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.parsed_location_report)) - return FALSE; - break; - case RPC_LOC_EVENT_SATELLITE_REPORT: - if (!xdr_rpc_loc_gnss_info_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.gnss_report)) - return FALSE; - break; - case RPC_LOC_EVENT_NMEA_POSITION_REPORT: - if (!xdr_rpc_loc_nmea_report_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.nmea_report)) - return FALSE; - break; - case RPC_LOC_EVENT_NI_NOTIFY_VERIFY_REQUEST: - if (!xdr_rpc_loc_ni_event_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.ni_request)) - return FALSE; - break; - case RPC_LOC_EVENT_ASSISTANCE_DATA_REQUEST: - if (!xdr_rpc_loc_assist_data_request_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.assist_data_request)) - return FALSE; - break; - case RPC_LOC_EVENT_LOCATION_SERVER_REQUEST: - if (!xdr_rpc_loc_server_request_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.loc_server_request)) - return FALSE; - break; - case RPC_LOC_EVENT_IOCTL_REPORT: - if (!xdr_rpc_loc_ioctl_callback_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.ioctl_report)) - return FALSE; - break; - case RPC_LOC_EVENT_STATUS_REPORT: - if (!xdr_rpc_loc_status_event_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.status_report)) - return FALSE; - break; - case RPC_LOC_EVENT_WPS_NEEDED_REQUEST: - if (!xdr_rpc_loc_qwip_request_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.qwip_request)) - return FALSE; - break; - case RPC_LOC_EVENT_RESERVED: - if (!xdr_rpc_loc_reserved_payload_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.reserved)) - return FALSE; - break; - default: - break; - } - return TRUE; -} diff --git a/loc_api/libloc_api-rpc/gen-1240/loc_api_fixup.c b/loc_api/libloc_api-rpc/gen-1240/loc_api_fixup.c deleted file mode 100644 index fe512f5d..00000000 --- a/loc_api/libloc_api-rpc/gen-1240/loc_api_fixup.c +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - L O C _ A P I _ F I X U P . C - -GENERAL DESCRIPTION - This file adds API constants that are not automatically transmitted to - the RPC stubs, and it also fixes other RPC-related problems. - - --------------------------------------------------------------------------- -Copyright (c) 2009, QUALCOMM USA, INC. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -· Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -· Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -· Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --------------------------------------------------------------------------- -=============================================================================*/ - -#include - -#include "loc_api_fixup.h" - -#ifdef ADD_XDR_FLOAT - -int -xdr_float(xdrp, fp) - XDR *xdrp; - float *fp; -{ - return xdr_long(xdrp, (long*)fp); -} - -int -xdr_double(xdrp, dp) - XDR *xdrp; - double *dp; -{ - return xdr_long(xdrp, (long*)dp + 1) - && xdr_long(xdrp, (long*)dp); -} - -#endif /* ADD_XDR_FLOAT */ diff --git a/loc_api/libloc_api-rpc/gen-1240/loc_api_rpc_glue.c b/loc_api/libloc_api-rpc/gen-1240/loc_api_rpc_glue.c deleted file mode 100644 index fbaca8b6..00000000 --- a/loc_api/libloc_api-rpc/gen-1240/loc_api_rpc_glue.c +++ /dev/null @@ -1,339 +0,0 @@ -/****************************************************************************** - @file loc_api_rpc_glue.c - @brief Android Loc API glue code using rpcgen. - - DESCRIPTION - Loc API glue code for Android - - ----------------------------------------------------------------------------- -Copyright (c) 2009, QUALCOMM USA, INC. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -· Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -· Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -· Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ----------------------------------------------------------------------------- - ******************************************************************************/ -/*===================================================================== - EDIT HISTORY FOR MODULE - - This section contains comments describing changes made to the module. - Notice that changes are listed in reverse chronological order. - -when who what, where, why --------- --- ------------------------------------------------------- -03/05/2009 dx Initial version - -======================================================================*/ -/*===================================================================== - - INCLUDE FILES FOR MODULE - -======================================================================*/ -//#define LOG_NDDEBUG 0 - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -/* Include RPC headers */ -#include "loc_api_rpc_glue.h" - -/* Callback init */ -#include "loc_apicb_appinit.h" - -/* Logging */ -#define LOG_TAG "lib_api_rpc_glue" -#include - -/* Comment this out to enable logging */ -#undef LOGD -#define LOGD(...) {} - -/*===================================================================== - External declarations -======================================================================*/ - -CLIENT* loc_api_clnt = NULL; - -/* Callback ID and pointer */ -#define LOC_API_CB_ID 1 -loc_event_cb_f_type *loc_api_saved_cb = NULL; /* the only callback of Loc API client */ - -#define RPC_FUNC_VERSION_BASE(a,b) a ## b -#define RPC_FUNC_VERSION(a,b) RPC_FUNC_VERSION_BASE(a,b) - -#define LOC_GLUE_CHECK_INIT(ret_type) \ - if (loc_api_clnt == NULL) { return (ret_type) RPC_LOC_API_RPC_FAILURE; } - -#define LOC_GLUE_CHECK_RESULT(stat, ret_type) \ - if (stat != RPC_SUCCESS) { return (ret_type) RPC_LOC_API_RPC_FAILURE; } - -/* Callback functions */ -/* Returns 1 if successful */ -bool_t rpc_loc_event_cb_f_type_0x00040001_svc( - rpc_loc_event_cb_f_type_args *argp, - rpc_loc_event_cb_f_type_rets *ret, - struct svc_req *req) -{ - /* Callback not registered, or unexpected ID (shouldn't happen) */ - if (loc_api_saved_cb == NULL || argp->cb_id != LOC_API_CB_ID) - { - LOGD("Warning: No callback handler.\n"); - ret->loc_event_cb_f_type_result = 0; - return 1; /* simply return */ - } - - LOGD("proc: %x prog: %x vers: %x\n", - (int) req->rq_proc, - (int) req->rq_prog, - (int) req->rq_vers); - - LOGD("Callback received: %x (handle=%d ret_ptr=%d)\n", - (int) argp->loc_event, - (int) argp->loc_handle, - (int) ret); - - /* Forward callback to real callback procedure */ - rpc_loc_client_handle_type loc_handle = argp->loc_handle; - rpc_loc_event_mask_type loc_event = argp->loc_event; - const rpc_loc_event_payload_u_type* loc_event_payload = - (const rpc_loc_event_payload_u_type*) argp->loc_event_payload; - - int32 rc = loc_api_saved_cb(loc_handle, loc_event, loc_event_payload); - ret->loc_event_cb_f_type_result = rc; - - return 1; /* ok */ -} - -int loc_apicbprog_freeresult (SVCXPRT *transp, xdrproc_t xdr_result, caddr_t result) -{ - xdr_free (xdr_result, result); - - /* - * Insert additional freeing code here, if needed - */ - // LOGD("***** loc_apicbprog_freeresult\n"); - - return 1; -} - -int loc_apicbprog_0x00040001_freeresult (SVCXPRT *transp, xdrproc_t xdr_result, caddr_t result) -{ - return loc_apicbprog_freeresult (transp, xdr_result, result); -} - -/*=========================================================================== - -FUNCTION loc_api_glue_init - -DESCRIPTION - Initiates the RPC client - -RETURN VALUE - 1 for success - 0 for failure - -===========================================================================*/ -int loc_api_glue_init(void) -{ - if (loc_api_clnt == NULL) - { - /* Print msg */ - LOGD("Trying to create RPC client...\n"); - loc_api_clnt = clnt_create(NULL, LOC_APIPROG, LOC_APIVERS, NULL); - LOGD("Created loc_api_clnt ---- %x\n", (unsigned int)loc_api_clnt); - - if (loc_api_clnt == NULL) - { - fprintf(stderr, "Error: cannot create RPC client.\n"); - return 0; - } - - /* Init RPC callbacks */ - int rc = loc_apicb_app_init(); - if (rc >= 0) - { - LOGD("Loc API callback initialized.\n"); - } else { - fprintf(stderr, "Loc API callback initialization failed.\n"); - return 0; - } - } - - return 1; -} - -rpc_loc_client_handle_type loc_open ( - rpc_loc_event_mask_type event_reg_mask, - loc_event_cb_f_type *event_callback - ) -{ - LOC_GLUE_CHECK_INIT(rpc_loc_client_handle_type); - - rpc_loc_open_args args; - args.event_reg_mask = event_reg_mask; - args.event_callback = LOC_API_CB_ID; - loc_api_saved_cb = event_callback; - - rpc_loc_open_rets rets; - enum clnt_stat stat = RPC_SUCCESS; - - stat = RPC_FUNC_VERSION(rpc_loc_open_, /* LOC_APIVERS */ 0x00040001)(&args, &rets, loc_api_clnt); - LOC_GLUE_CHECK_RESULT(stat, int32); - - return (rpc_loc_client_handle_type) rets.loc_open_result; -} - -int32 loc_close(rpc_loc_client_handle_type handle) -{ - LOC_GLUE_CHECK_INIT(int32); - - rpc_loc_close_args args; - args.handle = handle; - - rpc_loc_close_rets rets; - enum clnt_stat stat = RPC_SUCCESS; - - stat = RPC_FUNC_VERSION(rpc_loc_close_, /* LOC_APIVERS */ 0x00040001)(&args, &rets, loc_api_clnt); - LOC_GLUE_CHECK_RESULT(stat, int32); - - return (int32) rets.loc_close_result; -} - -int32 loc_start_fix(rpc_loc_client_handle_type handle) -{ - LOC_GLUE_CHECK_INIT(int32); - - rpc_loc_start_fix_args args; - args.handle = handle; - - rpc_loc_start_fix_rets rets; - enum clnt_stat stat = RPC_SUCCESS; - - stat = RPC_FUNC_VERSION(rpc_loc_start_fix_, /* LOC_APIVERS */ 0x00040001)(&args, &rets, loc_api_clnt); - LOC_GLUE_CHECK_RESULT(stat, int32); - - return (int32) rets.loc_start_fix_result; -} - -int32 loc_stop_fix(rpc_loc_client_handle_type handle) -{ - LOC_GLUE_CHECK_INIT(int32); - - rpc_loc_stop_fix_args args; - args.handle = handle; - - rpc_loc_stop_fix_rets rets; - enum clnt_stat stat = RPC_SUCCESS; - - stat = RPC_FUNC_VERSION(rpc_loc_stop_fix_, /* LOC_APIVERS */ 0x00040001)(&args, &rets, loc_api_clnt); - LOC_GLUE_CHECK_RESULT(stat, int32); - - return (int32) rets.loc_stop_fix_result; -} - -int32 loc_ioctl( - rpc_loc_client_handle_type handle, - rpc_loc_ioctl_e_type ioctl_type, - rpc_loc_ioctl_data_u_type* ioctl_data - ) -{ - LOC_GLUE_CHECK_INIT(int32); - - rpc_loc_ioctl_args args; - args.handle = handle; - args.ioctl_data = ioctl_data; - args.ioctl_type = ioctl_type; - if (ioctl_data != NULL) - { - /* Assign ioctl union discriminator */ - ioctl_data->disc = ioctl_type; - - /* In case the user hasn't filled in other disc fields, - automatically fill them in here */ - switch (ioctl_type) - { - case RPC_LOC_IOCTL_GET_API_VERSION: - case RPC_LOC_IOCTL_SET_FIX_CRITERIA: - case RPC_LOC_IOCTL_GET_FIX_CRITERIA: - case RPC_LOC_IOCTL_INFORM_NI_USER_RESPONSE: - case RPC_LOC_IOCTL_INJECT_PREDICTED_ORBITS_DATA: - case RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_VALIDITY: - case RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_SOURCE: - case RPC_LOC_IOCTL_SET_PREDICTED_ORBITS_DATA_AUTO_DOWNLOAD: - case RPC_LOC_IOCTL_INJECT_UTC_TIME: - case RPC_LOC_IOCTL_INJECT_RTC_VALUE: - case RPC_LOC_IOCTL_INJECT_POSITION: - case RPC_LOC_IOCTL_QUERY_ENGINE_STATE: - case RPC_LOC_IOCTL_INFORM_SERVER_OPEN_STATUS: - case RPC_LOC_IOCTL_INFORM_SERVER_CLOSE_STATUS: - case RPC_LOC_IOCTL_SET_ENGINE_LOCK: - case RPC_LOC_IOCTL_GET_ENGINE_LOCK: - case RPC_LOC_IOCTL_SET_SBAS_CONFIG: - case RPC_LOC_IOCTL_GET_SBAS_CONFIG: - case RPC_LOC_IOCTL_SET_NMEA_TYPES: - case RPC_LOC_IOCTL_GET_NMEA_TYPES: - break; - case RPC_LOC_IOCTL_SET_CDMA_PDE_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_CDMA_MPC_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_UMTS_SLP_SERVER_ADDR: - args.ioctl_data->rpc_loc_ioctl_data_u_type_u.server_addr.addr_info.disc = - args.ioctl_data->rpc_loc_ioctl_data_u_type_u.server_addr.addr_type; - break; - case RPC_LOC_IOCTL_GET_CDMA_PDE_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_CDMA_MPC_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_UMTS_SLP_SERVER_ADDR: - break; - case RPC_LOC_IOCTL_SET_ON_DEMAND_LPM: - case RPC_LOC_IOCTL_GET_ON_DEMAND_LPM: - case RPC_LOC_IOCTL_DELETE_ASSIST_DATA: - case RPC_LOC_IOCTL_SET_CUSTOM_PDE_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_CUSTOM_PDE_SERVER_ADDR: - default: - break; - } /* switch */ - } /* ioctl_data != NULL */ - - rpc_loc_ioctl_rets rets; - enum clnt_stat stat = RPC_SUCCESS; - - stat = RPC_FUNC_VERSION(rpc_loc_ioctl_, /* LOC_APIVERS */ 0x00040001)(&args, &rets, loc_api_clnt); - LOC_GLUE_CHECK_RESULT(stat, int32); - - return (int32) rets.loc_ioctl_result; -} - -/* Returns 0 if error */ -int32 loc_api_null(void) -{ - LOC_GLUE_CHECK_INIT(int32); - - int32 rets; - enum clnt_stat stat = RPC_SUCCESS; - - stat = RPC_FUNC_VERSION(rpc_loc_api_null_, LOC_APIVERS)(NULL, &rets, loc_api_clnt); - LOC_GLUE_CHECK_RESULT(stat, int32); - - return (int32) rets; -} diff --git a/loc_api/libloc_api-rpc/gen-1240/loc_api_xdr.c b/loc_api/libloc_api-rpc/gen-1240/loc_api_xdr.c deleted file mode 100644 index 835f6b18..00000000 --- a/loc_api/libloc_api-rpc/gen-1240/loc_api_xdr.c +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#include "loc_api.h" - -bool_t -xdr_rpc_loc_api_api_versions_return_type (XDR *xdrs, rpc_loc_api_api_versions_return_type *objp) -{ - register int32_t *buf; - - if (!xdr_array (xdrs, (char **)&objp->rpc_loc_api_api_versions_return_type_val, (u_int *) &objp->rpc_loc_api_api_versions_return_type_len, ~0, - sizeof (rpc_uint32), (xdrproc_t) xdr_rpc_uint32)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_event_cb_f_type (XDR *xdrs, rpc_loc_event_cb_f_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_open_args (XDR *xdrs, rpc_loc_open_args *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_event_mask_type (xdrs, &objp->event_reg_mask)) - return FALSE; - if (!xdr_rpc_loc_event_cb_f_type (xdrs, &objp->event_callback)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_close_args (XDR *xdrs, rpc_loc_close_args *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_client_handle_type (xdrs, &objp->handle)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_start_fix_args (XDR *xdrs, rpc_loc_start_fix_args *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_client_handle_type (xdrs, &objp->handle)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_stop_fix_args (XDR *xdrs, rpc_loc_stop_fix_args *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_client_handle_type (xdrs, &objp->handle)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ioctl_args (XDR *xdrs, rpc_loc_ioctl_args *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_client_handle_type (xdrs, &objp->handle)) - return FALSE; - if (!xdr_rpc_loc_ioctl_e_type (xdrs, &objp->ioctl_type)) - return FALSE; - if (!xdr_pointer (xdrs, (char **)&objp->ioctl_data, sizeof (rpc_loc_ioctl_data_u_type), (xdrproc_t) xdr_rpc_loc_ioctl_data_u_type)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_api_api_version_s_args (XDR *xdrs, rpc_loc_api_api_version_s_args *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_boolean (xdrs, &objp->len_not_null)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_api_rpc_glue_code_info_remote_rets (XDR *xdrs, rpc_loc_api_rpc_glue_code_info_remote_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, &objp->toolvers)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->features)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->proghash)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->cbproghash)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_open_rets (XDR *xdrs, rpc_loc_open_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_client_handle_type (xdrs, &objp->loc_open_result)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_close_rets (XDR *xdrs, rpc_loc_close_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_int32 (xdrs, &objp->loc_close_result)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_start_fix_rets (XDR *xdrs, rpc_loc_start_fix_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_int32 (xdrs, &objp->loc_start_fix_result)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_stop_fix_rets (XDR *xdrs, rpc_loc_stop_fix_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_int32 (xdrs, &objp->loc_stop_fix_result)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ioctl_rets (XDR *xdrs, rpc_loc_ioctl_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_int32 (xdrs, &objp->loc_ioctl_result)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_api_api_versions_rets (XDR *xdrs, rpc_loc_api_api_versions_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_api_api_versions_return_type (xdrs, &objp->loc_api_api_versions_result)) - return FALSE; - if (!xdr_pointer (xdrs, (char **)&objp->len, sizeof (rpc_uint32), (xdrproc_t) xdr_rpc_uint32)) - return FALSE; - return TRUE; -} diff --git a/loc_api/libloc_api-rpc/gen-3200/Makefile.xdr b/loc_api/libloc_api-rpc/gen-3200/Makefile.xdr deleted file mode 100644 index 5d9cf6c8..00000000 --- a/loc_api/libloc_api-rpc/gen-3200/Makefile.xdr +++ /dev/null @@ -1,29 +0,0 @@ -CLIENTS:= loc_api -SERVERS:= loc_api_cb -COMMON:= loc_api_common -RPC_INC:= inc-$(AMSS_VERSION) - -all: $(CLIENTS) $(SERVERS) $(COMMON) fixup - -$(CLIENTS) $(SERVERS) $(COMMON):: xdr = $(@:=.xdr) - -$(CLIENTS) $(SERVERS) $(COMMON):: - rpcgen -h -M $(xdr) -o ../$(RPC_INC)/$(addsuffix .h, $@) - rpcgen -c -M $(xdr) -o $(addsuffix _xdr.c, $@) - -$(CLIENTS):: - rpcgen -l -M $(xdr) -o $(addsuffix _clnt.c, $@) - -$(SERVERS):: - rpcgen -m -M $(xdr) -o $(addsuffix _svc.c, $@) - -fixup: - mv ../$(RPC_INC)/loc_api_common.h ../$(RPC_INC)/loc_api_common.h.bak - sed ../$(RPC_INC)/loc_api_common.h.bak -e "/#include ../$(RPC_INC)/loc_api_common.h - rm -f ../$(RPC_INC)/loc_api_common.h.bak - -clean: - rm -f $(addsuffix _clnt.c, $(CLIENTS)) - rm -f $(addsuffix _svc.c, $(SERVERS)) - rm -f $(addsuffix _xdr.c, $(CLIENTS) $(SERVERS) $(COMMON)) - rm -f $(addprefix ../$(RPC_INC)/, $(addsuffix .h, $(CLIENTS) $(SERVERS) $(COMMON))) diff --git a/loc_api/libloc_api-rpc/gen-3200/loc_api.xdr b/loc_api/libloc_api-rpc/gen-3200/loc_api.xdr deleted file mode 100644 index 981266b3..00000000 --- a/loc_api/libloc_api-rpc/gen-3200/loc_api.xdr +++ /dev/null @@ -1,164 +0,0 @@ -/* LOC_API TOOL VERSION: 3.28 */ -/*============================================================================= - L O C _ A P I . X D R - -GENERAL DESCRIPTION - This is an AUTO GENERATED file that provides an xdr compatible definition of - the loc_api API. - - --------------------------------------------------------------------------- -Copyright (c) 2009, QUALCOMM USA, INC. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -· Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -· Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -· Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --------------------------------------------------------------------------- -=============================================================================*/ - -/*============================================================================= - - Edit History - - AUTO GENERATED - -Generated by following versions of Htorpc modules: -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/htorpc.pl#9 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/Start.pm#4 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/Htoxdr.pm#1 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/XDR.pm#7 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/Output.pm#26 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/Parser.pm#3 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/Metacomments.pm#2 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/SymbolTable.pm#4 - -=============================================================================*/ -/*============================================================================= -$Header$ -=============================================================================*/ - - - -typedef rpc_uint32 rpc_loc_api_api_versions_return_type<>; - -/* - * Declare an rpc_uint32 type for each callback type in the API - */ -typedef rpc_uint32 rpc_loc_event_cb_f_type; - - - -/* - * These are struct declarations for the function arguments - */ - -struct rpc_loc_open_args { - rpc_loc_event_mask_type event_reg_mask; - rpc_loc_event_cb_f_type event_callback; -}; - -struct rpc_loc_close_args { - rpc_loc_client_handle_type handle; -}; - -struct rpc_loc_start_fix_args { - rpc_loc_client_handle_type handle; -}; - -struct rpc_loc_stop_fix_args { - rpc_loc_client_handle_type handle; -}; - -struct rpc_loc_ioctl_args { - rpc_loc_client_handle_type handle; - rpc_loc_ioctl_e_type ioctl_type; - rpc_loc_ioctl_data_u_type *ioctl_data; -}; - - - -struct rpc_loc_api_api_version_s_args { - rpc_boolean len_not_null; -}; - -/* - * These are struct declarations for the function results - */ - -struct rpc_loc_api_rpc_glue_code_info_remote_rets { - rpc_uint32 toolvers; /* Tool version */ - rpc_uint32 features; /* Features turned on in the code. - * 0x00000001 ONCRPC Server Cleanup Support - */ - rpc_uint32 proghash; /* Unique hash value for the API XDR definition */ - rpc_uint32 cbproghash; /* Unique hash value for the Callbacks' XDR definition */ -}; - -struct rpc_loc_open_rets { - rpc_loc_client_handle_type loc_open_result; -}; - -struct rpc_loc_close_rets { - rpc_int32 loc_close_result; -}; - -struct rpc_loc_start_fix_rets { - rpc_int32 loc_start_fix_result; -}; - -struct rpc_loc_stop_fix_rets { - rpc_int32 loc_stop_fix_result; -}; - -struct rpc_loc_ioctl_rets { - rpc_int32 loc_ioctl_result; -}; - - struct rpc_loc_api_api_versions_rets { - rpc_loc_api_api_versions_return_type loc_api_api_versions_result; - rpc_uint32 *len; -}; - -/* - * XDR definition of the LOC_API program ( vers. 0x00010001 ) - */ - -program LOC_APIPROG { - version LOC_APIVERS_0001 { - - void - rpc_loc_api_null( void ) = 0; - - rpc_loc_api_rpc_glue_code_info_remote_rets - rpc_loc_api_rpc_glue_code_info_remote( void ) = 1; - - rpc_loc_open_rets - rpc_loc_open( rpc_loc_open_args ) = 2; - - rpc_loc_close_rets - rpc_loc_close( rpc_loc_close_args ) = 3; - - rpc_loc_start_fix_rets - rpc_loc_start_fix( rpc_loc_start_fix_args ) = 4; - - rpc_loc_stop_fix_rets - rpc_loc_stop_fix( rpc_loc_stop_fix_args ) = 5; - - rpc_loc_ioctl_rets - rpc_loc_ioctl( rpc_loc_ioctl_args ) = 6; - - rpc_loc_api_api_versions_rets - rpc_loc_api_api_versions( void ) = 0xFFFFFFFF; - - - } = 0x00010001; -} = 0x3000008c; - -const LOC_APIVERS = 0x00010001; diff --git a/loc_api/libloc_api-rpc/gen-3200/loc_api_cb.xdr b/loc_api/libloc_api-rpc/gen-3200/loc_api_cb.xdr deleted file mode 100644 index 3f53504b..00000000 --- a/loc_api/libloc_api-rpc/gen-3200/loc_api_cb.xdr +++ /dev/null @@ -1,90 +0,0 @@ -/* LOC_API TOOL VERSION: 3.28 */ -/*============================================================================= - L O C _ A P I _ C B . X D R - -GENERAL DESCRIPTION - This is an AUTO GENERATED file that provides an xdr compatible definition of - an api that represents the grouping of the different callback functions the - loc_api API supports. - - --------------------------------------------------------------------------- -Copyright (c) 2009, QUALCOMM USA, INC. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -· Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -· Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -· Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --------------------------------------------------------------------------- -=============================================================================*/ - -/*============================================================================= - - Edit History - - AUTO GENERATED - -Generated by following versions of Htorpc modules: -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/htorpc.pl#9 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/Start.pm#4 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/Htoxdr.pm#1 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/XDR.pm#7 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/Output.pm#26 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/Parser.pm#3 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/Metacomments.pm#2 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/SymbolTable.pm#4 - -=============================================================================*/ -/*============================================================================= -$Header$ -=============================================================================*/ - - - - -/* - * These are struct declarations for the function arguments - */ - -struct rpc_loc_event_cb_f_type_args { - rpc_uint32 cb_id; - rpc_loc_client_handle_type loc_handle; - rpc_loc_event_mask_type loc_event; - rpc_loc_event_payload_u_type *loc_event_payload; -}; - - - - - -/* - * These are struct declaratios for the function results - */ - -struct rpc_loc_event_cb_f_type_rets { - rpc_int32 loc_event_cb_f_type_result; -}; - - - -/* - * XDR definition of the LOC_API callback program ( vers. 0x00010001 ) - */ - -program LOC_APICBPROG { - version LOC_APICBVERS_0001 { - - rpc_loc_event_cb_f_type_rets - rpc_loc_event_cb_f_type( rpc_loc_event_cb_f_type_args ) = 1; - - - } = 0x00010001; -} = 0x3100008c; - -const LOC_APICBVERS = 0x00010001; diff --git a/loc_api/libloc_api-rpc/gen-3200/loc_api_cb_svc.c b/loc_api/libloc_api-rpc/gen-3200/loc_api_cb_svc.c deleted file mode 100644 index b1aa1998..00000000 --- a/loc_api/libloc_api-rpc/gen-3200/loc_api_cb_svc.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#include "loc_api_cb.h" -#include -#include -#include -#include -#include -#include -#include - -#ifndef SIG_PF -#define SIG_PF void(*)(int) -#endif - -void -loc_apicbprog_0x00010001(struct svc_req *rqstp, register SVCXPRT *transp) -{ - union { - rpc_loc_event_cb_f_type_args rpc_loc_event_cb_f_type_0x00010001_arg; - } argument; - union { - rpc_loc_event_cb_f_type_rets rpc_loc_event_cb_f_type_0x00010001_res; - } result; - bool_t retval; - xdrproc_t _xdr_argument, _xdr_result; - bool_t (*local)(char *, void *, struct svc_req *); - - switch (rqstp->rq_proc) { - case NULLPROC: - (void) svc_sendreply (transp, (xdrproc_t) xdr_void, (char *)NULL); - return; - - case rpc_loc_event_cb_f_type: - _xdr_argument = (xdrproc_t) xdr_rpc_loc_event_cb_f_type_args; - _xdr_result = (xdrproc_t) xdr_rpc_loc_event_cb_f_type_rets; - local = (bool_t (*) (char *, void *, struct svc_req *))rpc_loc_event_cb_f_type_0x00010001_svc; - break; - - default: - svcerr_noproc (transp); - return; - } - memset ((char *)&argument, 0, sizeof (argument)); - if (!svc_getargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) { - svcerr_decode (transp); - return; - } - retval = (bool_t) (*local)((char *)&argument, (void *)&result, rqstp); - if (retval > 0 && !svc_sendreply(transp, (xdrproc_t) _xdr_result, (char *)&result)) { - svcerr_systemerr (transp); - } - if (!svc_freeargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) { - fprintf (stderr, "%s", "unable to free arguments"); - exit (1); - } - if (!loc_apicbprog_0x00010001_freeresult (transp, _xdr_result, (caddr_t) &result)) - fprintf (stderr, "%s", "unable to free results"); - - return; -} diff --git a/loc_api/libloc_api-rpc/gen-3200/loc_api_cb_xdr.c b/loc_api/libloc_api-rpc/gen-3200/loc_api_cb_xdr.c deleted file mode 100644 index 1d7795ed..00000000 --- a/loc_api/libloc_api-rpc/gen-3200/loc_api_cb_xdr.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#include "loc_api_cb.h" - -bool_t -xdr_rpc_loc_event_cb_f_type_args (XDR *xdrs, rpc_loc_event_cb_f_type_args *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, &objp->cb_id)) - return FALSE; - if (!xdr_rpc_loc_client_handle_type (xdrs, &objp->loc_handle)) - return FALSE; - if (!xdr_rpc_loc_event_mask_type (xdrs, &objp->loc_event)) - return FALSE; - if (!xdr_pointer (xdrs, (char **)&objp->loc_event_payload, sizeof (rpc_loc_event_payload_u_type), (xdrproc_t) xdr_rpc_loc_event_payload_u_type)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_event_cb_f_type_rets (XDR *xdrs, rpc_loc_event_cb_f_type_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_int32 (xdrs, &objp->loc_event_cb_f_type_result)) - return FALSE; - return TRUE; -} diff --git a/loc_api/libloc_api-rpc/gen-3200/loc_api_clnt.c b/loc_api/libloc_api-rpc/gen-3200/loc_api_clnt.c deleted file mode 100644 index 79814d42..00000000 --- a/loc_api/libloc_api-rpc/gen-3200/loc_api_clnt.c +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#include /* for memset */ -#include "loc_api.h" - -/* Default timeout can be changed using clnt_control() */ -static struct timeval TIMEOUT = { 25, 0 }; - -enum clnt_stat -rpc_loc_api_null_0x00010001(void *argp, void *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_api_null, - (xdrproc_t) xdr_void, (caddr_t) argp, - (xdrproc_t) xdr_void, (caddr_t) clnt_res, - TIMEOUT)); -} - -enum clnt_stat -rpc_loc_api_rpc_glue_code_info_remote_0x00010001(void *argp, rpc_loc_api_rpc_glue_code_info_remote_rets *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_api_rpc_glue_code_info_remote, - (xdrproc_t) xdr_void, (caddr_t) argp, - (xdrproc_t) xdr_rpc_loc_api_rpc_glue_code_info_remote_rets, (caddr_t) clnt_res, - TIMEOUT)); -} - -enum clnt_stat -rpc_loc_open_0x00010001(rpc_loc_open_args *argp, rpc_loc_open_rets *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_open, - (xdrproc_t) xdr_rpc_loc_open_args, (caddr_t) argp, - (xdrproc_t) xdr_rpc_loc_open_rets, (caddr_t) clnt_res, - TIMEOUT)); -} - -enum clnt_stat -rpc_loc_close_0x00010001(rpc_loc_close_args *argp, rpc_loc_close_rets *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_close, - (xdrproc_t) xdr_rpc_loc_close_args, (caddr_t) argp, - (xdrproc_t) xdr_rpc_loc_close_rets, (caddr_t) clnt_res, - TIMEOUT)); -} - -enum clnt_stat -rpc_loc_start_fix_0x00010001(rpc_loc_start_fix_args *argp, rpc_loc_start_fix_rets *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_start_fix, - (xdrproc_t) xdr_rpc_loc_start_fix_args, (caddr_t) argp, - (xdrproc_t) xdr_rpc_loc_start_fix_rets, (caddr_t) clnt_res, - TIMEOUT)); -} - -enum clnt_stat -rpc_loc_stop_fix_0x00010001(rpc_loc_stop_fix_args *argp, rpc_loc_stop_fix_rets *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_stop_fix, - (xdrproc_t) xdr_rpc_loc_stop_fix_args, (caddr_t) argp, - (xdrproc_t) xdr_rpc_loc_stop_fix_rets, (caddr_t) clnt_res, - TIMEOUT)); -} - -enum clnt_stat -rpc_loc_ioctl_0x00010001(rpc_loc_ioctl_args *argp, rpc_loc_ioctl_rets *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_ioctl, - (xdrproc_t) xdr_rpc_loc_ioctl_args, (caddr_t) argp, - (xdrproc_t) xdr_rpc_loc_ioctl_rets, (caddr_t) clnt_res, - TIMEOUT)); -} - -enum clnt_stat -rpc_loc_api_api_versions_0x00010001(void *argp, rpc_loc_api_api_versions_rets *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_api_api_versions, - (xdrproc_t) xdr_void, (caddr_t) argp, - (xdrproc_t) xdr_rpc_loc_api_api_versions_rets, (caddr_t) clnt_res, - TIMEOUT)); -} diff --git a/loc_api/libloc_api-rpc/gen-3200/loc_api_common.xdr b/loc_api/libloc_api-rpc/gen-3200/loc_api_common.xdr deleted file mode 100644 index 7ef6357c..00000000 --- a/loc_api/libloc_api-rpc/gen-3200/loc_api_common.xdr +++ /dev/null @@ -1,803 +0,0 @@ -/* LOC_API TOOL VERSION: 3.28 */ -/*============================================================================= - L O C _ A P I _ C O M M O N . X D R - -GENERAL DESCRIPTION - This is an AUTO GENERATED file that provides an xdr compatible definition of - an api that represents the grouping of the different callback functions the - loc_api API supports. - - --------------------------------------------------------------------------- -Copyright (c) 2009, QUALCOMM USA, INC. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -· Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -· Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -· Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --------------------------------------------------------------------------- -=============================================================================*/ - -/*============================================================================= - - Edit History - - AUTO GENERATED - -Generated by following versions of Htorpc modules: -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/htorpc.pl#9 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/Start.pm#4 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/Htoxdr.pm#1 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/XDR.pm#7 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/Output.pm#26 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/Parser.pm#3 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/Metacomments.pm#2 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/SymbolTable.pm#4 - -=============================================================================*/ -/*============================================================================= -$Header$ -=============================================================================*/ - - - - -const RPC_LOC_EVENT_NI_NOTIFY_VERIFY_REQUEST = 0x00000010; - -const RPC_LOC_EVENT_IOCTL_REPORT = 0x00000080; - -const RPC_LOC_EVENT_LOCATION_SERVER_REQUEST = 0x00000040; - -const RPC_LOC_EVENT_RESERVED = 0x8000000000000000; - -const RPC_LOC_EVENT_PARSED_POSITION_REPORT = 0x00000001; - -const RPC_LOC_EVENT_ASSISTANCE_DATA_REQUEST = 0x00000020; - -const RPC_LOC_EVENT_NMEA_POSITION_REPORT = 0x00000008; - -const RPC_LOC_EVENT_SATELLITE_REPORT = 0x00000002; - -const RPC_LOC_EVENT_STATUS_REPORT = 0x00000100; - -const RPC_LOC_OPEN_VERSION = 0x00010001; -const RPC_LOC_CLOSE_VERSION = 0x00010001; -const RPC_LOC_START_FIX_VERSION = 0x00010001; -const RPC_LOC_STOP_FIX_VERSION = 0x00010001; -const RPC_LOC_IOCTL_VERSION = 0x00010001; -const RPC_LOC_EVENT_CB_F_TYPE_VERSION = 0x00010001; -const RPC_LOC_APIAPI_VERSION_IS_HASHKEY = 0; -const RPC_LOC_API_API_MAJOR_NUM = 0x0001; -typedef bool rpc_boolean; -typedef unsigned long rpc_uint32; - -typedef unsigned short rpc_uint16; - -typedef unsigned char rpc_uint8; - -typedef long rpc_int32; - -typedef unsigned char rpc_byte; - -typedef unsigned hyper rpc_uint64; - -typedef rpc_int32 rpc_loc_client_handle_type; - -typedef rpc_uint64 rpc_loc_event_mask_type; - -typedef rpc_uint64 rpc_loc_position_valid_mask_type; - -typedef rpc_uint32 rpc_loc_pos_technology_mask_type; - -enum rpc_loc_session_status_e_type { - RPC_LOC_SESS_STATUS_SUCCESS = 0, - RPC_LOC_SESS_STATUS_IN_PROGESS = 1, - RPC_LOC_SESS_STATUS_GENERAL_FAILURE = 2, - RPC_LOC_SESS_STATUS_TIMEOUT = 3, - RPC_LOC_SESS_STATUS_USER_END = 4, - RPC_LOC_SESS_STATUS_BAD_PARAMETER = 5, - RPC_LOC_SESS_STATUS_PHONE_OFFLINE = 6, - RPC_LOC_SESS_STATUS_ENGINE_LOCKED = 7, - RPC_LOC_SESS_STATUS_MAX = 268435456 -}; - -struct rpc_loc_calendar_time_s_type { - rpc_uint16 year; - unsigned char month; - unsigned char day_of_week; - unsigned char day; - unsigned char hour; - unsigned char minute; - unsigned char second; - rpc_uint16 millisecond; -}; - -struct rpc_loc_parsed_position_s_type { - rpc_loc_position_valid_mask_type valid_mask; - rpc_loc_session_status_e_type session_status; - rpc_loc_calendar_time_s_type timestamp_calendar; - rpc_uint64 timestamp_utc; - rpc_uint8 leap_seconds; - float time_unc; - double latitude; - double longitude; - float altitude_wrt_ellipsoid; - float altitude_wrt_mean_sea_level; - float speed_horizontal; - float speed_vertical; - float heading; - float hor_unc_circular; - float hor_unc_ellipse_semi_major; - float hor_unc_ellipse_semi_minor; - float hor_unc_ellipse_orient_azimuth; - float vert_unc; - float speed_unc; - float heading_unc; - unsigned char confidence_horizontal; - unsigned char confidence_vertical; - float magnetic_deviation; - rpc_loc_pos_technology_mask_type technology_mask; -}; - -enum rpc_loc_sv_system_e_type { - RPC_LOC_SV_SYSTEM_GPS = 1, - RPC_LOC_SV_SYSTEM_GALILEO = 2, - RPC_LOC_SV_SYSTEM_SBAS = 3, - RPC_LOC_SV_SYSTEM_COMPASS = 4, - RPC_LOC_SV_SYSTEM_GLONASS = 5, - RPC_LOC_SV_SYSTEM_MAX = 268435456 -}; - -enum rpc_loc_sv_status_e_type { - RPC_LOC_SV_STATUS_IDLE = 1, - RPC_LOC_SV_STATUS_SEARCH = 2, - RPC_LOC_SV_STATUS_TRACK = 3, - RPC_LOC_SV_STATUS_MAX = 268435456 -}; - -typedef rpc_uint32 rpc_loc_sv_info_valid_mask_type; - -struct rpc_loc_sv_info_s_type { - rpc_loc_sv_info_valid_mask_type valid_mask; - rpc_loc_sv_system_e_type system; - rpc_uint8 prn; - rpc_uint8 health_status; - rpc_loc_sv_status_e_type process_status; - rpc_boolean has_eph; - rpc_boolean has_alm; - float elevation; - float azimuth; - float snr; -}; - -typedef rpc_uint32 rpc_loc_gnss_info_valid_mask_type; - -struct rpc_loc_gnss_info_s_type { - rpc_loc_gnss_info_valid_mask_type valid_mask; - float position_dop; - float horizontal_dop; - float vertical_dop; - rpc_boolean altitude_assumed; - rpc_uint16 sv_count; - rpc_loc_sv_info_s_type sv_list; -}; - -struct rpc_loc_nmea_report_s_type { - rpc_uint16 length; - opaque nmea_sentences; -}; - -enum rpc_loc_status_event_e_type { - RPC_LOC_STATUS_EVENT_ENGINE_STATE = 1, - RPC_LOC_STATUS_EVENT_MAX = 268435456 -}; - -enum rpc_loc_engine_state_e_type { - RPC_LOC_ENGINE_STATE_ON = 1, - RPC_LOC_ENGINE_STATE_OFF = 2, - RPC_LOC_ENGINE_STATE_MAX = 268435456 -}; - -union rpc_loc_status_event_payload_u_type switch (rpc_loc_status_event_e_type disc) { - case RPC_LOC_STATUS_EVENT_ENGINE_STATE: - rpc_loc_engine_state_e_type engine_state; - default: - void; -}; - -struct rpc_loc_status_event_s_type { - rpc_loc_status_event_e_type event; - rpc_loc_status_event_payload_u_type payload; -}; - -enum rpc_loc_server_addr_e_type { - RPC_LOC_SERVER_ADDR_IPV4 = 1, - RPC_LOC_SERVER_ADDR_URL = 2, - RPC_LOC_SERVER_ADDR_MAX = 268435456 -}; - -struct rpc_loc_server_addr_ipv4_type { - rpc_uint32 addr; - rpc_uint16 port; -}; - -struct rpc_loc_server_addr_url_type { - rpc_uint16 length; - opaque addr; -}; - -union rpc_loc_server_addr_u_type switch (rpc_loc_server_addr_e_type disc) { - case RPC_LOC_SERVER_ADDR_IPV4: - rpc_loc_server_addr_ipv4_type ipv4; - case RPC_LOC_SERVER_ADDR_URL: - rpc_loc_server_addr_url_type url; - default: - void; -}; - -struct rpc_loc_server_info_s_type { - rpc_loc_server_addr_e_type addr_type; - rpc_loc_server_addr_u_type addr_info; -}; - -enum rpc_loc_ni_notify_verify_e_type { - RPC_LOC_NI_USER_NO_NOTIFY_NO_VERIFY = 1, - RPC_LOC_NI_USER_NOTIFY_ONLY = 2, - RPC_LOC_NI_USER_NOTIFY_VERIFY_ALLOW_NO_RESP = 3, - RPC_LOC_NI_USER_NOTIFY_VERIFY_NOT_ALLOW_NO_RESP = 4, - RPC_LOC_NI_USER_PRIVACY_OVERRIDE = 5, - RPC_LOC_NI_USER_NOTIFY_VERITY_TYPE_MAX = 268435456 -}; - -enum rpc_loc_ni_event_e_type { - RPC_LOC_NI_EVENT_VX_NOTIFY_VERIFY_REQ = 1, - RPC_LOC_NI_EVENT_SUPL_NOTIFY_VERIFY_REQ = 2, - RPC_LOC_NI_EVENT_UMTS_CP_NOTIFY_VERIFY_REQ = 3, - RPC_LOC_NI_EVENT_MAX = 268435456 -}; - -enum rpc_loc_ni_datacoding_scheme_e_type { - RPC_LOC_NI_PRESUPL_ISO646IRV = 0, - RPC_LOC_NI_PRESUPL_ISO8859 = 1, - RPC_LOC_NI_PRESUPL_UTF8 = 2, - RPC_LOC_NI_PRESUPL_UTF16 = 3, - RPC_LOC_NI_PRESUPL_UCS2 = 4, - RPC_LOC_NI_PRESUPL_GSM_DEFAULT = 5, - RPC_LOC_NI_PRESUPL_SHIFT_JIS = 6, - RPC_LOC_NI_PRESUPL_JIS = 7, - RPC_LOC_NI_PRESUPL_EUC = 8, - RPC_LOC_NI_PRESUPL_GB2312 = 9, - RPC_LOC_NI_PRESUPL_CNS11643 = 10, - RPC_LOC_NI_PRESUPL_KSC1001 = 11, - RPC_LOC_NI_PRESUPL_ENCODING_UNKNOWN = 2147483647, - RPC_LOC_NI_SS_GERMAN = 12, - RPC_LOC_NI_SS_ENGLISH = 13, - RPC_LOC_NI_SS_ITALIAN = 14, - RPC_LOC_NI_SS_FRENCH = 15, - RPC_LOC_NI_SS_SPANISH = 16, - RPC_LOC_NI_SS_DUTCH = 17, - RPC_LOC_NI_SS_SWEDISH = 18, - RPC_LOC_NI_SS_DANISH = 19, - RPC_LOC_NI_SS_PORTUGUESE = 20, - RPC_LOC_NI_SS_FINNISH = 21, - RPC_LOC_NI_SS_NORWEGIAN = 22, - RPC_LOC_NI_SS_GREEK = 23, - RPC_LOC_NI_SS_TURKISH = 24, - RPC_LOC_NI_SS_HUNGARIAN = 25, - RPC_LOC_NI_SS_POLISH = 26, - RPC_LOC_NI_SS_LANGUAGE_UNSPEC = 27, - RPC_LOC_NI_SUPL_UTF8 = 28, - RPC_LOC_NI_SUPL_UCS2 = 29, - RPC_LOC_NI_SUPL_GSM_DEFAULT = 30, - RPC_LOC_NI_SUPL_ENCODING_UNKNOWN = 2147483647 -}; - -enum rpc_loc_ni_vx_requester_id_encoding_scheme_e_type { - RPC_LOC_NI_VX_OCTET = 0, - RPC_LOC_NI_VX_EXN_PROTOCOL_MSG = 1, - RPC_LOC_NI_VX_ASCII = 2, - RPC_LOC_NI_VX_IA5 = 3, - RPC_LOC_NI_VX_UNICODE = 4, - RPC_LOC_NI_VX_SHIFT_JIS = 5, - RPC_LOC_NI_VX_KOREAN = 6, - RPC_LOC_NI_VX_LATIN_HEBREW = 7, - RPC_LOC_NI_VX_LATIN = 8, - RPC_LOC_NI_VX_GSM = 9, - RPC_LOC_NI_VX_ENCODING_TYPE_MAX = 268435456 -}; - -enum rpc_loc_ni_vx_pos_mode_e_type { - RPC_LOC_VX_MS_ASSISTED_ONLY = 1, - RPC_LOC_VX_MS_BASED_ONLY = 2, - RPC_LOC_VX_MS_ASSISTED_PREF_MSBASED_ALLWD = 3, - RPC_LOC_VX_MS_BASED_PREF_ASSISTED_ALLWD = 4, - RPC_LOC_VX_POS_MODE_MAX = 268435456 -}; - -struct rpc_loc_ni_vx_requester_id_s_type { - unsigned char requester_id_length; - opaque requester_id[200]; -}; - -struct rpc_loc_ni_vx_notify_verify_req_s_type { - rpc_loc_ni_notify_verify_e_type notification_priv_type; - unsigned char pos_qos_incl; - unsigned char pos_qos; - rpc_uint32 num_fixes; - rpc_uint32 tbf; - rpc_loc_ni_vx_pos_mode_e_type pos_mode; - rpc_loc_ni_vx_requester_id_encoding_scheme_e_type encoding_scheme; - rpc_loc_ni_vx_requester_id_s_type requester_id; - rpc_uint16 user_resp_timer_val; -}; - -enum rpc_loc_ni_supl_pos_method_e_type { - RPC_LOC_NI_POSMETHOD_AGPS_SETASSISTED = 1, - RPC_LOC_NI_POSMETHOD_AGPS_SETBASED = 2, - RPC_LOC_NI_POSMETHOD_AGPS_SETASSISTED_PREF = 3, - RPC_LOC_NI_POSMETHOD_AGPS_SETBASED_PREF = 4, - RPC_LOC_NI_POSMETHOD_AUTONOMOUS_GPS = 5, - RPC_LOC_NI_POSMETHOD_AFLT = 6, - RPC_LOC_NI_POSMETHOD_ECID = 7, - RPC_LOC_NI_POSMETHOD_EOTD = 8, - RPC_LOC_NI_POSMETHOD_OTDOA = 9, - RPC_LOC_NI_POSMETHOD_NO_POSITION = 10, - RPC_LOC_NI_POSMETHOD_MAX = 268435456 -}; - -struct rpc_loc_ni_supl_slp_session_id_s_type { - unsigned char presence; - opaque session_id[4]; - rpc_loc_server_info_s_type slp_address; -}; - -struct rpc_loc_ni_requestor_id_s_type { - unsigned char data_coding_scheme; - opaque requestor_id_string; - unsigned char string_len; -}; - -struct rpc_loc_ni_supl_client_name_s_type { - unsigned char data_coding_scheme; - opaque client_name_string; - unsigned char string_len; -}; - -struct rpc_loc_ni_supl_qop_s_type { - unsigned char bit_mask; - unsigned char horacc; - unsigned char veracc; - unsigned char maxLocAge; - unsigned char delay; -}; - -struct rpc_loc_ni_supl_notify_verify_req_s_type { - rpc_loc_ni_notify_verify_e_type notification_priv_type; - rpc_uint16 flags; - rpc_loc_ni_supl_slp_session_id_s_type supl_slp_session_id; - opaque supl_hash[8]; - rpc_loc_ni_datacoding_scheme_e_type datacoding_scheme; - rpc_loc_ni_supl_pos_method_e_type pos_method; - rpc_loc_ni_requestor_id_s_type requestor_id; - rpc_loc_ni_supl_client_name_s_type client_name; - rpc_loc_ni_supl_qop_s_type supl_qop; - rpc_uint16 user_response_timer; -}; - -struct rpc_loc_ni_ext_client_address_s_type { - unsigned char ext_client_address_len; - opaque ext_client_address; -}; - -enum rpc_loc_ni_location_type_e_type { - RPC_LOC_NI_LOCATIONTYPE_CURRENT_LOCATION = 1, - RPC_LOC_NI_LOCATIONTYPE_CURRENT_OR_LAST_KNOWN_LOCATION = 2, - RPC_LOC_NI_LOCATIONTYPE_INITIAL_LOCATION = 3, - RPC_LOC_NI_LOCATIONTYPE_MAX = 268435456 -}; - -struct rpc_loc_ni_deferred_location_s_type { - unsigned char unused_bits; - unsigned char ms_available; -}; - -struct rpc_loc_ni_codeword_string_s_type { - unsigned char data_coding_scheme; - opaque lcs_codeword_string; - unsigned char string_len; -}; - -struct rpc_loc_ni_service_type_id_s_type { - unsigned char lcs_service_type_id; -}; - -struct rpc_loc_ni_umts_cp_notify_verify_req_s_type { - rpc_loc_ni_notify_verify_e_type notification_priv_type; - unsigned char invoke_id; - rpc_uint16 flags; - unsigned char notification_length; - opaque notification_text; - rpc_loc_ni_datacoding_scheme_e_type datacoding_scheme; - rpc_loc_ni_ext_client_address_s_type ext_client_address_data; - rpc_loc_ni_location_type_e_type location_type; - rpc_loc_ni_deferred_location_s_type deferred_location; - rpc_loc_ni_requestor_id_s_type requestor_id; - rpc_loc_ni_codeword_string_s_type codeword_string; - rpc_loc_ni_service_type_id_s_type service_type_id; - rpc_uint16 user_response_timer; -}; - -union rpc_loc_ni_event_payload_u_type switch (rpc_loc_ni_event_e_type disc) { - case RPC_LOC_NI_EVENT_VX_NOTIFY_VERIFY_REQ: - rpc_loc_ni_vx_notify_verify_req_s_type vx_req; - case RPC_LOC_NI_EVENT_SUPL_NOTIFY_VERIFY_REQ: - rpc_loc_ni_supl_notify_verify_req_s_type supl_req; - case RPC_LOC_NI_EVENT_UMTS_CP_NOTIFY_VERIFY_REQ: - rpc_loc_ni_umts_cp_notify_verify_req_s_type umts_cp_req; - default: - void; -}; - -struct rpc_loc_ni_event_s_type { - rpc_loc_ni_event_e_type event; - rpc_loc_ni_event_payload_u_type payload; -}; - -enum rpc_loc_assist_data_request_e_type { - RPC_LOC_ASSIST_DATA_TIME_REQ = 1, - RPC_LOC_ASSIST_DATA_PREDICTED_ORBITS_REQ = 2, - RPC_LOC_ASSIST_DATA_MAX = 268435456 -}; - -typedef string rpc_struct_loc_time_download_source_s_type_servers_ptr; - -typedef rpc_struct_loc_time_download_source_s_type_servers_ptr rpc_struct_loc_time_download_source_s_type_servers[3]; - -struct rpc_loc_time_download_source_s_type { - rpc_uint32 delay_threshold; - rpc_struct_loc_time_download_source_s_type_servers servers; -}; - -typedef string rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr; - -typedef rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr rpc_struct_loc_predicted_orbits_data_source_s_type_servers[3]; - -struct rpc_loc_predicted_orbits_data_source_s_type { - rpc_uint32 max_file_size; - rpc_uint32 max_part_size; - rpc_struct_loc_predicted_orbits_data_source_s_type_servers servers; -}; - -union rpc_loc_assist_data_request_payload_u_type switch (rpc_loc_assist_data_request_e_type disc) { - case RPC_LOC_ASSIST_DATA_TIME_REQ: - rpc_loc_time_download_source_s_type time_download; - case RPC_LOC_ASSIST_DATA_PREDICTED_ORBITS_REQ: - rpc_loc_predicted_orbits_data_source_s_type data_download; - default: - void; -}; - -struct rpc_loc_assist_data_request_s_type { - rpc_loc_assist_data_request_e_type event; - rpc_loc_assist_data_request_payload_u_type payload; -}; - -typedef rpc_uint32 rpc_loc_server_connection_handle; - -enum rpc_loc_server_protocol_e_type { - RPC_LOC_SERVER_PROTOCOL_DEFAULT = 0, - RPC_LOC_SERVER_PROTOCOL_SUPL = 1, - RPC_LOC_SERVER_PROTOCOL_VX_MPC = 2, - RPC_LOC_SERVER_PROTOCOL_VX_PDE = 3, - RPC_LOC_SERVER_PROTOCOL_MAX = 16777216 -}; - -enum rpc_loc_server_request_e_type { - RPC_LOC_SERVER_REQUEST_OPEN = 1, - RPC_LOC_SERVER_REQUEST_CLOSE = 2, - RPC_LOC_SERVER_REQUEST_MAX = 268435456 -}; - -struct rpc_loc_server_open_req_s_type { - rpc_loc_server_connection_handle conn_handle; - rpc_loc_server_protocol_e_type protocol; -}; - -struct rpc_loc_server_close_req_s_type { - rpc_loc_server_connection_handle conn_handle; -}; - -union rpc_loc_server_request_u_type switch (rpc_loc_server_request_e_type disc) { - case RPC_LOC_SERVER_REQUEST_OPEN: - rpc_loc_server_open_req_s_type open_req; - case RPC_LOC_SERVER_REQUEST_CLOSE: - rpc_loc_server_close_req_s_type close_req; - default: - void; -}; - -struct rpc_loc_server_request_s_type { - rpc_loc_server_request_e_type event; - rpc_loc_server_request_u_type payload; -}; - -struct rpc_loc_reserved_payload_s_type { - rpc_uint16 data_size; - opaque data<>; -}; - -enum rpc_loc_ioctl_e_type { - RPC_LOC_IOCTL_GET_API_VERSION = 1, - RPC_LOC_IOCTL_SET_FIX_CRITERIA = 2, - RPC_LOC_IOCTL_GET_FIX_CRITERIA = 3, - RPC_LOC_IOCTL_SERVICE_START_INDEX = 400, - RPC_LOC_IOCTL_INFORM_NI_USER_RESPONSE = 400, - RPC_LOC_IOCTL_INJECT_PREDICTED_ORBITS_DATA = 401, - RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_VALIDITY = 402, - RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_SOURCE = 403, - RPC_LOC_IOCTL_SET_PREDICTED_ORBITS_DATA_AUTO_DOWNLOAD = 404, - RPC_LOC_IOCTL_INJECT_UTC_TIME = 405, - RPC_LOC_IOCTL_INJECT_RTC_VALUE = 406, - RPC_LOC_IOCTL_INJECT_POSITION = 407, - RPC_LOC_IOCTL_QUERY_ENGINE_STATE = 408, - RPC_LOC_IOCTL_INFORM_SERVER_OPEN_STATUS = 409, - RPC_LOC_IOCTL_INFORM_SERVER_CLOSE_STATUS = 410, - RPC_LOC_IOCTL_NV_SETTINGS_START_INDEX = 800, - RPC_LOC_IOCTL_SET_ENGINE_LOCK = 800, - RPC_LOC_IOCTL_GET_ENGINE_LOCK = 801, - RPC_LOC_IOCTL_SET_SBAS_CONFIG = 802, - RPC_LOC_IOCTL_GET_SBAS_CONFIG = 803, - RPC_LOC_IOCTL_SET_NMEA_TYPES = 804, - RPC_LOC_IOCTL_GET_NMEA_TYPES = 805, - RPC_LOC_IOCTL_SET_CDMA_PDE_SERVER_ADDR = 806, - RPC_LOC_IOCTL_GET_CDMA_PDE_SERVER_ADDR = 807, - RPC_LOC_IOCTL_SET_CDMA_MPC_SERVER_ADDR = 808, - RPC_LOC_IOCTL_GET_CDMA_MPC_SERVER_ADDR = 809, - RPC_LOC_IOCTL_SET_UMTS_SLP_SERVER_ADDR = 810, - RPC_LOC_IOCTL_GET_UMTS_SLP_SERVER_ADDR = 811, - RPC_LOC_IOCTL_SET_ON_DEMAND_LPM = 812, - RPC_LOC_IOCTL_GET_ON_DEMAND_LPM = 813, - RPC_LOC_IOCTL_PROPRIETARY_START_INDEX = 1000, - RPC_LOC_IOCTL_DELETE_ASSIST_DATA = 1000, - RPC_LOC_IOCTL_SET_CUSTOM_PDE_SERVER_ADDR = 1001, - RPC_LOC_IOCTL_GET_CUSTOM_PDE_SERVER_ADDR = 1002, - RPC_LOC_IOCTL_THIRD_PARTY_START_INDEX = 1073741824 -}; - -struct rpc_loc_api_version_s_type { - unsigned char major; - unsigned char minor; -}; - -enum rpc_loc_fix_recurrence_e_type { - RPC_LOC_PERIODIC_FIX = 1, - RPC_LOC_SINGLE_FIX = 2, - RPC_LOC_FIX_SESSION_TYPE_MAX = 268435456 -}; - -enum rpc_loc_operation_mode_e_type { - RPC_LOC_OPER_MODE_DEFAULT = 1, - RPC_LOC_OPER_MODE_MSB = 2, - RPC_LOC_OPER_MODE_MSA = 3, - RPC_LOC_OPER_MODE_STANDALONE = 4, - RPC_LOC_OPER_MODE_SPEED_OPTIMAL = 5, - RPC_LOC_OPER_MODE_ACCURACY_OPTIMAL = 6, - RPC_LOC_OPER_MODE_DATA_OPTIMAL = 7, - RPC_LOC_OPER_MODE_MAX = 268435456 -}; - -enum rpc_loc_notify_e_type { - RPC_LOC_NOTIFY_ON_INTERVAL = 1, - RPC_LOC_NOTIFY_ON_DISTANCE = 2, - RPC_LOC_NOTIFY_ON_ANY = 3, - RPC_LOC_NOTIFY_ON_ALL = 4, - RPC_LOC_NOTIFY_TYPE_MAX = 268435456 -}; - -struct rpc_loc_fix_criteria_s_type { - rpc_uint32 valid_mask; - rpc_loc_fix_recurrence_e_type recurrence_type; - rpc_loc_operation_mode_e_type preferred_operation_mode; - rpc_uint32 preferred_accuracy; - rpc_uint32 preferred_response_time; - rpc_boolean intermediate_pos_report_enabled; - rpc_loc_notify_e_type notify_type; - rpc_uint32 min_interval; - float min_distance; - rpc_uint32 min_dist_sample_interval; -}; - -enum rpc_loc_ni_user_resp_e_type { - RPC_LOC_NI_LCS_NOTIFY_VERIFY_ACCEPT = 1, - RPC_LOC_NI_LCS_NOTIFY_VERIFY_DENY = 2, - RPC_LOC_NI_LCS_NOTIFY_VERIFY_NORESP = 3, - RPC_LOC_NI_LCS_NOTIFY_VERIFY_MAX = 268435456 -}; - -struct rpc_loc_user_verify_s_type { - rpc_loc_ni_user_resp_e_type user_resp; - rpc_loc_ni_event_s_type ni_event_pass_back; -}; - -enum rpc_loc_predicted_orbits_data_format_e_type { - RPC_LOC_PREDICTED_ORBITS_XTRA = 0, - RPC_LOC_PREDICTED_ORBITS_FORMAT_MAX = 268435456 -}; - -struct rpc_loc_predicted_orbits_data_s_type { - rpc_loc_predicted_orbits_data_format_e_type format_type; - rpc_uint32 total_size; - rpc_uint8 total_parts; - rpc_uint8 part; - rpc_uint16 part_len; - opaque data_ptr<>; -}; - -struct rpc_loc_predicted_orbits_data_validity_report_s_type { - rpc_uint64 start_time_utc; - rpc_uint16 valid_duration_hrs; -}; - -struct rpc_loc_predicted_orbits_auto_download_config_s_type { - rpc_boolean enable; - unsigned char auto_check_every_hrs; -}; - -struct rpc_loc_assist_data_time_s_type { - rpc_uint64 time_utc; - rpc_uint32 uncertainty; -}; - -typedef rpc_uint64 rpc_loc_assist_pos_valid_mask_type; - -struct rpc_loc_assist_data_pos_s_type { - rpc_loc_assist_pos_valid_mask_type valid_mask; - rpc_uint64 timestamp_utc; - double latitude; - double longitude; - float altitude_wrt_ellipsoid; - float altitude_wrt_mean_sea_level; - float hor_unc_circular; - float vert_unc; - unsigned char confidence_horizontal; - unsigned char confidence_vertical; -}; - -enum rpc_loc_server_open_status_e_type { - RPC_LOC_SERVER_OPEN_SUCCESS = 1, - RPC_LOC_SERVER_OPEN_FAIL = 2, - RPC_LOC_SERVER_OPEN_STATUS_MAX = 268435456 -}; - -struct rpc_loc_server_open_status_s_type { - rpc_loc_server_connection_handle conn_handle; - rpc_loc_server_open_status_e_type open_status; - string apn_name<>; -}; - -enum rpc_loc_server_close_status_e_type { - RPC_LOC_SERVER_CLOSE_SUCCESS = 1, - RPC_LOC_SERVER_CLOSE_FAIL = 2, - RPC_LOC_SERVER_CLOSE_STATUS_MAX = 268435456 -}; - -struct rpc_loc_server_close_status_s_type { - rpc_loc_server_connection_handle conn_handle; - rpc_loc_server_close_status_e_type close_status; -}; - -enum rpc_loc_lock_e_type { - RPC_LOC_LOCK_NONE = 1, - RPC_LOC_LOCK_MI = 2, - RPC_LOC_LOCK_MT = 3, - RPC_LOC_LOCK_ALL = 4, - RPC_LOC_LOCK_MAX = 268435456 -}; - -typedef rpc_uint32 rpc_loc_nmea_sentence_type; - -typedef rpc_uint32 rpc_loc_assist_data_type; - -struct rpc_loc_assist_data_delete_s_type { - rpc_loc_assist_data_type type; - rpc_uint32 reserved[8]; -}; - -union rpc_loc_ioctl_data_u_type switch (rpc_loc_ioctl_e_type disc) { - case RPC_LOC_IOCTL_SET_FIX_CRITERIA: - rpc_loc_fix_criteria_s_type fix_criteria; - case RPC_LOC_IOCTL_INFORM_NI_USER_RESPONSE: - rpc_loc_user_verify_s_type user_verify_resp; - case RPC_LOC_IOCTL_INJECT_PREDICTED_ORBITS_DATA: - rpc_loc_predicted_orbits_data_s_type predicted_orbits_data; - case RPC_LOC_IOCTL_SET_PREDICTED_ORBITS_DATA_AUTO_DOWNLOAD: - rpc_loc_predicted_orbits_auto_download_config_s_type predicted_orbits_auto_download; - case RPC_LOC_IOCTL_INJECT_UTC_TIME: - rpc_loc_assist_data_time_s_type assistance_data_time; - case RPC_LOC_IOCTL_INJECT_POSITION: - rpc_loc_assist_data_pos_s_type assistance_data_position; - case RPC_LOC_IOCTL_INFORM_SERVER_OPEN_STATUS: - rpc_loc_server_open_status_s_type conn_open_status; - case RPC_LOC_IOCTL_INFORM_SERVER_CLOSE_STATUS: - rpc_loc_server_close_status_s_type conn_close_status; - case RPC_LOC_IOCTL_SET_ENGINE_LOCK: - rpc_loc_lock_e_type engine_lock; - case RPC_LOC_IOCTL_SET_SBAS_CONFIG: - rpc_boolean sbas_mode; - case RPC_LOC_IOCTL_SET_NMEA_TYPES: - rpc_loc_nmea_sentence_type nmea_types; - case RPC_LOC_IOCTL_SET_ON_DEMAND_LPM: - rpc_boolean on_demand_lpm; - case RPC_LOC_IOCTL_SET_CDMA_PDE_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_CDMA_MPC_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_UMTS_SLP_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_CUSTOM_PDE_SERVER_ADDR: - rpc_loc_server_info_s_type server_addr; - case RPC_LOC_IOCTL_DELETE_ASSIST_DATA: - rpc_loc_assist_data_delete_s_type assist_data_delete; - default: - void; -}; - -union rpc_loc_ioctl_callback_data_u_type switch (rpc_loc_ioctl_e_type disc) { - case RPC_LOC_IOCTL_GET_API_VERSION: - rpc_loc_api_version_s_type api_version; - case RPC_LOC_IOCTL_GET_FIX_CRITERIA: - rpc_loc_fix_criteria_s_type fix_criteria; - case RPC_LOC_IOCTL_GET_ENGINE_LOCK: - rpc_loc_lock_e_type engine_lock; - case RPC_LOC_IOCTL_GET_SBAS_CONFIG: - rpc_boolean sbas_mode; - case RPC_LOC_IOCTL_GET_NMEA_TYPES: - rpc_loc_nmea_sentence_type nmea_types; - case RPC_LOC_IOCTL_GET_ON_DEMAND_LPM: - rpc_boolean on_demand_lpm; - case RPC_LOC_IOCTL_GET_CDMA_PDE_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_CDMA_MPC_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_UMTS_SLP_SERVER_ADDR: - rpc_loc_server_info_s_type server_addr; - case RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_SOURCE: - rpc_loc_predicted_orbits_data_source_s_type predicted_orbits_data_source; - case RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_VALIDITY: - rpc_loc_predicted_orbits_data_validity_report_s_type predicted_orbits_data_validity; - default: - void; -}; - -struct rpc_loc_ioctl_callback_s_type { - rpc_loc_ioctl_e_type type; - rpc_int32 status; - rpc_loc_ioctl_callback_data_u_type data; -}; - -union rpc_loc_event_payload_u_type switch (unsigned hyper disc) { - case RPC_LOC_EVENT_PARSED_POSITION_REPORT: - rpc_loc_parsed_position_s_type parsed_location_report; - case RPC_LOC_EVENT_SATELLITE_REPORT: - rpc_loc_gnss_info_s_type gnss_report; - case RPC_LOC_EVENT_NMEA_POSITION_REPORT: - rpc_loc_nmea_report_s_type nmea_report; - case RPC_LOC_EVENT_NI_NOTIFY_VERIFY_REQUEST: - rpc_loc_ni_event_s_type ni_request; - case RPC_LOC_EVENT_ASSISTANCE_DATA_REQUEST: - rpc_loc_assist_data_request_s_type assist_data_request; - case RPC_LOC_EVENT_LOCATION_SERVER_REQUEST: - rpc_loc_server_request_s_type loc_server_request; - case RPC_LOC_EVENT_IOCTL_REPORT: - rpc_loc_ioctl_callback_s_type ioctl_report; - case RPC_LOC_EVENT_STATUS_REPORT: - rpc_loc_status_event_s_type status_report; - case RPC_LOC_EVENT_RESERVED: - rpc_loc_reserved_payload_s_type reserved; - default: - void; -}; - -const RPC_LOC_API_NULL_VERSION = 0x00010001; -const RPC_LOC_API_RPC_GLUE_CODE_INFO_REMOTE_VERSION = 0x00010001; diff --git a/loc_api/libloc_api-rpc/gen-3200/loc_api_common_xdr.c b/loc_api/libloc_api-rpc/gen-3200/loc_api_common_xdr.c deleted file mode 100644 index 7b37b9c3..00000000 --- a/loc_api/libloc_api-rpc/gen-3200/loc_api_common_xdr.c +++ /dev/null @@ -1,1441 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#include "loc_api_common.h" - -bool_t -xdr_rpc_boolean (XDR *xdrs, rpc_boolean *objp) -{ - register int32_t *buf; - - if (!xdr_bool (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_uint32 (XDR *xdrs, rpc_uint32 *objp) -{ - register int32_t *buf; - - if (!xdr_u_long (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_uint16 (XDR *xdrs, rpc_uint16 *objp) -{ - register int32_t *buf; - - if (!xdr_u_short (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_uint8 (XDR *xdrs, rpc_uint8 *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_int32 (XDR *xdrs, rpc_int32 *objp) -{ - register int32_t *buf; - - if (!xdr_long (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_byte (XDR *xdrs, rpc_byte *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_uint64 (XDR *xdrs, rpc_uint64 *objp) -{ - register int32_t *buf; - - if (!xdr_u_quad_t (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_client_handle_type (XDR *xdrs, rpc_loc_client_handle_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_int32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_event_mask_type (XDR *xdrs, rpc_loc_event_mask_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint64 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_position_valid_mask_type (XDR *xdrs, rpc_loc_position_valid_mask_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint64 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_pos_technology_mask_type (XDR *xdrs, rpc_loc_pos_technology_mask_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_session_status_e_type (XDR *xdrs, rpc_loc_session_status_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_calendar_time_s_type (XDR *xdrs, rpc_loc_calendar_time_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint16 (xdrs, &objp->year)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->month)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->day_of_week)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->day)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->hour)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->minute)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->second)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->millisecond)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_parsed_position_s_type (XDR *xdrs, rpc_loc_parsed_position_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_position_valid_mask_type (xdrs, &objp->valid_mask)) - return FALSE; - if (!xdr_rpc_loc_session_status_e_type (xdrs, &objp->session_status)) - return FALSE; - if (!xdr_rpc_loc_calendar_time_s_type (xdrs, &objp->timestamp_calendar)) - return FALSE; - if (!xdr_rpc_uint64 (xdrs, &objp->timestamp_utc)) - return FALSE; - if (!xdr_rpc_uint8 (xdrs, &objp->leap_seconds)) - return FALSE; - if (!xdr_float (xdrs, &objp->time_unc)) - return FALSE; - if (!xdr_double (xdrs, &objp->latitude)) - return FALSE; - if (!xdr_double (xdrs, &objp->longitude)) - return FALSE; - if (!xdr_float (xdrs, &objp->altitude_wrt_ellipsoid)) - return FALSE; - if (!xdr_float (xdrs, &objp->altitude_wrt_mean_sea_level)) - return FALSE; - if (!xdr_float (xdrs, &objp->speed_horizontal)) - return FALSE; - if (!xdr_float (xdrs, &objp->speed_vertical)) - return FALSE; - if (!xdr_float (xdrs, &objp->heading)) - return FALSE; - if (!xdr_float (xdrs, &objp->hor_unc_circular)) - return FALSE; - if (!xdr_float (xdrs, &objp->hor_unc_ellipse_semi_major)) - return FALSE; - if (!xdr_float (xdrs, &objp->hor_unc_ellipse_semi_minor)) - return FALSE; - if (!xdr_float (xdrs, &objp->hor_unc_ellipse_orient_azimuth)) - return FALSE; - if (!xdr_float (xdrs, &objp->vert_unc)) - return FALSE; - if (!xdr_float (xdrs, &objp->speed_unc)) - return FALSE; - if (!xdr_float (xdrs, &objp->heading_unc)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->confidence_horizontal)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->confidence_vertical)) - return FALSE; - if (!xdr_float (xdrs, &objp->magnetic_deviation)) - return FALSE; - if (!xdr_rpc_loc_pos_technology_mask_type (xdrs, &objp->technology_mask)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_sv_system_e_type (XDR *xdrs, rpc_loc_sv_system_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_sv_status_e_type (XDR *xdrs, rpc_loc_sv_status_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_sv_info_valid_mask_type (XDR *xdrs, rpc_loc_sv_info_valid_mask_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_sv_info_s_type (XDR *xdrs, rpc_loc_sv_info_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_sv_info_valid_mask_type (xdrs, &objp->valid_mask)) - return FALSE; - if (!xdr_rpc_loc_sv_system_e_type (xdrs, &objp->system)) - return FALSE; - if (!xdr_rpc_uint8 (xdrs, &objp->prn)) - return FALSE; - if (!xdr_rpc_uint8 (xdrs, &objp->health_status)) - return FALSE; - if (!xdr_rpc_loc_sv_status_e_type (xdrs, &objp->process_status)) - return FALSE; - if (!xdr_rpc_boolean (xdrs, &objp->has_eph)) - return FALSE; - if (!xdr_rpc_boolean (xdrs, &objp->has_alm)) - return FALSE; - if (!xdr_float (xdrs, &objp->elevation)) - return FALSE; - if (!xdr_float (xdrs, &objp->azimuth)) - return FALSE; - if (!xdr_float (xdrs, &objp->snr)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_gnss_info_valid_mask_type (XDR *xdrs, rpc_loc_gnss_info_valid_mask_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_gnss_info_s_type (XDR *xdrs, rpc_loc_gnss_info_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_gnss_info_valid_mask_type (xdrs, &objp->valid_mask)) - return FALSE; - if (!xdr_float (xdrs, &objp->position_dop)) - return FALSE; - if (!xdr_float (xdrs, &objp->horizontal_dop)) - return FALSE; - if (!xdr_float (xdrs, &objp->vertical_dop)) - return FALSE; - if (!xdr_rpc_boolean (xdrs, &objp->altitude_assumed)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->sv_count)) - return FALSE; - if (!xdr_array (xdrs, (char **)&objp->sv_list.sv_list_val, (u_int *) &objp->sv_list.sv_list_len, RPC_LOC_API_MAX_SV_COUNT, - sizeof (rpc_loc_sv_info_s_type), (xdrproc_t) xdr_rpc_loc_sv_info_s_type)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_nmea_report_s_type (XDR *xdrs, rpc_loc_nmea_report_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint16 (xdrs, &objp->length)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->nmea_sentences.nmea_sentences_val, (u_int *) &objp->nmea_sentences.nmea_sentences_len, RPC_LOC_API_MAX_NMEA_STRING_LENGTH)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_status_event_e_type (XDR *xdrs, rpc_loc_status_event_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_engine_state_e_type (XDR *xdrs, rpc_loc_engine_state_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_status_event_payload_u_type (XDR *xdrs, rpc_loc_status_event_payload_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_status_event_e_type (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_STATUS_EVENT_ENGINE_STATE: - if (!xdr_rpc_loc_engine_state_e_type (xdrs, &objp->rpc_loc_status_event_payload_u_type_u.engine_state)) - return FALSE; - break; - default: - break; - } - return TRUE; -} - -bool_t -xdr_rpc_loc_status_event_s_type (XDR *xdrs, rpc_loc_status_event_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_status_event_e_type (xdrs, &objp->event)) - return FALSE; - if (!xdr_rpc_loc_status_event_payload_u_type (xdrs, &objp->payload)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_addr_e_type (XDR *xdrs, rpc_loc_server_addr_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_addr_ipv4_type (XDR *xdrs, rpc_loc_server_addr_ipv4_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, &objp->addr)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->port)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_addr_url_type (XDR *xdrs, rpc_loc_server_addr_url_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint16 (xdrs, &objp->length)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->addr.addr_val, (u_int *) &objp->addr.addr_len, RPC_LOC_API_MAX_SERVER_ADDR_LENGTH)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_addr_u_type (XDR *xdrs, rpc_loc_server_addr_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_server_addr_e_type (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_SERVER_ADDR_IPV4: - if (!xdr_rpc_loc_server_addr_ipv4_type (xdrs, &objp->rpc_loc_server_addr_u_type_u.ipv4)) - return FALSE; - break; - case RPC_LOC_SERVER_ADDR_URL: - if (!xdr_rpc_loc_server_addr_url_type (xdrs, &objp->rpc_loc_server_addr_u_type_u.url)) - return FALSE; - break; - default: - break; - } - return TRUE; -} - -bool_t -xdr_rpc_loc_server_info_s_type (XDR *xdrs, rpc_loc_server_info_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_server_addr_e_type (xdrs, &objp->addr_type)) - return FALSE; - if (!xdr_rpc_loc_server_addr_u_type (xdrs, &objp->addr_info)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_notify_verify_e_type (XDR *xdrs, rpc_loc_ni_notify_verify_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_event_e_type (XDR *xdrs, rpc_loc_ni_event_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_datacoding_scheme_e_type (XDR *xdrs, rpc_loc_ni_datacoding_scheme_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_vx_requester_id_encoding_scheme_e_type (XDR *xdrs, rpc_loc_ni_vx_requester_id_encoding_scheme_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_vx_pos_mode_e_type (XDR *xdrs, rpc_loc_ni_vx_pos_mode_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_vx_requester_id_s_type (XDR *xdrs, rpc_loc_ni_vx_requester_id_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_u_char (xdrs, &objp->requester_id_length)) - return FALSE; - if (!xdr_opaque (xdrs, objp->requester_id, 200)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_vx_notify_verify_req_s_type (XDR *xdrs, rpc_loc_ni_vx_notify_verify_req_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ni_notify_verify_e_type (xdrs, &objp->notification_priv_type)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->pos_qos_incl)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->pos_qos)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->num_fixes)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->tbf)) - return FALSE; - if (!xdr_rpc_loc_ni_vx_pos_mode_e_type (xdrs, &objp->pos_mode)) - return FALSE; - if (!xdr_rpc_loc_ni_vx_requester_id_encoding_scheme_e_type (xdrs, &objp->encoding_scheme)) - return FALSE; - if (!xdr_rpc_loc_ni_vx_requester_id_s_type (xdrs, &objp->requester_id)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->user_resp_timer_val)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_supl_pos_method_e_type (XDR *xdrs, rpc_loc_ni_supl_pos_method_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_supl_slp_session_id_s_type (XDR *xdrs, rpc_loc_ni_supl_slp_session_id_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_u_char (xdrs, &objp->presence)) - return FALSE; - if (!xdr_opaque (xdrs, objp->session_id, 4)) - return FALSE; - if (!xdr_rpc_loc_server_info_s_type (xdrs, &objp->slp_address)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_requestor_id_s_type (XDR *xdrs, rpc_loc_ni_requestor_id_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, &objp->data_coding_scheme)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->requestor_id_string.requestor_id_string_val, (u_int *) &objp->requestor_id_string.requestor_id_string_len, RPC_LOC_NI_MAX_REQUESTOR_ID_LENGTH)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->string_len)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_supl_client_name_s_type (XDR *xdrs, rpc_loc_ni_supl_client_name_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, &objp->data_coding_scheme)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->client_name_string.client_name_string_val, (u_int *) &objp->client_name_string.client_name_string_len, RPC_LOC_NI_MAX_CLIENT_NAME_LENGTH)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->string_len)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_supl_qop_s_type (XDR *xdrs, rpc_loc_ni_supl_qop_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, &objp->bit_mask)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->horacc)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->veracc)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->maxLocAge)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->delay)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_supl_notify_verify_req_s_type (XDR *xdrs, rpc_loc_ni_supl_notify_verify_req_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_rpc_loc_ni_notify_verify_e_type (xdrs, &objp->notification_priv_type)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->flags)) - return FALSE; - if (!xdr_rpc_loc_ni_supl_slp_session_id_s_type (xdrs, &objp->supl_slp_session_id)) - return FALSE; - if (!xdr_opaque (xdrs, objp->supl_hash, 8)) - return FALSE; - if (!xdr_rpc_loc_ni_datacoding_scheme_e_type (xdrs, &objp->datacoding_scheme)) - return FALSE; - if (!xdr_rpc_loc_ni_supl_pos_method_e_type (xdrs, &objp->pos_method)) - return FALSE; - if (!xdr_rpc_loc_ni_requestor_id_s_type (xdrs, &objp->requestor_id)) - return FALSE; - if (!xdr_rpc_loc_ni_supl_client_name_s_type (xdrs, &objp->client_name)) - return FALSE; - if (!xdr_rpc_loc_ni_supl_qop_s_type (xdrs, &objp->supl_qop)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->user_response_timer)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_ext_client_address_s_type (XDR *xdrs, rpc_loc_ni_ext_client_address_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, &objp->ext_client_address_len)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->ext_client_address.ext_client_address_val, (u_int *) &objp->ext_client_address.ext_client_address_len, RPC_LOC_NI_MAX_EXT_CLIENT_ADDRESS)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_location_type_e_type (XDR *xdrs, rpc_loc_ni_location_type_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_deferred_location_s_type (XDR *xdrs, rpc_loc_ni_deferred_location_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, &objp->unused_bits)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->ms_available)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_codeword_string_s_type (XDR *xdrs, rpc_loc_ni_codeword_string_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, &objp->data_coding_scheme)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->lcs_codeword_string.lcs_codeword_string_val, (u_int *) &objp->lcs_codeword_string.lcs_codeword_string_len, RPC_LOC_NI_CODEWORD_LENGTH)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->string_len)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_service_type_id_s_type (XDR *xdrs, rpc_loc_ni_service_type_id_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, &objp->lcs_service_type_id)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_umts_cp_notify_verify_req_s_type (XDR *xdrs, rpc_loc_ni_umts_cp_notify_verify_req_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ni_notify_verify_e_type (xdrs, &objp->notification_priv_type)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->invoke_id)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->flags)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->notification_length)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->notification_text.notification_text_val, (u_int *) &objp->notification_text.notification_text_len, RPC_LOC_NI_MAX_CLIENT_NAME_LENGTH)) - return FALSE; - if (!xdr_rpc_loc_ni_datacoding_scheme_e_type (xdrs, &objp->datacoding_scheme)) - return FALSE; - if (!xdr_rpc_loc_ni_ext_client_address_s_type (xdrs, &objp->ext_client_address_data)) - return FALSE; - if (!xdr_rpc_loc_ni_location_type_e_type (xdrs, &objp->location_type)) - return FALSE; - if (!xdr_rpc_loc_ni_deferred_location_s_type (xdrs, &objp->deferred_location)) - return FALSE; - if (!xdr_rpc_loc_ni_requestor_id_s_type (xdrs, &objp->requestor_id)) - return FALSE; - if (!xdr_rpc_loc_ni_codeword_string_s_type (xdrs, &objp->codeword_string)) - return FALSE; - if (!xdr_rpc_loc_ni_service_type_id_s_type (xdrs, &objp->service_type_id)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->user_response_timer)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_event_payload_u_type (XDR *xdrs, rpc_loc_ni_event_payload_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ni_event_e_type (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_NI_EVENT_VX_NOTIFY_VERIFY_REQ: - if (!xdr_rpc_loc_ni_vx_notify_verify_req_s_type (xdrs, &objp->rpc_loc_ni_event_payload_u_type_u.vx_req)) - return FALSE; - break; - case RPC_LOC_NI_EVENT_SUPL_NOTIFY_VERIFY_REQ: - if (!xdr_rpc_loc_ni_supl_notify_verify_req_s_type (xdrs, &objp->rpc_loc_ni_event_payload_u_type_u.supl_req)) - return FALSE; - break; - case RPC_LOC_NI_EVENT_UMTS_CP_NOTIFY_VERIFY_REQ: - if (!xdr_rpc_loc_ni_umts_cp_notify_verify_req_s_type (xdrs, &objp->rpc_loc_ni_event_payload_u_type_u.umts_cp_req)) - return FALSE; - break; - default: - break; - } - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_event_s_type (XDR *xdrs, rpc_loc_ni_event_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ni_event_e_type (xdrs, &objp->event)) - return FALSE; - if (!xdr_rpc_loc_ni_event_payload_u_type (xdrs, &objp->payload)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_data_request_e_type (XDR *xdrs, rpc_loc_assist_data_request_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_struct_loc_time_download_source_s_type_servers_ptr (XDR *xdrs, rpc_struct_loc_time_download_source_s_type_servers_ptr *objp) -{ - register int32_t *buf; - - if (!xdr_string (xdrs, objp, RPC_LOC_API_MAX_SERVER_ADDR_LENGTH)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_struct_loc_time_download_source_s_type_servers (XDR *xdrs, rpc_struct_loc_time_download_source_s_type_servers objp) -{ - register int32_t *buf; - - if (!xdr_vector (xdrs, (char *)objp, 3, - sizeof (rpc_struct_loc_time_download_source_s_type_servers_ptr), (xdrproc_t) xdr_rpc_struct_loc_time_download_source_s_type_servers_ptr)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_time_download_source_s_type (XDR *xdrs, rpc_loc_time_download_source_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, &objp->delay_threshold)) - return FALSE; - if (!xdr_rpc_struct_loc_time_download_source_s_type_servers (xdrs, objp->servers)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr (XDR *xdrs, rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr *objp) -{ - register int32_t *buf; - - if (!xdr_string (xdrs, objp, RPC_LOC_API_MAX_SERVER_ADDR_LENGTH)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers (XDR *xdrs, rpc_struct_loc_predicted_orbits_data_source_s_type_servers objp) -{ - register int32_t *buf; - - if (!xdr_vector (xdrs, (char *)objp, 3, - sizeof (rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr), (xdrproc_t) xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_predicted_orbits_data_source_s_type (XDR *xdrs, rpc_loc_predicted_orbits_data_source_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, &objp->max_file_size)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->max_part_size)) - return FALSE; - if (!xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers (xdrs, objp->servers)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_data_request_payload_u_type (XDR *xdrs, rpc_loc_assist_data_request_payload_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_assist_data_request_e_type (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_ASSIST_DATA_TIME_REQ: - if (!xdr_rpc_loc_time_download_source_s_type (xdrs, &objp->rpc_loc_assist_data_request_payload_u_type_u.time_download)) - return FALSE; - break; - case RPC_LOC_ASSIST_DATA_PREDICTED_ORBITS_REQ: - if (!xdr_rpc_loc_predicted_orbits_data_source_s_type (xdrs, &objp->rpc_loc_assist_data_request_payload_u_type_u.data_download)) - return FALSE; - break; - default: - break; - } - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_data_request_s_type (XDR *xdrs, rpc_loc_assist_data_request_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_assist_data_request_e_type (xdrs, &objp->event)) - return FALSE; - if (!xdr_rpc_loc_assist_data_request_payload_u_type (xdrs, &objp->payload)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_connection_handle (XDR *xdrs, rpc_loc_server_connection_handle *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_protocol_e_type (XDR *xdrs, rpc_loc_server_protocol_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_request_e_type (XDR *xdrs, rpc_loc_server_request_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_open_req_s_type (XDR *xdrs, rpc_loc_server_open_req_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_server_connection_handle (xdrs, &objp->conn_handle)) - return FALSE; - if (!xdr_rpc_loc_server_protocol_e_type (xdrs, &objp->protocol)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_close_req_s_type (XDR *xdrs, rpc_loc_server_close_req_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_server_connection_handle (xdrs, &objp->conn_handle)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_request_u_type (XDR *xdrs, rpc_loc_server_request_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_server_request_e_type (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_SERVER_REQUEST_OPEN: - if (!xdr_rpc_loc_server_open_req_s_type (xdrs, &objp->rpc_loc_server_request_u_type_u.open_req)) - return FALSE; - break; - case RPC_LOC_SERVER_REQUEST_CLOSE: - if (!xdr_rpc_loc_server_close_req_s_type (xdrs, &objp->rpc_loc_server_request_u_type_u.close_req)) - return FALSE; - break; - default: - break; - } - return TRUE; -} - -bool_t -xdr_rpc_loc_server_request_s_type (XDR *xdrs, rpc_loc_server_request_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_server_request_e_type (xdrs, &objp->event)) - return FALSE; - if (!xdr_rpc_loc_server_request_u_type (xdrs, &objp->payload)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_reserved_payload_s_type (XDR *xdrs, rpc_loc_reserved_payload_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint16 (xdrs, &objp->data_size)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->data.data_val, (u_int *) &objp->data.data_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ioctl_e_type (XDR *xdrs, rpc_loc_ioctl_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_api_version_s_type (XDR *xdrs, rpc_loc_api_version_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, &objp->major)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->minor)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_fix_recurrence_e_type (XDR *xdrs, rpc_loc_fix_recurrence_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_operation_mode_e_type (XDR *xdrs, rpc_loc_operation_mode_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_notify_e_type (XDR *xdrs, rpc_loc_notify_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_fix_criteria_s_type (XDR *xdrs, rpc_loc_fix_criteria_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, &objp->valid_mask)) - return FALSE; - if (!xdr_rpc_loc_fix_recurrence_e_type (xdrs, &objp->recurrence_type)) - return FALSE; - if (!xdr_rpc_loc_operation_mode_e_type (xdrs, &objp->preferred_operation_mode)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->preferred_accuracy)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->preferred_response_time)) - return FALSE; - if (!xdr_rpc_boolean (xdrs, &objp->intermediate_pos_report_enabled)) - return FALSE; - if (!xdr_rpc_loc_notify_e_type (xdrs, &objp->notify_type)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->min_interval)) - return FALSE; - if (!xdr_float (xdrs, &objp->min_distance)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->min_dist_sample_interval)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_user_resp_e_type (XDR *xdrs, rpc_loc_ni_user_resp_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_user_verify_s_type (XDR *xdrs, rpc_loc_user_verify_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ni_user_resp_e_type (xdrs, &objp->user_resp)) - return FALSE; - if (!xdr_rpc_loc_ni_event_s_type (xdrs, &objp->ni_event_pass_back)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_predicted_orbits_data_format_e_type (XDR *xdrs, rpc_loc_predicted_orbits_data_format_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_predicted_orbits_data_s_type (XDR *xdrs, rpc_loc_predicted_orbits_data_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_predicted_orbits_data_format_e_type (xdrs, &objp->format_type)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->total_size)) - return FALSE; - if (!xdr_rpc_uint8 (xdrs, &objp->total_parts)) - return FALSE; - if (!xdr_rpc_uint8 (xdrs, &objp->part)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->part_len)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->data_ptr.data_ptr_val, (u_int *) &objp->data_ptr.data_ptr_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_predicted_orbits_data_validity_report_s_type (XDR *xdrs, rpc_loc_predicted_orbits_data_validity_report_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint64 (xdrs, &objp->start_time_utc)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->valid_duration_hrs)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_predicted_orbits_auto_download_config_s_type (XDR *xdrs, rpc_loc_predicted_orbits_auto_download_config_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_boolean (xdrs, &objp->enable)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->auto_check_every_hrs)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_data_time_s_type (XDR *xdrs, rpc_loc_assist_data_time_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint64 (xdrs, &objp->time_utc)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->uncertainty)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_pos_valid_mask_type (XDR *xdrs, rpc_loc_assist_pos_valid_mask_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint64 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_data_pos_s_type (XDR *xdrs, rpc_loc_assist_data_pos_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_assist_pos_valid_mask_type (xdrs, &objp->valid_mask)) - return FALSE; - if (!xdr_rpc_uint64 (xdrs, &objp->timestamp_utc)) - return FALSE; - if (!xdr_double (xdrs, &objp->latitude)) - return FALSE; - if (!xdr_double (xdrs, &objp->longitude)) - return FALSE; - if (!xdr_float (xdrs, &objp->altitude_wrt_ellipsoid)) - return FALSE; - if (!xdr_float (xdrs, &objp->altitude_wrt_mean_sea_level)) - return FALSE; - if (!xdr_float (xdrs, &objp->hor_unc_circular)) - return FALSE; - if (!xdr_float (xdrs, &objp->vert_unc)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->confidence_horizontal)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->confidence_vertical)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_open_status_e_type (XDR *xdrs, rpc_loc_server_open_status_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_open_status_s_type (XDR *xdrs, rpc_loc_server_open_status_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_server_connection_handle (xdrs, &objp->conn_handle)) - return FALSE; - if (!xdr_rpc_loc_server_open_status_e_type (xdrs, &objp->open_status)) - return FALSE; - if (!xdr_string (xdrs, &objp->apn_name, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_close_status_e_type (XDR *xdrs, rpc_loc_server_close_status_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_close_status_s_type (XDR *xdrs, rpc_loc_server_close_status_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_server_connection_handle (xdrs, &objp->conn_handle)) - return FALSE; - if (!xdr_rpc_loc_server_close_status_e_type (xdrs, &objp->close_status)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_lock_e_type (XDR *xdrs, rpc_loc_lock_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_nmea_sentence_type (XDR *xdrs, rpc_loc_nmea_sentence_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_data_type (XDR *xdrs, rpc_loc_assist_data_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_data_delete_s_type (XDR *xdrs, rpc_loc_assist_data_delete_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_rpc_loc_assist_data_type (xdrs, &objp->type)) - return FALSE; - if (!xdr_vector (xdrs, (char *)objp->reserved, 8, - sizeof (rpc_uint32), (xdrproc_t) xdr_rpc_uint32)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ioctl_data_u_type (XDR *xdrs, rpc_loc_ioctl_data_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ioctl_e_type (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_IOCTL_SET_FIX_CRITERIA: - if (!xdr_rpc_loc_fix_criteria_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.fix_criteria)) - return FALSE; - break; - case RPC_LOC_IOCTL_INFORM_NI_USER_RESPONSE: - if (!xdr_rpc_loc_user_verify_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.user_verify_resp)) - return FALSE; - break; - case RPC_LOC_IOCTL_INJECT_PREDICTED_ORBITS_DATA: - if (!xdr_rpc_loc_predicted_orbits_data_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.predicted_orbits_data)) - return FALSE; - break; - case RPC_LOC_IOCTL_SET_PREDICTED_ORBITS_DATA_AUTO_DOWNLOAD: - if (!xdr_rpc_loc_predicted_orbits_auto_download_config_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.predicted_orbits_auto_download)) - return FALSE; - break; - case RPC_LOC_IOCTL_INJECT_UTC_TIME: - if (!xdr_rpc_loc_assist_data_time_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.assistance_data_time)) - return FALSE; - break; - case RPC_LOC_IOCTL_INJECT_POSITION: - if (!xdr_rpc_loc_assist_data_pos_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.assistance_data_position)) - return FALSE; - break; - case RPC_LOC_IOCTL_INFORM_SERVER_OPEN_STATUS: - if (!xdr_rpc_loc_server_open_status_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.conn_open_status)) - return FALSE; - break; - case RPC_LOC_IOCTL_INFORM_SERVER_CLOSE_STATUS: - if (!xdr_rpc_loc_server_close_status_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.conn_close_status)) - return FALSE; - break; - case RPC_LOC_IOCTL_SET_ENGINE_LOCK: - if (!xdr_rpc_loc_lock_e_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.engine_lock)) - return FALSE; - break; - case RPC_LOC_IOCTL_SET_SBAS_CONFIG: - if (!xdr_rpc_boolean (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.sbas_mode)) - return FALSE; - break; - case RPC_LOC_IOCTL_SET_NMEA_TYPES: - if (!xdr_rpc_loc_nmea_sentence_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.nmea_types)) - return FALSE; - break; - case RPC_LOC_IOCTL_SET_ON_DEMAND_LPM: - if (!xdr_rpc_boolean (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.on_demand_lpm)) - return FALSE; - break; - case RPC_LOC_IOCTL_SET_CDMA_PDE_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_CDMA_MPC_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_UMTS_SLP_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_CUSTOM_PDE_SERVER_ADDR: - if (!xdr_rpc_loc_server_info_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.server_addr)) - return FALSE; - break; - case RPC_LOC_IOCTL_DELETE_ASSIST_DATA: - if (!xdr_rpc_loc_assist_data_delete_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.assist_data_delete)) - return FALSE; - break; - default: - break; - } - return TRUE; -} - -bool_t -xdr_rpc_loc_ioctl_callback_data_u_type (XDR *xdrs, rpc_loc_ioctl_callback_data_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ioctl_e_type (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_IOCTL_GET_API_VERSION: - if (!xdr_rpc_loc_api_version_s_type (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.api_version)) - return FALSE; - break; - case RPC_LOC_IOCTL_GET_FIX_CRITERIA: - if (!xdr_rpc_loc_fix_criteria_s_type (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.fix_criteria)) - return FALSE; - break; - case RPC_LOC_IOCTL_GET_ENGINE_LOCK: - if (!xdr_rpc_loc_lock_e_type (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.engine_lock)) - return FALSE; - break; - case RPC_LOC_IOCTL_GET_SBAS_CONFIG: - if (!xdr_rpc_boolean (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.sbas_mode)) - return FALSE; - break; - case RPC_LOC_IOCTL_GET_NMEA_TYPES: - if (!xdr_rpc_loc_nmea_sentence_type (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.nmea_types)) - return FALSE; - break; - case RPC_LOC_IOCTL_GET_ON_DEMAND_LPM: - if (!xdr_rpc_boolean (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.on_demand_lpm)) - return FALSE; - break; - case RPC_LOC_IOCTL_GET_CDMA_PDE_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_CDMA_MPC_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_UMTS_SLP_SERVER_ADDR: - if (!xdr_rpc_loc_server_info_s_type (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.server_addr)) - return FALSE; - break; - case RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_SOURCE: - if (!xdr_rpc_loc_predicted_orbits_data_source_s_type (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.predicted_orbits_data_source)) - return FALSE; - break; - case RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_VALIDITY: - if (!xdr_rpc_loc_predicted_orbits_data_validity_report_s_type (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.predicted_orbits_data_validity)) - return FALSE; - break; - default: - break; - } - return TRUE; -} - -bool_t -xdr_rpc_loc_ioctl_callback_s_type (XDR *xdrs, rpc_loc_ioctl_callback_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ioctl_e_type (xdrs, &objp->type)) - return FALSE; - if (!xdr_rpc_int32 (xdrs, &objp->status)) - return FALSE; - if (!xdr_rpc_loc_ioctl_callback_data_u_type (xdrs, &objp->data)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_event_payload_u_type (XDR *xdrs, rpc_loc_event_payload_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_u_quad_t (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_EVENT_PARSED_POSITION_REPORT: - if (!xdr_rpc_loc_parsed_position_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.parsed_location_report)) - return FALSE; - break; - case RPC_LOC_EVENT_SATELLITE_REPORT: - if (!xdr_rpc_loc_gnss_info_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.gnss_report)) - return FALSE; - break; - case RPC_LOC_EVENT_NMEA_POSITION_REPORT: - if (!xdr_rpc_loc_nmea_report_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.nmea_report)) - return FALSE; - break; - case RPC_LOC_EVENT_NI_NOTIFY_VERIFY_REQUEST: - if (!xdr_rpc_loc_ni_event_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.ni_request)) - return FALSE; - break; - case RPC_LOC_EVENT_ASSISTANCE_DATA_REQUEST: - if (!xdr_rpc_loc_assist_data_request_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.assist_data_request)) - return FALSE; - break; - case RPC_LOC_EVENT_LOCATION_SERVER_REQUEST: - if (!xdr_rpc_loc_server_request_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.loc_server_request)) - return FALSE; - break; - case RPC_LOC_EVENT_IOCTL_REPORT: - if (!xdr_rpc_loc_ioctl_callback_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.ioctl_report)) - return FALSE; - break; - case RPC_LOC_EVENT_STATUS_REPORT: - if (!xdr_rpc_loc_status_event_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.status_report)) - return FALSE; - break; - case RPC_LOC_EVENT_RESERVED: - if (!xdr_rpc_loc_reserved_payload_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.reserved)) - return FALSE; - break; - default: - break; - } - return TRUE; -} diff --git a/loc_api/libloc_api-rpc/gen-3200/loc_api_fixup.c b/loc_api/libloc_api-rpc/gen-3200/loc_api_fixup.c deleted file mode 100644 index fe512f5d..00000000 --- a/loc_api/libloc_api-rpc/gen-3200/loc_api_fixup.c +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - L O C _ A P I _ F I X U P . C - -GENERAL DESCRIPTION - This file adds API constants that are not automatically transmitted to - the RPC stubs, and it also fixes other RPC-related problems. - - --------------------------------------------------------------------------- -Copyright (c) 2009, QUALCOMM USA, INC. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -· Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -· Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -· Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --------------------------------------------------------------------------- -=============================================================================*/ - -#include - -#include "loc_api_fixup.h" - -#ifdef ADD_XDR_FLOAT - -int -xdr_float(xdrp, fp) - XDR *xdrp; - float *fp; -{ - return xdr_long(xdrp, (long*)fp); -} - -int -xdr_double(xdrp, dp) - XDR *xdrp; - double *dp; -{ - return xdr_long(xdrp, (long*)dp + 1) - && xdr_long(xdrp, (long*)dp); -} - -#endif /* ADD_XDR_FLOAT */ diff --git a/loc_api/libloc_api-rpc/gen-3200/loc_api_rpc_glue.c b/loc_api/libloc_api-rpc/gen-3200/loc_api_rpc_glue.c deleted file mode 100644 index 8c171222..00000000 --- a/loc_api/libloc_api-rpc/gen-3200/loc_api_rpc_glue.c +++ /dev/null @@ -1,339 +0,0 @@ -/****************************************************************************** - @file loc_api_rpc_glue.c - @brief Android Loc API glue code using rpcgen. - - DESCRIPTION - Loc API glue code for Android - - ----------------------------------------------------------------------------- -Copyright (c) 2009, QUALCOMM USA, INC. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -· Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -· Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -· Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ----------------------------------------------------------------------------- - ******************************************************************************/ -/*===================================================================== - EDIT HISTORY FOR MODULE - - This section contains comments describing changes made to the module. - Notice that changes are listed in reverse chronological order. - -when who what, where, why --------- --- ------------------------------------------------------- -03/05/2009 dx Initial version - -======================================================================*/ -/*===================================================================== - - INCLUDE FILES FOR MODULE - -======================================================================*/ -//#define LOG_NDDEBUG 0 - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -/* Include RPC headers */ -#include "loc_api_rpc_glue.h" - -/* Callback init */ -#include "loc_apicb_appinit.h" - -/* Logging */ -#define LOG_TAG "lib_api_rpc_glue" -#include - -/* Comment this out to enable logging */ -#undef LOGD -#define LOGD(...) {} - -/*===================================================================== - External declarations -======================================================================*/ - -CLIENT* loc_api_clnt = NULL; - -/* Callback ID and pointer */ -#define LOC_API_CB_ID 1 -loc_event_cb_f_type *loc_api_saved_cb = NULL; /* the only callback of Loc API client */ - -#define RPC_FUNC_VERSION_BASE(a,b) a ## b -#define RPC_FUNC_VERSION(a,b) RPC_FUNC_VERSION_BASE(a,b) - -#define LOC_GLUE_CHECK_INIT(ret_type) \ - if (loc_api_clnt == NULL) { return (ret_type) RPC_LOC_API_RPC_FAILURE; } - -#define LOC_GLUE_CHECK_RESULT(stat, ret_type) \ - if (stat != RPC_SUCCESS) { return (ret_type) RPC_LOC_API_RPC_FAILURE; } - -/* Callback functions */ -/* Returns 1 if successful */ -bool_t rpc_loc_event_cb_f_type_0x00010001_svc( - rpc_loc_event_cb_f_type_args *argp, - rpc_loc_event_cb_f_type_rets *ret, - struct svc_req *req) -{ - /* Callback not registered, or unexpected ID (shouldn't happen) */ - if (loc_api_saved_cb == NULL || argp->cb_id != LOC_API_CB_ID) - { - LOGD("Warning: No callback handler.\n"); - ret->loc_event_cb_f_type_result = 0; - return 1; /* simply return */ - } - - LOGD("proc: %x prog: %x vers: %x\n", - (int) req->rq_proc, - (int) req->rq_prog, - (int) req->rq_vers); - - LOGD("Callback received: %x (handle=%d ret_ptr=%d)\n", - (int) argp->loc_event, - (int) argp->loc_handle, - (int) ret); - - /* Forward callback to real callback procedure */ - rpc_loc_client_handle_type loc_handle = argp->loc_handle; - rpc_loc_event_mask_type loc_event = argp->loc_event; - const rpc_loc_event_payload_u_type* loc_event_payload = - (const rpc_loc_event_payload_u_type*) argp->loc_event_payload; - - int32 rc = loc_api_saved_cb(loc_handle, loc_event, loc_event_payload); - ret->loc_event_cb_f_type_result = rc; - - return 1; /* ok */ -} - -int loc_apicbprog_freeresult (SVCXPRT *transp, xdrproc_t xdr_result, caddr_t result) -{ - xdr_free (xdr_result, result); - - /* - * Insert additional freeing code here, if needed - */ - // LOGD("***** loc_apicbprog_freeresult\n"); - - return 1; -} - -int loc_apicbprog_0x00010001_freeresult (SVCXPRT *transp, xdrproc_t xdr_result, caddr_t result) -{ - return loc_apicbprog_freeresult (transp, xdr_result, result); -} - -/*=========================================================================== - -FUNCTION loc_api_glue_init - -DESCRIPTION - Initiates the RPC client - -RETURN VALUE - 1 for success - 0 for failure - -===========================================================================*/ -int loc_api_glue_init(void) -{ - if (loc_api_clnt == NULL) - { - /* Print msg */ - LOGD("Trying to create RPC client...\n"); - loc_api_clnt = clnt_create(NULL, LOC_APIPROG, /*LOC_APIVERS*/ 0x00010000, NULL); - LOGD("Created loc_api_clnt ---- %x\n", (unsigned int)loc_api_clnt); - - if (loc_api_clnt == NULL) - { - fprintf(stderr, "Error: cannot create RPC client.\n"); - return 0; - } - - /* Init RPC callbacks */ - int rc = loc_apicb_app_init(); - if (rc >= 0) - { - LOGD("Loc API callback initialized.\n"); - } else { - fprintf(stderr, "Loc API callback initialization failed.\n"); - return 0; - } - } - - return 1; -} - -rpc_loc_client_handle_type loc_open ( - rpc_loc_event_mask_type event_reg_mask, - loc_event_cb_f_type *event_callback - ) -{ - LOC_GLUE_CHECK_INIT(rpc_loc_client_handle_type); - - rpc_loc_open_args args; - args.event_reg_mask = event_reg_mask; - args.event_callback = LOC_API_CB_ID; - loc_api_saved_cb = event_callback; - - rpc_loc_open_rets rets; - enum clnt_stat stat = RPC_SUCCESS; - - stat = RPC_FUNC_VERSION(rpc_loc_open_, LOC_APIVERS)(&args, &rets, loc_api_clnt); - LOC_GLUE_CHECK_RESULT(stat, int32); - - return (rpc_loc_client_handle_type) rets.loc_open_result; -} - -int32 loc_close(rpc_loc_client_handle_type handle) -{ - LOC_GLUE_CHECK_INIT(int32); - - rpc_loc_close_args args; - args.handle = handle; - - rpc_loc_close_rets rets; - enum clnt_stat stat = RPC_SUCCESS; - - stat = RPC_FUNC_VERSION(rpc_loc_close_, LOC_APIVERS)(&args, &rets, loc_api_clnt); - LOC_GLUE_CHECK_RESULT(stat, int32); - - return (int32) rets.loc_close_result; -} - -int32 loc_start_fix(rpc_loc_client_handle_type handle) -{ - LOC_GLUE_CHECK_INIT(int32); - - rpc_loc_start_fix_args args; - args.handle = handle; - - rpc_loc_start_fix_rets rets; - enum clnt_stat stat = RPC_SUCCESS; - - stat = RPC_FUNC_VERSION(rpc_loc_start_fix_, LOC_APIVERS)(&args, &rets, loc_api_clnt); - LOC_GLUE_CHECK_RESULT(stat, int32); - - return (int32) rets.loc_start_fix_result; -} - -int32 loc_stop_fix(rpc_loc_client_handle_type handle) -{ - LOC_GLUE_CHECK_INIT(int32); - - rpc_loc_stop_fix_args args; - args.handle = handle; - - rpc_loc_stop_fix_rets rets; - enum clnt_stat stat = RPC_SUCCESS; - - stat = RPC_FUNC_VERSION(rpc_loc_stop_fix_, LOC_APIVERS)(&args, &rets, loc_api_clnt); - LOC_GLUE_CHECK_RESULT(stat, int32); - - return (int32) rets.loc_stop_fix_result; -} - -int32 loc_ioctl( - rpc_loc_client_handle_type handle, - rpc_loc_ioctl_e_type ioctl_type, - rpc_loc_ioctl_data_u_type* ioctl_data - ) -{ - LOC_GLUE_CHECK_INIT(int32); - - rpc_loc_ioctl_args args; - args.handle = handle; - args.ioctl_data = ioctl_data; - args.ioctl_type = ioctl_type; - if (ioctl_data != NULL) - { - /* Assign ioctl union discriminator */ - ioctl_data->disc = ioctl_type; - - /* In case the user hasn't filled in other disc fields, - automatically fill them in here */ - switch (ioctl_type) - { - case RPC_LOC_IOCTL_GET_API_VERSION: - case RPC_LOC_IOCTL_SET_FIX_CRITERIA: - case RPC_LOC_IOCTL_GET_FIX_CRITERIA: - case RPC_LOC_IOCTL_INFORM_NI_USER_RESPONSE: - case RPC_LOC_IOCTL_INJECT_PREDICTED_ORBITS_DATA: - case RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_VALIDITY: - case RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_SOURCE: - case RPC_LOC_IOCTL_SET_PREDICTED_ORBITS_DATA_AUTO_DOWNLOAD: - case RPC_LOC_IOCTL_INJECT_UTC_TIME: - case RPC_LOC_IOCTL_INJECT_RTC_VALUE: - case RPC_LOC_IOCTL_INJECT_POSITION: - case RPC_LOC_IOCTL_QUERY_ENGINE_STATE: - case RPC_LOC_IOCTL_INFORM_SERVER_OPEN_STATUS: - case RPC_LOC_IOCTL_INFORM_SERVER_CLOSE_STATUS: - case RPC_LOC_IOCTL_SET_ENGINE_LOCK: - case RPC_LOC_IOCTL_GET_ENGINE_LOCK: - case RPC_LOC_IOCTL_SET_SBAS_CONFIG: - case RPC_LOC_IOCTL_GET_SBAS_CONFIG: - case RPC_LOC_IOCTL_SET_NMEA_TYPES: - case RPC_LOC_IOCTL_GET_NMEA_TYPES: - break; - case RPC_LOC_IOCTL_SET_CDMA_PDE_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_CDMA_MPC_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_UMTS_SLP_SERVER_ADDR: - args.ioctl_data->rpc_loc_ioctl_data_u_type_u.server_addr.addr_info.disc = - args.ioctl_data->rpc_loc_ioctl_data_u_type_u.server_addr.addr_type; - break; - case RPC_LOC_IOCTL_GET_CDMA_PDE_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_CDMA_MPC_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_UMTS_SLP_SERVER_ADDR: - break; - case RPC_LOC_IOCTL_SET_ON_DEMAND_LPM: - case RPC_LOC_IOCTL_GET_ON_DEMAND_LPM: - case RPC_LOC_IOCTL_DELETE_ASSIST_DATA: - case RPC_LOC_IOCTL_SET_CUSTOM_PDE_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_CUSTOM_PDE_SERVER_ADDR: - default: - break; - } /* switch */ - } /* ioctl_data != NULL */ - - rpc_loc_ioctl_rets rets; - enum clnt_stat stat = RPC_SUCCESS; - - stat = RPC_FUNC_VERSION(rpc_loc_ioctl_, LOC_APIVERS)(&args, &rets, loc_api_clnt); - LOC_GLUE_CHECK_RESULT(stat, int32); - - return (int32) rets.loc_ioctl_result; -} - -/* Returns 0 if error */ -int32 loc_api_null(void) -{ - LOC_GLUE_CHECK_INIT(int32); - - int32 rets; - enum clnt_stat stat = RPC_SUCCESS; - - stat = RPC_FUNC_VERSION(rpc_loc_api_null_, LOC_APIVERS)(NULL, &rets, loc_api_clnt); - LOC_GLUE_CHECK_RESULT(stat, int32); - - return (int32) rets; -} diff --git a/loc_api/libloc_api-rpc/gen-3200/loc_api_xdr.c b/loc_api/libloc_api-rpc/gen-3200/loc_api_xdr.c deleted file mode 100644 index 835f6b18..00000000 --- a/loc_api/libloc_api-rpc/gen-3200/loc_api_xdr.c +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#include "loc_api.h" - -bool_t -xdr_rpc_loc_api_api_versions_return_type (XDR *xdrs, rpc_loc_api_api_versions_return_type *objp) -{ - register int32_t *buf; - - if (!xdr_array (xdrs, (char **)&objp->rpc_loc_api_api_versions_return_type_val, (u_int *) &objp->rpc_loc_api_api_versions_return_type_len, ~0, - sizeof (rpc_uint32), (xdrproc_t) xdr_rpc_uint32)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_event_cb_f_type (XDR *xdrs, rpc_loc_event_cb_f_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_open_args (XDR *xdrs, rpc_loc_open_args *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_event_mask_type (xdrs, &objp->event_reg_mask)) - return FALSE; - if (!xdr_rpc_loc_event_cb_f_type (xdrs, &objp->event_callback)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_close_args (XDR *xdrs, rpc_loc_close_args *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_client_handle_type (xdrs, &objp->handle)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_start_fix_args (XDR *xdrs, rpc_loc_start_fix_args *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_client_handle_type (xdrs, &objp->handle)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_stop_fix_args (XDR *xdrs, rpc_loc_stop_fix_args *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_client_handle_type (xdrs, &objp->handle)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ioctl_args (XDR *xdrs, rpc_loc_ioctl_args *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_client_handle_type (xdrs, &objp->handle)) - return FALSE; - if (!xdr_rpc_loc_ioctl_e_type (xdrs, &objp->ioctl_type)) - return FALSE; - if (!xdr_pointer (xdrs, (char **)&objp->ioctl_data, sizeof (rpc_loc_ioctl_data_u_type), (xdrproc_t) xdr_rpc_loc_ioctl_data_u_type)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_api_api_version_s_args (XDR *xdrs, rpc_loc_api_api_version_s_args *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_boolean (xdrs, &objp->len_not_null)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_api_rpc_glue_code_info_remote_rets (XDR *xdrs, rpc_loc_api_rpc_glue_code_info_remote_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, &objp->toolvers)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->features)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->proghash)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->cbproghash)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_open_rets (XDR *xdrs, rpc_loc_open_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_client_handle_type (xdrs, &objp->loc_open_result)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_close_rets (XDR *xdrs, rpc_loc_close_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_int32 (xdrs, &objp->loc_close_result)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_start_fix_rets (XDR *xdrs, rpc_loc_start_fix_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_int32 (xdrs, &objp->loc_start_fix_result)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_stop_fix_rets (XDR *xdrs, rpc_loc_stop_fix_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_int32 (xdrs, &objp->loc_stop_fix_result)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ioctl_rets (XDR *xdrs, rpc_loc_ioctl_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_int32 (xdrs, &objp->loc_ioctl_result)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_api_api_versions_rets (XDR *xdrs, rpc_loc_api_api_versions_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_api_api_versions_return_type (xdrs, &objp->loc_api_api_versions_result)) - return FALSE; - if (!xdr_pointer (xdrs, (char **)&objp->len, sizeof (rpc_uint32), (xdrproc_t) xdr_rpc_uint32)) - return FALSE; - return TRUE; -} diff --git a/loc_api/libloc_api-rpc/inc-1240/loc_api.h b/loc_api/libloc_api-rpc/inc-1240/loc_api.h deleted file mode 100644 index e02648cc..00000000 --- a/loc_api/libloc_api-rpc/inc-1240/loc_api.h +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#ifndef _LOC_API_H_RPCGEN -#define _LOC_API_H_RPCGEN - -#include - -#include - -#ifdef __cplusplus -extern "C" { -#endif - - -typedef struct { - u_int rpc_loc_api_api_versions_return_type_len; - rpc_uint32 *rpc_loc_api_api_versions_return_type_val; -} rpc_loc_api_api_versions_return_type; - -typedef rpc_uint32 rpc_loc_event_cb_f_type; - -struct rpc_loc_open_args { - rpc_loc_event_mask_type event_reg_mask; - rpc_loc_event_cb_f_type event_callback; -}; -typedef struct rpc_loc_open_args rpc_loc_open_args; - -struct rpc_loc_close_args { - rpc_loc_client_handle_type handle; -}; -typedef struct rpc_loc_close_args rpc_loc_close_args; - -struct rpc_loc_start_fix_args { - rpc_loc_client_handle_type handle; -}; -typedef struct rpc_loc_start_fix_args rpc_loc_start_fix_args; - -struct rpc_loc_stop_fix_args { - rpc_loc_client_handle_type handle; -}; -typedef struct rpc_loc_stop_fix_args rpc_loc_stop_fix_args; - -struct rpc_loc_ioctl_args { - rpc_loc_client_handle_type handle; - rpc_loc_ioctl_e_type ioctl_type; - rpc_loc_ioctl_data_u_type *ioctl_data; -}; -typedef struct rpc_loc_ioctl_args rpc_loc_ioctl_args; - -struct rpc_loc_api_api_version_s_args { - rpc_boolean len_not_null; -}; -typedef struct rpc_loc_api_api_version_s_args rpc_loc_api_api_version_s_args; - -struct rpc_loc_api_rpc_glue_code_info_remote_rets { - rpc_uint32 toolvers; - rpc_uint32 features; - rpc_uint32 proghash; - rpc_uint32 cbproghash; -}; -typedef struct rpc_loc_api_rpc_glue_code_info_remote_rets rpc_loc_api_rpc_glue_code_info_remote_rets; - -struct rpc_loc_open_rets { - rpc_loc_client_handle_type loc_open_result; -}; -typedef struct rpc_loc_open_rets rpc_loc_open_rets; - -struct rpc_loc_close_rets { - rpc_int32 loc_close_result; -}; -typedef struct rpc_loc_close_rets rpc_loc_close_rets; - -struct rpc_loc_start_fix_rets { - rpc_int32 loc_start_fix_result; -}; -typedef struct rpc_loc_start_fix_rets rpc_loc_start_fix_rets; - -struct rpc_loc_stop_fix_rets { - rpc_int32 loc_stop_fix_result; -}; -typedef struct rpc_loc_stop_fix_rets rpc_loc_stop_fix_rets; - -struct rpc_loc_ioctl_rets { - rpc_int32 loc_ioctl_result; -}; -typedef struct rpc_loc_ioctl_rets rpc_loc_ioctl_rets; - -struct rpc_loc_api_api_versions_rets { - rpc_loc_api_api_versions_return_type loc_api_api_versions_result; - rpc_uint32 *len; -}; -typedef struct rpc_loc_api_api_versions_rets rpc_loc_api_api_versions_rets; -#define LOC_APIVERS 0x00040002 - -#define LOC_APIPROG 0x3000008c -#define LOC_APIVERS_0001 0x00040001 - -#if defined(__STDC__) || defined(__cplusplus) -#define rpc_loc_api_null 0 -extern enum clnt_stat rpc_loc_api_null_0x00040001(void *, void *, CLIENT *); -extern bool_t rpc_loc_api_null_0x00040001_svc(void *, void *, struct svc_req *); -#define rpc_loc_api_rpc_glue_code_info_remote 1 -extern enum clnt_stat rpc_loc_api_rpc_glue_code_info_remote_0x00040001(void *, rpc_loc_api_rpc_glue_code_info_remote_rets *, CLIENT *); -extern bool_t rpc_loc_api_rpc_glue_code_info_remote_0x00040001_svc(void *, rpc_loc_api_rpc_glue_code_info_remote_rets *, struct svc_req *); -#define rpc_loc_open 2 -extern enum clnt_stat rpc_loc_open_0x00040001(rpc_loc_open_args *, rpc_loc_open_rets *, CLIENT *); -extern bool_t rpc_loc_open_0x00040001_svc(rpc_loc_open_args *, rpc_loc_open_rets *, struct svc_req *); -#define rpc_loc_close 3 -extern enum clnt_stat rpc_loc_close_0x00040001(rpc_loc_close_args *, rpc_loc_close_rets *, CLIENT *); -extern bool_t rpc_loc_close_0x00040001_svc(rpc_loc_close_args *, rpc_loc_close_rets *, struct svc_req *); -#define rpc_loc_start_fix 4 -extern enum clnt_stat rpc_loc_start_fix_0x00040001(rpc_loc_start_fix_args *, rpc_loc_start_fix_rets *, CLIENT *); -extern bool_t rpc_loc_start_fix_0x00040001_svc(rpc_loc_start_fix_args *, rpc_loc_start_fix_rets *, struct svc_req *); -#define rpc_loc_stop_fix 5 -extern enum clnt_stat rpc_loc_stop_fix_0x00040001(rpc_loc_stop_fix_args *, rpc_loc_stop_fix_rets *, CLIENT *); -extern bool_t rpc_loc_stop_fix_0x00040001_svc(rpc_loc_stop_fix_args *, rpc_loc_stop_fix_rets *, struct svc_req *); -#define rpc_loc_ioctl 6 -extern enum clnt_stat rpc_loc_ioctl_0x00040001(rpc_loc_ioctl_args *, rpc_loc_ioctl_rets *, CLIENT *); -extern bool_t rpc_loc_ioctl_0x00040001_svc(rpc_loc_ioctl_args *, rpc_loc_ioctl_rets *, struct svc_req *); -#define rpc_loc_api_api_versions 0xFFFFFFFF -extern enum clnt_stat rpc_loc_api_api_versions_0x00040001(void *, rpc_loc_api_api_versions_rets *, CLIENT *); -extern bool_t rpc_loc_api_api_versions_0x00040001_svc(void *, rpc_loc_api_api_versions_rets *, struct svc_req *); -extern int loc_apiprog_0x00040001_freeresult (SVCXPRT *, xdrproc_t, caddr_t); - -#else /* K&R C */ -#define rpc_loc_api_null 0 -extern enum clnt_stat rpc_loc_api_null_0x00040001(); -extern bool_t rpc_loc_api_null_0x00040001_svc(); -#define rpc_loc_api_rpc_glue_code_info_remote 1 -extern enum clnt_stat rpc_loc_api_rpc_glue_code_info_remote_0x00040001(); -extern bool_t rpc_loc_api_rpc_glue_code_info_remote_0x00040001_svc(); -#define rpc_loc_open 2 -extern enum clnt_stat rpc_loc_open_0x00040001(); -extern bool_t rpc_loc_open_0x00040001_svc(); -#define rpc_loc_close 3 -extern enum clnt_stat rpc_loc_close_0x00040001(); -extern bool_t rpc_loc_close_0x00040001_svc(); -#define rpc_loc_start_fix 4 -extern enum clnt_stat rpc_loc_start_fix_0x00040001(); -extern bool_t rpc_loc_start_fix_0x00040001_svc(); -#define rpc_loc_stop_fix 5 -extern enum clnt_stat rpc_loc_stop_fix_0x00040001(); -extern bool_t rpc_loc_stop_fix_0x00040001_svc(); -#define rpc_loc_ioctl 6 -extern enum clnt_stat rpc_loc_ioctl_0x00040001(); -extern bool_t rpc_loc_ioctl_0x00040001_svc(); -#define rpc_loc_api_api_versions 0xFFFFFFFF -extern enum clnt_stat rpc_loc_api_api_versions_0x00040001(); -extern bool_t rpc_loc_api_api_versions_0x00040001_svc(); -extern int loc_apiprog_0x00040001_freeresult (); -#endif /* K&R C */ -#define LOC_APIVERS_0002 0x00040002 - -#if defined(__STDC__) || defined(__cplusplus) -extern enum clnt_stat rpc_loc_api_null_0x00040002(void *, void *, CLIENT *); -extern bool_t rpc_loc_api_null_0x00040002_svc(void *, void *, struct svc_req *); -extern int loc_apiprog_0x00040002_freeresult (SVCXPRT *, xdrproc_t, caddr_t); - -#else /* K&R C */ -extern enum clnt_stat rpc_loc_api_null_0x00040002(); -extern bool_t rpc_loc_api_null_0x00040002_svc(); -extern int loc_apiprog_0x00040002_freeresult (); -#endif /* K&R C */ - -/* the xdr functions */ - -#if defined(__STDC__) || defined(__cplusplus) -extern bool_t xdr_rpc_loc_api_api_versions_return_type (XDR *, rpc_loc_api_api_versions_return_type*); -extern bool_t xdr_rpc_loc_event_cb_f_type (XDR *, rpc_loc_event_cb_f_type*); -extern bool_t xdr_rpc_loc_open_args (XDR *, rpc_loc_open_args*); -extern bool_t xdr_rpc_loc_close_args (XDR *, rpc_loc_close_args*); -extern bool_t xdr_rpc_loc_start_fix_args (XDR *, rpc_loc_start_fix_args*); -extern bool_t xdr_rpc_loc_stop_fix_args (XDR *, rpc_loc_stop_fix_args*); -extern bool_t xdr_rpc_loc_ioctl_args (XDR *, rpc_loc_ioctl_args*); -extern bool_t xdr_rpc_loc_api_api_version_s_args (XDR *, rpc_loc_api_api_version_s_args*); -extern bool_t xdr_rpc_loc_api_rpc_glue_code_info_remote_rets (XDR *, rpc_loc_api_rpc_glue_code_info_remote_rets*); -extern bool_t xdr_rpc_loc_open_rets (XDR *, rpc_loc_open_rets*); -extern bool_t xdr_rpc_loc_close_rets (XDR *, rpc_loc_close_rets*); -extern bool_t xdr_rpc_loc_start_fix_rets (XDR *, rpc_loc_start_fix_rets*); -extern bool_t xdr_rpc_loc_stop_fix_rets (XDR *, rpc_loc_stop_fix_rets*); -extern bool_t xdr_rpc_loc_ioctl_rets (XDR *, rpc_loc_ioctl_rets*); -extern bool_t xdr_rpc_loc_api_api_versions_rets (XDR *, rpc_loc_api_api_versions_rets*); - -#else /* K&R C */ -extern bool_t xdr_rpc_loc_api_api_versions_return_type (); -extern bool_t xdr_rpc_loc_event_cb_f_type (); -extern bool_t xdr_rpc_loc_open_args (); -extern bool_t xdr_rpc_loc_close_args (); -extern bool_t xdr_rpc_loc_start_fix_args (); -extern bool_t xdr_rpc_loc_stop_fix_args (); -extern bool_t xdr_rpc_loc_ioctl_args (); -extern bool_t xdr_rpc_loc_api_api_version_s_args (); -extern bool_t xdr_rpc_loc_api_rpc_glue_code_info_remote_rets (); -extern bool_t xdr_rpc_loc_open_rets (); -extern bool_t xdr_rpc_loc_close_rets (); -extern bool_t xdr_rpc_loc_start_fix_rets (); -extern bool_t xdr_rpc_loc_stop_fix_rets (); -extern bool_t xdr_rpc_loc_ioctl_rets (); -extern bool_t xdr_rpc_loc_api_api_versions_rets (); - -#endif /* K&R C */ - -#ifdef __cplusplus -} -#endif - -#endif /* !_LOC_API_H_RPCGEN */ diff --git a/loc_api/libloc_api-rpc/inc-1240/loc_api_cb.h b/loc_api/libloc_api-rpc/inc-1240/loc_api_cb.h deleted file mode 100644 index 67ac0846..00000000 --- a/loc_api/libloc_api-rpc/inc-1240/loc_api_cb.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#ifndef _LOC_API_CB_H_RPCGEN -#define _LOC_API_CB_H_RPCGEN - -#include - -#include - -#ifdef __cplusplus -extern "C" { -#endif - - -struct rpc_loc_event_cb_f_type_args { - rpc_uint32 cb_id; - rpc_loc_client_handle_type loc_handle; - rpc_loc_event_mask_type loc_event; - rpc_loc_event_payload_u_type *loc_event_payload; -}; -typedef struct rpc_loc_event_cb_f_type_args rpc_loc_event_cb_f_type_args; - -struct rpc_loc_event_cb_f_type_rets { - rpc_int32 loc_event_cb_f_type_result; -}; -typedef struct rpc_loc_event_cb_f_type_rets rpc_loc_event_cb_f_type_rets; -#define LOC_APICBVERS 0x00040002 - -#define LOC_APICBPROG 0x3100008c -#define LOC_APICBVERS_0001 0x00040001 - -#if defined(__STDC__) || defined(__cplusplus) -#define rpc_loc_event_cb_f_type 1 -extern enum clnt_stat rpc_loc_event_cb_f_type_0x00040001(rpc_loc_event_cb_f_type_args *, rpc_loc_event_cb_f_type_rets *, CLIENT *); -extern bool_t rpc_loc_event_cb_f_type_0x00040001_svc(rpc_loc_event_cb_f_type_args *, rpc_loc_event_cb_f_type_rets *, struct svc_req *); -extern int loc_apicbprog_0x00040001_freeresult (SVCXPRT *, xdrproc_t, caddr_t); - -#else /* K&R C */ -#define rpc_loc_event_cb_f_type 1 -extern enum clnt_stat rpc_loc_event_cb_f_type_0x00040001(); -extern bool_t rpc_loc_event_cb_f_type_0x00040001_svc(); -extern int loc_apicbprog_0x00040001_freeresult (); -#endif /* K&R C */ - -/* the xdr functions */ - -#if defined(__STDC__) || defined(__cplusplus) -extern bool_t xdr_rpc_loc_event_cb_f_type_args (XDR *, rpc_loc_event_cb_f_type_args*); -extern bool_t xdr_rpc_loc_event_cb_f_type_rets (XDR *, rpc_loc_event_cb_f_type_rets*); - -#else /* K&R C */ -extern bool_t xdr_rpc_loc_event_cb_f_type_args (); -extern bool_t xdr_rpc_loc_event_cb_f_type_rets (); - -#endif /* K&R C */ - -#ifdef __cplusplus -} -#endif - -#endif /* !_LOC_API_CB_H_RPCGEN */ diff --git a/loc_api/libloc_api-rpc/inc-1240/loc_api_common.h b/loc_api/libloc_api-rpc/inc-1240/loc_api_common.h deleted file mode 100644 index 6ff3baf1..00000000 --- a/loc_api/libloc_api-rpc/inc-1240/loc_api_common.h +++ /dev/null @@ -1,1154 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#ifndef _LOC_API_COMMON_H_RPCGEN -#define _LOC_API_COMMON_H_RPCGEN - -#include -#include "loc_api_fixup.h" - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#define LOC_API_TOOLVERS 0x00040024 -#define LOC_API_FEATURES 0x00000001 -#define RPC_LOC_EVENT_NI_NOTIFY_VERIFY_REQUEST 0x00000010 -#define RPC_LOC_EVENT_WPS_NEEDED_REQUEST 0x00000200 -#define RPC_LOC_EVENT_IOCTL_REPORT 0x00000080 -#define RPC_LOC_EVENT_LOCATION_SERVER_REQUEST 0x00000040 -#define RPC_LOC_EVENT_RESERVED 0x8000000000000000 -#define RPC_LOC_EVENT_PARSED_POSITION_REPORT 0x00000001 -#define RPC_LOC_EVENT_ASSISTANCE_DATA_REQUEST 0x00000020 -#define RPC_LOC_EVENT_NMEA_POSITION_REPORT 0x00000008 -#define RPC_LOC_EVENT_SATELLITE_REPORT 0x00000002 -#define RPC_LOC_EVENT_STATUS_REPORT 0x00000100 -#define RPC_LOC_EVENT_CB_F_TYPE_VERSION 0x00040001 -#define RPC_LOC_OPEN_VERSION 0x00040001 -#define RPC_LOC_API_RPC_GLUE_CODE_INFO_REMOTE_VERSION 0x00040001 -#define RPC_LOC_API_NULL_VERSION 0x00040001 -#define RPC_LOC_STOP_FIX_VERSION 0x00040001 -#define RPC_LOC_IOCTL_VERSION 0x00040001 -#define RPC_LOC_START_FIX_VERSION 0x00040001 -#define RPC_LOC_CLOSE_VERSION 0x00040001 -#define RPC_LOC_API_API_VERSIONS_VERSION 0x00040001 -#define RPC_LOC_API_API_MAJOR_NUM 0x0004 -#define RPC_LOC_APIAPI_VERSION_IS_HASHKEY 0 - -typedef bool_t rpc_boolean; - -typedef u_long rpc_uint32; - -typedef u_short rpc_uint16; - -typedef u_char rpc_uint8; - -typedef long rpc_int32; - -typedef u_char rpc_byte; - -typedef u_quad_t rpc_uint64; - -typedef rpc_int32 rpc_loc_client_handle_type; - -typedef rpc_uint64 rpc_loc_event_mask_type; - -typedef rpc_uint64 rpc_loc_position_valid_mask_type; - -typedef rpc_uint32 rpc_loc_pos_technology_mask_type; - -enum rpc_loc_session_status_e_type { - RPC_LOC_SESS_STATUS_SUCCESS = 0, - RPC_LOC_SESS_STATUS_IN_PROGESS = 1, - RPC_LOC_SESS_STATUS_GENERAL_FAILURE = 2, - RPC_LOC_SESS_STATUS_TIMEOUT = 3, - RPC_LOC_SESS_STATUS_USER_END = 4, - RPC_LOC_SESS_STATUS_BAD_PARAMETER = 5, - RPC_LOC_SESS_STATUS_PHONE_OFFLINE = 6, - RPC_LOC_SESS_STATUS_ENGINE_LOCKED = 7, - RPC_LOC_SESS_STATUS_MAX = 268435456, -}; -typedef enum rpc_loc_session_status_e_type rpc_loc_session_status_e_type; - -struct rpc_loc_calendar_time_s_type { - rpc_uint16 year; - u_char month; - u_char day_of_week; - u_char day; - u_char hour; - u_char minute; - u_char second; - rpc_uint16 millisecond; -}; -typedef struct rpc_loc_calendar_time_s_type rpc_loc_calendar_time_s_type; - -struct rpc_loc_parsed_position_s_type { - rpc_loc_position_valid_mask_type valid_mask; - rpc_loc_session_status_e_type session_status; - rpc_loc_calendar_time_s_type timestamp_calendar; - rpc_uint64 timestamp_utc; - rpc_uint8 leap_seconds; - float time_unc; - double latitude; - double longitude; - float altitude_wrt_ellipsoid; - float altitude_wrt_mean_sea_level; - float speed_horizontal; - float speed_vertical; - float heading; - float hor_unc_circular; - float hor_unc_ellipse_semi_major; - float hor_unc_ellipse_semi_minor; - float hor_unc_ellipse_orient_azimuth; - float vert_unc; - float speed_unc; - float heading_unc; - u_char confidence_horizontal; - u_char confidence_vertical; - float magnetic_deviation; - rpc_loc_pos_technology_mask_type technology_mask; -}; -typedef struct rpc_loc_parsed_position_s_type rpc_loc_parsed_position_s_type; - -enum rpc_loc_sv_system_e_type { - RPC_LOC_SV_SYSTEM_GPS = 1, - RPC_LOC_SV_SYSTEM_GALILEO = 2, - RPC_LOC_SV_SYSTEM_SBAS = 3, - RPC_LOC_SV_SYSTEM_COMPASS = 4, - RPC_LOC_SV_SYSTEM_GLONASS = 5, - RPC_LOC_SV_SYSTEM_MAX = 268435456, -}; -typedef enum rpc_loc_sv_system_e_type rpc_loc_sv_system_e_type; - -enum rpc_loc_sv_status_e_type { - RPC_LOC_SV_STATUS_IDLE = 1, - RPC_LOC_SV_STATUS_SEARCH = 2, - RPC_LOC_SV_STATUS_TRACK = 3, - RPC_LOC_SV_STATUS_MAX = 268435456, -}; -typedef enum rpc_loc_sv_status_e_type rpc_loc_sv_status_e_type; - -typedef rpc_uint32 rpc_loc_sv_info_valid_mask_type; - -struct rpc_loc_sv_info_s_type { - rpc_loc_sv_info_valid_mask_type valid_mask; - rpc_loc_sv_system_e_type system; - rpc_uint8 prn; - rpc_uint8 health_status; - rpc_loc_sv_status_e_type process_status; - rpc_boolean has_eph; - rpc_boolean has_alm; - float elevation; - float azimuth; - float snr; -}; -typedef struct rpc_loc_sv_info_s_type rpc_loc_sv_info_s_type; - -typedef rpc_uint32 rpc_loc_gnss_info_valid_mask_type; - -struct rpc_loc_gnss_info_s_type { - rpc_loc_gnss_info_valid_mask_type valid_mask; - float position_dop; - float horizontal_dop; - float vertical_dop; - rpc_boolean altitude_assumed; - rpc_uint16 sv_count; - struct { - u_int sv_list_len; - rpc_loc_sv_info_s_type *sv_list_val; - } sv_list; -}; -typedef struct rpc_loc_gnss_info_s_type rpc_loc_gnss_info_s_type; - -struct rpc_loc_nmea_report_s_type { - rpc_uint16 length; - char nmea_sentences[1200]; -}; -typedef struct rpc_loc_nmea_report_s_type rpc_loc_nmea_report_s_type; - -enum rpc_loc_status_event_e_type { - RPC_LOC_STATUS_EVENT_ENGINE_STATE = 1, - RPC_LOC_STATUS_EVENT_FIX_SESSION_STATE = 2, - RPC_LOC_STATUS_EVENT_MAX = 268435456, -}; -typedef enum rpc_loc_status_event_e_type rpc_loc_status_event_e_type; - -enum rpc_loc_engine_state_e_type { - RPC_LOC_ENGINE_STATE_ON = 1, - RPC_LOC_ENGINE_STATE_OFF = 2, - RPC_LOC_ENGINE_STATE_MAX = 268435456, -}; -typedef enum rpc_loc_engine_state_e_type rpc_loc_engine_state_e_type; - -enum rpc_loc_fix_session_state_e_type { - RPC_LOC_FIX_SESSION_STATE_BEGIN = 1, - RPC_LOC_FIX_SESSION_STATE_END = 2, - RPC_LOC_FIX_SESSION_STATE_MAX = 268435456, -}; -typedef enum rpc_loc_fix_session_state_e_type rpc_loc_fix_session_state_e_type; - -struct rpc_loc_status_event_payload_u_type { - rpc_loc_status_event_e_type disc; - union { - rpc_loc_engine_state_e_type engine_state; - rpc_loc_fix_session_state_e_type fix_session_state; - } rpc_loc_status_event_payload_u_type_u; -}; -typedef struct rpc_loc_status_event_payload_u_type rpc_loc_status_event_payload_u_type; - -struct rpc_loc_status_event_s_type { - rpc_loc_status_event_e_type event; - rpc_loc_status_event_payload_u_type payload; -}; -typedef struct rpc_loc_status_event_s_type rpc_loc_status_event_s_type; - -enum rpc_loc_server_addr_e_type { - RPC_LOC_SERVER_ADDR_IPV4 = 1, - RPC_LOC_SERVER_ADDR_URL = 2, - RPC_LOC_SERVER_ADDR_MAX = 268435456, -}; -typedef enum rpc_loc_server_addr_e_type rpc_loc_server_addr_e_type; - -struct rpc_loc_server_addr_ipv4_type { - rpc_uint32 addr; - rpc_uint16 port; -}; -typedef struct rpc_loc_server_addr_ipv4_type rpc_loc_server_addr_ipv4_type; - -struct rpc_loc_server_addr_url_type { - rpc_uint16 length; - char addr[256]; -}; -typedef struct rpc_loc_server_addr_url_type rpc_loc_server_addr_url_type; - -struct rpc_loc_server_addr_u_type { - rpc_loc_server_addr_e_type disc; - union { - rpc_loc_server_addr_ipv4_type ipv4; - rpc_loc_server_addr_url_type url; - } rpc_loc_server_addr_u_type_u; -}; -typedef struct rpc_loc_server_addr_u_type rpc_loc_server_addr_u_type; - -struct rpc_loc_server_info_s_type { - rpc_loc_server_addr_e_type addr_type; - rpc_loc_server_addr_u_type addr_info; -}; -typedef struct rpc_loc_server_info_s_type rpc_loc_server_info_s_type; - -enum rpc_loc_ni_notify_verify_e_type { - RPC_LOC_NI_USER_NO_NOTIFY_NO_VERIFY = 1, - RPC_LOC_NI_USER_NOTIFY_ONLY = 2, - RPC_LOC_NI_USER_NOTIFY_VERIFY_ALLOW_NO_RESP = 3, - RPC_LOC_NI_USER_NOTIFY_VERIFY_NOT_ALLOW_NO_RESP = 4, - RPC_LOC_NI_USER_PRIVACY_OVERRIDE = 5, - RPC_LOC_NI_USER_NOTIFY_VERITY_TYPE_MAX = 268435456, -}; -typedef enum rpc_loc_ni_notify_verify_e_type rpc_loc_ni_notify_verify_e_type; - -enum rpc_loc_ni_event_e_type { - RPC_LOC_NI_EVENT_VX_NOTIFY_VERIFY_REQ = 1, - RPC_LOC_NI_EVENT_SUPL_NOTIFY_VERIFY_REQ = 2, - RPC_LOC_NI_EVENT_UMTS_CP_NOTIFY_VERIFY_REQ = 3, - RPC_LOC_NI_EVENT_VX_SERVICE_INTERACTION_REQ = 4, - RPC_LOC_NI_EVENT_MAX = 268435456, -}; -typedef enum rpc_loc_ni_event_e_type rpc_loc_ni_event_e_type; - -enum rpc_loc_ni_datacoding_scheme_e_type { - RPC_LOC_NI_PRESUPL_ISO646IRV = 0, - RPC_LOC_NI_PRESUPL_ISO8859 = 1, - RPC_LOC_NI_PRESUPL_UTF8 = 2, - RPC_LOC_NI_PRESUPL_UTF16 = 3, - RPC_LOC_NI_PRESUPL_UCS2 = 4, - RPC_LOC_NI_PRESUPL_GSM_DEFAULT = 5, - RPC_LOC_NI_PRESUPL_SHIFT_JIS = 6, - RPC_LOC_NI_PRESUPL_JIS = 7, - RPC_LOC_NI_PRESUPL_EUC = 8, - RPC_LOC_NI_PRESUPL_GB2312 = 9, - RPC_LOC_NI_PRESUPL_CNS11643 = 10, - RPC_LOC_NI_PRESUPL_KSC1001 = 11, - RPC_LOC_NI_PRESUPL_ENCODING_UNKNOWN = 2147483647, - RPC_LOC_NI_SS_GERMAN = 12, - RPC_LOC_NI_SS_ENGLISH = 13, - RPC_LOC_NI_SS_ITALIAN = 14, - RPC_LOC_NI_SS_FRENCH = 15, - RPC_LOC_NI_SS_SPANISH = 16, - RPC_LOC_NI_SS_DUTCH = 17, - RPC_LOC_NI_SS_SWEDISH = 18, - RPC_LOC_NI_SS_DANISH = 19, - RPC_LOC_NI_SS_PORTUGUESE = 20, - RPC_LOC_NI_SS_FINNISH = 21, - RPC_LOC_NI_SS_NORWEGIAN = 22, - RPC_LOC_NI_SS_GREEK = 23, - RPC_LOC_NI_SS_TURKISH = 24, - RPC_LOC_NI_SS_HUNGARIAN = 25, - RPC_LOC_NI_SS_POLISH = 26, - RPC_LOC_NI_SS_LANGUAGE_UNSPEC = 27, - RPC_LOC_NI_SUPL_UTF8 = 28, - RPC_LOC_NI_SUPL_UCS2 = 29, - RPC_LOC_NI_SUPL_GSM_DEFAULT = 30, - RPC_LOC_NI_SUPL_ENCODING_UNKNOWN = 2147483647, -}; -typedef enum rpc_loc_ni_datacoding_scheme_e_type rpc_loc_ni_datacoding_scheme_e_type; - -enum rpc_loc_ni_vx_requester_id_encoding_scheme_e_type { - RPC_LOC_NI_VX_OCTET = 0, - RPC_LOC_NI_VX_EXN_PROTOCOL_MSG = 1, - RPC_LOC_NI_VX_ASCII = 2, - RPC_LOC_NI_VX_IA5 = 3, - RPC_LOC_NI_VX_UNICODE = 4, - RPC_LOC_NI_VX_SHIFT_JIS = 5, - RPC_LOC_NI_VX_KOREAN = 6, - RPC_LOC_NI_VX_LATIN_HEBREW = 7, - RPC_LOC_NI_VX_LATIN = 8, - RPC_LOC_NI_VX_GSM = 9, - RPC_LOC_NI_VX_ENCODING_TYPE_MAX = 268435456, -}; -typedef enum rpc_loc_ni_vx_requester_id_encoding_scheme_e_type rpc_loc_ni_vx_requester_id_encoding_scheme_e_type; - -enum rpc_loc_ni_vx_pos_mode_e_type { - RPC_LOC_VX_MS_ASSISTED_ONLY = 1, - RPC_LOC_VX_MS_BASED_ONLY = 2, - RPC_LOC_VX_MS_ASSISTED_PREF_MSBASED_ALLWD = 3, - RPC_LOC_VX_MS_BASED_PREF_ASSISTED_ALLWD = 4, - RPC_LOC_VX_POS_MODE_MAX = 268435456, -}; -typedef enum rpc_loc_ni_vx_pos_mode_e_type rpc_loc_ni_vx_pos_mode_e_type; - -struct rpc_loc_ni_vx_requester_id_s_type { - u_char requester_id_length; - char requester_id[200]; -}; -typedef struct rpc_loc_ni_vx_requester_id_s_type rpc_loc_ni_vx_requester_id_s_type; - -struct rpc_loc_ni_vx_notify_verify_req_s_type { - rpc_loc_ni_notify_verify_e_type notification_priv_type; - u_char pos_qos_incl; - u_char pos_qos; - rpc_uint32 num_fixes; - rpc_uint32 tbf; - rpc_loc_ni_vx_pos_mode_e_type pos_mode; - rpc_loc_ni_vx_requester_id_encoding_scheme_e_type encoding_scheme; - rpc_loc_ni_vx_requester_id_s_type requester_id; - rpc_uint16 user_resp_timer_val; -}; -typedef struct rpc_loc_ni_vx_notify_verify_req_s_type rpc_loc_ni_vx_notify_verify_req_s_type; - -enum rpc_loc_ni_supl_pos_method_e_type { - RPC_LOC_NI_POSMETHOD_AGPS_SETASSISTED = 1, - RPC_LOC_NI_POSMETHOD_AGPS_SETBASED = 2, - RPC_LOC_NI_POSMETHOD_AGPS_SETASSISTED_PREF = 3, - RPC_LOC_NI_POSMETHOD_AGPS_SETBASED_PREF = 4, - RPC_LOC_NI_POSMETHOD_AUTONOMOUS_GPS = 5, - RPC_LOC_NI_POSMETHOD_AFLT = 6, - RPC_LOC_NI_POSMETHOD_ECID = 7, - RPC_LOC_NI_POSMETHOD_EOTD = 8, - RPC_LOC_NI_POSMETHOD_OTDOA = 9, - RPC_LOC_NI_POSMETHOD_NO_POSITION = 10, - RPC_LOC_NI_POSMETHOD_MAX = 268435456, -}; -typedef enum rpc_loc_ni_supl_pos_method_e_type rpc_loc_ni_supl_pos_method_e_type; - -struct rpc_loc_ni_supl_slp_session_id_s_type { - u_char presence; - char session_id[4]; - rpc_loc_server_info_s_type slp_address; -}; -typedef struct rpc_loc_ni_supl_slp_session_id_s_type rpc_loc_ni_supl_slp_session_id_s_type; - -struct rpc_loc_ni_requestor_id_s_type { - u_char data_coding_scheme; - char requestor_id_string[200]; - u_char string_len; -}; -typedef struct rpc_loc_ni_requestor_id_s_type rpc_loc_ni_requestor_id_s_type; - -struct rpc_loc_ni_supl_client_name_s_type { - u_char data_coding_scheme; - char client_name_string[64]; - u_char string_len; -}; -typedef struct rpc_loc_ni_supl_client_name_s_type rpc_loc_ni_supl_client_name_s_type; - -struct rpc_loc_ni_supl_qop_s_type { - u_char bit_mask; - u_char horacc; - u_char veracc; - rpc_uint16 maxLocAge; - u_char delay; -}; -typedef struct rpc_loc_ni_supl_qop_s_type rpc_loc_ni_supl_qop_s_type; - -struct rpc_loc_ni_supl_notify_verify_req_s_type { - rpc_loc_ni_notify_verify_e_type notification_priv_type; - rpc_uint16 flags; - rpc_loc_ni_supl_slp_session_id_s_type supl_slp_session_id; - char supl_hash[8]; - rpc_loc_ni_datacoding_scheme_e_type datacoding_scheme; - rpc_loc_ni_supl_pos_method_e_type pos_method; - rpc_loc_ni_requestor_id_s_type requestor_id; - rpc_loc_ni_supl_client_name_s_type client_name; - rpc_loc_ni_supl_qop_s_type supl_qop; - rpc_uint16 user_response_timer; -}; -typedef struct rpc_loc_ni_supl_notify_verify_req_s_type rpc_loc_ni_supl_notify_verify_req_s_type; - -struct rpc_loc_ni_ext_client_address_s_type { - u_char ext_client_address_len; - char ext_client_address[20]; -}; -typedef struct rpc_loc_ni_ext_client_address_s_type rpc_loc_ni_ext_client_address_s_type; - -enum rpc_loc_ni_location_type_e_type { - RPC_LOC_NI_LOCATIONTYPE_CURRENT_LOCATION = 1, - RPC_LOC_NI_LOCATIONTYPE_CURRENT_OR_LAST_KNOWN_LOCATION = 2, - RPC_LOC_NI_LOCATIONTYPE_INITIAL_LOCATION = 3, - RPC_LOC_NI_LOCATIONTYPE_MAX = 268435456, -}; -typedef enum rpc_loc_ni_location_type_e_type rpc_loc_ni_location_type_e_type; - -struct rpc_loc_ni_deferred_location_s_type { - u_char unused_bits; - u_char ms_available; -}; -typedef struct rpc_loc_ni_deferred_location_s_type rpc_loc_ni_deferred_location_s_type; - -struct rpc_loc_ni_codeword_string_s_type { - u_char data_coding_scheme; - char lcs_codeword_string[20]; - u_char string_len; -}; -typedef struct rpc_loc_ni_codeword_string_s_type rpc_loc_ni_codeword_string_s_type; - -struct rpc_loc_ni_service_type_id_s_type { - u_char lcs_service_type_id; -}; -typedef struct rpc_loc_ni_service_type_id_s_type rpc_loc_ni_service_type_id_s_type; - -struct rpc_loc_ni_umts_cp_notify_verify_req_s_type { - rpc_loc_ni_notify_verify_e_type notification_priv_type; - u_char invoke_id; - rpc_uint16 flags; - u_char notification_length; - char notification_text[64]; - rpc_loc_ni_datacoding_scheme_e_type datacoding_scheme; - rpc_loc_ni_ext_client_address_s_type ext_client_address_data; - rpc_loc_ni_location_type_e_type location_type; - rpc_loc_ni_deferred_location_s_type deferred_location; - rpc_loc_ni_requestor_id_s_type requestor_id; - rpc_loc_ni_codeword_string_s_type codeword_string; - rpc_loc_ni_service_type_id_s_type service_type_id; - rpc_uint16 user_response_timer; -}; -typedef struct rpc_loc_ni_umts_cp_notify_verify_req_s_type rpc_loc_ni_umts_cp_notify_verify_req_s_type; - -enum rpc_loc_ni_service_interaction_e_type { - RPC_LOC_NI_SERVICE_INTERACTION_ONGOING_NI_INCOMING_MO = 1, - RPC_LOC_NI_SERVICE_INTERACTION_MAX = 268435456, -}; -typedef enum rpc_loc_ni_service_interaction_e_type rpc_loc_ni_service_interaction_e_type; - -struct rpc_loc_ni_vx_service_interaction_req_s_type { - rpc_loc_ni_vx_notify_verify_req_s_type ni_vx_req; - rpc_loc_ni_service_interaction_e_type service_interation_type; -}; -typedef struct rpc_loc_ni_vx_service_interaction_req_s_type rpc_loc_ni_vx_service_interaction_req_s_type; - -struct rpc_loc_ni_event_payload_u_type { - rpc_loc_ni_event_e_type disc; - union { - rpc_loc_ni_vx_notify_verify_req_s_type vx_req; - rpc_loc_ni_supl_notify_verify_req_s_type supl_req; - rpc_loc_ni_umts_cp_notify_verify_req_s_type umts_cp_req; - rpc_loc_ni_vx_service_interaction_req_s_type service_interaction_req; - } rpc_loc_ni_event_payload_u_type_u; -}; -typedef struct rpc_loc_ni_event_payload_u_type rpc_loc_ni_event_payload_u_type; - -struct rpc_loc_ni_event_s_type { - rpc_loc_ni_event_e_type event; - rpc_loc_ni_event_payload_u_type payload; -}; -typedef struct rpc_loc_ni_event_s_type rpc_loc_ni_event_s_type; - -enum rpc_loc_assist_data_request_e_type { - RPC_LOC_ASSIST_DATA_TIME_REQ = 1, - RPC_LOC_ASSIST_DATA_PREDICTED_ORBITS_REQ = 2, - RPC_LOC_ASSIST_DATA_MAX = 268435456, -}; -typedef enum rpc_loc_assist_data_request_e_type rpc_loc_assist_data_request_e_type; - -typedef char *rpc_struct_loc_time_download_source_s_type_servers_ptr; - -typedef rpc_struct_loc_time_download_source_s_type_servers_ptr rpc_struct_loc_time_download_source_s_type_servers[3]; - -struct rpc_loc_time_download_source_s_type { - rpc_uint32 delay_threshold; - rpc_struct_loc_time_download_source_s_type_servers servers; -}; -typedef struct rpc_loc_time_download_source_s_type rpc_loc_time_download_source_s_type; - -typedef char *rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr; - -typedef rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr rpc_struct_loc_predicted_orbits_data_source_s_type_servers[3]; - -struct rpc_loc_predicted_orbits_data_source_s_type { - rpc_uint32 max_file_size; - rpc_uint32 max_part_size; - rpc_struct_loc_predicted_orbits_data_source_s_type_servers servers; -}; -typedef struct rpc_loc_predicted_orbits_data_source_s_type rpc_loc_predicted_orbits_data_source_s_type; - -struct rpc_loc_assist_data_request_payload_u_type { - rpc_loc_assist_data_request_e_type disc; - union { - rpc_loc_time_download_source_s_type time_download; - rpc_loc_predicted_orbits_data_source_s_type data_download; - } rpc_loc_assist_data_request_payload_u_type_u; -}; -typedef struct rpc_loc_assist_data_request_payload_u_type rpc_loc_assist_data_request_payload_u_type; - -struct rpc_loc_assist_data_request_s_type { - rpc_loc_assist_data_request_e_type event; - rpc_loc_assist_data_request_payload_u_type payload; -}; -typedef struct rpc_loc_assist_data_request_s_type rpc_loc_assist_data_request_s_type; - -typedef rpc_uint32 rpc_loc_server_connection_handle; - -enum rpc_loc_server_protocol_e_type { - RPC_LOC_SERVER_PROTOCOL_DEFAULT = 0, - RPC_LOC_SERVER_PROTOCOL_SUPL = 1, - RPC_LOC_SERVER_PROTOCOL_VX_MPC = 2, - RPC_LOC_SERVER_PROTOCOL_VX_PDE = 3, - RPC_LOC_SERVER_PROTOCOL_MAX = 16777216, -}; -typedef enum rpc_loc_server_protocol_e_type rpc_loc_server_protocol_e_type; - -enum rpc_loc_server_request_e_type { - RPC_LOC_SERVER_REQUEST_OPEN = 1, - RPC_LOC_SERVER_REQUEST_CLOSE = 2, - RPC_LOC_SERVER_REQUEST_MAX = 268435456, -}; -typedef enum rpc_loc_server_request_e_type rpc_loc_server_request_e_type; - -struct rpc_loc_server_open_req_s_type { - rpc_loc_server_connection_handle conn_handle; - rpc_loc_server_protocol_e_type protocol; -}; -typedef struct rpc_loc_server_open_req_s_type rpc_loc_server_open_req_s_type; - -struct rpc_loc_server_close_req_s_type { - rpc_loc_server_connection_handle conn_handle; -}; -typedef struct rpc_loc_server_close_req_s_type rpc_loc_server_close_req_s_type; - -struct rpc_loc_server_request_u_type { - rpc_loc_server_request_e_type disc; - union { - rpc_loc_server_open_req_s_type open_req; - rpc_loc_server_close_req_s_type close_req; - } rpc_loc_server_request_u_type_u; -}; -typedef struct rpc_loc_server_request_u_type rpc_loc_server_request_u_type; - -struct rpc_loc_server_request_s_type { - rpc_loc_server_request_e_type event; - rpc_loc_server_request_u_type payload; -}; -typedef struct rpc_loc_server_request_s_type rpc_loc_server_request_s_type; - -enum rpc_loc_qwip_request_e_type { - RPC_LOC_QWIP_START_PERIODIC_HI_FREQ_FIXES = 0, - RPC_LOC_QWIP_START_PERIODIC_KEEP_WARM = 0 + 1, - RPC_LOC_QWIP_STOP_PERIODIC_FIXES = 0 + 2, - RPC_LOC_QWIP_SUSPEND = 0 + 3, - RPC_LOC_QWIP_REQUEST_MAX = 268435456, -}; -typedef enum rpc_loc_qwip_request_e_type rpc_loc_qwip_request_e_type; - -struct rpc_loc_qwip_request_s_type { - rpc_loc_qwip_request_e_type request_type; - rpc_uint16 tbf_ms; -}; -typedef struct rpc_loc_qwip_request_s_type rpc_loc_qwip_request_s_type; - -struct rpc_loc_reserved_payload_s_type { - rpc_uint16 data_size; - struct { - u_int data_len; - char *data_val; - } data; -}; -typedef struct rpc_loc_reserved_payload_s_type rpc_loc_reserved_payload_s_type; - -enum rpc_loc_ioctl_e_type { - RPC_LOC_IOCTL_GET_API_VERSION = 1, - RPC_LOC_IOCTL_SET_FIX_CRITERIA = 2, - RPC_LOC_IOCTL_GET_FIX_CRITERIA = 3, - RPC_LOC_IOCTL_SERVICE_START_INDEX = 400, - RPC_LOC_IOCTL_INFORM_NI_USER_RESPONSE = 400, - RPC_LOC_IOCTL_INJECT_PREDICTED_ORBITS_DATA = 401, - RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_VALIDITY = 402, - RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_SOURCE = 403, - RPC_LOC_IOCTL_SET_PREDICTED_ORBITS_DATA_AUTO_DOWNLOAD = 404, - RPC_LOC_IOCTL_INJECT_UTC_TIME = 405, - RPC_LOC_IOCTL_INJECT_RTC_VALUE = 406, - RPC_LOC_IOCTL_INJECT_POSITION = 407, - RPC_LOC_IOCTL_QUERY_ENGINE_STATE = 408, - RPC_LOC_IOCTL_INFORM_SERVER_OPEN_STATUS = 409, - RPC_LOC_IOCTL_INFORM_SERVER_CLOSE_STATUS = 410, - RPC_LOC_IOCTL_SEND_WIPER_POSITION_REPORT = 411, - RPC_LOC_IOCTL_NOTIFY_WIPER_STATUS = 412, - RPC_LOC_IOCTL_ACCESS_EFS_DATA = 413, - RPC_LOC_IOCTL_NV_SETTINGS_START_INDEX = 800, - RPC_LOC_IOCTL_SET_ENGINE_LOCK = 800, - RPC_LOC_IOCTL_GET_ENGINE_LOCK = 801, - RPC_LOC_IOCTL_SET_SBAS_CONFIG = 802, - RPC_LOC_IOCTL_GET_SBAS_CONFIG = 803, - RPC_LOC_IOCTL_SET_NMEA_TYPES = 804, - RPC_LOC_IOCTL_GET_NMEA_TYPES = 805, - RPC_LOC_IOCTL_SET_CDMA_PDE_SERVER_ADDR = 806, - RPC_LOC_IOCTL_GET_CDMA_PDE_SERVER_ADDR = 807, - RPC_LOC_IOCTL_SET_CDMA_MPC_SERVER_ADDR = 808, - RPC_LOC_IOCTL_GET_CDMA_MPC_SERVER_ADDR = 809, - RPC_LOC_IOCTL_SET_UMTS_SLP_SERVER_ADDR = 810, - RPC_LOC_IOCTL_GET_UMTS_SLP_SERVER_ADDR = 811, - RPC_LOC_IOCTL_SET_ON_DEMAND_LPM = 812, - RPC_LOC_IOCTL_GET_ON_DEMAND_LPM = 813, - RPC_LOC_IOCTL_PROPRIETARY_START_INDEX = 1000, - RPC_LOC_IOCTL_DELETE_ASSIST_DATA = 1000, - RPC_LOC_IOCTL_SET_CUSTOM_PDE_SERVER_ADDR = 1001, - RPC_LOC_IOCTL_GET_CUSTOM_PDE_SERVER_ADDR = 1002, - RPC_LOC_IOCTL_THIRD_PARTY_START_INDEX = 1073741824, -}; -typedef enum rpc_loc_ioctl_e_type rpc_loc_ioctl_e_type; - -struct rpc_loc_api_version_s_type { - u_char major; - u_char minor; -}; -typedef struct rpc_loc_api_version_s_type rpc_loc_api_version_s_type; - -enum rpc_loc_fix_recurrence_e_type { - RPC_LOC_PERIODIC_FIX = 1, - RPC_LOC_SINGLE_FIX = 2, - RPC_LOC_FIX_SESSION_TYPE_MAX = 268435456, -}; -typedef enum rpc_loc_fix_recurrence_e_type rpc_loc_fix_recurrence_e_type; - -enum rpc_loc_operation_mode_e_type { - RPC_LOC_OPER_MODE_DEFAULT = 1, - RPC_LOC_OPER_MODE_MSB = 2, - RPC_LOC_OPER_MODE_MSA = 3, - RPC_LOC_OPER_MODE_STANDALONE = 4, - RPC_LOC_OPER_MODE_SPEED_OPTIMAL = 5, - RPC_LOC_OPER_MODE_ACCURACY_OPTIMAL = 6, - RPC_LOC_OPER_MODE_DATA_OPTIMAL = 7, - RPC_LOC_OPER_MODE_CELL_ID = 8, - RPC_LOC_OPER_MODE_MAX = 268435456, -}; -typedef enum rpc_loc_operation_mode_e_type rpc_loc_operation_mode_e_type; - -enum rpc_loc_notify_e_type { - RPC_LOC_NOTIFY_ON_INTERVAL = 1, - RPC_LOC_NOTIFY_ON_DISTANCE = 2, - RPC_LOC_NOTIFY_ON_ANY = 3, - RPC_LOC_NOTIFY_ON_ALL = 4, - RPC_LOC_NOTIFY_TYPE_MAX = 268435456, -}; -typedef enum rpc_loc_notify_e_type rpc_loc_notify_e_type; - -struct rpc_loc_fix_criteria_s_type { - rpc_uint32 valid_mask; - rpc_loc_fix_recurrence_e_type recurrence_type; - rpc_loc_operation_mode_e_type preferred_operation_mode; - rpc_uint32 preferred_accuracy; - rpc_uint32 preferred_response_time; - rpc_boolean intermediate_pos_report_enabled; - rpc_loc_notify_e_type notify_type; - rpc_uint32 min_interval; - float min_distance; - rpc_uint32 min_dist_sample_interval; -}; -typedef struct rpc_loc_fix_criteria_s_type rpc_loc_fix_criteria_s_type; - -enum rpc_loc_ni_user_resp_e_type { - RPC_LOC_NI_LCS_NOTIFY_VERIFY_ACCEPT = 1, - RPC_LOC_NI_LCS_NOTIFY_VERIFY_DENY = 2, - RPC_LOC_NI_LCS_NOTIFY_VERIFY_NORESP = 3, - RPC_LOC_NI_LCS_NOTIFY_VERIFY_MAX = 268435456, -}; -typedef enum rpc_loc_ni_user_resp_e_type rpc_loc_ni_user_resp_e_type; - -struct rpc_loc_user_verify_s_type { - rpc_loc_ni_user_resp_e_type user_resp; - rpc_loc_ni_event_s_type ni_event_pass_back; -}; -typedef struct rpc_loc_user_verify_s_type rpc_loc_user_verify_s_type; - -enum rpc_loc_predicted_orbits_data_format_e_type { - RPC_LOC_PREDICTED_ORBITS_XTRA = 0, - RPC_LOC_PREDICTED_ORBITS_FORMAT_MAX = 268435456, -}; -typedef enum rpc_loc_predicted_orbits_data_format_e_type rpc_loc_predicted_orbits_data_format_e_type; - -struct rpc_loc_predicted_orbits_data_s_type { - rpc_loc_predicted_orbits_data_format_e_type format_type; - rpc_uint32 total_size; - rpc_uint8 total_parts; - rpc_uint8 part; - rpc_uint16 part_len; - struct { - u_int data_ptr_len; - char *data_ptr_val; - } data_ptr; -}; -typedef struct rpc_loc_predicted_orbits_data_s_type rpc_loc_predicted_orbits_data_s_type; - -struct rpc_loc_predicted_orbits_data_validity_report_s_type { - rpc_uint64 start_time_utc; - rpc_uint16 valid_duration_hrs; -}; -typedef struct rpc_loc_predicted_orbits_data_validity_report_s_type rpc_loc_predicted_orbits_data_validity_report_s_type; - -struct rpc_loc_predicted_orbits_auto_download_config_s_type { - rpc_boolean enable; - u_char auto_check_every_hrs; -}; -typedef struct rpc_loc_predicted_orbits_auto_download_config_s_type rpc_loc_predicted_orbits_auto_download_config_s_type; - -struct rpc_loc_assist_data_time_s_type { - rpc_uint64 time_utc; - rpc_uint32 uncertainty; -}; -typedef struct rpc_loc_assist_data_time_s_type rpc_loc_assist_data_time_s_type; - -typedef rpc_uint64 rpc_loc_assist_pos_valid_mask_type; - -struct rpc_loc_assist_data_pos_s_type { - rpc_loc_assist_pos_valid_mask_type valid_mask; - rpc_uint64 timestamp_utc; - double latitude; - double longitude; - float altitude_wrt_ellipsoid; - float altitude_wrt_mean_sea_level; - float hor_unc_circular; - float vert_unc; - u_char confidence_horizontal; - u_char confidence_vertical; - rpc_int32 timestamp_age; -}; -typedef struct rpc_loc_assist_data_pos_s_type rpc_loc_assist_data_pos_s_type; - -enum rpc_loc_server_open_status_e_type { - RPC_LOC_SERVER_OPEN_SUCCESS = 1, - RPC_LOC_SERVER_OPEN_FAIL = 2, - RPC_LOC_SERVER_OPEN_STATUS_MAX = 268435456, -}; -typedef enum rpc_loc_server_open_status_e_type rpc_loc_server_open_status_e_type; - -struct rpc_loc_server_open_status_s_type { - rpc_loc_server_connection_handle conn_handle; - rpc_loc_server_open_status_e_type open_status; - char apn_name[100]; -}; -typedef struct rpc_loc_server_open_status_s_type rpc_loc_server_open_status_s_type; - -enum rpc_loc_server_close_status_e_type { - RPC_LOC_SERVER_CLOSE_SUCCESS = 1, - RPC_LOC_SERVER_CLOSE_FAIL = 2, - RPC_LOC_SERVER_CLOSE_STATUS_MAX = 268435456, -}; -typedef enum rpc_loc_server_close_status_e_type rpc_loc_server_close_status_e_type; - -struct rpc_loc_server_close_status_s_type { - rpc_loc_server_connection_handle conn_handle; - rpc_loc_server_close_status_e_type close_status; -}; -typedef struct rpc_loc_server_close_status_s_type rpc_loc_server_close_status_s_type; - -struct rpc_loc_wiper_fix_time_s_type { - rpc_uint32 slow_clock_count; -}; -typedef struct rpc_loc_wiper_fix_time_s_type rpc_loc_wiper_fix_time_s_type; - -struct rpc_loc_wiper_fix_pos_s_type { - rpc_int32 lat; - rpc_int32 lon; - rpc_uint16 HEPE; - rpc_uint8 num_of_aps_used; - rpc_uint8 fix_error_code; -}; -typedef struct rpc_loc_wiper_fix_pos_s_type rpc_loc_wiper_fix_pos_s_type; - -struct rpc_loc_wiper_ap_info_s_type { - char mac_addr[6]; - rpc_int32 rssi; - rpc_uint16 channel; - rpc_uint8 ap_qualifier; -}; -typedef struct rpc_loc_wiper_ap_info_s_type rpc_loc_wiper_ap_info_s_type; - -struct rpc_loc_wiper_ap_set_s_type { - rpc_uint8 num_of_aps; - rpc_loc_wiper_ap_info_s_type ap_info[50]; -}; -typedef struct rpc_loc_wiper_ap_set_s_type rpc_loc_wiper_ap_set_s_type; - -struct rpc_loc_wiper_position_report_s_type { - rpc_uint8 wiper_valid_info_flag; - rpc_loc_wiper_fix_time_s_type wiper_fix_time; - rpc_loc_wiper_fix_pos_s_type wiper_fix_position; - rpc_loc_wiper_ap_set_s_type wiper_ap_set; -}; -typedef struct rpc_loc_wiper_position_report_s_type rpc_loc_wiper_position_report_s_type; - -enum rpc_loc_wiper_status_e_type { - RPC_LOC_WIPER_STATUS_AVAILABLE = 1, - RPC_LOC_WIPER_STATUS_UNAVAILABLE = 2, - RPC_LOC_WIPER_STATUS_E_SIZE = 268435456, -}; -typedef enum rpc_loc_wiper_status_e_type rpc_loc_wiper_status_e_type; - -enum rpc_loc_fs_operation_e_type { - RPC_LOC_FS_CREATE_WRITE_FILE = 1, - RPC_LOC_FS_APPEND_FILE = 2, - RPC_LOC_FS_DELETE_FILE = 3, - RPC_LOC_FS_READ_FILE = 4, - RPC_LOC_FS_MAX = 268435456, -}; -typedef enum rpc_loc_fs_operation_e_type rpc_loc_fs_operation_e_type; - -struct rpc_loc_efs_data_s_type { - char filename[64]; - rpc_loc_fs_operation_e_type operation; - rpc_uint32 total_size; - struct { - u_int data_ptr_len; - char *data_ptr_val; - } data_ptr; - rpc_uint32 part_len; - rpc_uint8 part; - rpc_uint8 total_parts; - rpc_uint32 reserved; -}; -typedef struct rpc_loc_efs_data_s_type rpc_loc_efs_data_s_type; - -enum rpc_loc_lock_e_type { - RPC_LOC_LOCK_NONE = 1, - RPC_LOC_LOCK_MI = 2, - RPC_LOC_LOCK_MT = 3, - RPC_LOC_LOCK_ALL = 4, - RPC_LOC_LOCK_MAX = 268435456, -}; -typedef enum rpc_loc_lock_e_type rpc_loc_lock_e_type; - -typedef rpc_uint32 rpc_loc_nmea_sentence_type; - -typedef rpc_uint32 rpc_loc_assist_data_type; - -struct rpc_loc_assist_data_delete_s_type { - rpc_loc_assist_data_type type; - rpc_uint32 reserved[8]; -}; -typedef struct rpc_loc_assist_data_delete_s_type rpc_loc_assist_data_delete_s_type; - -struct rpc_loc_ioctl_data_u_type { - rpc_loc_ioctl_e_type disc; - union { - rpc_loc_fix_criteria_s_type fix_criteria; - rpc_loc_user_verify_s_type user_verify_resp; - rpc_loc_predicted_orbits_data_s_type predicted_orbits_data; - rpc_loc_predicted_orbits_auto_download_config_s_type predicted_orbits_auto_download; - rpc_loc_assist_data_time_s_type assistance_data_time; - rpc_loc_assist_data_pos_s_type assistance_data_position; - rpc_loc_server_open_status_s_type conn_open_status; - rpc_loc_server_close_status_s_type conn_close_status; - rpc_loc_wiper_position_report_s_type wiper_pos; - rpc_loc_wiper_status_e_type wiper_status; - rpc_loc_lock_e_type engine_lock; - rpc_boolean sbas_mode; - rpc_loc_nmea_sentence_type nmea_types; - rpc_boolean on_demand_lpm; - rpc_loc_server_info_s_type server_addr; - rpc_loc_assist_data_delete_s_type assist_data_delete; - rpc_loc_efs_data_s_type efs_data; - } rpc_loc_ioctl_data_u_type_u; -}; -typedef struct rpc_loc_ioctl_data_u_type rpc_loc_ioctl_data_u_type; - -struct rpc_loc_ioctl_callback_data_u_type { - rpc_loc_ioctl_e_type disc; - union { - rpc_loc_api_version_s_type api_version; - rpc_loc_fix_criteria_s_type fix_criteria; - rpc_loc_lock_e_type engine_lock; - rpc_boolean sbas_mode; - rpc_loc_nmea_sentence_type nmea_types; - rpc_boolean on_demand_lpm; - rpc_loc_server_info_s_type server_addr; - rpc_loc_predicted_orbits_data_source_s_type predicted_orbits_data_source; - rpc_loc_predicted_orbits_data_validity_report_s_type predicted_orbits_data_validity; - } rpc_loc_ioctl_callback_data_u_type_u; -}; -typedef struct rpc_loc_ioctl_callback_data_u_type rpc_loc_ioctl_callback_data_u_type; - -struct rpc_loc_ioctl_callback_s_type { - rpc_loc_ioctl_e_type type; - rpc_int32 status; - rpc_loc_ioctl_callback_data_u_type data; -}; -typedef struct rpc_loc_ioctl_callback_s_type rpc_loc_ioctl_callback_s_type; - -struct rpc_loc_event_payload_u_type { - u_quad_t disc; - union { - rpc_loc_parsed_position_s_type parsed_location_report; - rpc_loc_gnss_info_s_type gnss_report; - rpc_loc_nmea_report_s_type nmea_report; - rpc_loc_ni_event_s_type ni_request; - rpc_loc_assist_data_request_s_type assist_data_request; - rpc_loc_server_request_s_type loc_server_request; - rpc_loc_ioctl_callback_s_type ioctl_report; - rpc_loc_status_event_s_type status_report; - rpc_loc_qwip_request_s_type qwip_request; - rpc_loc_reserved_payload_s_type reserved; - } rpc_loc_event_payload_u_type_u; -}; -typedef struct rpc_loc_event_payload_u_type rpc_loc_event_payload_u_type; - -/* the xdr functions */ - -#if defined(__STDC__) || defined(__cplusplus) -extern bool_t xdr_rpc_boolean (XDR *, rpc_boolean*); -extern bool_t xdr_rpc_uint32 (XDR *, rpc_uint32*); -extern bool_t xdr_rpc_uint16 (XDR *, rpc_uint16*); -extern bool_t xdr_rpc_uint8 (XDR *, rpc_uint8*); -extern bool_t xdr_rpc_int32 (XDR *, rpc_int32*); -extern bool_t xdr_rpc_byte (XDR *, rpc_byte*); -extern bool_t xdr_rpc_uint64 (XDR *, rpc_uint64*); -extern bool_t xdr_rpc_loc_client_handle_type (XDR *, rpc_loc_client_handle_type*); -extern bool_t xdr_rpc_loc_event_mask_type (XDR *, rpc_loc_event_mask_type*); -extern bool_t xdr_rpc_loc_position_valid_mask_type (XDR *, rpc_loc_position_valid_mask_type*); -extern bool_t xdr_rpc_loc_pos_technology_mask_type (XDR *, rpc_loc_pos_technology_mask_type*); -extern bool_t xdr_rpc_loc_session_status_e_type (XDR *, rpc_loc_session_status_e_type*); -extern bool_t xdr_rpc_loc_calendar_time_s_type (XDR *, rpc_loc_calendar_time_s_type*); -extern bool_t xdr_rpc_loc_parsed_position_s_type (XDR *, rpc_loc_parsed_position_s_type*); -extern bool_t xdr_rpc_loc_sv_system_e_type (XDR *, rpc_loc_sv_system_e_type*); -extern bool_t xdr_rpc_loc_sv_status_e_type (XDR *, rpc_loc_sv_status_e_type*); -extern bool_t xdr_rpc_loc_sv_info_valid_mask_type (XDR *, rpc_loc_sv_info_valid_mask_type*); -extern bool_t xdr_rpc_loc_sv_info_s_type (XDR *, rpc_loc_sv_info_s_type*); -extern bool_t xdr_rpc_loc_gnss_info_valid_mask_type (XDR *, rpc_loc_gnss_info_valid_mask_type*); -extern bool_t xdr_rpc_loc_gnss_info_s_type (XDR *, rpc_loc_gnss_info_s_type*); -extern bool_t xdr_rpc_loc_nmea_report_s_type (XDR *, rpc_loc_nmea_report_s_type*); -extern bool_t xdr_rpc_loc_status_event_e_type (XDR *, rpc_loc_status_event_e_type*); -extern bool_t xdr_rpc_loc_engine_state_e_type (XDR *, rpc_loc_engine_state_e_type*); -extern bool_t xdr_rpc_loc_fix_session_state_e_type (XDR *, rpc_loc_fix_session_state_e_type*); -extern bool_t xdr_rpc_loc_status_event_payload_u_type (XDR *, rpc_loc_status_event_payload_u_type*); -extern bool_t xdr_rpc_loc_status_event_s_type (XDR *, rpc_loc_status_event_s_type*); -extern bool_t xdr_rpc_loc_server_addr_e_type (XDR *, rpc_loc_server_addr_e_type*); -extern bool_t xdr_rpc_loc_server_addr_ipv4_type (XDR *, rpc_loc_server_addr_ipv4_type*); -extern bool_t xdr_rpc_loc_server_addr_url_type (XDR *, rpc_loc_server_addr_url_type*); -extern bool_t xdr_rpc_loc_server_addr_u_type (XDR *, rpc_loc_server_addr_u_type*); -extern bool_t xdr_rpc_loc_server_info_s_type (XDR *, rpc_loc_server_info_s_type*); -extern bool_t xdr_rpc_loc_ni_notify_verify_e_type (XDR *, rpc_loc_ni_notify_verify_e_type*); -extern bool_t xdr_rpc_loc_ni_event_e_type (XDR *, rpc_loc_ni_event_e_type*); -extern bool_t xdr_rpc_loc_ni_datacoding_scheme_e_type (XDR *, rpc_loc_ni_datacoding_scheme_e_type*); -extern bool_t xdr_rpc_loc_ni_vx_requester_id_encoding_scheme_e_type (XDR *, rpc_loc_ni_vx_requester_id_encoding_scheme_e_type*); -extern bool_t xdr_rpc_loc_ni_vx_pos_mode_e_type (XDR *, rpc_loc_ni_vx_pos_mode_e_type*); -extern bool_t xdr_rpc_loc_ni_vx_requester_id_s_type (XDR *, rpc_loc_ni_vx_requester_id_s_type*); -extern bool_t xdr_rpc_loc_ni_vx_notify_verify_req_s_type (XDR *, rpc_loc_ni_vx_notify_verify_req_s_type*); -extern bool_t xdr_rpc_loc_ni_supl_pos_method_e_type (XDR *, rpc_loc_ni_supl_pos_method_e_type*); -extern bool_t xdr_rpc_loc_ni_supl_slp_session_id_s_type (XDR *, rpc_loc_ni_supl_slp_session_id_s_type*); -extern bool_t xdr_rpc_loc_ni_requestor_id_s_type (XDR *, rpc_loc_ni_requestor_id_s_type*); -extern bool_t xdr_rpc_loc_ni_supl_client_name_s_type (XDR *, rpc_loc_ni_supl_client_name_s_type*); -extern bool_t xdr_rpc_loc_ni_supl_qop_s_type (XDR *, rpc_loc_ni_supl_qop_s_type*); -extern bool_t xdr_rpc_loc_ni_supl_notify_verify_req_s_type (XDR *, rpc_loc_ni_supl_notify_verify_req_s_type*); -extern bool_t xdr_rpc_loc_ni_ext_client_address_s_type (XDR *, rpc_loc_ni_ext_client_address_s_type*); -extern bool_t xdr_rpc_loc_ni_location_type_e_type (XDR *, rpc_loc_ni_location_type_e_type*); -extern bool_t xdr_rpc_loc_ni_deferred_location_s_type (XDR *, rpc_loc_ni_deferred_location_s_type*); -extern bool_t xdr_rpc_loc_ni_codeword_string_s_type (XDR *, rpc_loc_ni_codeword_string_s_type*); -extern bool_t xdr_rpc_loc_ni_service_type_id_s_type (XDR *, rpc_loc_ni_service_type_id_s_type*); -extern bool_t xdr_rpc_loc_ni_umts_cp_notify_verify_req_s_type (XDR *, rpc_loc_ni_umts_cp_notify_verify_req_s_type*); -extern bool_t xdr_rpc_loc_ni_service_interaction_e_type (XDR *, rpc_loc_ni_service_interaction_e_type*); -extern bool_t xdr_rpc_loc_ni_vx_service_interaction_req_s_type (XDR *, rpc_loc_ni_vx_service_interaction_req_s_type*); -extern bool_t xdr_rpc_loc_ni_event_payload_u_type (XDR *, rpc_loc_ni_event_payload_u_type*); -extern bool_t xdr_rpc_loc_ni_event_s_type (XDR *, rpc_loc_ni_event_s_type*); -extern bool_t xdr_rpc_loc_assist_data_request_e_type (XDR *, rpc_loc_assist_data_request_e_type*); -extern bool_t xdr_rpc_struct_loc_time_download_source_s_type_servers_ptr (XDR *, rpc_struct_loc_time_download_source_s_type_servers_ptr*); -extern bool_t xdr_rpc_struct_loc_time_download_source_s_type_servers (XDR *, rpc_struct_loc_time_download_source_s_type_servers); -extern bool_t xdr_rpc_loc_time_download_source_s_type (XDR *, rpc_loc_time_download_source_s_type*); -extern bool_t xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr (XDR *, rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr*); -extern bool_t xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers (XDR *, rpc_struct_loc_predicted_orbits_data_source_s_type_servers); -extern bool_t xdr_rpc_loc_predicted_orbits_data_source_s_type (XDR *, rpc_loc_predicted_orbits_data_source_s_type*); -extern bool_t xdr_rpc_loc_assist_data_request_payload_u_type (XDR *, rpc_loc_assist_data_request_payload_u_type*); -extern bool_t xdr_rpc_loc_assist_data_request_s_type (XDR *, rpc_loc_assist_data_request_s_type*); -extern bool_t xdr_rpc_loc_server_connection_handle (XDR *, rpc_loc_server_connection_handle*); -extern bool_t xdr_rpc_loc_server_protocol_e_type (XDR *, rpc_loc_server_protocol_e_type*); -extern bool_t xdr_rpc_loc_server_request_e_type (XDR *, rpc_loc_server_request_e_type*); -extern bool_t xdr_rpc_loc_server_open_req_s_type (XDR *, rpc_loc_server_open_req_s_type*); -extern bool_t xdr_rpc_loc_server_close_req_s_type (XDR *, rpc_loc_server_close_req_s_type*); -extern bool_t xdr_rpc_loc_server_request_u_type (XDR *, rpc_loc_server_request_u_type*); -extern bool_t xdr_rpc_loc_server_request_s_type (XDR *, rpc_loc_server_request_s_type*); -extern bool_t xdr_rpc_loc_qwip_request_e_type (XDR *, rpc_loc_qwip_request_e_type*); -extern bool_t xdr_rpc_loc_qwip_request_s_type (XDR *, rpc_loc_qwip_request_s_type*); -extern bool_t xdr_rpc_loc_reserved_payload_s_type (XDR *, rpc_loc_reserved_payload_s_type*); -extern bool_t xdr_rpc_loc_ioctl_e_type (XDR *, rpc_loc_ioctl_e_type*); -extern bool_t xdr_rpc_loc_api_version_s_type (XDR *, rpc_loc_api_version_s_type*); -extern bool_t xdr_rpc_loc_fix_recurrence_e_type (XDR *, rpc_loc_fix_recurrence_e_type*); -extern bool_t xdr_rpc_loc_operation_mode_e_type (XDR *, rpc_loc_operation_mode_e_type*); -extern bool_t xdr_rpc_loc_notify_e_type (XDR *, rpc_loc_notify_e_type*); -extern bool_t xdr_rpc_loc_fix_criteria_s_type (XDR *, rpc_loc_fix_criteria_s_type*); -extern bool_t xdr_rpc_loc_ni_user_resp_e_type (XDR *, rpc_loc_ni_user_resp_e_type*); -extern bool_t xdr_rpc_loc_user_verify_s_type (XDR *, rpc_loc_user_verify_s_type*); -extern bool_t xdr_rpc_loc_predicted_orbits_data_format_e_type (XDR *, rpc_loc_predicted_orbits_data_format_e_type*); -extern bool_t xdr_rpc_loc_predicted_orbits_data_s_type (XDR *, rpc_loc_predicted_orbits_data_s_type*); -extern bool_t xdr_rpc_loc_predicted_orbits_data_validity_report_s_type (XDR *, rpc_loc_predicted_orbits_data_validity_report_s_type*); -extern bool_t xdr_rpc_loc_predicted_orbits_auto_download_config_s_type (XDR *, rpc_loc_predicted_orbits_auto_download_config_s_type*); -extern bool_t xdr_rpc_loc_assist_data_time_s_type (XDR *, rpc_loc_assist_data_time_s_type*); -extern bool_t xdr_rpc_loc_assist_pos_valid_mask_type (XDR *, rpc_loc_assist_pos_valid_mask_type*); -extern bool_t xdr_rpc_loc_assist_data_pos_s_type (XDR *, rpc_loc_assist_data_pos_s_type*); -extern bool_t xdr_rpc_loc_server_open_status_e_type (XDR *, rpc_loc_server_open_status_e_type*); -extern bool_t xdr_rpc_loc_server_open_status_s_type (XDR *, rpc_loc_server_open_status_s_type*); -extern bool_t xdr_rpc_loc_server_close_status_e_type (XDR *, rpc_loc_server_close_status_e_type*); -extern bool_t xdr_rpc_loc_server_close_status_s_type (XDR *, rpc_loc_server_close_status_s_type*); -extern bool_t xdr_rpc_loc_wiper_fix_time_s_type (XDR *, rpc_loc_wiper_fix_time_s_type*); -extern bool_t xdr_rpc_loc_wiper_fix_pos_s_type (XDR *, rpc_loc_wiper_fix_pos_s_type*); -extern bool_t xdr_rpc_loc_wiper_ap_info_s_type (XDR *, rpc_loc_wiper_ap_info_s_type*); -extern bool_t xdr_rpc_loc_wiper_ap_set_s_type (XDR *, rpc_loc_wiper_ap_set_s_type*); -extern bool_t xdr_rpc_loc_wiper_position_report_s_type (XDR *, rpc_loc_wiper_position_report_s_type*); -extern bool_t xdr_rpc_loc_wiper_status_e_type (XDR *, rpc_loc_wiper_status_e_type*); -extern bool_t xdr_rpc_loc_fs_operation_e_type (XDR *, rpc_loc_fs_operation_e_type*); -extern bool_t xdr_rpc_loc_efs_data_s_type (XDR *, rpc_loc_efs_data_s_type*); -extern bool_t xdr_rpc_loc_lock_e_type (XDR *, rpc_loc_lock_e_type*); -extern bool_t xdr_rpc_loc_nmea_sentence_type (XDR *, rpc_loc_nmea_sentence_type*); -extern bool_t xdr_rpc_loc_assist_data_type (XDR *, rpc_loc_assist_data_type*); -extern bool_t xdr_rpc_loc_assist_data_delete_s_type (XDR *, rpc_loc_assist_data_delete_s_type*); -extern bool_t xdr_rpc_loc_ioctl_data_u_type (XDR *, rpc_loc_ioctl_data_u_type*); -extern bool_t xdr_rpc_loc_ioctl_callback_data_u_type (XDR *, rpc_loc_ioctl_callback_data_u_type*); -extern bool_t xdr_rpc_loc_ioctl_callback_s_type (XDR *, rpc_loc_ioctl_callback_s_type*); -extern bool_t xdr_rpc_loc_event_payload_u_type (XDR *, rpc_loc_event_payload_u_type*); - -#else /* K&R C */ -extern bool_t xdr_rpc_boolean (); -extern bool_t xdr_rpc_uint32 (); -extern bool_t xdr_rpc_uint16 (); -extern bool_t xdr_rpc_uint8 (); -extern bool_t xdr_rpc_int32 (); -extern bool_t xdr_rpc_byte (); -extern bool_t xdr_rpc_uint64 (); -extern bool_t xdr_rpc_loc_client_handle_type (); -extern bool_t xdr_rpc_loc_event_mask_type (); -extern bool_t xdr_rpc_loc_position_valid_mask_type (); -extern bool_t xdr_rpc_loc_pos_technology_mask_type (); -extern bool_t xdr_rpc_loc_session_status_e_type (); -extern bool_t xdr_rpc_loc_calendar_time_s_type (); -extern bool_t xdr_rpc_loc_parsed_position_s_type (); -extern bool_t xdr_rpc_loc_sv_system_e_type (); -extern bool_t xdr_rpc_loc_sv_status_e_type (); -extern bool_t xdr_rpc_loc_sv_info_valid_mask_type (); -extern bool_t xdr_rpc_loc_sv_info_s_type (); -extern bool_t xdr_rpc_loc_gnss_info_valid_mask_type (); -extern bool_t xdr_rpc_loc_gnss_info_s_type (); -extern bool_t xdr_rpc_loc_nmea_report_s_type (); -extern bool_t xdr_rpc_loc_status_event_e_type (); -extern bool_t xdr_rpc_loc_engine_state_e_type (); -extern bool_t xdr_rpc_loc_fix_session_state_e_type (); -extern bool_t xdr_rpc_loc_status_event_payload_u_type (); -extern bool_t xdr_rpc_loc_status_event_s_type (); -extern bool_t xdr_rpc_loc_server_addr_e_type (); -extern bool_t xdr_rpc_loc_server_addr_ipv4_type (); -extern bool_t xdr_rpc_loc_server_addr_url_type (); -extern bool_t xdr_rpc_loc_server_addr_u_type (); -extern bool_t xdr_rpc_loc_server_info_s_type (); -extern bool_t xdr_rpc_loc_ni_notify_verify_e_type (); -extern bool_t xdr_rpc_loc_ni_event_e_type (); -extern bool_t xdr_rpc_loc_ni_datacoding_scheme_e_type (); -extern bool_t xdr_rpc_loc_ni_vx_requester_id_encoding_scheme_e_type (); -extern bool_t xdr_rpc_loc_ni_vx_pos_mode_e_type (); -extern bool_t xdr_rpc_loc_ni_vx_requester_id_s_type (); -extern bool_t xdr_rpc_loc_ni_vx_notify_verify_req_s_type (); -extern bool_t xdr_rpc_loc_ni_supl_pos_method_e_type (); -extern bool_t xdr_rpc_loc_ni_supl_slp_session_id_s_type (); -extern bool_t xdr_rpc_loc_ni_requestor_id_s_type (); -extern bool_t xdr_rpc_loc_ni_supl_client_name_s_type (); -extern bool_t xdr_rpc_loc_ni_supl_qop_s_type (); -extern bool_t xdr_rpc_loc_ni_supl_notify_verify_req_s_type (); -extern bool_t xdr_rpc_loc_ni_ext_client_address_s_type (); -extern bool_t xdr_rpc_loc_ni_location_type_e_type (); -extern bool_t xdr_rpc_loc_ni_deferred_location_s_type (); -extern bool_t xdr_rpc_loc_ni_codeword_string_s_type (); -extern bool_t xdr_rpc_loc_ni_service_type_id_s_type (); -extern bool_t xdr_rpc_loc_ni_umts_cp_notify_verify_req_s_type (); -extern bool_t xdr_rpc_loc_ni_service_interaction_e_type (); -extern bool_t xdr_rpc_loc_ni_vx_service_interaction_req_s_type (); -extern bool_t xdr_rpc_loc_ni_event_payload_u_type (); -extern bool_t xdr_rpc_loc_ni_event_s_type (); -extern bool_t xdr_rpc_loc_assist_data_request_e_type (); -extern bool_t xdr_rpc_struct_loc_time_download_source_s_type_servers_ptr (); -extern bool_t xdr_rpc_struct_loc_time_download_source_s_type_servers (); -extern bool_t xdr_rpc_loc_time_download_source_s_type (); -extern bool_t xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr (); -extern bool_t xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers (); -extern bool_t xdr_rpc_loc_predicted_orbits_data_source_s_type (); -extern bool_t xdr_rpc_loc_assist_data_request_payload_u_type (); -extern bool_t xdr_rpc_loc_assist_data_request_s_type (); -extern bool_t xdr_rpc_loc_server_connection_handle (); -extern bool_t xdr_rpc_loc_server_protocol_e_type (); -extern bool_t xdr_rpc_loc_server_request_e_type (); -extern bool_t xdr_rpc_loc_server_open_req_s_type (); -extern bool_t xdr_rpc_loc_server_close_req_s_type (); -extern bool_t xdr_rpc_loc_server_request_u_type (); -extern bool_t xdr_rpc_loc_server_request_s_type (); -extern bool_t xdr_rpc_loc_qwip_request_e_type (); -extern bool_t xdr_rpc_loc_qwip_request_s_type (); -extern bool_t xdr_rpc_loc_reserved_payload_s_type (); -extern bool_t xdr_rpc_loc_ioctl_e_type (); -extern bool_t xdr_rpc_loc_api_version_s_type (); -extern bool_t xdr_rpc_loc_fix_recurrence_e_type (); -extern bool_t xdr_rpc_loc_operation_mode_e_type (); -extern bool_t xdr_rpc_loc_notify_e_type (); -extern bool_t xdr_rpc_loc_fix_criteria_s_type (); -extern bool_t xdr_rpc_loc_ni_user_resp_e_type (); -extern bool_t xdr_rpc_loc_user_verify_s_type (); -extern bool_t xdr_rpc_loc_predicted_orbits_data_format_e_type (); -extern bool_t xdr_rpc_loc_predicted_orbits_data_s_type (); -extern bool_t xdr_rpc_loc_predicted_orbits_data_validity_report_s_type (); -extern bool_t xdr_rpc_loc_predicted_orbits_auto_download_config_s_type (); -extern bool_t xdr_rpc_loc_assist_data_time_s_type (); -extern bool_t xdr_rpc_loc_assist_pos_valid_mask_type (); -extern bool_t xdr_rpc_loc_assist_data_pos_s_type (); -extern bool_t xdr_rpc_loc_server_open_status_e_type (); -extern bool_t xdr_rpc_loc_server_open_status_s_type (); -extern bool_t xdr_rpc_loc_server_close_status_e_type (); -extern bool_t xdr_rpc_loc_server_close_status_s_type (); -extern bool_t xdr_rpc_loc_wiper_fix_time_s_type (); -extern bool_t xdr_rpc_loc_wiper_fix_pos_s_type (); -extern bool_t xdr_rpc_loc_wiper_ap_info_s_type (); -extern bool_t xdr_rpc_loc_wiper_ap_set_s_type (); -extern bool_t xdr_rpc_loc_wiper_position_report_s_type (); -extern bool_t xdr_rpc_loc_wiper_status_e_type (); -extern bool_t xdr_rpc_loc_fs_operation_e_type (); -extern bool_t xdr_rpc_loc_efs_data_s_type (); -extern bool_t xdr_rpc_loc_lock_e_type (); -extern bool_t xdr_rpc_loc_nmea_sentence_type (); -extern bool_t xdr_rpc_loc_assist_data_type (); -extern bool_t xdr_rpc_loc_assist_data_delete_s_type (); -extern bool_t xdr_rpc_loc_ioctl_data_u_type (); -extern bool_t xdr_rpc_loc_ioctl_callback_data_u_type (); -extern bool_t xdr_rpc_loc_ioctl_callback_s_type (); -extern bool_t xdr_rpc_loc_event_payload_u_type (); - -#endif /* K&R C */ - -#ifdef __cplusplus -} -#endif - -#endif /* !_LOC_API_COMMON_H_RPCGEN */ diff --git a/loc_api/libloc_api-rpc/inc-1240/loc_api_fixup.h b/loc_api/libloc_api-rpc/inc-1240/loc_api_fixup.h deleted file mode 100644 index e62eb367..00000000 --- a/loc_api/libloc_api-rpc/inc-1240/loc_api_fixup.h +++ /dev/null @@ -1,188 +0,0 @@ -/****************************************************************************** - @file: loc_api_fixup.h - @brief: Loc API Android RPC amendment header - - DESCRIPTION - Loc API Android RPC amendment header - - INITIALIZATION AND SEQUENCING REQUIREMENTS - - ----------------------------------------------------------------------------- -Copyright (c) 2009, QUALCOMM USA, INC. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -· Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -· Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -· Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ----------------------------------------------------------------------------- - ******************************************************************************/ - -#ifndef LOC_API_FIXUP_H -#define LOC_API_FIXUP_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -#ifndef NULLPROC -#define NULLPROC 0 -#endif /* NULLPROC */ - -#ifdef ADD_XDR_FLOAT - -extern bool_t xdr_float (XDR *__xdrs, float *__fp); -extern bool_t xdr_double (XDR *__xdrs, double *__dp); - -#endif /* ADD_XDR_FLOAT */ - -#ifdef ADD_XDR_BOOL -extern bool_t xdr_bool(XDR *__xdrs, int *__bp); -#endif /* ADD_XDR_BOOL */ - -#define RPC_LOC_API_MAJOR_VERSION_NUMBER 1 -#define RPC_LOC_API_MINOR_VERSION_NUMBER 0 - -// Return value for loc_open in case of failure. -#define RPC_LOC_CLIENT_HANDLE_INVALID -1 - -// Return value of loc api calls for loc_close, loc_start_fix, loc_stop_fix and loc_ioctl -// These are also the status for the ioctl callback -#define RPC_LOC_API_SUCCESS 0 -#define RPC_LOC_API_GENERAL_FAILURE 1 -#define RPC_LOC_API_UNSUPPORTED 2 -#define RPC_LOC_API_INVALID_HANDLE 4 -#define RPC_LOC_API_INVALID_PARAMETER 5 -#define RPC_LOC_API_ENGINE_BUSY 6 -#define RPC_LOC_API_PHONE_OFFLINE 7 -#define RPC_LOC_API_TIMEOUT 8 - -// Special return value for loc api calls in case of RCP failure -#define RPC_LOC_API_RPC_FAILURE (-1234) - -#define RPC_LOC_API_MAX_SV_COUNT 80 -#define RPC_LOC_API_MAX_NMEA_STRING_LENGTH 1200 - -// Maximum server address that will be used in location API -#define RPC_LOC_API_MAX_SERVER_ADDR_LENGTH 256 -#define RPC_LOC_API_MAX_NUM_PREDICTED_ORBITS_SERVERS 3 -#define RPC_LOC_API_MAX_NUM_NTP_SERVERS 3 - -#define RPC_LOC_EVENT_PARSED_POSITION_REPORT 0x00000001 // Position report comes in loc_parsed_position_s_type -#define RPC_LOC_EVENT_SATELLITE_REPORT 0x00000002 // Satellite in view report -#define RPC_LOC_EVENT_NMEA_1HZ_REPORT 0x00000004 // NMEA report at 1HZ rate -#define RPC_LOC_EVENT_NMEA_POSITION_REPORT 0x00000008 // NMEA report at position report rate -#define RPC_LOC_EVENT_NI_NOTIFY_VERIFY_REQUEST 0x00000010 // NI notification/verification request -#define RPC_LOC_EVENT_ASSISTANCE_DATA_REQUEST 0x00000020 // Assistance data, eg: time, predicted orbits request -#define RPC_LOC_EVENT_LOCATION_SERVER_REQUEST 0x00000040 // Request for location server -#define RPC_LOC_EVENT_IOCTL_REPORT 0x00000080 // Callback report for loc_ioctl -#define RPC_LOC_EVENT_STATUS_REPORT 0x00000100 // Misc status report: eg, engine state - - -#define RPC_LOC_POS_VALID_SESSION_STATUS 0x00000001 -#define RPC_LOC_POS_VALID_TIMESTAMP_CALENDAR 0x00000002 -#define RPC_LOC_POS_VALID_TIMESTAMP_UTC 0x00000004 -#define RPC_LOC_POS_VALID_LEAP_SECONDS 0x00000008 -#define RPC_LOC_POS_VALID_TIME_UNC 0x00000010 -#define RPC_LOC_POS_VALID_LATITUDE 0x00000020 -#define RPC_LOC_POS_VALID_LONGITUDE 0x00000040 -#define RPC_LOC_POS_VALID_ALTITUDE_WRT_ELLIPSOID 0x00000080 -#define RPC_LOC_POS_VALID_ALTITUDE_WRT_MEAN_SEA_LEVEL 0x00000100 -#define RPC_LOC_POS_VALID_SPEED_HORIZONTAL 0x00000200 -#define RPC_LOC_POS_VALID_SPEED_VERTICAL 0x00000400 -#define RPC_LOC_POS_VALID_HEADING 0x00000800 -#define RPC_LOC_POS_VALID_HOR_UNC_CIRCULAR 0x00001000 -#define RPC_LOC_POS_VALID_HOR_UNC_ELLI_SEMI_MAJ 0x00002000 -#define RPC_LOC_POS_VALID_HOR_UNC_ELLI_SEMI_MIN 0x00004000 -#define RPC_LOC_POS_VALID_HOR_UNC_ELLI_ORIENT_AZIMUTH 0x00008000 -#define RPC_LOC_POS_VALID_VERTICAL_UNC 0x00010000 -#define RPC_LOC_POS_VALID_SPEED_UNC 0x00020000 -#define RPC_LOC_POS_VALID_HEADING_UNC 0x00040000 -#define RPC_LOC_POS_VALID_CONFIDENCE_HORIZONTAL 0x00080000 -#define RPC_LOC_POS_VALID_CONFIDENCE_VERTICAL 0x00100000 -#define RPC_LOC_POS_VALID_MAGNETIC_VARIATION 0x00200000 -#define RPC_LOC_POS_VALID_TECHNOLOGY_MASK 0x00400000 - -#define RPC_LOC_POS_TECH_SATELLITE 0x00000001 -#define RPC_LOC_POS_TECH_CELLID 0x00000002 -#define RPC_LOC_POS_TECH_WIFI 0x00000004 - -#define RPC_LOC_SV_INFO_VALID_SYSTEM 0x00000001 -#define RPC_LOC_SV_INFO_VALID_PRN 0x00000002 -#define RPC_LOC_SV_INFO_VALID_HEALTH_STATUS 0x00000004 -#define RPC_LOC_SV_INFO_VALID_PROCESS_STATUS 0x00000008 -#define RPC_LOC_SV_INFO_VALID_HAS_EPH 0x00000010 -#define RPC_LOC_SV_INFO_VALID_HAS_ALM 0x00000020 -#define RPC_LOC_SV_INFO_VALID_ELEVATION 0x00000040 -#define RPC_LOC_SV_INFO_VALID_AZIMUTH 0x00000080 -#define RPC_LOC_SV_INFO_VALID_SNR 0x00000100 - -#define RPC_LOC_GNSS_INFO_VALID_POS_DOP 0x00000001 -#define RPC_LOC_GNSS_INFO_VALID_HOR_DOP 0x00000002 -#define RPC_LOC_GNSS_INFO_VALID_VERT_DOP 0x00000004 -#define RPC_LOC_GNSS_INFO_VALID_ALTITUDE_ASSUMED 0x00000008 -#define RPC_LOC_GNSS_INFO_VALID_SV_COUNT 0x00000010 -#define RPC_LOC_GNSS_INFO_VALID_SV_LIST 0x00000020 - -#define RPC_LOC_NI_MAX_REQUESTOR_ID_LENGTH 200 -#define RPC_LOC_NI_SUPL_HASH_LENGTH 8 -#define RPC_LOC_NI_SUPL_SLP_SESSION_ID_BYTE_LENGTH 4 -#define RPC_LOC_NI_MAX_CLIENT_NAME_LENGTH 64 -#define RPC_LOC_NI_MAX_EXT_CLIENT_ADDRESS 20 -#define RPC_LOC_NI_CODEWORD_LENGTH 20 - -#define RPC_LOC_NI_SUPL_QOP_VALID 0x01 -#define RPC_LOC_NI_SUPL_QOP_VERACC_VALID 0x02 -#define RPC_LOC_NI_SUPL_QOP_MAXAGE_VALID 0x04 -#define RPC_LOC_NI_SUPL_QOP_DELAY_VALID 0x08 - -#define RPC_LOC_FIX_CRIT_VALID_RECURRENCE_TYPE 0x00000001 -#define RPC_LOC_FIX_CRIT_VALID_PREFERRED_OPERATION_MODE 0x00000002 -#define RPC_LOC_FIX_CRIT_VALID_PREFERRED_ACCURACY 0x00000004 -#define RPC_LOC_FIX_CRIT_VALID_PREFERRED_RESPONSE_TIME 0x00000008 -#define RPC_LOC_FIX_CRIT_VALID_INTERMEDIATE_POS_REPORT_ENABLED 0x00000010 -#define RPC_LOC_FIX_CRIT_VALID_NOTIFY_TYPE 0x00000020 -#define RPC_LOC_FIX_CRIT_VALID_MIN_INTERVAL 0x00000040 -#define RPC_LOC_FIX_CRIT_VALID_MIN_DISTANCE 0x00000080 -#define RPC_LOC_FIX_CRIT_VALID_MIN_DIST_SAMPLE_INTERVAL 0x00000100 - -#define RPC_LOC_ASSIST_POS_VALID_TIMESTAMP_UTC 0x00000001 -#define RPC_LOC_ASSIST_POS_VALID_LATITUDE 0x00000002 -#define RPC_LOC_ASSIST_POS_VALID_LONGITUDE 0x00000004 -#define RPC_LOC_ASSIST_POS_VALID_ALTITUDE_WRT_ELLIPSOID 0x00000008 -#define RPC_LOC_ASSIST_POS_VALID_ALTITUDE_WRT_MEAN_SEA_LEVEL 0x00000010 -#define RPC_LOC_ASSIST_POS_VALID_HOR_UNC_CIRCULAR 0x00000020 -#define RPC_LOC_ASSIST_POS_VALID_VERT_UNC 0x00000040 -#define RPC_LOC_ASSIST_POS_VALID_CONFIDENCE_HORIZONTAL 0x00000080 -#define RPC_LOC_ASSIST_POS_VALID_CONFIDENCE_VERTICAL 0x00000100 - -#define RPC_LOC_ASSIST_DATA_ALL 0xFFFFFFFF - -#define RPC_LOC_NMEA_MASK_ALL 0xffff -#define RPC_LOC_NMEA_MASK_GGA 0x0001 -#define RPC_LOC_NMEA_MASK_RMC 0x0002 -#define RPC_LOC_NMEA_MASK_GSV 0x0004 -#define RPC_LOC_NMEA_MASK_GSA 0x0008 -#define RPC_LOC_NMEA_MASK_VTG 0x0010 - -/* flags for notification */ -#define RPC_LOC_NI_CLIENT_NAME_PRESENT 0x0001 -#define RPC_LOC_NI_CLIENT_EXTADDR_PRESENT 0x0002 -#define RPC_LOC_NI_DEF_LOCATION_TYPE_PRESENT 0x0010 -#define RPC_LOC_NI_REQUESTOR_ID_PRESENT 0x0020 -#define RPC_LOC_NI_CODEWORD_PRESENT 0x0040 -#define RPC_LOC_NI_SERVICE_TYPE_ID_PRESENT 0x0080 -#define RPC_LOC_NI_ENCODING_TYPE_PRESENT 0x0100 - -#ifdef __cplusplus -} -#endif - -#endif /* LOC_API_FIXUP_H */ diff --git a/loc_api/libloc_api-rpc/inc-1240/loc_apicb_appinit.h b/loc_api/libloc_api-rpc/inc-1240/loc_apicb_appinit.h deleted file mode 100644 index 92d4e150..00000000 --- a/loc_api/libloc_api-rpc/inc-1240/loc_apicb_appinit.h +++ /dev/null @@ -1,34 +0,0 @@ -/* ------------------------------------------------------------------------------- -Copyright (c) 2009, QUALCOMM USA, INC. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -· Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -· Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -· Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ------------------------------------------------------------------------------- - */ - -#ifndef LOC_APICB_APPINIT_H -#define LOC_APICB_APPINIT_H - -#ifdef __cplusplus -extern "C" -{ -#endif - - /* Initialization function for callbacks */ -extern int loc_apicb_app_init(); -extern void loc_apicb_app_deinit(); - -#ifdef __cplusplus -} -#endif - -#endif /* LOC_APICB_APPINIT_H */ diff --git a/loc_api/libloc_api-rpc/inc-3200/loc_api.h b/loc_api/libloc_api-rpc/inc-3200/loc_api.h deleted file mode 100644 index 8998aca4..00000000 --- a/loc_api/libloc_api-rpc/inc-3200/loc_api.h +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#ifndef _LOC_API_H_RPCGEN -#define _LOC_API_H_RPCGEN - -#include - -#include - -#ifdef __cplusplus -extern "C" { -#endif - - -typedef struct { - u_int rpc_loc_api_api_versions_return_type_len; - rpc_uint32 *rpc_loc_api_api_versions_return_type_val; -} rpc_loc_api_api_versions_return_type; - -typedef rpc_uint32 rpc_loc_event_cb_f_type; - -struct rpc_loc_open_args { - rpc_loc_event_mask_type event_reg_mask; - rpc_loc_event_cb_f_type event_callback; -}; -typedef struct rpc_loc_open_args rpc_loc_open_args; - -struct rpc_loc_close_args { - rpc_loc_client_handle_type handle; -}; -typedef struct rpc_loc_close_args rpc_loc_close_args; - -struct rpc_loc_start_fix_args { - rpc_loc_client_handle_type handle; -}; -typedef struct rpc_loc_start_fix_args rpc_loc_start_fix_args; - -struct rpc_loc_stop_fix_args { - rpc_loc_client_handle_type handle; -}; -typedef struct rpc_loc_stop_fix_args rpc_loc_stop_fix_args; - -struct rpc_loc_ioctl_args { - rpc_loc_client_handle_type handle; - rpc_loc_ioctl_e_type ioctl_type; - rpc_loc_ioctl_data_u_type *ioctl_data; -}; -typedef struct rpc_loc_ioctl_args rpc_loc_ioctl_args; - -struct rpc_loc_api_api_version_s_args { - rpc_boolean len_not_null; -}; -typedef struct rpc_loc_api_api_version_s_args rpc_loc_api_api_version_s_args; - -struct rpc_loc_api_rpc_glue_code_info_remote_rets { - rpc_uint32 toolvers; - rpc_uint32 features; - rpc_uint32 proghash; - rpc_uint32 cbproghash; -}; -typedef struct rpc_loc_api_rpc_glue_code_info_remote_rets rpc_loc_api_rpc_glue_code_info_remote_rets; - -struct rpc_loc_open_rets { - rpc_loc_client_handle_type loc_open_result; -}; -typedef struct rpc_loc_open_rets rpc_loc_open_rets; - -struct rpc_loc_close_rets { - rpc_int32 loc_close_result; -}; -typedef struct rpc_loc_close_rets rpc_loc_close_rets; - -struct rpc_loc_start_fix_rets { - rpc_int32 loc_start_fix_result; -}; -typedef struct rpc_loc_start_fix_rets rpc_loc_start_fix_rets; - -struct rpc_loc_stop_fix_rets { - rpc_int32 loc_stop_fix_result; -}; -typedef struct rpc_loc_stop_fix_rets rpc_loc_stop_fix_rets; - -struct rpc_loc_ioctl_rets { - rpc_int32 loc_ioctl_result; -}; -typedef struct rpc_loc_ioctl_rets rpc_loc_ioctl_rets; - -struct rpc_loc_api_api_versions_rets { - rpc_loc_api_api_versions_return_type loc_api_api_versions_result; - rpc_uint32 *len; -}; -typedef struct rpc_loc_api_api_versions_rets rpc_loc_api_api_versions_rets; -#define LOC_APIVERS 0x00010001 - -#define LOC_APIPROG 0x3000008c -#define LOC_APIVERS_0001 0x00010001 - -#if defined(__STDC__) || defined(__cplusplus) -#define rpc_loc_api_null 0 -extern enum clnt_stat rpc_loc_api_null_0x00010001(void *, void *, CLIENT *); -extern bool_t rpc_loc_api_null_0x00010001_svc(void *, void *, struct svc_req *); -#define rpc_loc_api_rpc_glue_code_info_remote 1 -extern enum clnt_stat rpc_loc_api_rpc_glue_code_info_remote_0x00010001(void *, rpc_loc_api_rpc_glue_code_info_remote_rets *, CLIENT *); -extern bool_t rpc_loc_api_rpc_glue_code_info_remote_0x00010001_svc(void *, rpc_loc_api_rpc_glue_code_info_remote_rets *, struct svc_req *); -#define rpc_loc_open 2 -extern enum clnt_stat rpc_loc_open_0x00010001(rpc_loc_open_args *, rpc_loc_open_rets *, CLIENT *); -extern bool_t rpc_loc_open_0x00010001_svc(rpc_loc_open_args *, rpc_loc_open_rets *, struct svc_req *); -#define rpc_loc_close 3 -extern enum clnt_stat rpc_loc_close_0x00010001(rpc_loc_close_args *, rpc_loc_close_rets *, CLIENT *); -extern bool_t rpc_loc_close_0x00010001_svc(rpc_loc_close_args *, rpc_loc_close_rets *, struct svc_req *); -#define rpc_loc_start_fix 4 -extern enum clnt_stat rpc_loc_start_fix_0x00010001(rpc_loc_start_fix_args *, rpc_loc_start_fix_rets *, CLIENT *); -extern bool_t rpc_loc_start_fix_0x00010001_svc(rpc_loc_start_fix_args *, rpc_loc_start_fix_rets *, struct svc_req *); -#define rpc_loc_stop_fix 5 -extern enum clnt_stat rpc_loc_stop_fix_0x00010001(rpc_loc_stop_fix_args *, rpc_loc_stop_fix_rets *, CLIENT *); -extern bool_t rpc_loc_stop_fix_0x00010001_svc(rpc_loc_stop_fix_args *, rpc_loc_stop_fix_rets *, struct svc_req *); -#define rpc_loc_ioctl 6 -extern enum clnt_stat rpc_loc_ioctl_0x00010001(rpc_loc_ioctl_args *, rpc_loc_ioctl_rets *, CLIENT *); -extern bool_t rpc_loc_ioctl_0x00010001_svc(rpc_loc_ioctl_args *, rpc_loc_ioctl_rets *, struct svc_req *); -#define rpc_loc_api_api_versions 0xFFFFFFFF -extern enum clnt_stat rpc_loc_api_api_versions_0x00010001(void *, rpc_loc_api_api_versions_rets *, CLIENT *); -extern bool_t rpc_loc_api_api_versions_0x00010001_svc(void *, rpc_loc_api_api_versions_rets *, struct svc_req *); -extern int loc_apiprog_0x00010001_freeresult (SVCXPRT *, xdrproc_t, caddr_t); - -#else /* K&R C */ -#define rpc_loc_api_null 0 -extern enum clnt_stat rpc_loc_api_null_0x00010001(); -extern bool_t rpc_loc_api_null_0x00010001_svc(); -#define rpc_loc_api_rpc_glue_code_info_remote 1 -extern enum clnt_stat rpc_loc_api_rpc_glue_code_info_remote_0x00010001(); -extern bool_t rpc_loc_api_rpc_glue_code_info_remote_0x00010001_svc(); -#define rpc_loc_open 2 -extern enum clnt_stat rpc_loc_open_0x00010001(); -extern bool_t rpc_loc_open_0x00010001_svc(); -#define rpc_loc_close 3 -extern enum clnt_stat rpc_loc_close_0x00010001(); -extern bool_t rpc_loc_close_0x00010001_svc(); -#define rpc_loc_start_fix 4 -extern enum clnt_stat rpc_loc_start_fix_0x00010001(); -extern bool_t rpc_loc_start_fix_0x00010001_svc(); -#define rpc_loc_stop_fix 5 -extern enum clnt_stat rpc_loc_stop_fix_0x00010001(); -extern bool_t rpc_loc_stop_fix_0x00010001_svc(); -#define rpc_loc_ioctl 6 -extern enum clnt_stat rpc_loc_ioctl_0x00010001(); -extern bool_t rpc_loc_ioctl_0x00010001_svc(); -#define rpc_loc_api_api_versions 0xFFFFFFFF -extern enum clnt_stat rpc_loc_api_api_versions_0x00010001(); -extern bool_t rpc_loc_api_api_versions_0x00010001_svc(); -extern int loc_apiprog_0x00010001_freeresult (); -#endif /* K&R C */ - -/* the xdr functions */ - -#if defined(__STDC__) || defined(__cplusplus) -extern bool_t xdr_rpc_loc_api_api_versions_return_type (XDR *, rpc_loc_api_api_versions_return_type*); -extern bool_t xdr_rpc_loc_event_cb_f_type (XDR *, rpc_loc_event_cb_f_type*); -extern bool_t xdr_rpc_loc_open_args (XDR *, rpc_loc_open_args*); -extern bool_t xdr_rpc_loc_close_args (XDR *, rpc_loc_close_args*); -extern bool_t xdr_rpc_loc_start_fix_args (XDR *, rpc_loc_start_fix_args*); -extern bool_t xdr_rpc_loc_stop_fix_args (XDR *, rpc_loc_stop_fix_args*); -extern bool_t xdr_rpc_loc_ioctl_args (XDR *, rpc_loc_ioctl_args*); -extern bool_t xdr_rpc_loc_api_api_version_s_args (XDR *, rpc_loc_api_api_version_s_args*); -extern bool_t xdr_rpc_loc_api_rpc_glue_code_info_remote_rets (XDR *, rpc_loc_api_rpc_glue_code_info_remote_rets*); -extern bool_t xdr_rpc_loc_open_rets (XDR *, rpc_loc_open_rets*); -extern bool_t xdr_rpc_loc_close_rets (XDR *, rpc_loc_close_rets*); -extern bool_t xdr_rpc_loc_start_fix_rets (XDR *, rpc_loc_start_fix_rets*); -extern bool_t xdr_rpc_loc_stop_fix_rets (XDR *, rpc_loc_stop_fix_rets*); -extern bool_t xdr_rpc_loc_ioctl_rets (XDR *, rpc_loc_ioctl_rets*); -extern bool_t xdr_rpc_loc_api_api_versions_rets (XDR *, rpc_loc_api_api_versions_rets*); - -#else /* K&R C */ -extern bool_t xdr_rpc_loc_api_api_versions_return_type (); -extern bool_t xdr_rpc_loc_event_cb_f_type (); -extern bool_t xdr_rpc_loc_open_args (); -extern bool_t xdr_rpc_loc_close_args (); -extern bool_t xdr_rpc_loc_start_fix_args (); -extern bool_t xdr_rpc_loc_stop_fix_args (); -extern bool_t xdr_rpc_loc_ioctl_args (); -extern bool_t xdr_rpc_loc_api_api_version_s_args (); -extern bool_t xdr_rpc_loc_api_rpc_glue_code_info_remote_rets (); -extern bool_t xdr_rpc_loc_open_rets (); -extern bool_t xdr_rpc_loc_close_rets (); -extern bool_t xdr_rpc_loc_start_fix_rets (); -extern bool_t xdr_rpc_loc_stop_fix_rets (); -extern bool_t xdr_rpc_loc_ioctl_rets (); -extern bool_t xdr_rpc_loc_api_api_versions_rets (); - -#endif /* K&R C */ - -#ifdef __cplusplus -} -#endif - -#endif /* !_LOC_API_H_RPCGEN */ diff --git a/loc_api/libloc_api-rpc/inc-3200/loc_api_cb.h b/loc_api/libloc_api-rpc/inc-3200/loc_api_cb.h deleted file mode 100644 index 4f2f8f91..00000000 --- a/loc_api/libloc_api-rpc/inc-3200/loc_api_cb.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#ifndef _LOC_API_CB_H_RPCGEN -#define _LOC_API_CB_H_RPCGEN - -#include - -#include - -#ifdef __cplusplus -extern "C" { -#endif - - -struct rpc_loc_event_cb_f_type_args { - rpc_uint32 cb_id; - rpc_loc_client_handle_type loc_handle; - rpc_loc_event_mask_type loc_event; - rpc_loc_event_payload_u_type *loc_event_payload; -}; -typedef struct rpc_loc_event_cb_f_type_args rpc_loc_event_cb_f_type_args; - -struct rpc_loc_event_cb_f_type_rets { - rpc_int32 loc_event_cb_f_type_result; -}; -typedef struct rpc_loc_event_cb_f_type_rets rpc_loc_event_cb_f_type_rets; -#define LOC_APICBVERS 0x00010001 - -#define LOC_APICBPROG 0x3100008c -#define LOC_APICBVERS_0001 0x00010001 - -#if defined(__STDC__) || defined(__cplusplus) -#define rpc_loc_event_cb_f_type 1 -extern enum clnt_stat rpc_loc_event_cb_f_type_0x00010001(rpc_loc_event_cb_f_type_args *, rpc_loc_event_cb_f_type_rets *, CLIENT *); -extern bool_t rpc_loc_event_cb_f_type_0x00010001_svc(rpc_loc_event_cb_f_type_args *, rpc_loc_event_cb_f_type_rets *, struct svc_req *); -extern int loc_apicbprog_0x00010001_freeresult (SVCXPRT *, xdrproc_t, caddr_t); - -#else /* K&R C */ -#define rpc_loc_event_cb_f_type 1 -extern enum clnt_stat rpc_loc_event_cb_f_type_0x00010001(); -extern bool_t rpc_loc_event_cb_f_type_0x00010001_svc(); -extern int loc_apicbprog_0x00010001_freeresult (); -#endif /* K&R C */ - -/* the xdr functions */ - -#if defined(__STDC__) || defined(__cplusplus) -extern bool_t xdr_rpc_loc_event_cb_f_type_args (XDR *, rpc_loc_event_cb_f_type_args*); -extern bool_t xdr_rpc_loc_event_cb_f_type_rets (XDR *, rpc_loc_event_cb_f_type_rets*); - -#else /* K&R C */ -extern bool_t xdr_rpc_loc_event_cb_f_type_args (); -extern bool_t xdr_rpc_loc_event_cb_f_type_rets (); - -#endif /* K&R C */ - -#ifdef __cplusplus -} -#endif - -#endif /* !_LOC_API_CB_H_RPCGEN */ diff --git a/loc_api/libloc_api-rpc/inc-3200/loc_api_common.h b/loc_api/libloc_api-rpc/inc-3200/loc_api_common.h deleted file mode 100644 index 04be079f..00000000 --- a/loc_api/libloc_api-rpc/inc-3200/loc_api_common.h +++ /dev/null @@ -1,1031 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#ifndef _LOC_API_COMMON_H_RPCGEN -#define _LOC_API_COMMON_H_RPCGEN - -#include -#include "loc_api_fixup.h" - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#define RPC_LOC_EVENT_NI_NOTIFY_VERIFY_REQUEST 0x00000010 -#define RPC_LOC_EVENT_IOCTL_REPORT 0x00000080 -#define RPC_LOC_EVENT_LOCATION_SERVER_REQUEST 0x00000040 -#define RPC_LOC_EVENT_RESERVED 0x8000000000000000 -#define RPC_LOC_EVENT_PARSED_POSITION_REPORT 0x00000001 -#define RPC_LOC_EVENT_ASSISTANCE_DATA_REQUEST 0x00000020 -#define RPC_LOC_EVENT_NMEA_POSITION_REPORT 0x00000008 -#define RPC_LOC_EVENT_SATELLITE_REPORT 0x00000002 -#define RPC_LOC_EVENT_STATUS_REPORT 0x00000100 -#define RPC_LOC_OPEN_VERSION 0x00010001 -#define RPC_LOC_CLOSE_VERSION 0x00010001 -#define RPC_LOC_START_FIX_VERSION 0x00010001 -#define RPC_LOC_STOP_FIX_VERSION 0x00010001 -#define RPC_LOC_IOCTL_VERSION 0x00010001 -#define RPC_LOC_EVENT_CB_F_TYPE_VERSION 0x00010001 -#define RPC_LOC_APIAPI_VERSION_IS_HASHKEY 0 -#define RPC_LOC_API_API_MAJOR_NUM 0x0001 - -typedef bool_t rpc_boolean; - -typedef u_long rpc_uint32; - -typedef u_short rpc_uint16; - -typedef u_char rpc_uint8; - -typedef long rpc_int32; - -typedef u_char rpc_byte; - -typedef u_quad_t rpc_uint64; - -typedef rpc_int32 rpc_loc_client_handle_type; - -typedef rpc_uint64 rpc_loc_event_mask_type; - -typedef rpc_uint64 rpc_loc_position_valid_mask_type; - -typedef rpc_uint32 rpc_loc_pos_technology_mask_type; - -enum rpc_loc_session_status_e_type { - RPC_LOC_SESS_STATUS_SUCCESS = 0, - RPC_LOC_SESS_STATUS_IN_PROGESS = 1, - RPC_LOC_SESS_STATUS_GENERAL_FAILURE = 2, - RPC_LOC_SESS_STATUS_TIMEOUT = 3, - RPC_LOC_SESS_STATUS_USER_END = 4, - RPC_LOC_SESS_STATUS_BAD_PARAMETER = 5, - RPC_LOC_SESS_STATUS_PHONE_OFFLINE = 6, - RPC_LOC_SESS_STATUS_ENGINE_LOCKED = 7, - RPC_LOC_SESS_STATUS_MAX = 268435456, -}; -typedef enum rpc_loc_session_status_e_type rpc_loc_session_status_e_type; - -struct rpc_loc_calendar_time_s_type { - rpc_uint16 year; - u_char month; - u_char day_of_week; - u_char day; - u_char hour; - u_char minute; - u_char second; - rpc_uint16 millisecond; -}; -typedef struct rpc_loc_calendar_time_s_type rpc_loc_calendar_time_s_type; - -struct rpc_loc_parsed_position_s_type { - rpc_loc_position_valid_mask_type valid_mask; - rpc_loc_session_status_e_type session_status; - rpc_loc_calendar_time_s_type timestamp_calendar; - rpc_uint64 timestamp_utc; - rpc_uint8 leap_seconds; - float time_unc; - double latitude; - double longitude; - float altitude_wrt_ellipsoid; - float altitude_wrt_mean_sea_level; - float speed_horizontal; - float speed_vertical; - float heading; - float hor_unc_circular; - float hor_unc_ellipse_semi_major; - float hor_unc_ellipse_semi_minor; - float hor_unc_ellipse_orient_azimuth; - float vert_unc; - float speed_unc; - float heading_unc; - u_char confidence_horizontal; - u_char confidence_vertical; - float magnetic_deviation; - rpc_loc_pos_technology_mask_type technology_mask; -}; -typedef struct rpc_loc_parsed_position_s_type rpc_loc_parsed_position_s_type; - -enum rpc_loc_sv_system_e_type { - RPC_LOC_SV_SYSTEM_GPS = 1, - RPC_LOC_SV_SYSTEM_GALILEO = 2, - RPC_LOC_SV_SYSTEM_SBAS = 3, - RPC_LOC_SV_SYSTEM_COMPASS = 4, - RPC_LOC_SV_SYSTEM_GLONASS = 5, - RPC_LOC_SV_SYSTEM_MAX = 268435456, -}; -typedef enum rpc_loc_sv_system_e_type rpc_loc_sv_system_e_type; - -enum rpc_loc_sv_status_e_type { - RPC_LOC_SV_STATUS_IDLE = 1, - RPC_LOC_SV_STATUS_SEARCH = 2, - RPC_LOC_SV_STATUS_TRACK = 3, - RPC_LOC_SV_STATUS_MAX = 268435456, -}; -typedef enum rpc_loc_sv_status_e_type rpc_loc_sv_status_e_type; - -typedef rpc_uint32 rpc_loc_sv_info_valid_mask_type; - -struct rpc_loc_sv_info_s_type { - rpc_loc_sv_info_valid_mask_type valid_mask; - rpc_loc_sv_system_e_type system; - rpc_uint8 prn; - rpc_uint8 health_status; - rpc_loc_sv_status_e_type process_status; - rpc_boolean has_eph; - rpc_boolean has_alm; - float elevation; - float azimuth; - float snr; -}; -typedef struct rpc_loc_sv_info_s_type rpc_loc_sv_info_s_type; - -typedef rpc_uint32 rpc_loc_gnss_info_valid_mask_type; - -struct rpc_loc_gnss_info_s_type { - rpc_loc_gnss_info_valid_mask_type valid_mask; - float position_dop; - float horizontal_dop; - float vertical_dop; - rpc_boolean altitude_assumed; - rpc_uint16 sv_count; - struct { - u_int sv_list_len; - rpc_loc_sv_info_s_type *sv_list_val; - } sv_list; -}; -typedef struct rpc_loc_gnss_info_s_type rpc_loc_gnss_info_s_type; - -struct rpc_loc_nmea_report_s_type { - rpc_uint16 length; - struct { - u_int nmea_sentences_len; - char *nmea_sentences_val; - } nmea_sentences; -}; -typedef struct rpc_loc_nmea_report_s_type rpc_loc_nmea_report_s_type; - -enum rpc_loc_status_event_e_type { - RPC_LOC_STATUS_EVENT_ENGINE_STATE = 1, - RPC_LOC_STATUS_EVENT_MAX = 268435456, -}; -typedef enum rpc_loc_status_event_e_type rpc_loc_status_event_e_type; - -enum rpc_loc_engine_state_e_type { - RPC_LOC_ENGINE_STATE_ON = 1, - RPC_LOC_ENGINE_STATE_OFF = 2, - RPC_LOC_ENGINE_STATE_MAX = 268435456, -}; -typedef enum rpc_loc_engine_state_e_type rpc_loc_engine_state_e_type; - -struct rpc_loc_status_event_payload_u_type { - rpc_loc_status_event_e_type disc; - union { - rpc_loc_engine_state_e_type engine_state; - } rpc_loc_status_event_payload_u_type_u; -}; -typedef struct rpc_loc_status_event_payload_u_type rpc_loc_status_event_payload_u_type; - -struct rpc_loc_status_event_s_type { - rpc_loc_status_event_e_type event; - rpc_loc_status_event_payload_u_type payload; -}; -typedef struct rpc_loc_status_event_s_type rpc_loc_status_event_s_type; - -enum rpc_loc_server_addr_e_type { - RPC_LOC_SERVER_ADDR_IPV4 = 1, - RPC_LOC_SERVER_ADDR_URL = 2, - RPC_LOC_SERVER_ADDR_MAX = 268435456, -}; -typedef enum rpc_loc_server_addr_e_type rpc_loc_server_addr_e_type; - -struct rpc_loc_server_addr_ipv4_type { - rpc_uint32 addr; - rpc_uint16 port; -}; -typedef struct rpc_loc_server_addr_ipv4_type rpc_loc_server_addr_ipv4_type; - -struct rpc_loc_server_addr_url_type { - rpc_uint16 length; - struct { - u_int addr_len; - char *addr_val; - } addr; -}; -typedef struct rpc_loc_server_addr_url_type rpc_loc_server_addr_url_type; - -struct rpc_loc_server_addr_u_type { - rpc_loc_server_addr_e_type disc; - union { - rpc_loc_server_addr_ipv4_type ipv4; - rpc_loc_server_addr_url_type url; - } rpc_loc_server_addr_u_type_u; -}; -typedef struct rpc_loc_server_addr_u_type rpc_loc_server_addr_u_type; - -struct rpc_loc_server_info_s_type { - rpc_loc_server_addr_e_type addr_type; - rpc_loc_server_addr_u_type addr_info; -}; -typedef struct rpc_loc_server_info_s_type rpc_loc_server_info_s_type; - -enum rpc_loc_ni_notify_verify_e_type { - RPC_LOC_NI_USER_NO_NOTIFY_NO_VERIFY = 1, - RPC_LOC_NI_USER_NOTIFY_ONLY = 2, - RPC_LOC_NI_USER_NOTIFY_VERIFY_ALLOW_NO_RESP = 3, - RPC_LOC_NI_USER_NOTIFY_VERIFY_NOT_ALLOW_NO_RESP = 4, - RPC_LOC_NI_USER_PRIVACY_OVERRIDE = 5, - RPC_LOC_NI_USER_NOTIFY_VERITY_TYPE_MAX = 268435456, -}; -typedef enum rpc_loc_ni_notify_verify_e_type rpc_loc_ni_notify_verify_e_type; - -enum rpc_loc_ni_event_e_type { - RPC_LOC_NI_EVENT_VX_NOTIFY_VERIFY_REQ = 1, - RPC_LOC_NI_EVENT_SUPL_NOTIFY_VERIFY_REQ = 2, - RPC_LOC_NI_EVENT_UMTS_CP_NOTIFY_VERIFY_REQ = 3, - RPC_LOC_NI_EVENT_MAX = 268435456, -}; -typedef enum rpc_loc_ni_event_e_type rpc_loc_ni_event_e_type; - -enum rpc_loc_ni_datacoding_scheme_e_type { - RPC_LOC_NI_PRESUPL_ISO646IRV = 0, - RPC_LOC_NI_PRESUPL_ISO8859 = 1, - RPC_LOC_NI_PRESUPL_UTF8 = 2, - RPC_LOC_NI_PRESUPL_UTF16 = 3, - RPC_LOC_NI_PRESUPL_UCS2 = 4, - RPC_LOC_NI_PRESUPL_GSM_DEFAULT = 5, - RPC_LOC_NI_PRESUPL_SHIFT_JIS = 6, - RPC_LOC_NI_PRESUPL_JIS = 7, - RPC_LOC_NI_PRESUPL_EUC = 8, - RPC_LOC_NI_PRESUPL_GB2312 = 9, - RPC_LOC_NI_PRESUPL_CNS11643 = 10, - RPC_LOC_NI_PRESUPL_KSC1001 = 11, - RPC_LOC_NI_PRESUPL_ENCODING_UNKNOWN = 2147483647, - RPC_LOC_NI_SS_GERMAN = 12, - RPC_LOC_NI_SS_ENGLISH = 13, - RPC_LOC_NI_SS_ITALIAN = 14, - RPC_LOC_NI_SS_FRENCH = 15, - RPC_LOC_NI_SS_SPANISH = 16, - RPC_LOC_NI_SS_DUTCH = 17, - RPC_LOC_NI_SS_SWEDISH = 18, - RPC_LOC_NI_SS_DANISH = 19, - RPC_LOC_NI_SS_PORTUGUESE = 20, - RPC_LOC_NI_SS_FINNISH = 21, - RPC_LOC_NI_SS_NORWEGIAN = 22, - RPC_LOC_NI_SS_GREEK = 23, - RPC_LOC_NI_SS_TURKISH = 24, - RPC_LOC_NI_SS_HUNGARIAN = 25, - RPC_LOC_NI_SS_POLISH = 26, - RPC_LOC_NI_SS_LANGUAGE_UNSPEC = 27, - RPC_LOC_NI_SUPL_UTF8 = 28, - RPC_LOC_NI_SUPL_UCS2 = 29, - RPC_LOC_NI_SUPL_GSM_DEFAULT = 30, - RPC_LOC_NI_SUPL_ENCODING_UNKNOWN = 2147483647, -}; -typedef enum rpc_loc_ni_datacoding_scheme_e_type rpc_loc_ni_datacoding_scheme_e_type; - -enum rpc_loc_ni_vx_requester_id_encoding_scheme_e_type { - RPC_LOC_NI_VX_OCTET = 0, - RPC_LOC_NI_VX_EXN_PROTOCOL_MSG = 1, - RPC_LOC_NI_VX_ASCII = 2, - RPC_LOC_NI_VX_IA5 = 3, - RPC_LOC_NI_VX_UNICODE = 4, - RPC_LOC_NI_VX_SHIFT_JIS = 5, - RPC_LOC_NI_VX_KOREAN = 6, - RPC_LOC_NI_VX_LATIN_HEBREW = 7, - RPC_LOC_NI_VX_LATIN = 8, - RPC_LOC_NI_VX_GSM = 9, - RPC_LOC_NI_VX_ENCODING_TYPE_MAX = 268435456, -}; -typedef enum rpc_loc_ni_vx_requester_id_encoding_scheme_e_type rpc_loc_ni_vx_requester_id_encoding_scheme_e_type; - -enum rpc_loc_ni_vx_pos_mode_e_type { - RPC_LOC_VX_MS_ASSISTED_ONLY = 1, - RPC_LOC_VX_MS_BASED_ONLY = 2, - RPC_LOC_VX_MS_ASSISTED_PREF_MSBASED_ALLWD = 3, - RPC_LOC_VX_MS_BASED_PREF_ASSISTED_ALLWD = 4, - RPC_LOC_VX_POS_MODE_MAX = 268435456, -}; -typedef enum rpc_loc_ni_vx_pos_mode_e_type rpc_loc_ni_vx_pos_mode_e_type; - -struct rpc_loc_ni_vx_requester_id_s_type { - u_char requester_id_length; - char requester_id[200]; -}; -typedef struct rpc_loc_ni_vx_requester_id_s_type rpc_loc_ni_vx_requester_id_s_type; - -struct rpc_loc_ni_vx_notify_verify_req_s_type { - rpc_loc_ni_notify_verify_e_type notification_priv_type; - u_char pos_qos_incl; - u_char pos_qos; - rpc_uint32 num_fixes; - rpc_uint32 tbf; - rpc_loc_ni_vx_pos_mode_e_type pos_mode; - rpc_loc_ni_vx_requester_id_encoding_scheme_e_type encoding_scheme; - rpc_loc_ni_vx_requester_id_s_type requester_id; - rpc_uint16 user_resp_timer_val; -}; -typedef struct rpc_loc_ni_vx_notify_verify_req_s_type rpc_loc_ni_vx_notify_verify_req_s_type; - -enum rpc_loc_ni_supl_pos_method_e_type { - RPC_LOC_NI_POSMETHOD_AGPS_SETASSISTED = 1, - RPC_LOC_NI_POSMETHOD_AGPS_SETBASED = 2, - RPC_LOC_NI_POSMETHOD_AGPS_SETASSISTED_PREF = 3, - RPC_LOC_NI_POSMETHOD_AGPS_SETBASED_PREF = 4, - RPC_LOC_NI_POSMETHOD_AUTONOMOUS_GPS = 5, - RPC_LOC_NI_POSMETHOD_AFLT = 6, - RPC_LOC_NI_POSMETHOD_ECID = 7, - RPC_LOC_NI_POSMETHOD_EOTD = 8, - RPC_LOC_NI_POSMETHOD_OTDOA = 9, - RPC_LOC_NI_POSMETHOD_NO_POSITION = 10, - RPC_LOC_NI_POSMETHOD_MAX = 268435456, -}; -typedef enum rpc_loc_ni_supl_pos_method_e_type rpc_loc_ni_supl_pos_method_e_type; - -struct rpc_loc_ni_supl_slp_session_id_s_type { - u_char presence; - char session_id[4]; - rpc_loc_server_info_s_type slp_address; -}; -typedef struct rpc_loc_ni_supl_slp_session_id_s_type rpc_loc_ni_supl_slp_session_id_s_type; - -struct rpc_loc_ni_requestor_id_s_type { - u_char data_coding_scheme; - struct { - u_int requestor_id_string_len; - char *requestor_id_string_val; - } requestor_id_string; - u_char string_len; -}; -typedef struct rpc_loc_ni_requestor_id_s_type rpc_loc_ni_requestor_id_s_type; - -struct rpc_loc_ni_supl_client_name_s_type { - u_char data_coding_scheme; - struct { - u_int client_name_string_len; - char *client_name_string_val; - } client_name_string; - u_char string_len; -}; -typedef struct rpc_loc_ni_supl_client_name_s_type rpc_loc_ni_supl_client_name_s_type; - -struct rpc_loc_ni_supl_qop_s_type { - u_char bit_mask; - u_char horacc; - u_char veracc; - u_char maxLocAge; - u_char delay; -}; -typedef struct rpc_loc_ni_supl_qop_s_type rpc_loc_ni_supl_qop_s_type; - -struct rpc_loc_ni_supl_notify_verify_req_s_type { - rpc_loc_ni_notify_verify_e_type notification_priv_type; - rpc_uint16 flags; - rpc_loc_ni_supl_slp_session_id_s_type supl_slp_session_id; - char supl_hash[8]; - rpc_loc_ni_datacoding_scheme_e_type datacoding_scheme; - rpc_loc_ni_supl_pos_method_e_type pos_method; - rpc_loc_ni_requestor_id_s_type requestor_id; - rpc_loc_ni_supl_client_name_s_type client_name; - rpc_loc_ni_supl_qop_s_type supl_qop; - rpc_uint16 user_response_timer; -}; -typedef struct rpc_loc_ni_supl_notify_verify_req_s_type rpc_loc_ni_supl_notify_verify_req_s_type; - -struct rpc_loc_ni_ext_client_address_s_type { - u_char ext_client_address_len; - struct { - u_int ext_client_address_len; - char *ext_client_address_val; - } ext_client_address; -}; -typedef struct rpc_loc_ni_ext_client_address_s_type rpc_loc_ni_ext_client_address_s_type; - -enum rpc_loc_ni_location_type_e_type { - RPC_LOC_NI_LOCATIONTYPE_CURRENT_LOCATION = 1, - RPC_LOC_NI_LOCATIONTYPE_CURRENT_OR_LAST_KNOWN_LOCATION = 2, - RPC_LOC_NI_LOCATIONTYPE_INITIAL_LOCATION = 3, - RPC_LOC_NI_LOCATIONTYPE_MAX = 268435456, -}; -typedef enum rpc_loc_ni_location_type_e_type rpc_loc_ni_location_type_e_type; - -struct rpc_loc_ni_deferred_location_s_type { - u_char unused_bits; - u_char ms_available; -}; -typedef struct rpc_loc_ni_deferred_location_s_type rpc_loc_ni_deferred_location_s_type; - -struct rpc_loc_ni_codeword_string_s_type { - u_char data_coding_scheme; - struct { - u_int lcs_codeword_string_len; - char *lcs_codeword_string_val; - } lcs_codeword_string; - u_char string_len; -}; -typedef struct rpc_loc_ni_codeword_string_s_type rpc_loc_ni_codeword_string_s_type; - -struct rpc_loc_ni_service_type_id_s_type { - u_char lcs_service_type_id; -}; -typedef struct rpc_loc_ni_service_type_id_s_type rpc_loc_ni_service_type_id_s_type; - -struct rpc_loc_ni_umts_cp_notify_verify_req_s_type { - rpc_loc_ni_notify_verify_e_type notification_priv_type; - u_char invoke_id; - rpc_uint16 flags; - u_char notification_length; - struct { - u_int notification_text_len; - char *notification_text_val; - } notification_text; - rpc_loc_ni_datacoding_scheme_e_type datacoding_scheme; - rpc_loc_ni_ext_client_address_s_type ext_client_address_data; - rpc_loc_ni_location_type_e_type location_type; - rpc_loc_ni_deferred_location_s_type deferred_location; - rpc_loc_ni_requestor_id_s_type requestor_id; - rpc_loc_ni_codeword_string_s_type codeword_string; - rpc_loc_ni_service_type_id_s_type service_type_id; - rpc_uint16 user_response_timer; -}; -typedef struct rpc_loc_ni_umts_cp_notify_verify_req_s_type rpc_loc_ni_umts_cp_notify_verify_req_s_type; - -struct rpc_loc_ni_event_payload_u_type { - rpc_loc_ni_event_e_type disc; - union { - rpc_loc_ni_vx_notify_verify_req_s_type vx_req; - rpc_loc_ni_supl_notify_verify_req_s_type supl_req; - rpc_loc_ni_umts_cp_notify_verify_req_s_type umts_cp_req; - } rpc_loc_ni_event_payload_u_type_u; -}; -typedef struct rpc_loc_ni_event_payload_u_type rpc_loc_ni_event_payload_u_type; - -struct rpc_loc_ni_event_s_type { - rpc_loc_ni_event_e_type event; - rpc_loc_ni_event_payload_u_type payload; -}; -typedef struct rpc_loc_ni_event_s_type rpc_loc_ni_event_s_type; - -enum rpc_loc_assist_data_request_e_type { - RPC_LOC_ASSIST_DATA_TIME_REQ = 1, - RPC_LOC_ASSIST_DATA_PREDICTED_ORBITS_REQ = 2, - RPC_LOC_ASSIST_DATA_MAX = 268435456, -}; -typedef enum rpc_loc_assist_data_request_e_type rpc_loc_assist_data_request_e_type; - -typedef char *rpc_struct_loc_time_download_source_s_type_servers_ptr; - -typedef rpc_struct_loc_time_download_source_s_type_servers_ptr rpc_struct_loc_time_download_source_s_type_servers[3]; - -struct rpc_loc_time_download_source_s_type { - rpc_uint32 delay_threshold; - rpc_struct_loc_time_download_source_s_type_servers servers; -}; -typedef struct rpc_loc_time_download_source_s_type rpc_loc_time_download_source_s_type; - -typedef char *rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr; - -typedef rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr rpc_struct_loc_predicted_orbits_data_source_s_type_servers[3]; - -struct rpc_loc_predicted_orbits_data_source_s_type { - rpc_uint32 max_file_size; - rpc_uint32 max_part_size; - rpc_struct_loc_predicted_orbits_data_source_s_type_servers servers; -}; -typedef struct rpc_loc_predicted_orbits_data_source_s_type rpc_loc_predicted_orbits_data_source_s_type; - -struct rpc_loc_assist_data_request_payload_u_type { - rpc_loc_assist_data_request_e_type disc; - union { - rpc_loc_time_download_source_s_type time_download; - rpc_loc_predicted_orbits_data_source_s_type data_download; - } rpc_loc_assist_data_request_payload_u_type_u; -}; -typedef struct rpc_loc_assist_data_request_payload_u_type rpc_loc_assist_data_request_payload_u_type; - -struct rpc_loc_assist_data_request_s_type { - rpc_loc_assist_data_request_e_type event; - rpc_loc_assist_data_request_payload_u_type payload; -}; -typedef struct rpc_loc_assist_data_request_s_type rpc_loc_assist_data_request_s_type; - -typedef rpc_uint32 rpc_loc_server_connection_handle; - -enum rpc_loc_server_protocol_e_type { - RPC_LOC_SERVER_PROTOCOL_DEFAULT = 0, - RPC_LOC_SERVER_PROTOCOL_SUPL = 1, - RPC_LOC_SERVER_PROTOCOL_VX_MPC = 2, - RPC_LOC_SERVER_PROTOCOL_VX_PDE = 3, - RPC_LOC_SERVER_PROTOCOL_MAX = 16777216, -}; -typedef enum rpc_loc_server_protocol_e_type rpc_loc_server_protocol_e_type; - -enum rpc_loc_server_request_e_type { - RPC_LOC_SERVER_REQUEST_OPEN = 1, - RPC_LOC_SERVER_REQUEST_CLOSE = 2, - RPC_LOC_SERVER_REQUEST_MAX = 268435456, -}; -typedef enum rpc_loc_server_request_e_type rpc_loc_server_request_e_type; - -struct rpc_loc_server_open_req_s_type { - rpc_loc_server_connection_handle conn_handle; - rpc_loc_server_protocol_e_type protocol; -}; -typedef struct rpc_loc_server_open_req_s_type rpc_loc_server_open_req_s_type; - -struct rpc_loc_server_close_req_s_type { - rpc_loc_server_connection_handle conn_handle; -}; -typedef struct rpc_loc_server_close_req_s_type rpc_loc_server_close_req_s_type; - -struct rpc_loc_server_request_u_type { - rpc_loc_server_request_e_type disc; - union { - rpc_loc_server_open_req_s_type open_req; - rpc_loc_server_close_req_s_type close_req; - } rpc_loc_server_request_u_type_u; -}; -typedef struct rpc_loc_server_request_u_type rpc_loc_server_request_u_type; - -struct rpc_loc_server_request_s_type { - rpc_loc_server_request_e_type event; - rpc_loc_server_request_u_type payload; -}; -typedef struct rpc_loc_server_request_s_type rpc_loc_server_request_s_type; - -struct rpc_loc_reserved_payload_s_type { - rpc_uint16 data_size; - struct { - u_int data_len; - char *data_val; - } data; -}; -typedef struct rpc_loc_reserved_payload_s_type rpc_loc_reserved_payload_s_type; - -enum rpc_loc_ioctl_e_type { - RPC_LOC_IOCTL_GET_API_VERSION = 1, - RPC_LOC_IOCTL_SET_FIX_CRITERIA = 2, - RPC_LOC_IOCTL_GET_FIX_CRITERIA = 3, - RPC_LOC_IOCTL_SERVICE_START_INDEX = 400, - RPC_LOC_IOCTL_INFORM_NI_USER_RESPONSE = 400, - RPC_LOC_IOCTL_INJECT_PREDICTED_ORBITS_DATA = 401, - RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_VALIDITY = 402, - RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_SOURCE = 403, - RPC_LOC_IOCTL_SET_PREDICTED_ORBITS_DATA_AUTO_DOWNLOAD = 404, - RPC_LOC_IOCTL_INJECT_UTC_TIME = 405, - RPC_LOC_IOCTL_INJECT_RTC_VALUE = 406, - RPC_LOC_IOCTL_INJECT_POSITION = 407, - RPC_LOC_IOCTL_QUERY_ENGINE_STATE = 408, - RPC_LOC_IOCTL_INFORM_SERVER_OPEN_STATUS = 409, - RPC_LOC_IOCTL_INFORM_SERVER_CLOSE_STATUS = 410, - RPC_LOC_IOCTL_NV_SETTINGS_START_INDEX = 800, - RPC_LOC_IOCTL_SET_ENGINE_LOCK = 800, - RPC_LOC_IOCTL_GET_ENGINE_LOCK = 801, - RPC_LOC_IOCTL_SET_SBAS_CONFIG = 802, - RPC_LOC_IOCTL_GET_SBAS_CONFIG = 803, - RPC_LOC_IOCTL_SET_NMEA_TYPES = 804, - RPC_LOC_IOCTL_GET_NMEA_TYPES = 805, - RPC_LOC_IOCTL_SET_CDMA_PDE_SERVER_ADDR = 806, - RPC_LOC_IOCTL_GET_CDMA_PDE_SERVER_ADDR = 807, - RPC_LOC_IOCTL_SET_CDMA_MPC_SERVER_ADDR = 808, - RPC_LOC_IOCTL_GET_CDMA_MPC_SERVER_ADDR = 809, - RPC_LOC_IOCTL_SET_UMTS_SLP_SERVER_ADDR = 810, - RPC_LOC_IOCTL_GET_UMTS_SLP_SERVER_ADDR = 811, - RPC_LOC_IOCTL_SET_ON_DEMAND_LPM = 812, - RPC_LOC_IOCTL_GET_ON_DEMAND_LPM = 813, - RPC_LOC_IOCTL_PROPRIETARY_START_INDEX = 1000, - RPC_LOC_IOCTL_DELETE_ASSIST_DATA = 1000, - RPC_LOC_IOCTL_SET_CUSTOM_PDE_SERVER_ADDR = 1001, - RPC_LOC_IOCTL_GET_CUSTOM_PDE_SERVER_ADDR = 1002, - RPC_LOC_IOCTL_THIRD_PARTY_START_INDEX = 1073741824, -}; -typedef enum rpc_loc_ioctl_e_type rpc_loc_ioctl_e_type; - -struct rpc_loc_api_version_s_type { - u_char major; - u_char minor; -}; -typedef struct rpc_loc_api_version_s_type rpc_loc_api_version_s_type; - -enum rpc_loc_fix_recurrence_e_type { - RPC_LOC_PERIODIC_FIX = 1, - RPC_LOC_SINGLE_FIX = 2, - RPC_LOC_FIX_SESSION_TYPE_MAX = 268435456, -}; -typedef enum rpc_loc_fix_recurrence_e_type rpc_loc_fix_recurrence_e_type; - -enum rpc_loc_operation_mode_e_type { - RPC_LOC_OPER_MODE_DEFAULT = 1, - RPC_LOC_OPER_MODE_MSB = 2, - RPC_LOC_OPER_MODE_MSA = 3, - RPC_LOC_OPER_MODE_STANDALONE = 4, - RPC_LOC_OPER_MODE_SPEED_OPTIMAL = 5, - RPC_LOC_OPER_MODE_ACCURACY_OPTIMAL = 6, - RPC_LOC_OPER_MODE_DATA_OPTIMAL = 7, - RPC_LOC_OPER_MODE_MAX = 268435456, -}; -typedef enum rpc_loc_operation_mode_e_type rpc_loc_operation_mode_e_type; - -enum rpc_loc_notify_e_type { - RPC_LOC_NOTIFY_ON_INTERVAL = 1, - RPC_LOC_NOTIFY_ON_DISTANCE = 2, - RPC_LOC_NOTIFY_ON_ANY = 3, - RPC_LOC_NOTIFY_ON_ALL = 4, - RPC_LOC_NOTIFY_TYPE_MAX = 268435456, -}; -typedef enum rpc_loc_notify_e_type rpc_loc_notify_e_type; - -struct rpc_loc_fix_criteria_s_type { - rpc_uint32 valid_mask; - rpc_loc_fix_recurrence_e_type recurrence_type; - rpc_loc_operation_mode_e_type preferred_operation_mode; - rpc_uint32 preferred_accuracy; - rpc_uint32 preferred_response_time; - rpc_boolean intermediate_pos_report_enabled; - rpc_loc_notify_e_type notify_type; - rpc_uint32 min_interval; - float min_distance; - rpc_uint32 min_dist_sample_interval; -}; -typedef struct rpc_loc_fix_criteria_s_type rpc_loc_fix_criteria_s_type; - -enum rpc_loc_ni_user_resp_e_type { - RPC_LOC_NI_LCS_NOTIFY_VERIFY_ACCEPT = 1, - RPC_LOC_NI_LCS_NOTIFY_VERIFY_DENY = 2, - RPC_LOC_NI_LCS_NOTIFY_VERIFY_NORESP = 3, - RPC_LOC_NI_LCS_NOTIFY_VERIFY_MAX = 268435456, -}; -typedef enum rpc_loc_ni_user_resp_e_type rpc_loc_ni_user_resp_e_type; - -struct rpc_loc_user_verify_s_type { - rpc_loc_ni_user_resp_e_type user_resp; - rpc_loc_ni_event_s_type ni_event_pass_back; -}; -typedef struct rpc_loc_user_verify_s_type rpc_loc_user_verify_s_type; - -enum rpc_loc_predicted_orbits_data_format_e_type { - RPC_LOC_PREDICTED_ORBITS_XTRA = 0, - RPC_LOC_PREDICTED_ORBITS_FORMAT_MAX = 268435456, -}; -typedef enum rpc_loc_predicted_orbits_data_format_e_type rpc_loc_predicted_orbits_data_format_e_type; - -struct rpc_loc_predicted_orbits_data_s_type { - rpc_loc_predicted_orbits_data_format_e_type format_type; - rpc_uint32 total_size; - rpc_uint8 total_parts; - rpc_uint8 part; - rpc_uint16 part_len; - struct { - u_int data_ptr_len; - char *data_ptr_val; - } data_ptr; -}; -typedef struct rpc_loc_predicted_orbits_data_s_type rpc_loc_predicted_orbits_data_s_type; - -struct rpc_loc_predicted_orbits_data_validity_report_s_type { - rpc_uint64 start_time_utc; - rpc_uint16 valid_duration_hrs; -}; -typedef struct rpc_loc_predicted_orbits_data_validity_report_s_type rpc_loc_predicted_orbits_data_validity_report_s_type; - -struct rpc_loc_predicted_orbits_auto_download_config_s_type { - rpc_boolean enable; - u_char auto_check_every_hrs; -}; -typedef struct rpc_loc_predicted_orbits_auto_download_config_s_type rpc_loc_predicted_orbits_auto_download_config_s_type; - -struct rpc_loc_assist_data_time_s_type { - rpc_uint64 time_utc; - rpc_uint32 uncertainty; -}; -typedef struct rpc_loc_assist_data_time_s_type rpc_loc_assist_data_time_s_type; - -typedef rpc_uint64 rpc_loc_assist_pos_valid_mask_type; - -struct rpc_loc_assist_data_pos_s_type { - rpc_loc_assist_pos_valid_mask_type valid_mask; - rpc_uint64 timestamp_utc; - double latitude; - double longitude; - float altitude_wrt_ellipsoid; - float altitude_wrt_mean_sea_level; - float hor_unc_circular; - float vert_unc; - u_char confidence_horizontal; - u_char confidence_vertical; -}; -typedef struct rpc_loc_assist_data_pos_s_type rpc_loc_assist_data_pos_s_type; - -enum rpc_loc_server_open_status_e_type { - RPC_LOC_SERVER_OPEN_SUCCESS = 1, - RPC_LOC_SERVER_OPEN_FAIL = 2, - RPC_LOC_SERVER_OPEN_STATUS_MAX = 268435456, -}; -typedef enum rpc_loc_server_open_status_e_type rpc_loc_server_open_status_e_type; - -struct rpc_loc_server_open_status_s_type { - rpc_loc_server_connection_handle conn_handle; - rpc_loc_server_open_status_e_type open_status; - char *apn_name; -}; -typedef struct rpc_loc_server_open_status_s_type rpc_loc_server_open_status_s_type; - -enum rpc_loc_server_close_status_e_type { - RPC_LOC_SERVER_CLOSE_SUCCESS = 1, - RPC_LOC_SERVER_CLOSE_FAIL = 2, - RPC_LOC_SERVER_CLOSE_STATUS_MAX = 268435456, -}; -typedef enum rpc_loc_server_close_status_e_type rpc_loc_server_close_status_e_type; - -struct rpc_loc_server_close_status_s_type { - rpc_loc_server_connection_handle conn_handle; - rpc_loc_server_close_status_e_type close_status; -}; -typedef struct rpc_loc_server_close_status_s_type rpc_loc_server_close_status_s_type; - -enum rpc_loc_lock_e_type { - RPC_LOC_LOCK_NONE = 1, - RPC_LOC_LOCK_MI = 2, - RPC_LOC_LOCK_MT = 3, - RPC_LOC_LOCK_ALL = 4, - RPC_LOC_LOCK_MAX = 268435456, -}; -typedef enum rpc_loc_lock_e_type rpc_loc_lock_e_type; - -typedef rpc_uint32 rpc_loc_nmea_sentence_type; - -typedef rpc_uint32 rpc_loc_assist_data_type; - -struct rpc_loc_assist_data_delete_s_type { - rpc_loc_assist_data_type type; - rpc_uint32 reserved[8]; -}; -typedef struct rpc_loc_assist_data_delete_s_type rpc_loc_assist_data_delete_s_type; - -struct rpc_loc_ioctl_data_u_type { - rpc_loc_ioctl_e_type disc; - union { - rpc_loc_fix_criteria_s_type fix_criteria; - rpc_loc_user_verify_s_type user_verify_resp; - rpc_loc_predicted_orbits_data_s_type predicted_orbits_data; - rpc_loc_predicted_orbits_auto_download_config_s_type predicted_orbits_auto_download; - rpc_loc_assist_data_time_s_type assistance_data_time; - rpc_loc_assist_data_pos_s_type assistance_data_position; - rpc_loc_server_open_status_s_type conn_open_status; - rpc_loc_server_close_status_s_type conn_close_status; - rpc_loc_lock_e_type engine_lock; - rpc_boolean sbas_mode; - rpc_loc_nmea_sentence_type nmea_types; - rpc_boolean on_demand_lpm; - rpc_loc_server_info_s_type server_addr; - rpc_loc_assist_data_delete_s_type assist_data_delete; - } rpc_loc_ioctl_data_u_type_u; -}; -typedef struct rpc_loc_ioctl_data_u_type rpc_loc_ioctl_data_u_type; - -struct rpc_loc_ioctl_callback_data_u_type { - rpc_loc_ioctl_e_type disc; - union { - rpc_loc_api_version_s_type api_version; - rpc_loc_fix_criteria_s_type fix_criteria; - rpc_loc_lock_e_type engine_lock; - rpc_boolean sbas_mode; - rpc_loc_nmea_sentence_type nmea_types; - rpc_boolean on_demand_lpm; - rpc_loc_server_info_s_type server_addr; - rpc_loc_predicted_orbits_data_source_s_type predicted_orbits_data_source; - rpc_loc_predicted_orbits_data_validity_report_s_type predicted_orbits_data_validity; - } rpc_loc_ioctl_callback_data_u_type_u; -}; -typedef struct rpc_loc_ioctl_callback_data_u_type rpc_loc_ioctl_callback_data_u_type; - -struct rpc_loc_ioctl_callback_s_type { - rpc_loc_ioctl_e_type type; - rpc_int32 status; - rpc_loc_ioctl_callback_data_u_type data; -}; -typedef struct rpc_loc_ioctl_callback_s_type rpc_loc_ioctl_callback_s_type; - -struct rpc_loc_event_payload_u_type { - u_quad_t disc; - union { - rpc_loc_parsed_position_s_type parsed_location_report; - rpc_loc_gnss_info_s_type gnss_report; - rpc_loc_nmea_report_s_type nmea_report; - rpc_loc_ni_event_s_type ni_request; - rpc_loc_assist_data_request_s_type assist_data_request; - rpc_loc_server_request_s_type loc_server_request; - rpc_loc_ioctl_callback_s_type ioctl_report; - rpc_loc_status_event_s_type status_report; - rpc_loc_reserved_payload_s_type reserved; - } rpc_loc_event_payload_u_type_u; -}; -typedef struct rpc_loc_event_payload_u_type rpc_loc_event_payload_u_type; -#define RPC_LOC_API_NULL_VERSION 0x00010001 -#define RPC_LOC_API_RPC_GLUE_CODE_INFO_REMOTE_VERSION 0x00010001 - -/* the xdr functions */ - -#if defined(__STDC__) || defined(__cplusplus) -extern bool_t xdr_rpc_boolean (XDR *, rpc_boolean*); -extern bool_t xdr_rpc_uint32 (XDR *, rpc_uint32*); -extern bool_t xdr_rpc_uint16 (XDR *, rpc_uint16*); -extern bool_t xdr_rpc_uint8 (XDR *, rpc_uint8*); -extern bool_t xdr_rpc_int32 (XDR *, rpc_int32*); -extern bool_t xdr_rpc_byte (XDR *, rpc_byte*); -extern bool_t xdr_rpc_uint64 (XDR *, rpc_uint64*); -extern bool_t xdr_rpc_loc_client_handle_type (XDR *, rpc_loc_client_handle_type*); -extern bool_t xdr_rpc_loc_event_mask_type (XDR *, rpc_loc_event_mask_type*); -extern bool_t xdr_rpc_loc_position_valid_mask_type (XDR *, rpc_loc_position_valid_mask_type*); -extern bool_t xdr_rpc_loc_pos_technology_mask_type (XDR *, rpc_loc_pos_technology_mask_type*); -extern bool_t xdr_rpc_loc_session_status_e_type (XDR *, rpc_loc_session_status_e_type*); -extern bool_t xdr_rpc_loc_calendar_time_s_type (XDR *, rpc_loc_calendar_time_s_type*); -extern bool_t xdr_rpc_loc_parsed_position_s_type (XDR *, rpc_loc_parsed_position_s_type*); -extern bool_t xdr_rpc_loc_sv_system_e_type (XDR *, rpc_loc_sv_system_e_type*); -extern bool_t xdr_rpc_loc_sv_status_e_type (XDR *, rpc_loc_sv_status_e_type*); -extern bool_t xdr_rpc_loc_sv_info_valid_mask_type (XDR *, rpc_loc_sv_info_valid_mask_type*); -extern bool_t xdr_rpc_loc_sv_info_s_type (XDR *, rpc_loc_sv_info_s_type*); -extern bool_t xdr_rpc_loc_gnss_info_valid_mask_type (XDR *, rpc_loc_gnss_info_valid_mask_type*); -extern bool_t xdr_rpc_loc_gnss_info_s_type (XDR *, rpc_loc_gnss_info_s_type*); -extern bool_t xdr_rpc_loc_nmea_report_s_type (XDR *, rpc_loc_nmea_report_s_type*); -extern bool_t xdr_rpc_loc_status_event_e_type (XDR *, rpc_loc_status_event_e_type*); -extern bool_t xdr_rpc_loc_engine_state_e_type (XDR *, rpc_loc_engine_state_e_type*); -extern bool_t xdr_rpc_loc_status_event_payload_u_type (XDR *, rpc_loc_status_event_payload_u_type*); -extern bool_t xdr_rpc_loc_status_event_s_type (XDR *, rpc_loc_status_event_s_type*); -extern bool_t xdr_rpc_loc_server_addr_e_type (XDR *, rpc_loc_server_addr_e_type*); -extern bool_t xdr_rpc_loc_server_addr_ipv4_type (XDR *, rpc_loc_server_addr_ipv4_type*); -extern bool_t xdr_rpc_loc_server_addr_url_type (XDR *, rpc_loc_server_addr_url_type*); -extern bool_t xdr_rpc_loc_server_addr_u_type (XDR *, rpc_loc_server_addr_u_type*); -extern bool_t xdr_rpc_loc_server_info_s_type (XDR *, rpc_loc_server_info_s_type*); -extern bool_t xdr_rpc_loc_ni_notify_verify_e_type (XDR *, rpc_loc_ni_notify_verify_e_type*); -extern bool_t xdr_rpc_loc_ni_event_e_type (XDR *, rpc_loc_ni_event_e_type*); -extern bool_t xdr_rpc_loc_ni_datacoding_scheme_e_type (XDR *, rpc_loc_ni_datacoding_scheme_e_type*); -extern bool_t xdr_rpc_loc_ni_vx_requester_id_encoding_scheme_e_type (XDR *, rpc_loc_ni_vx_requester_id_encoding_scheme_e_type*); -extern bool_t xdr_rpc_loc_ni_vx_pos_mode_e_type (XDR *, rpc_loc_ni_vx_pos_mode_e_type*); -extern bool_t xdr_rpc_loc_ni_vx_requester_id_s_type (XDR *, rpc_loc_ni_vx_requester_id_s_type*); -extern bool_t xdr_rpc_loc_ni_vx_notify_verify_req_s_type (XDR *, rpc_loc_ni_vx_notify_verify_req_s_type*); -extern bool_t xdr_rpc_loc_ni_supl_pos_method_e_type (XDR *, rpc_loc_ni_supl_pos_method_e_type*); -extern bool_t xdr_rpc_loc_ni_supl_slp_session_id_s_type (XDR *, rpc_loc_ni_supl_slp_session_id_s_type*); -extern bool_t xdr_rpc_loc_ni_requestor_id_s_type (XDR *, rpc_loc_ni_requestor_id_s_type*); -extern bool_t xdr_rpc_loc_ni_supl_client_name_s_type (XDR *, rpc_loc_ni_supl_client_name_s_type*); -extern bool_t xdr_rpc_loc_ni_supl_qop_s_type (XDR *, rpc_loc_ni_supl_qop_s_type*); -extern bool_t xdr_rpc_loc_ni_supl_notify_verify_req_s_type (XDR *, rpc_loc_ni_supl_notify_verify_req_s_type*); -extern bool_t xdr_rpc_loc_ni_ext_client_address_s_type (XDR *, rpc_loc_ni_ext_client_address_s_type*); -extern bool_t xdr_rpc_loc_ni_location_type_e_type (XDR *, rpc_loc_ni_location_type_e_type*); -extern bool_t xdr_rpc_loc_ni_deferred_location_s_type (XDR *, rpc_loc_ni_deferred_location_s_type*); -extern bool_t xdr_rpc_loc_ni_codeword_string_s_type (XDR *, rpc_loc_ni_codeword_string_s_type*); -extern bool_t xdr_rpc_loc_ni_service_type_id_s_type (XDR *, rpc_loc_ni_service_type_id_s_type*); -extern bool_t xdr_rpc_loc_ni_umts_cp_notify_verify_req_s_type (XDR *, rpc_loc_ni_umts_cp_notify_verify_req_s_type*); -extern bool_t xdr_rpc_loc_ni_event_payload_u_type (XDR *, rpc_loc_ni_event_payload_u_type*); -extern bool_t xdr_rpc_loc_ni_event_s_type (XDR *, rpc_loc_ni_event_s_type*); -extern bool_t xdr_rpc_loc_assist_data_request_e_type (XDR *, rpc_loc_assist_data_request_e_type*); -extern bool_t xdr_rpc_struct_loc_time_download_source_s_type_servers_ptr (XDR *, rpc_struct_loc_time_download_source_s_type_servers_ptr*); -extern bool_t xdr_rpc_struct_loc_time_download_source_s_type_servers (XDR *, rpc_struct_loc_time_download_source_s_type_servers); -extern bool_t xdr_rpc_loc_time_download_source_s_type (XDR *, rpc_loc_time_download_source_s_type*); -extern bool_t xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr (XDR *, rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr*); -extern bool_t xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers (XDR *, rpc_struct_loc_predicted_orbits_data_source_s_type_servers); -extern bool_t xdr_rpc_loc_predicted_orbits_data_source_s_type (XDR *, rpc_loc_predicted_orbits_data_source_s_type*); -extern bool_t xdr_rpc_loc_assist_data_request_payload_u_type (XDR *, rpc_loc_assist_data_request_payload_u_type*); -extern bool_t xdr_rpc_loc_assist_data_request_s_type (XDR *, rpc_loc_assist_data_request_s_type*); -extern bool_t xdr_rpc_loc_server_connection_handle (XDR *, rpc_loc_server_connection_handle*); -extern bool_t xdr_rpc_loc_server_protocol_e_type (XDR *, rpc_loc_server_protocol_e_type*); -extern bool_t xdr_rpc_loc_server_request_e_type (XDR *, rpc_loc_server_request_e_type*); -extern bool_t xdr_rpc_loc_server_open_req_s_type (XDR *, rpc_loc_server_open_req_s_type*); -extern bool_t xdr_rpc_loc_server_close_req_s_type (XDR *, rpc_loc_server_close_req_s_type*); -extern bool_t xdr_rpc_loc_server_request_u_type (XDR *, rpc_loc_server_request_u_type*); -extern bool_t xdr_rpc_loc_server_request_s_type (XDR *, rpc_loc_server_request_s_type*); -extern bool_t xdr_rpc_loc_reserved_payload_s_type (XDR *, rpc_loc_reserved_payload_s_type*); -extern bool_t xdr_rpc_loc_ioctl_e_type (XDR *, rpc_loc_ioctl_e_type*); -extern bool_t xdr_rpc_loc_api_version_s_type (XDR *, rpc_loc_api_version_s_type*); -extern bool_t xdr_rpc_loc_fix_recurrence_e_type (XDR *, rpc_loc_fix_recurrence_e_type*); -extern bool_t xdr_rpc_loc_operation_mode_e_type (XDR *, rpc_loc_operation_mode_e_type*); -extern bool_t xdr_rpc_loc_notify_e_type (XDR *, rpc_loc_notify_e_type*); -extern bool_t xdr_rpc_loc_fix_criteria_s_type (XDR *, rpc_loc_fix_criteria_s_type*); -extern bool_t xdr_rpc_loc_ni_user_resp_e_type (XDR *, rpc_loc_ni_user_resp_e_type*); -extern bool_t xdr_rpc_loc_user_verify_s_type (XDR *, rpc_loc_user_verify_s_type*); -extern bool_t xdr_rpc_loc_predicted_orbits_data_format_e_type (XDR *, rpc_loc_predicted_orbits_data_format_e_type*); -extern bool_t xdr_rpc_loc_predicted_orbits_data_s_type (XDR *, rpc_loc_predicted_orbits_data_s_type*); -extern bool_t xdr_rpc_loc_predicted_orbits_data_validity_report_s_type (XDR *, rpc_loc_predicted_orbits_data_validity_report_s_type*); -extern bool_t xdr_rpc_loc_predicted_orbits_auto_download_config_s_type (XDR *, rpc_loc_predicted_orbits_auto_download_config_s_type*); -extern bool_t xdr_rpc_loc_assist_data_time_s_type (XDR *, rpc_loc_assist_data_time_s_type*); -extern bool_t xdr_rpc_loc_assist_pos_valid_mask_type (XDR *, rpc_loc_assist_pos_valid_mask_type*); -extern bool_t xdr_rpc_loc_assist_data_pos_s_type (XDR *, rpc_loc_assist_data_pos_s_type*); -extern bool_t xdr_rpc_loc_server_open_status_e_type (XDR *, rpc_loc_server_open_status_e_type*); -extern bool_t xdr_rpc_loc_server_open_status_s_type (XDR *, rpc_loc_server_open_status_s_type*); -extern bool_t xdr_rpc_loc_server_close_status_e_type (XDR *, rpc_loc_server_close_status_e_type*); -extern bool_t xdr_rpc_loc_server_close_status_s_type (XDR *, rpc_loc_server_close_status_s_type*); -extern bool_t xdr_rpc_loc_lock_e_type (XDR *, rpc_loc_lock_e_type*); -extern bool_t xdr_rpc_loc_nmea_sentence_type (XDR *, rpc_loc_nmea_sentence_type*); -extern bool_t xdr_rpc_loc_assist_data_type (XDR *, rpc_loc_assist_data_type*); -extern bool_t xdr_rpc_loc_assist_data_delete_s_type (XDR *, rpc_loc_assist_data_delete_s_type*); -extern bool_t xdr_rpc_loc_ioctl_data_u_type (XDR *, rpc_loc_ioctl_data_u_type*); -extern bool_t xdr_rpc_loc_ioctl_callback_data_u_type (XDR *, rpc_loc_ioctl_callback_data_u_type*); -extern bool_t xdr_rpc_loc_ioctl_callback_s_type (XDR *, rpc_loc_ioctl_callback_s_type*); -extern bool_t xdr_rpc_loc_event_payload_u_type (XDR *, rpc_loc_event_payload_u_type*); - -#else /* K&R C */ -extern bool_t xdr_rpc_boolean (); -extern bool_t xdr_rpc_uint32 (); -extern bool_t xdr_rpc_uint16 (); -extern bool_t xdr_rpc_uint8 (); -extern bool_t xdr_rpc_int32 (); -extern bool_t xdr_rpc_byte (); -extern bool_t xdr_rpc_uint64 (); -extern bool_t xdr_rpc_loc_client_handle_type (); -extern bool_t xdr_rpc_loc_event_mask_type (); -extern bool_t xdr_rpc_loc_position_valid_mask_type (); -extern bool_t xdr_rpc_loc_pos_technology_mask_type (); -extern bool_t xdr_rpc_loc_session_status_e_type (); -extern bool_t xdr_rpc_loc_calendar_time_s_type (); -extern bool_t xdr_rpc_loc_parsed_position_s_type (); -extern bool_t xdr_rpc_loc_sv_system_e_type (); -extern bool_t xdr_rpc_loc_sv_status_e_type (); -extern bool_t xdr_rpc_loc_sv_info_valid_mask_type (); -extern bool_t xdr_rpc_loc_sv_info_s_type (); -extern bool_t xdr_rpc_loc_gnss_info_valid_mask_type (); -extern bool_t xdr_rpc_loc_gnss_info_s_type (); -extern bool_t xdr_rpc_loc_nmea_report_s_type (); -extern bool_t xdr_rpc_loc_status_event_e_type (); -extern bool_t xdr_rpc_loc_engine_state_e_type (); -extern bool_t xdr_rpc_loc_status_event_payload_u_type (); -extern bool_t xdr_rpc_loc_status_event_s_type (); -extern bool_t xdr_rpc_loc_server_addr_e_type (); -extern bool_t xdr_rpc_loc_server_addr_ipv4_type (); -extern bool_t xdr_rpc_loc_server_addr_url_type (); -extern bool_t xdr_rpc_loc_server_addr_u_type (); -extern bool_t xdr_rpc_loc_server_info_s_type (); -extern bool_t xdr_rpc_loc_ni_notify_verify_e_type (); -extern bool_t xdr_rpc_loc_ni_event_e_type (); -extern bool_t xdr_rpc_loc_ni_datacoding_scheme_e_type (); -extern bool_t xdr_rpc_loc_ni_vx_requester_id_encoding_scheme_e_type (); -extern bool_t xdr_rpc_loc_ni_vx_pos_mode_e_type (); -extern bool_t xdr_rpc_loc_ni_vx_requester_id_s_type (); -extern bool_t xdr_rpc_loc_ni_vx_notify_verify_req_s_type (); -extern bool_t xdr_rpc_loc_ni_supl_pos_method_e_type (); -extern bool_t xdr_rpc_loc_ni_supl_slp_session_id_s_type (); -extern bool_t xdr_rpc_loc_ni_requestor_id_s_type (); -extern bool_t xdr_rpc_loc_ni_supl_client_name_s_type (); -extern bool_t xdr_rpc_loc_ni_supl_qop_s_type (); -extern bool_t xdr_rpc_loc_ni_supl_notify_verify_req_s_type (); -extern bool_t xdr_rpc_loc_ni_ext_client_address_s_type (); -extern bool_t xdr_rpc_loc_ni_location_type_e_type (); -extern bool_t xdr_rpc_loc_ni_deferred_location_s_type (); -extern bool_t xdr_rpc_loc_ni_codeword_string_s_type (); -extern bool_t xdr_rpc_loc_ni_service_type_id_s_type (); -extern bool_t xdr_rpc_loc_ni_umts_cp_notify_verify_req_s_type (); -extern bool_t xdr_rpc_loc_ni_event_payload_u_type (); -extern bool_t xdr_rpc_loc_ni_event_s_type (); -extern bool_t xdr_rpc_loc_assist_data_request_e_type (); -extern bool_t xdr_rpc_struct_loc_time_download_source_s_type_servers_ptr (); -extern bool_t xdr_rpc_struct_loc_time_download_source_s_type_servers (); -extern bool_t xdr_rpc_loc_time_download_source_s_type (); -extern bool_t xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr (); -extern bool_t xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers (); -extern bool_t xdr_rpc_loc_predicted_orbits_data_source_s_type (); -extern bool_t xdr_rpc_loc_assist_data_request_payload_u_type (); -extern bool_t xdr_rpc_loc_assist_data_request_s_type (); -extern bool_t xdr_rpc_loc_server_connection_handle (); -extern bool_t xdr_rpc_loc_server_protocol_e_type (); -extern bool_t xdr_rpc_loc_server_request_e_type (); -extern bool_t xdr_rpc_loc_server_open_req_s_type (); -extern bool_t xdr_rpc_loc_server_close_req_s_type (); -extern bool_t xdr_rpc_loc_server_request_u_type (); -extern bool_t xdr_rpc_loc_server_request_s_type (); -extern bool_t xdr_rpc_loc_reserved_payload_s_type (); -extern bool_t xdr_rpc_loc_ioctl_e_type (); -extern bool_t xdr_rpc_loc_api_version_s_type (); -extern bool_t xdr_rpc_loc_fix_recurrence_e_type (); -extern bool_t xdr_rpc_loc_operation_mode_e_type (); -extern bool_t xdr_rpc_loc_notify_e_type (); -extern bool_t xdr_rpc_loc_fix_criteria_s_type (); -extern bool_t xdr_rpc_loc_ni_user_resp_e_type (); -extern bool_t xdr_rpc_loc_user_verify_s_type (); -extern bool_t xdr_rpc_loc_predicted_orbits_data_format_e_type (); -extern bool_t xdr_rpc_loc_predicted_orbits_data_s_type (); -extern bool_t xdr_rpc_loc_predicted_orbits_data_validity_report_s_type (); -extern bool_t xdr_rpc_loc_predicted_orbits_auto_download_config_s_type (); -extern bool_t xdr_rpc_loc_assist_data_time_s_type (); -extern bool_t xdr_rpc_loc_assist_pos_valid_mask_type (); -extern bool_t xdr_rpc_loc_assist_data_pos_s_type (); -extern bool_t xdr_rpc_loc_server_open_status_e_type (); -extern bool_t xdr_rpc_loc_server_open_status_s_type (); -extern bool_t xdr_rpc_loc_server_close_status_e_type (); -extern bool_t xdr_rpc_loc_server_close_status_s_type (); -extern bool_t xdr_rpc_loc_lock_e_type (); -extern bool_t xdr_rpc_loc_nmea_sentence_type (); -extern bool_t xdr_rpc_loc_assist_data_type (); -extern bool_t xdr_rpc_loc_assist_data_delete_s_type (); -extern bool_t xdr_rpc_loc_ioctl_data_u_type (); -extern bool_t xdr_rpc_loc_ioctl_callback_data_u_type (); -extern bool_t xdr_rpc_loc_ioctl_callback_s_type (); -extern bool_t xdr_rpc_loc_event_payload_u_type (); - -#endif /* K&R C */ - -#ifdef __cplusplus -} -#endif - -#endif /* !_LOC_API_COMMON_H_RPCGEN */ diff --git a/loc_api/libloc_api-rpc/inc-3200/loc_api_fixup.h b/loc_api/libloc_api-rpc/inc-3200/loc_api_fixup.h deleted file mode 100644 index e62eb367..00000000 --- a/loc_api/libloc_api-rpc/inc-3200/loc_api_fixup.h +++ /dev/null @@ -1,188 +0,0 @@ -/****************************************************************************** - @file: loc_api_fixup.h - @brief: Loc API Android RPC amendment header - - DESCRIPTION - Loc API Android RPC amendment header - - INITIALIZATION AND SEQUENCING REQUIREMENTS - - ----------------------------------------------------------------------------- -Copyright (c) 2009, QUALCOMM USA, INC. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -· Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -· Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -· Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ----------------------------------------------------------------------------- - ******************************************************************************/ - -#ifndef LOC_API_FIXUP_H -#define LOC_API_FIXUP_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -#ifndef NULLPROC -#define NULLPROC 0 -#endif /* NULLPROC */ - -#ifdef ADD_XDR_FLOAT - -extern bool_t xdr_float (XDR *__xdrs, float *__fp); -extern bool_t xdr_double (XDR *__xdrs, double *__dp); - -#endif /* ADD_XDR_FLOAT */ - -#ifdef ADD_XDR_BOOL -extern bool_t xdr_bool(XDR *__xdrs, int *__bp); -#endif /* ADD_XDR_BOOL */ - -#define RPC_LOC_API_MAJOR_VERSION_NUMBER 1 -#define RPC_LOC_API_MINOR_VERSION_NUMBER 0 - -// Return value for loc_open in case of failure. -#define RPC_LOC_CLIENT_HANDLE_INVALID -1 - -// Return value of loc api calls for loc_close, loc_start_fix, loc_stop_fix and loc_ioctl -// These are also the status for the ioctl callback -#define RPC_LOC_API_SUCCESS 0 -#define RPC_LOC_API_GENERAL_FAILURE 1 -#define RPC_LOC_API_UNSUPPORTED 2 -#define RPC_LOC_API_INVALID_HANDLE 4 -#define RPC_LOC_API_INVALID_PARAMETER 5 -#define RPC_LOC_API_ENGINE_BUSY 6 -#define RPC_LOC_API_PHONE_OFFLINE 7 -#define RPC_LOC_API_TIMEOUT 8 - -// Special return value for loc api calls in case of RCP failure -#define RPC_LOC_API_RPC_FAILURE (-1234) - -#define RPC_LOC_API_MAX_SV_COUNT 80 -#define RPC_LOC_API_MAX_NMEA_STRING_LENGTH 1200 - -// Maximum server address that will be used in location API -#define RPC_LOC_API_MAX_SERVER_ADDR_LENGTH 256 -#define RPC_LOC_API_MAX_NUM_PREDICTED_ORBITS_SERVERS 3 -#define RPC_LOC_API_MAX_NUM_NTP_SERVERS 3 - -#define RPC_LOC_EVENT_PARSED_POSITION_REPORT 0x00000001 // Position report comes in loc_parsed_position_s_type -#define RPC_LOC_EVENT_SATELLITE_REPORT 0x00000002 // Satellite in view report -#define RPC_LOC_EVENT_NMEA_1HZ_REPORT 0x00000004 // NMEA report at 1HZ rate -#define RPC_LOC_EVENT_NMEA_POSITION_REPORT 0x00000008 // NMEA report at position report rate -#define RPC_LOC_EVENT_NI_NOTIFY_VERIFY_REQUEST 0x00000010 // NI notification/verification request -#define RPC_LOC_EVENT_ASSISTANCE_DATA_REQUEST 0x00000020 // Assistance data, eg: time, predicted orbits request -#define RPC_LOC_EVENT_LOCATION_SERVER_REQUEST 0x00000040 // Request for location server -#define RPC_LOC_EVENT_IOCTL_REPORT 0x00000080 // Callback report for loc_ioctl -#define RPC_LOC_EVENT_STATUS_REPORT 0x00000100 // Misc status report: eg, engine state - - -#define RPC_LOC_POS_VALID_SESSION_STATUS 0x00000001 -#define RPC_LOC_POS_VALID_TIMESTAMP_CALENDAR 0x00000002 -#define RPC_LOC_POS_VALID_TIMESTAMP_UTC 0x00000004 -#define RPC_LOC_POS_VALID_LEAP_SECONDS 0x00000008 -#define RPC_LOC_POS_VALID_TIME_UNC 0x00000010 -#define RPC_LOC_POS_VALID_LATITUDE 0x00000020 -#define RPC_LOC_POS_VALID_LONGITUDE 0x00000040 -#define RPC_LOC_POS_VALID_ALTITUDE_WRT_ELLIPSOID 0x00000080 -#define RPC_LOC_POS_VALID_ALTITUDE_WRT_MEAN_SEA_LEVEL 0x00000100 -#define RPC_LOC_POS_VALID_SPEED_HORIZONTAL 0x00000200 -#define RPC_LOC_POS_VALID_SPEED_VERTICAL 0x00000400 -#define RPC_LOC_POS_VALID_HEADING 0x00000800 -#define RPC_LOC_POS_VALID_HOR_UNC_CIRCULAR 0x00001000 -#define RPC_LOC_POS_VALID_HOR_UNC_ELLI_SEMI_MAJ 0x00002000 -#define RPC_LOC_POS_VALID_HOR_UNC_ELLI_SEMI_MIN 0x00004000 -#define RPC_LOC_POS_VALID_HOR_UNC_ELLI_ORIENT_AZIMUTH 0x00008000 -#define RPC_LOC_POS_VALID_VERTICAL_UNC 0x00010000 -#define RPC_LOC_POS_VALID_SPEED_UNC 0x00020000 -#define RPC_LOC_POS_VALID_HEADING_UNC 0x00040000 -#define RPC_LOC_POS_VALID_CONFIDENCE_HORIZONTAL 0x00080000 -#define RPC_LOC_POS_VALID_CONFIDENCE_VERTICAL 0x00100000 -#define RPC_LOC_POS_VALID_MAGNETIC_VARIATION 0x00200000 -#define RPC_LOC_POS_VALID_TECHNOLOGY_MASK 0x00400000 - -#define RPC_LOC_POS_TECH_SATELLITE 0x00000001 -#define RPC_LOC_POS_TECH_CELLID 0x00000002 -#define RPC_LOC_POS_TECH_WIFI 0x00000004 - -#define RPC_LOC_SV_INFO_VALID_SYSTEM 0x00000001 -#define RPC_LOC_SV_INFO_VALID_PRN 0x00000002 -#define RPC_LOC_SV_INFO_VALID_HEALTH_STATUS 0x00000004 -#define RPC_LOC_SV_INFO_VALID_PROCESS_STATUS 0x00000008 -#define RPC_LOC_SV_INFO_VALID_HAS_EPH 0x00000010 -#define RPC_LOC_SV_INFO_VALID_HAS_ALM 0x00000020 -#define RPC_LOC_SV_INFO_VALID_ELEVATION 0x00000040 -#define RPC_LOC_SV_INFO_VALID_AZIMUTH 0x00000080 -#define RPC_LOC_SV_INFO_VALID_SNR 0x00000100 - -#define RPC_LOC_GNSS_INFO_VALID_POS_DOP 0x00000001 -#define RPC_LOC_GNSS_INFO_VALID_HOR_DOP 0x00000002 -#define RPC_LOC_GNSS_INFO_VALID_VERT_DOP 0x00000004 -#define RPC_LOC_GNSS_INFO_VALID_ALTITUDE_ASSUMED 0x00000008 -#define RPC_LOC_GNSS_INFO_VALID_SV_COUNT 0x00000010 -#define RPC_LOC_GNSS_INFO_VALID_SV_LIST 0x00000020 - -#define RPC_LOC_NI_MAX_REQUESTOR_ID_LENGTH 200 -#define RPC_LOC_NI_SUPL_HASH_LENGTH 8 -#define RPC_LOC_NI_SUPL_SLP_SESSION_ID_BYTE_LENGTH 4 -#define RPC_LOC_NI_MAX_CLIENT_NAME_LENGTH 64 -#define RPC_LOC_NI_MAX_EXT_CLIENT_ADDRESS 20 -#define RPC_LOC_NI_CODEWORD_LENGTH 20 - -#define RPC_LOC_NI_SUPL_QOP_VALID 0x01 -#define RPC_LOC_NI_SUPL_QOP_VERACC_VALID 0x02 -#define RPC_LOC_NI_SUPL_QOP_MAXAGE_VALID 0x04 -#define RPC_LOC_NI_SUPL_QOP_DELAY_VALID 0x08 - -#define RPC_LOC_FIX_CRIT_VALID_RECURRENCE_TYPE 0x00000001 -#define RPC_LOC_FIX_CRIT_VALID_PREFERRED_OPERATION_MODE 0x00000002 -#define RPC_LOC_FIX_CRIT_VALID_PREFERRED_ACCURACY 0x00000004 -#define RPC_LOC_FIX_CRIT_VALID_PREFERRED_RESPONSE_TIME 0x00000008 -#define RPC_LOC_FIX_CRIT_VALID_INTERMEDIATE_POS_REPORT_ENABLED 0x00000010 -#define RPC_LOC_FIX_CRIT_VALID_NOTIFY_TYPE 0x00000020 -#define RPC_LOC_FIX_CRIT_VALID_MIN_INTERVAL 0x00000040 -#define RPC_LOC_FIX_CRIT_VALID_MIN_DISTANCE 0x00000080 -#define RPC_LOC_FIX_CRIT_VALID_MIN_DIST_SAMPLE_INTERVAL 0x00000100 - -#define RPC_LOC_ASSIST_POS_VALID_TIMESTAMP_UTC 0x00000001 -#define RPC_LOC_ASSIST_POS_VALID_LATITUDE 0x00000002 -#define RPC_LOC_ASSIST_POS_VALID_LONGITUDE 0x00000004 -#define RPC_LOC_ASSIST_POS_VALID_ALTITUDE_WRT_ELLIPSOID 0x00000008 -#define RPC_LOC_ASSIST_POS_VALID_ALTITUDE_WRT_MEAN_SEA_LEVEL 0x00000010 -#define RPC_LOC_ASSIST_POS_VALID_HOR_UNC_CIRCULAR 0x00000020 -#define RPC_LOC_ASSIST_POS_VALID_VERT_UNC 0x00000040 -#define RPC_LOC_ASSIST_POS_VALID_CONFIDENCE_HORIZONTAL 0x00000080 -#define RPC_LOC_ASSIST_POS_VALID_CONFIDENCE_VERTICAL 0x00000100 - -#define RPC_LOC_ASSIST_DATA_ALL 0xFFFFFFFF - -#define RPC_LOC_NMEA_MASK_ALL 0xffff -#define RPC_LOC_NMEA_MASK_GGA 0x0001 -#define RPC_LOC_NMEA_MASK_RMC 0x0002 -#define RPC_LOC_NMEA_MASK_GSV 0x0004 -#define RPC_LOC_NMEA_MASK_GSA 0x0008 -#define RPC_LOC_NMEA_MASK_VTG 0x0010 - -/* flags for notification */ -#define RPC_LOC_NI_CLIENT_NAME_PRESENT 0x0001 -#define RPC_LOC_NI_CLIENT_EXTADDR_PRESENT 0x0002 -#define RPC_LOC_NI_DEF_LOCATION_TYPE_PRESENT 0x0010 -#define RPC_LOC_NI_REQUESTOR_ID_PRESENT 0x0020 -#define RPC_LOC_NI_CODEWORD_PRESENT 0x0040 -#define RPC_LOC_NI_SERVICE_TYPE_ID_PRESENT 0x0080 -#define RPC_LOC_NI_ENCODING_TYPE_PRESENT 0x0100 - -#ifdef __cplusplus -} -#endif - -#endif /* LOC_API_FIXUP_H */ diff --git a/loc_api/libloc_api-rpc/inc-3200/loc_apicb_appinit.h b/loc_api/libloc_api-rpc/inc-3200/loc_apicb_appinit.h deleted file mode 100644 index 92d4e150..00000000 --- a/loc_api/libloc_api-rpc/inc-3200/loc_apicb_appinit.h +++ /dev/null @@ -1,34 +0,0 @@ -/* ------------------------------------------------------------------------------- -Copyright (c) 2009, QUALCOMM USA, INC. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -· Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -· Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -· Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ------------------------------------------------------------------------------- - */ - -#ifndef LOC_APICB_APPINIT_H -#define LOC_APICB_APPINIT_H - -#ifdef __cplusplus -extern "C" -{ -#endif - - /* Initialization function for callbacks */ -extern int loc_apicb_app_init(); -extern void loc_apicb_app_deinit(); - -#ifdef __cplusplus -} -#endif - -#endif /* LOC_APICB_APPINIT_H */ diff --git a/loc_api/libloc_api-rpc/inc/debug.h b/loc_api/libloc_api-rpc/inc/debug.h deleted file mode 100644 index a71b23a0..00000000 --- a/loc_api/libloc_api-rpc/inc/debug.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright (c) 2009, QUALCOMM USA, INC. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -· Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -· Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -· Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef DEBUG_H -#define DEBUG_H - -#include - -#define LOG_TAG "libgps-rpc" -#include - -#define PRINT(x...) do { \ - fprintf(stdout, "%s(%d) ", __FUNCTION__, __LINE__); \ - fprintf(stdout, ##x); \ - LOGD(x); \ - } while(0) - -#ifdef DEBUG -#define D PRINT -#else -#define D(x...) do { } while(0) -#endif - -#ifdef VERBOSE -#define V PRINT -#else -#define V(x...) do { } while(0) -#endif - -#define E(x...) do { \ - fprintf(stderr, "%s(%d) ", __FUNCTION__, __LINE__); \ - fprintf(stderr, ##x); \ - LOGE(x); \ - } while(0) - -#define FAILIF(cond, msg...) do { \ - if (__builtin_expect (cond, 0)) { \ - fprintf(stderr, "%s:%s:(%d): ", __FILE__, __FUNCTION__, __LINE__); \ - fprintf(stderr, ##msg); \ - LOGE(##msg); \ - } \ - } while(0) - -#endif/*DEBUG_H*/ diff --git a/loc_api/libloc_api-rpc/inc/loc_api_rpc_glue.h b/loc_api/libloc_api-rpc/inc/loc_api_rpc_glue.h deleted file mode 100644 index ef972bd6..00000000 --- a/loc_api/libloc_api-rpc/inc/loc_api_rpc_glue.h +++ /dev/null @@ -1,100 +0,0 @@ -/****************************************************************************** - @file: loc_api_rpc_glue.h - @brief: Loc API Android glue code header - - DESCRIPTION - Loc API Android glue code header - - INITIALIZATION AND SEQUENCING REQUIREMENTS - - ----------------------------------------------------------------------------- -Copyright (c) 2009, QUALCOMM USA, INC. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -· Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -· Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -· Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ----------------------------------------------------------------------------- - ******************************************************************************/ - -/*===================================================================== - EDIT HISTORY FOR MODULE - - This section contains comments describing changes made to the module. - Notice that changes are listed in reverse chronological order. - -when who what, where, why --------- --- ------------------------------------------------------- -03/17/09 dx Initial version - -$Id: //source/qcom/qct/modem/gps/cgps/dev/locationmiddleware/locapi/app-linux/source/test/loc_api_test/loc_api_cb_log.h#4 $ -======================================================================*/ - -#ifndef LOC_API_RPC_GLUE_H -#define LOC_API_RPC_GLUE_H - -/* Include RPC headers */ -#include "loc_api_common.h" -#include "loc_api.h" -#include "loc_api_cb.h" -#include "loc_api_fixup.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Boolean */ -/* Other data types in comdef.h are defined in rpc stubs, so fix it here */ -typedef unsigned char boolean; -#define TRUE 1 -#define FALSE 0 - -extern int loc_api_glue_init(void); -extern int loc_api_null(void); - -typedef int32 (loc_event_cb_f_type)( - rpc_loc_client_handle_type loc_handle, /* handle of the client */ - rpc_loc_event_mask_type loc_event, /* event mask */ - const rpc_loc_event_payload_u_type* loc_event_payload /* payload */ -); - -extern rpc_loc_client_handle_type loc_open( - rpc_loc_event_mask_type event_reg_mask, - loc_event_cb_f_type *event_callback -); - -extern int32 loc_close -( - rpc_loc_client_handle_type handle -); - -extern int32 loc_start_fix -( - rpc_loc_client_handle_type handle -); - -extern int32 loc_stop_fix -( - rpc_loc_client_handle_type handle -); - -extern int32 loc_ioctl -( - rpc_loc_client_handle_type handle, - rpc_loc_ioctl_e_type ioctl_type, - rpc_loc_ioctl_data_u_type* ioctl_data -); - -#ifdef __cplusplus -} -#endif - -#endif /* LOC_API_RPC_GLUE_H */ diff --git a/loc_api/libloc_api-rpc/src/loc_apicb_appinit.c b/loc_api/libloc_api-rpc/src/loc_apicb_appinit.c deleted file mode 100644 index 7fcfd6cb..00000000 --- a/loc_api/libloc_api-rpc/src/loc_apicb_appinit.c +++ /dev/null @@ -1,61 +0,0 @@ -/* ------------------------------------------------------------------------------- -Copyright (c) 2009, QUALCOMM USA, INC. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -· Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -· Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -· Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ------------------------------------------------------------------------------- - */ -#include "rpc/rpc.h" -#include "loc_api_common.h" -#include "loc_api.h" -#include "loc_api_cb.h" -#include "loc_api_fixup.h" - -#include "loc_apicb_appinit.h" - -#define RPC_FUNC_VERSION_BASE(a,b) a ## b -#define RPC_CB_FUNC_VERS(a,b) RPC_FUNC_VERSION_BASE(a,b) - -static SVCXPRT* svrPort = NULL; - -extern void RPC_CB_FUNC_VERS(loc_apicbprog_,LOC_APICBVERS_0001)(struct svc_req *rqstp, register SVCXPRT *transp); - -int loc_apicb_app_init(void) -{ - /* Register a callback server to use the loc_apicbprog_* function */ - if (svrPort == NULL) { - svrPort = svcrtr_create(); - } - if (!svrPort) return -1; - - xprt_register(svrPort); - if(svc_register(svrPort, LOC_APICBPROG, LOC_APICBVERS_0001, RPC_CB_FUNC_VERS(loc_apicbprog_,LOC_APICBVERS_0001),0)) - { - return 0; - } - else - { - return -1; - } -} - -void loc_apicb_app_deinit(void) -{ - if (svrPort == NULL) - { - return; - } - xprt_unregister(svrPort); - svc_destroy(svrPort); - //svc_unregister(svrPort, LOC_APICBPROG, LOC_APICBVERS_0001); - svrPort = NULL; -} From 18d81539155dcb5cd5006c81568851fd8909cdb3 Mon Sep 17 00:00:00 2001 From: Qiang Chen Date: Tue, 5 May 2015 14:09:00 -0700 Subject: [PATCH 09/37] Removed unused code and unnecessary notice files libloc_api-rpc code is not built for any targets, so it's removed. NOTICE file is unnecessary and can be remvoed. Change-Id: I7da6f0d5a7d90fd4ad7ef51d9eaee88d2a7a20ac CRs-fixed: 827856 --- loc_api/NOTICE | 13 - loc_api/libloc_api-rpc/Android.mk | 61 - loc_api/libloc_api-rpc/gen-1240/Makefile.xdr | 29 - loc_api/libloc_api-rpc/gen-1240/loc_api.xdr | 172 -- .../libloc_api-rpc/gen-1240/loc_api_cb.xdr | 85 - .../libloc_api-rpc/gen-1240/loc_api_cb_svc.c | 64 - .../libloc_api-rpc/gen-1240/loc_api_cb_xdr.c | 32 - .../libloc_api-rpc/gen-1240/loc_api_clnt.c | 91 - .../gen-1240/loc_api_common.xdr | 906 --------- .../gen-1240/loc_api_common_xdr.c | 1650 ----------------- .../libloc_api-rpc/gen-1240/loc_api_fixup.c | 48 - .../gen-1240/loc_api_rpc_glue.c | 339 ---- loc_api/libloc_api-rpc/gen-1240/loc_api_xdr.c | 171 -- loc_api/libloc_api-rpc/gen-3200/Makefile.xdr | 29 - loc_api/libloc_api-rpc/gen-3200/loc_api.xdr | 164 -- .../libloc_api-rpc/gen-3200/loc_api_cb.xdr | 90 - .../libloc_api-rpc/gen-3200/loc_api_cb_svc.c | 64 - .../libloc_api-rpc/gen-3200/loc_api_cb_xdr.c | 32 - .../libloc_api-rpc/gen-3200/loc_api_clnt.c | 82 - .../gen-3200/loc_api_common.xdr | 803 -------- .../gen-3200/loc_api_common_xdr.c | 1441 -------------- .../libloc_api-rpc/gen-3200/loc_api_fixup.c | 48 - .../gen-3200/loc_api_rpc_glue.c | 339 ---- loc_api/libloc_api-rpc/gen-3200/loc_api_xdr.c | 171 -- loc_api/libloc_api-rpc/inc-1240/loc_api.h | 210 --- loc_api/libloc_api-rpc/inc-1240/loc_api_cb.h | 64 - .../libloc_api-rpc/inc-1240/loc_api_common.h | 1154 ------------ .../libloc_api-rpc/inc-1240/loc_api_fixup.h | 188 -- .../inc-1240/loc_apicb_appinit.h | 34 - loc_api/libloc_api-rpc/inc-3200/loc_api.h | 198 -- loc_api/libloc_api-rpc/inc-3200/loc_api_cb.h | 64 - .../libloc_api-rpc/inc-3200/loc_api_common.h | 1031 ---------- .../libloc_api-rpc/inc-3200/loc_api_fixup.h | 188 -- .../inc-3200/loc_apicb_appinit.h | 34 - loc_api/libloc_api-rpc/inc/debug.h | 57 - loc_api/libloc_api-rpc/inc/loc_api_rpc_glue.h | 100 - .../libloc_api-rpc/src/loc_apicb_appinit.c | 61 - 37 files changed, 10307 deletions(-) delete mode 100644 loc_api/NOTICE delete mode 100644 loc_api/libloc_api-rpc/Android.mk delete mode 100644 loc_api/libloc_api-rpc/gen-1240/Makefile.xdr delete mode 100644 loc_api/libloc_api-rpc/gen-1240/loc_api.xdr delete mode 100644 loc_api/libloc_api-rpc/gen-1240/loc_api_cb.xdr delete mode 100644 loc_api/libloc_api-rpc/gen-1240/loc_api_cb_svc.c delete mode 100644 loc_api/libloc_api-rpc/gen-1240/loc_api_cb_xdr.c delete mode 100644 loc_api/libloc_api-rpc/gen-1240/loc_api_clnt.c delete mode 100644 loc_api/libloc_api-rpc/gen-1240/loc_api_common.xdr delete mode 100644 loc_api/libloc_api-rpc/gen-1240/loc_api_common_xdr.c delete mode 100644 loc_api/libloc_api-rpc/gen-1240/loc_api_fixup.c delete mode 100644 loc_api/libloc_api-rpc/gen-1240/loc_api_rpc_glue.c delete mode 100644 loc_api/libloc_api-rpc/gen-1240/loc_api_xdr.c delete mode 100644 loc_api/libloc_api-rpc/gen-3200/Makefile.xdr delete mode 100644 loc_api/libloc_api-rpc/gen-3200/loc_api.xdr delete mode 100644 loc_api/libloc_api-rpc/gen-3200/loc_api_cb.xdr delete mode 100644 loc_api/libloc_api-rpc/gen-3200/loc_api_cb_svc.c delete mode 100644 loc_api/libloc_api-rpc/gen-3200/loc_api_cb_xdr.c delete mode 100644 loc_api/libloc_api-rpc/gen-3200/loc_api_clnt.c delete mode 100644 loc_api/libloc_api-rpc/gen-3200/loc_api_common.xdr delete mode 100644 loc_api/libloc_api-rpc/gen-3200/loc_api_common_xdr.c delete mode 100644 loc_api/libloc_api-rpc/gen-3200/loc_api_fixup.c delete mode 100644 loc_api/libloc_api-rpc/gen-3200/loc_api_rpc_glue.c delete mode 100644 loc_api/libloc_api-rpc/gen-3200/loc_api_xdr.c delete mode 100644 loc_api/libloc_api-rpc/inc-1240/loc_api.h delete mode 100644 loc_api/libloc_api-rpc/inc-1240/loc_api_cb.h delete mode 100644 loc_api/libloc_api-rpc/inc-1240/loc_api_common.h delete mode 100644 loc_api/libloc_api-rpc/inc-1240/loc_api_fixup.h delete mode 100644 loc_api/libloc_api-rpc/inc-1240/loc_apicb_appinit.h delete mode 100644 loc_api/libloc_api-rpc/inc-3200/loc_api.h delete mode 100644 loc_api/libloc_api-rpc/inc-3200/loc_api_cb.h delete mode 100644 loc_api/libloc_api-rpc/inc-3200/loc_api_common.h delete mode 100644 loc_api/libloc_api-rpc/inc-3200/loc_api_fixup.h delete mode 100644 loc_api/libloc_api-rpc/inc-3200/loc_apicb_appinit.h delete mode 100644 loc_api/libloc_api-rpc/inc/debug.h delete mode 100644 loc_api/libloc_api-rpc/inc/loc_api_rpc_glue.h delete mode 100644 loc_api/libloc_api-rpc/src/loc_apicb_appinit.c diff --git a/loc_api/NOTICE b/loc_api/NOTICE deleted file mode 100644 index 85b5740d..00000000 --- a/loc_api/NOTICE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2009, QUALCOMM USA, INC. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -· Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -· Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -· Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/loc_api/libloc_api-rpc/Android.mk b/loc_api/libloc_api-rpc/Android.mk deleted file mode 100644 index 06e46948..00000000 --- a/loc_api/libloc_api-rpc/Android.mk +++ /dev/null @@ -1,61 +0,0 @@ -ifneq ($(BUILD_TINY_ANDROID),true) - -ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_AMSS_VERSION),50001) - -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -AMSS_VERSION:=$(BOARD_VENDOR_QCOM_GPS_LOC_API_AMSS_VERSION) -RPC_INC:=inc-$(AMSS_VERSION) - -generated_files:= \ - gen-$(AMSS_VERSION)/loc_api_clnt.c \ - gen-$(AMSS_VERSION)/loc_api_cb_xdr.c \ - gen-$(AMSS_VERSION)/loc_api_common_xdr.c \ - gen-$(AMSS_VERSION)/loc_api_cb_svc.c \ - gen-$(AMSS_VERSION)/loc_api_xdr.c \ - gen-$(AMSS_VERSION)/loc_api_fixup.c \ - gen-$(AMSS_VERSION)/loc_api_rpc_glue.c \ - src/loc_apicb_appinit.c - -LOCAL_SRC_FILES:= $(generated_files) - -# removed from library build since the client should implement this code. -# src/loc_api_cb_server.c - -LOCAL_CFLAGS:=-fno-short-enums -LOCAL_CFLAGS+=-include $(RPC_INC)/loc_api_common.h -LOCAL_CFLAGS+=-DDEBUG -# LOCAL_CFLAGS+=-DDEBUG -DVERBOSE - -LOCAL_CFLAGS+=-DADD_XDR_FLOAT -DADD_XDR_BOOL - -LOCAL_SHARED_LIBRARIES:= librpc -LOCAL_STATIC_LIBRARIES:= libcommondefs-rpc - - - -LOCAL_COPY_HEADERS_TO:= libloc_api-rpc/inc -LOCAL_COPY_HEADERS:= \ - $(RPC_INC)/loc_api_cb.h \ - $(RPC_INC)/loc_api_common.h \ - $(RPC_INC)/loc_api.h \ - $(RPC_INC)/loc_api_fixup.h \ - $(RPC_INC)/loc_apicb_appinit.h \ - inc/debug.h \ - inc/loc_api_rpc_glue.h - -LOCAL_C_INCLUDES:= \ - $(LOCAL_PATH) \ - $(LOCAL_PATH)/inc \ - $(LOCAL_PATH)/$(RPC_INC) \ - $(TARGET_OUT_HEADERS)/libcommondefs-rpc \ - $(TARGET_OUT_HEADERS)/librpc - -LOCAL_MODULE:= libloc_api-rpc -LOCAL_MODULE_OWNER := qcom - -include $(BUILD_STATIC_LIBRARY) - -endif -endif diff --git a/loc_api/libloc_api-rpc/gen-1240/Makefile.xdr b/loc_api/libloc_api-rpc/gen-1240/Makefile.xdr deleted file mode 100644 index 5d9cf6c8..00000000 --- a/loc_api/libloc_api-rpc/gen-1240/Makefile.xdr +++ /dev/null @@ -1,29 +0,0 @@ -CLIENTS:= loc_api -SERVERS:= loc_api_cb -COMMON:= loc_api_common -RPC_INC:= inc-$(AMSS_VERSION) - -all: $(CLIENTS) $(SERVERS) $(COMMON) fixup - -$(CLIENTS) $(SERVERS) $(COMMON):: xdr = $(@:=.xdr) - -$(CLIENTS) $(SERVERS) $(COMMON):: - rpcgen -h -M $(xdr) -o ../$(RPC_INC)/$(addsuffix .h, $@) - rpcgen -c -M $(xdr) -o $(addsuffix _xdr.c, $@) - -$(CLIENTS):: - rpcgen -l -M $(xdr) -o $(addsuffix _clnt.c, $@) - -$(SERVERS):: - rpcgen -m -M $(xdr) -o $(addsuffix _svc.c, $@) - -fixup: - mv ../$(RPC_INC)/loc_api_common.h ../$(RPC_INC)/loc_api_common.h.bak - sed ../$(RPC_INC)/loc_api_common.h.bak -e "/#include ../$(RPC_INC)/loc_api_common.h - rm -f ../$(RPC_INC)/loc_api_common.h.bak - -clean: - rm -f $(addsuffix _clnt.c, $(CLIENTS)) - rm -f $(addsuffix _svc.c, $(SERVERS)) - rm -f $(addsuffix _xdr.c, $(CLIENTS) $(SERVERS) $(COMMON)) - rm -f $(addprefix ../$(RPC_INC)/, $(addsuffix .h, $(CLIENTS) $(SERVERS) $(COMMON))) diff --git a/loc_api/libloc_api-rpc/gen-1240/loc_api.xdr b/loc_api/libloc_api-rpc/gen-1240/loc_api.xdr deleted file mode 100644 index a9d60aa4..00000000 --- a/loc_api/libloc_api-rpc/gen-1240/loc_api.xdr +++ /dev/null @@ -1,172 +0,0 @@ -/* LOC_API TOOL VERSION: 4.36 */ -/*============================================================================= - L O C _ A P I . X D R - -GENERAL DESCRIPTION - This is an AUTO GENERATED file that provides an xdr compatible definition of - the loc_api API. - - --------------------------------------------------------------------------- - Copyright (c) 2010 QUALCOMM Incorporated. - All Rights Reserved. QUALCOMM Proprietary and Confidential. - --------------------------------------------------------------------------- -=============================================================================*/ - -/*============================================================================= - - Edit History - - AUTO GENERATED - -Generated by following versions of Htorpc modules: -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/htorpc.pl#20 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/Start.pm#3 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/Htoxdr.pm#1 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/XDR.pm#7 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/Output.pm#29 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/Parser.pm#2 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/Metacomments.pm#6 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/SymbolTable.pm#3 - -loc_api Definition File(s): -Id: //source/qcom/qct/modem/api/gps/main/latest/loc_api.h#16 -=============================================================================*/ -/*============================================================================= -$Header$ -=============================================================================*/ - - - -typedef rpc_uint32 rpc_loc_api_api_versions_return_type<>; - -/* - * Declare an rpc_uint32 type for each callback type in the API - */ -typedef rpc_uint32 rpc_loc_event_cb_f_type; - - - -/* - * These are struct declarations for the function arguments - */ - -struct rpc_loc_open_args { - rpc_loc_event_mask_type event_reg_mask; - rpc_loc_event_cb_f_type event_callback; -}; - -struct rpc_loc_close_args { - rpc_loc_client_handle_type handle; -}; - -struct rpc_loc_start_fix_args { - rpc_loc_client_handle_type handle; -}; - -struct rpc_loc_stop_fix_args { - rpc_loc_client_handle_type handle; -}; - -struct rpc_loc_ioctl_args { - rpc_loc_client_handle_type handle; - rpc_loc_ioctl_e_type ioctl_type; - rpc_loc_ioctl_data_u_type *ioctl_data; -}; - - - -struct rpc_loc_api_api_version_s_args { - rpc_boolean len_not_null; -}; - -/* - * These are struct declarations for the function results - */ - -struct rpc_loc_api_rpc_glue_code_info_remote_rets { - rpc_uint32 toolvers; /* Tool version */ - rpc_uint32 features; /* Features turned on in the code. - * 0x00000001 ONCRPC Server Cleanup Support - */ - rpc_uint32 proghash; /* Unique hash value for the API XDR definition */ - rpc_uint32 cbproghash; /* Unique hash value for the Callbacks' XDR definition */ -}; - -struct rpc_loc_open_rets { - rpc_loc_client_handle_type loc_open_result; -}; - -struct rpc_loc_close_rets { - rpc_int32 loc_close_result; -}; - -struct rpc_loc_start_fix_rets { - rpc_int32 loc_start_fix_result; -}; - -struct rpc_loc_stop_fix_rets { - rpc_int32 loc_stop_fix_result; -}; - -struct rpc_loc_ioctl_rets { - rpc_int32 loc_ioctl_result; -}; - - struct rpc_loc_api_api_versions_rets { - rpc_loc_api_api_versions_return_type loc_api_api_versions_result; - rpc_uint32 *len; -}; - -/* - * XDR definition of the LOC_API program ( vers. 0x00040002 ) - */ - -program LOC_APIPROG { - version LOC_APIVERS_0001 { - - void - rpc_loc_api_null( void ) = 0; - - rpc_loc_api_rpc_glue_code_info_remote_rets - rpc_loc_api_rpc_glue_code_info_remote( void ) = 1; - - rpc_loc_open_rets - rpc_loc_open( rpc_loc_open_args ) = 2; - - rpc_loc_close_rets - rpc_loc_close( rpc_loc_close_args ) = 3; - - rpc_loc_start_fix_rets - rpc_loc_start_fix( rpc_loc_start_fix_args ) = 4; - - rpc_loc_stop_fix_rets - rpc_loc_stop_fix( rpc_loc_stop_fix_args ) = 5; - - rpc_loc_ioctl_rets - rpc_loc_ioctl( rpc_loc_ioctl_args ) = 6; - - rpc_loc_api_api_versions_rets - rpc_loc_api_api_versions( void ) = 0xFFFFFFFF; - - - - - } = 0x00040001; - - - - version LOC_APIVERS_0002 { - -/* Following elements added in enum rpc_loc_ni_event_e_type in 0x00040002 -RPC_LOC_NI_EVENT_VX_SERVICE_INTERACTION_REQ -*/ - - void - rpc_loc_api_null( void ) = 0; - - } = 0x00040002; - - -} = 0x3000008c; - -const LOC_APIVERS = 0x00040002; diff --git a/loc_api/libloc_api-rpc/gen-1240/loc_api_cb.xdr b/loc_api/libloc_api-rpc/gen-1240/loc_api_cb.xdr deleted file mode 100644 index 1bd4e151..00000000 --- a/loc_api/libloc_api-rpc/gen-1240/loc_api_cb.xdr +++ /dev/null @@ -1,85 +0,0 @@ -/* LOC_API TOOL VERSION: 4.36 */ -/*============================================================================= - L O C _ A P I _ C B . X D R - -GENERAL DESCRIPTION - This is an AUTO GENERATED file that provides an xdr compatible definition of - an api that represents the grouping of the different callback functions the - loc_api API supports. - - --------------------------------------------------------------------------- - Copyright (c) 2010 QUALCOMM Incorporated. - All Rights Reserved. QUALCOMM Proprietary and Confidential. - --------------------------------------------------------------------------- -=============================================================================*/ - -/*============================================================================= - - Edit History - - AUTO GENERATED - -Generated by following versions of Htorpc modules: -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/htorpc.pl#20 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/Start.pm#3 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/Htoxdr.pm#1 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/XDR.pm#7 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/Output.pm#29 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/Parser.pm#2 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/Metacomments.pm#6 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/SymbolTable.pm#3 - -loc_api Definition File(s): -Id: //source/qcom/qct/modem/api/gps/main/latest/loc_api.h#16 -=============================================================================*/ -/*============================================================================= -$Header$ -=============================================================================*/ - - - - -/* - * These are struct declarations for the function arguments - */ - -struct rpc_loc_event_cb_f_type_args { - rpc_uint32 cb_id; - rpc_loc_client_handle_type loc_handle; - rpc_loc_event_mask_type loc_event; - rpc_loc_event_payload_u_type *loc_event_payload; -}; - - - - - -/* - * These are struct declaratios for the function results - */ - -struct rpc_loc_event_cb_f_type_rets { - rpc_int32 loc_event_cb_f_type_result; -}; - - - -/* - * XDR definition of the LOC_API callback program ( vers. 0x00040002 ) - */ - -program LOC_APICBPROG { - version LOC_APICBVERS_0001 { - - rpc_loc_event_cb_f_type_rets - rpc_loc_event_cb_f_type( rpc_loc_event_cb_f_type_args ) = 1; - - - - - } = 0x00040001; - - -} = 0x3100008c; - -const LOC_APICBVERS = 0x00040002; diff --git a/loc_api/libloc_api-rpc/gen-1240/loc_api_cb_svc.c b/loc_api/libloc_api-rpc/gen-1240/loc_api_cb_svc.c deleted file mode 100644 index 52a0d15b..00000000 --- a/loc_api/libloc_api-rpc/gen-1240/loc_api_cb_svc.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#include "loc_api_cb.h" -#include -#include -#include -#include -#include -#include -#include - -#ifndef SIG_PF -#define SIG_PF void(*)(int) -#endif - -void -loc_apicbprog_0x00040001(struct svc_req *rqstp, register SVCXPRT *transp) -{ - union { - rpc_loc_event_cb_f_type_args rpc_loc_event_cb_f_type_0x00040001_arg; - } argument; - union { - rpc_loc_event_cb_f_type_rets rpc_loc_event_cb_f_type_0x00040001_res; - } result; - bool_t retval; - xdrproc_t _xdr_argument, _xdr_result; - bool_t (*local)(char *, void *, struct svc_req *); - - switch (rqstp->rq_proc) { - case NULLPROC: - (void) svc_sendreply (transp, (xdrproc_t) xdr_void, (char *)NULL); - return; - - case rpc_loc_event_cb_f_type: - _xdr_argument = (xdrproc_t) xdr_rpc_loc_event_cb_f_type_args; - _xdr_result = (xdrproc_t) xdr_rpc_loc_event_cb_f_type_rets; - local = (bool_t (*) (char *, void *, struct svc_req *))rpc_loc_event_cb_f_type_0x00040001_svc; - break; - - default: - svcerr_noproc (transp); - return; - } - memset ((char *)&argument, 0, sizeof (argument)); - if (!svc_getargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) { - svcerr_decode (transp); - return; - } - retval = (bool_t) (*local)((char *)&argument, (void *)&result, rqstp); - if (retval > 0 && !svc_sendreply(transp, (xdrproc_t) _xdr_result, (char *)&result)) { - svcerr_systemerr (transp); - } - if (!svc_freeargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) { - fprintf (stderr, "%s", "unable to free arguments"); - exit (1); - } - if (!loc_apicbprog_0x00040001_freeresult (transp, _xdr_result, (caddr_t) &result)) - fprintf (stderr, "%s", "unable to free results"); - - return; -} diff --git a/loc_api/libloc_api-rpc/gen-1240/loc_api_cb_xdr.c b/loc_api/libloc_api-rpc/gen-1240/loc_api_cb_xdr.c deleted file mode 100644 index 1d7795ed..00000000 --- a/loc_api/libloc_api-rpc/gen-1240/loc_api_cb_xdr.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#include "loc_api_cb.h" - -bool_t -xdr_rpc_loc_event_cb_f_type_args (XDR *xdrs, rpc_loc_event_cb_f_type_args *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, &objp->cb_id)) - return FALSE; - if (!xdr_rpc_loc_client_handle_type (xdrs, &objp->loc_handle)) - return FALSE; - if (!xdr_rpc_loc_event_mask_type (xdrs, &objp->loc_event)) - return FALSE; - if (!xdr_pointer (xdrs, (char **)&objp->loc_event_payload, sizeof (rpc_loc_event_payload_u_type), (xdrproc_t) xdr_rpc_loc_event_payload_u_type)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_event_cb_f_type_rets (XDR *xdrs, rpc_loc_event_cb_f_type_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_int32 (xdrs, &objp->loc_event_cb_f_type_result)) - return FALSE; - return TRUE; -} diff --git a/loc_api/libloc_api-rpc/gen-1240/loc_api_clnt.c b/loc_api/libloc_api-rpc/gen-1240/loc_api_clnt.c deleted file mode 100644 index dca1e8d5..00000000 --- a/loc_api/libloc_api-rpc/gen-1240/loc_api_clnt.c +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#include /* for memset */ -#include "loc_api.h" - -/* Default timeout can be changed using clnt_control() */ -static struct timeval TIMEOUT = { 25, 0 }; - -enum clnt_stat -rpc_loc_api_null_0x00040001(void *argp, void *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_api_null, - (xdrproc_t) xdr_void, (caddr_t) argp, - (xdrproc_t) xdr_void, (caddr_t) clnt_res, - TIMEOUT)); -} - -enum clnt_stat -rpc_loc_api_rpc_glue_code_info_remote_0x00040001(void *argp, rpc_loc_api_rpc_glue_code_info_remote_rets *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_api_rpc_glue_code_info_remote, - (xdrproc_t) xdr_void, (caddr_t) argp, - (xdrproc_t) xdr_rpc_loc_api_rpc_glue_code_info_remote_rets, (caddr_t) clnt_res, - TIMEOUT)); -} - -enum clnt_stat -rpc_loc_open_0x00040001(rpc_loc_open_args *argp, rpc_loc_open_rets *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_open, - (xdrproc_t) xdr_rpc_loc_open_args, (caddr_t) argp, - (xdrproc_t) xdr_rpc_loc_open_rets, (caddr_t) clnt_res, - TIMEOUT)); -} - -enum clnt_stat -rpc_loc_close_0x00040001(rpc_loc_close_args *argp, rpc_loc_close_rets *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_close, - (xdrproc_t) xdr_rpc_loc_close_args, (caddr_t) argp, - (xdrproc_t) xdr_rpc_loc_close_rets, (caddr_t) clnt_res, - TIMEOUT)); -} - -enum clnt_stat -rpc_loc_start_fix_0x00040001(rpc_loc_start_fix_args *argp, rpc_loc_start_fix_rets *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_start_fix, - (xdrproc_t) xdr_rpc_loc_start_fix_args, (caddr_t) argp, - (xdrproc_t) xdr_rpc_loc_start_fix_rets, (caddr_t) clnt_res, - TIMEOUT)); -} - -enum clnt_stat -rpc_loc_stop_fix_0x00040001(rpc_loc_stop_fix_args *argp, rpc_loc_stop_fix_rets *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_stop_fix, - (xdrproc_t) xdr_rpc_loc_stop_fix_args, (caddr_t) argp, - (xdrproc_t) xdr_rpc_loc_stop_fix_rets, (caddr_t) clnt_res, - TIMEOUT)); -} - -enum clnt_stat -rpc_loc_ioctl_0x00040001(rpc_loc_ioctl_args *argp, rpc_loc_ioctl_rets *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_ioctl, - (xdrproc_t) xdr_rpc_loc_ioctl_args, (caddr_t) argp, - (xdrproc_t) xdr_rpc_loc_ioctl_rets, (caddr_t) clnt_res, - TIMEOUT)); -} - -enum clnt_stat -rpc_loc_api_api_versions_0x00040001(void *argp, rpc_loc_api_api_versions_rets *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_api_api_versions, - (xdrproc_t) xdr_void, (caddr_t) argp, - (xdrproc_t) xdr_rpc_loc_api_api_versions_rets, (caddr_t) clnt_res, - TIMEOUT)); -} - -enum clnt_stat -rpc_loc_api_null_0x00040002(void *argp, void *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_api_null, - (xdrproc_t) xdr_void, (caddr_t) argp, - (xdrproc_t) xdr_void, (caddr_t) clnt_res, - TIMEOUT)); -} diff --git a/loc_api/libloc_api-rpc/gen-1240/loc_api_common.xdr b/loc_api/libloc_api-rpc/gen-1240/loc_api_common.xdr deleted file mode 100644 index 4e01607d..00000000 --- a/loc_api/libloc_api-rpc/gen-1240/loc_api_common.xdr +++ /dev/null @@ -1,906 +0,0 @@ -/* LOC_API TOOL VERSION: 4.36 */ -/*============================================================================= - L O C _ A P I _ C O M M O N . X D R - -GENERAL DESCRIPTION - This is an AUTO GENERATED file that provides an xdr compatible definition of - an api that represents the grouping of the different callback functions the - loc_api API supports. - - --------------------------------------------------------------------------- - Copyright (c) 2010 QUALCOMM Incorporated. - All Rights Reserved. QUALCOMM Proprietary and Confidential. - --------------------------------------------------------------------------- -=============================================================================*/ - -/*============================================================================= - - Edit History - - AUTO GENERATED - -Generated by following versions of Htorpc modules: -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/htorpc.pl#20 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/Start.pm#3 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/Htoxdr.pm#1 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/XDR.pm#7 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/Output.pm#29 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/Parser.pm#2 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/Metacomments.pm#6 -Id: //source/qcom/qct/core/mproc/tools/rel/04.01/htorpc/lib/Htorpc/SymbolTable.pm#3 - -loc_api Definition File(s): -Id: //source/qcom/qct/modem/api/gps/main/latest/loc_api.h#16 -=============================================================================*/ -/*============================================================================= -$Header$ -=============================================================================*/ - - - -const LOC_API_TOOLVERS = 0x00040024; -const LOC_API_FEATURES = 0x00000001; - -const RPC_LOC_EVENT_NI_NOTIFY_VERIFY_REQUEST = 0x00000010; - -const RPC_LOC_EVENT_WPS_NEEDED_REQUEST = 0x00000200; - -const RPC_LOC_EVENT_IOCTL_REPORT = 0x00000080; - -const RPC_LOC_EVENT_LOCATION_SERVER_REQUEST = 0x00000040; - -const RPC_LOC_EVENT_RESERVED = 0x8000000000000000; - -const RPC_LOC_EVENT_PARSED_POSITION_REPORT = 0x00000001; - -const RPC_LOC_EVENT_ASSISTANCE_DATA_REQUEST = 0x00000020; - -const RPC_LOC_EVENT_NMEA_POSITION_REPORT = 0x00000008; - -const RPC_LOC_EVENT_SATELLITE_REPORT = 0x00000002; - -const RPC_LOC_EVENT_STATUS_REPORT = 0x00000100; - -const RPC_LOC_EVENT_CB_F_TYPE_VERSION = 0x00040001; -const RPC_LOC_OPEN_VERSION = 0x00040001; -const RPC_LOC_API_RPC_GLUE_CODE_INFO_REMOTE_VERSION = 0x00040001; -const RPC_LOC_API_NULL_VERSION = 0x00040001; -const RPC_LOC_STOP_FIX_VERSION = 0x00040001; -const RPC_LOC_IOCTL_VERSION = 0x00040001; -const RPC_LOC_START_FIX_VERSION = 0x00040001; -const RPC_LOC_CLOSE_VERSION = 0x00040001; -const RPC_LOC_API_API_VERSIONS_VERSION = 0x00040001; -const RPC_LOC_API_API_MAJOR_NUM = 0x0004; -const RPC_LOC_APIAPI_VERSION_IS_HASHKEY = 0; - -typedef bool rpc_boolean; - -typedef unsigned long rpc_uint32; - -typedef unsigned short rpc_uint16; - -typedef unsigned char rpc_uint8; - -typedef long rpc_int32; - -typedef unsigned char rpc_byte; - -typedef unsigned hyper rpc_uint64; - -typedef rpc_int32 rpc_loc_client_handle_type; - -typedef rpc_uint64 rpc_loc_event_mask_type; - -typedef rpc_uint64 rpc_loc_position_valid_mask_type; - -typedef rpc_uint32 rpc_loc_pos_technology_mask_type; - -enum rpc_loc_session_status_e_type { - RPC_LOC_SESS_STATUS_SUCCESS = 0, - RPC_LOC_SESS_STATUS_IN_PROGESS = 1, - RPC_LOC_SESS_STATUS_GENERAL_FAILURE = 2, - RPC_LOC_SESS_STATUS_TIMEOUT = 3, - RPC_LOC_SESS_STATUS_USER_END = 4, - RPC_LOC_SESS_STATUS_BAD_PARAMETER = 5, - RPC_LOC_SESS_STATUS_PHONE_OFFLINE = 6, - RPC_LOC_SESS_STATUS_ENGINE_LOCKED = 7, - RPC_LOC_SESS_STATUS_MAX = 268435456 -}; - -struct rpc_loc_calendar_time_s_type { - rpc_uint16 year; - unsigned char month; - unsigned char day_of_week; - unsigned char day; - unsigned char hour; - unsigned char minute; - unsigned char second; - rpc_uint16 millisecond; -}; - -struct rpc_loc_parsed_position_s_type { - rpc_loc_position_valid_mask_type valid_mask; - rpc_loc_session_status_e_type session_status; - rpc_loc_calendar_time_s_type timestamp_calendar; - rpc_uint64 timestamp_utc; - rpc_uint8 leap_seconds; - float time_unc; - double latitude; - double longitude; - float altitude_wrt_ellipsoid; - float altitude_wrt_mean_sea_level; - float speed_horizontal; - float speed_vertical; - float heading; - float hor_unc_circular; - float hor_unc_ellipse_semi_major; - float hor_unc_ellipse_semi_minor; - float hor_unc_ellipse_orient_azimuth; - float vert_unc; - float speed_unc; - float heading_unc; - unsigned char confidence_horizontal; - unsigned char confidence_vertical; - float magnetic_deviation; - rpc_loc_pos_technology_mask_type technology_mask; -}; - -enum rpc_loc_sv_system_e_type { - RPC_LOC_SV_SYSTEM_GPS = 1, - RPC_LOC_SV_SYSTEM_GALILEO = 2, - RPC_LOC_SV_SYSTEM_SBAS = 3, - RPC_LOC_SV_SYSTEM_COMPASS = 4, - RPC_LOC_SV_SYSTEM_GLONASS = 5, - RPC_LOC_SV_SYSTEM_MAX = 268435456 -}; - -enum rpc_loc_sv_status_e_type { - RPC_LOC_SV_STATUS_IDLE = 1, - RPC_LOC_SV_STATUS_SEARCH = 2, - RPC_LOC_SV_STATUS_TRACK = 3, - RPC_LOC_SV_STATUS_MAX = 268435456 -}; - -typedef rpc_uint32 rpc_loc_sv_info_valid_mask_type; - -struct rpc_loc_sv_info_s_type { - rpc_loc_sv_info_valid_mask_type valid_mask; - rpc_loc_sv_system_e_type system; - rpc_uint8 prn; - rpc_uint8 health_status; - rpc_loc_sv_status_e_type process_status; - rpc_boolean has_eph; - rpc_boolean has_alm; - float elevation; - float azimuth; - float snr; -}; - -typedef rpc_uint32 rpc_loc_gnss_info_valid_mask_type; - -struct rpc_loc_gnss_info_s_type { - rpc_loc_gnss_info_valid_mask_type valid_mask; - float position_dop; - float horizontal_dop; - float vertical_dop; - rpc_boolean altitude_assumed; - rpc_uint16 sv_count; - rpc_loc_sv_info_s_type sv_list<80>; /* EVAL:[LOC_API_MAX_SV_COUNT]*/ -}; - -struct rpc_loc_nmea_report_s_type { - rpc_uint16 length; - opaque nmea_sentences[1200]; /* EVAL:[1200]*/ -}; - -enum rpc_loc_status_event_e_type { - RPC_LOC_STATUS_EVENT_ENGINE_STATE = 1, - RPC_LOC_STATUS_EVENT_FIX_SESSION_STATE = 2, - RPC_LOC_STATUS_EVENT_MAX = 268435456 -}; - -enum rpc_loc_engine_state_e_type { - RPC_LOC_ENGINE_STATE_ON = 1, - RPC_LOC_ENGINE_STATE_OFF = 2, - RPC_LOC_ENGINE_STATE_MAX = 268435456 -}; - -enum rpc_loc_fix_session_state_e_type { - RPC_LOC_FIX_SESSION_STATE_BEGIN = 1, - RPC_LOC_FIX_SESSION_STATE_END = 2, - RPC_LOC_FIX_SESSION_STATE_MAX = 268435456 -}; - -union rpc_loc_status_event_payload_u_type switch (rpc_loc_status_event_e_type disc) { - case RPC_LOC_STATUS_EVENT_ENGINE_STATE: - rpc_loc_engine_state_e_type engine_state; - case RPC_LOC_STATUS_EVENT_FIX_SESSION_STATE: - rpc_loc_fix_session_state_e_type fix_session_state; - default: - void; -}; - -struct rpc_loc_status_event_s_type { - rpc_loc_status_event_e_type event; - rpc_loc_status_event_payload_u_type payload; -}; - -enum rpc_loc_server_addr_e_type { - RPC_LOC_SERVER_ADDR_IPV4 = 1, - RPC_LOC_SERVER_ADDR_URL = 2, - RPC_LOC_SERVER_ADDR_MAX = 268435456 -}; - -struct rpc_loc_server_addr_ipv4_type { - rpc_uint32 addr; - rpc_uint16 port; -}; - -struct rpc_loc_server_addr_url_type { - rpc_uint16 length; - opaque addr[256]; /* EVAL:[256]*/ -}; - -union rpc_loc_server_addr_u_type switch (rpc_loc_server_addr_e_type disc) { - case RPC_LOC_SERVER_ADDR_IPV4: - rpc_loc_server_addr_ipv4_type ipv4; - case RPC_LOC_SERVER_ADDR_URL: - rpc_loc_server_addr_url_type url; - default: - void; -}; - -struct rpc_loc_server_info_s_type { - rpc_loc_server_addr_e_type addr_type; - rpc_loc_server_addr_u_type addr_info; -}; - -enum rpc_loc_ni_notify_verify_e_type { - RPC_LOC_NI_USER_NO_NOTIFY_NO_VERIFY = 1, - RPC_LOC_NI_USER_NOTIFY_ONLY = 2, - RPC_LOC_NI_USER_NOTIFY_VERIFY_ALLOW_NO_RESP = 3, - RPC_LOC_NI_USER_NOTIFY_VERIFY_NOT_ALLOW_NO_RESP = 4, - RPC_LOC_NI_USER_PRIVACY_OVERRIDE = 5, - RPC_LOC_NI_USER_NOTIFY_VERITY_TYPE_MAX = 268435456 -}; - -enum rpc_loc_ni_event_e_type { - RPC_LOC_NI_EVENT_VX_NOTIFY_VERIFY_REQ = 1, - RPC_LOC_NI_EVENT_SUPL_NOTIFY_VERIFY_REQ = 2, - RPC_LOC_NI_EVENT_UMTS_CP_NOTIFY_VERIFY_REQ = 3, - RPC_LOC_NI_EVENT_VX_SERVICE_INTERACTION_REQ = 4, - RPC_LOC_NI_EVENT_MAX = 268435456 -}; - -enum rpc_loc_ni_datacoding_scheme_e_type { - RPC_LOC_NI_PRESUPL_ISO646IRV = 0, - RPC_LOC_NI_PRESUPL_ISO8859 = 1, - RPC_LOC_NI_PRESUPL_UTF8 = 2, - RPC_LOC_NI_PRESUPL_UTF16 = 3, - RPC_LOC_NI_PRESUPL_UCS2 = 4, - RPC_LOC_NI_PRESUPL_GSM_DEFAULT = 5, - RPC_LOC_NI_PRESUPL_SHIFT_JIS = 6, - RPC_LOC_NI_PRESUPL_JIS = 7, - RPC_LOC_NI_PRESUPL_EUC = 8, - RPC_LOC_NI_PRESUPL_GB2312 = 9, - RPC_LOC_NI_PRESUPL_CNS11643 = 10, - RPC_LOC_NI_PRESUPL_KSC1001 = 11, - RPC_LOC_NI_PRESUPL_ENCODING_UNKNOWN = 2147483647, - RPC_LOC_NI_SS_GERMAN = 12, - RPC_LOC_NI_SS_ENGLISH = 13, - RPC_LOC_NI_SS_ITALIAN = 14, - RPC_LOC_NI_SS_FRENCH = 15, - RPC_LOC_NI_SS_SPANISH = 16, - RPC_LOC_NI_SS_DUTCH = 17, - RPC_LOC_NI_SS_SWEDISH = 18, - RPC_LOC_NI_SS_DANISH = 19, - RPC_LOC_NI_SS_PORTUGUESE = 20, - RPC_LOC_NI_SS_FINNISH = 21, - RPC_LOC_NI_SS_NORWEGIAN = 22, - RPC_LOC_NI_SS_GREEK = 23, - RPC_LOC_NI_SS_TURKISH = 24, - RPC_LOC_NI_SS_HUNGARIAN = 25, - RPC_LOC_NI_SS_POLISH = 26, - RPC_LOC_NI_SS_LANGUAGE_UNSPEC = 27, - RPC_LOC_NI_SUPL_UTF8 = 28, - RPC_LOC_NI_SUPL_UCS2 = 29, - RPC_LOC_NI_SUPL_GSM_DEFAULT = 30, - RPC_LOC_NI_SUPL_ENCODING_UNKNOWN = 2147483647 -}; - -enum rpc_loc_ni_vx_requester_id_encoding_scheme_e_type { - RPC_LOC_NI_VX_OCTET = 0, - RPC_LOC_NI_VX_EXN_PROTOCOL_MSG = 1, - RPC_LOC_NI_VX_ASCII = 2, - RPC_LOC_NI_VX_IA5 = 3, - RPC_LOC_NI_VX_UNICODE = 4, - RPC_LOC_NI_VX_SHIFT_JIS = 5, - RPC_LOC_NI_VX_KOREAN = 6, - RPC_LOC_NI_VX_LATIN_HEBREW = 7, - RPC_LOC_NI_VX_LATIN = 8, - RPC_LOC_NI_VX_GSM = 9, - RPC_LOC_NI_VX_ENCODING_TYPE_MAX = 268435456 -}; - -enum rpc_loc_ni_vx_pos_mode_e_type { - RPC_LOC_VX_MS_ASSISTED_ONLY = 1, - RPC_LOC_VX_MS_BASED_ONLY = 2, - RPC_LOC_VX_MS_ASSISTED_PREF_MSBASED_ALLWD = 3, - RPC_LOC_VX_MS_BASED_PREF_ASSISTED_ALLWD = 4, - RPC_LOC_VX_POS_MODE_MAX = 268435456 -}; - -struct rpc_loc_ni_vx_requester_id_s_type { - unsigned char requester_id_length; - opaque requester_id[200]; /* EVAL:[200]*/ -}; - -struct rpc_loc_ni_vx_notify_verify_req_s_type { - rpc_loc_ni_notify_verify_e_type notification_priv_type; - unsigned char pos_qos_incl; - unsigned char pos_qos; - rpc_uint32 num_fixes; - rpc_uint32 tbf; - rpc_loc_ni_vx_pos_mode_e_type pos_mode; - rpc_loc_ni_vx_requester_id_encoding_scheme_e_type encoding_scheme; - rpc_loc_ni_vx_requester_id_s_type requester_id; - rpc_uint16 user_resp_timer_val; -}; - -enum rpc_loc_ni_supl_pos_method_e_type { - RPC_LOC_NI_POSMETHOD_AGPS_SETASSISTED = 1, - RPC_LOC_NI_POSMETHOD_AGPS_SETBASED = 2, - RPC_LOC_NI_POSMETHOD_AGPS_SETASSISTED_PREF = 3, - RPC_LOC_NI_POSMETHOD_AGPS_SETBASED_PREF = 4, - RPC_LOC_NI_POSMETHOD_AUTONOMOUS_GPS = 5, - RPC_LOC_NI_POSMETHOD_AFLT = 6, - RPC_LOC_NI_POSMETHOD_ECID = 7, - RPC_LOC_NI_POSMETHOD_EOTD = 8, - RPC_LOC_NI_POSMETHOD_OTDOA = 9, - RPC_LOC_NI_POSMETHOD_NO_POSITION = 10, - RPC_LOC_NI_POSMETHOD_MAX = 268435456 -}; - -struct rpc_loc_ni_supl_slp_session_id_s_type { - unsigned char presence; - opaque session_id[4]; /* EVAL:[4]*/ - rpc_loc_server_info_s_type slp_address; -}; - -struct rpc_loc_ni_requestor_id_s_type { - unsigned char data_coding_scheme; - opaque requestor_id_string[200]; /* EVAL:[200]*/ - unsigned char string_len; -}; - -struct rpc_loc_ni_supl_client_name_s_type { - unsigned char data_coding_scheme; - opaque client_name_string[64]; /* EVAL:[64]*/ - unsigned char string_len; -}; - -struct rpc_loc_ni_supl_qop_s_type { - unsigned char bit_mask; - unsigned char horacc; - unsigned char veracc; - rpc_uint16 maxLocAge; - unsigned char delay; -}; - -struct rpc_loc_ni_supl_notify_verify_req_s_type { - rpc_loc_ni_notify_verify_e_type notification_priv_type; - rpc_uint16 flags; - rpc_loc_ni_supl_slp_session_id_s_type supl_slp_session_id; - opaque supl_hash[8]; /* EVAL:[8]*/ - rpc_loc_ni_datacoding_scheme_e_type datacoding_scheme; - rpc_loc_ni_supl_pos_method_e_type pos_method; - rpc_loc_ni_requestor_id_s_type requestor_id; - rpc_loc_ni_supl_client_name_s_type client_name; - rpc_loc_ni_supl_qop_s_type supl_qop; - rpc_uint16 user_response_timer; -}; - -struct rpc_loc_ni_ext_client_address_s_type { - unsigned char ext_client_address_len; - opaque ext_client_address[20]; /* EVAL:[20]*/ -}; - -enum rpc_loc_ni_location_type_e_type { - RPC_LOC_NI_LOCATIONTYPE_CURRENT_LOCATION = 1, - RPC_LOC_NI_LOCATIONTYPE_CURRENT_OR_LAST_KNOWN_LOCATION = 2, - RPC_LOC_NI_LOCATIONTYPE_INITIAL_LOCATION = 3, - RPC_LOC_NI_LOCATIONTYPE_MAX = 268435456 -}; - -struct rpc_loc_ni_deferred_location_s_type { - unsigned char unused_bits; - unsigned char ms_available; -}; - -struct rpc_loc_ni_codeword_string_s_type { - unsigned char data_coding_scheme; - opaque lcs_codeword_string[20]; /* EVAL:[20]*/ - unsigned char string_len; -}; - -struct rpc_loc_ni_service_type_id_s_type { - unsigned char lcs_service_type_id; -}; - -struct rpc_loc_ni_umts_cp_notify_verify_req_s_type { - rpc_loc_ni_notify_verify_e_type notification_priv_type; - unsigned char invoke_id; - rpc_uint16 flags; - unsigned char notification_length; - opaque notification_text[64]; /* EVAL:[64]*/ - rpc_loc_ni_datacoding_scheme_e_type datacoding_scheme; - rpc_loc_ni_ext_client_address_s_type ext_client_address_data; - rpc_loc_ni_location_type_e_type location_type; - rpc_loc_ni_deferred_location_s_type deferred_location; - rpc_loc_ni_requestor_id_s_type requestor_id; - rpc_loc_ni_codeword_string_s_type codeword_string; - rpc_loc_ni_service_type_id_s_type service_type_id; - rpc_uint16 user_response_timer; -}; - -enum rpc_loc_ni_service_interaction_e_type { - RPC_LOC_NI_SERVICE_INTERACTION_ONGOING_NI_INCOMING_MO = 1, - RPC_LOC_NI_SERVICE_INTERACTION_MAX = 268435456 -}; - -struct rpc_loc_ni_vx_service_interaction_req_s_type { - rpc_loc_ni_vx_notify_verify_req_s_type ni_vx_req; - rpc_loc_ni_service_interaction_e_type service_interation_type; -}; - -union rpc_loc_ni_event_payload_u_type switch (rpc_loc_ni_event_e_type disc) { - case RPC_LOC_NI_EVENT_VX_NOTIFY_VERIFY_REQ: - rpc_loc_ni_vx_notify_verify_req_s_type vx_req; - case RPC_LOC_NI_EVENT_SUPL_NOTIFY_VERIFY_REQ: - rpc_loc_ni_supl_notify_verify_req_s_type supl_req; - case RPC_LOC_NI_EVENT_UMTS_CP_NOTIFY_VERIFY_REQ: - rpc_loc_ni_umts_cp_notify_verify_req_s_type umts_cp_req; - case RPC_LOC_NI_EVENT_VX_SERVICE_INTERACTION_REQ: - rpc_loc_ni_vx_service_interaction_req_s_type service_interaction_req; - default: - void; -}; - -struct rpc_loc_ni_event_s_type { - rpc_loc_ni_event_e_type event; - rpc_loc_ni_event_payload_u_type payload; -}; - -enum rpc_loc_assist_data_request_e_type { - RPC_LOC_ASSIST_DATA_TIME_REQ = 1, - RPC_LOC_ASSIST_DATA_PREDICTED_ORBITS_REQ = 2, - RPC_LOC_ASSIST_DATA_MAX = 268435456 -}; - - typedef string rpc_struct_loc_time_download_source_s_type_servers_ptr<256>; /* EVAL:[LOC_API_MAX_SERVER_ADDR_LENGTH]*/ - - typedef rpc_struct_loc_time_download_source_s_type_servers_ptr rpc_struct_loc_time_download_source_s_type_servers[3]; /* EVAL:[3]*/ - -struct rpc_loc_time_download_source_s_type { - rpc_uint32 delay_threshold; - rpc_struct_loc_time_download_source_s_type_servers servers; -}; - - typedef string rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr<256>; /* EVAL:[LOC_API_MAX_SERVER_ADDR_LENGTH]*/ - - typedef rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr rpc_struct_loc_predicted_orbits_data_source_s_type_servers[3]; /* EVAL:[3]*/ - -struct rpc_loc_predicted_orbits_data_source_s_type { - rpc_uint32 max_file_size; - rpc_uint32 max_part_size; - rpc_struct_loc_predicted_orbits_data_source_s_type_servers servers; -}; - -union rpc_loc_assist_data_request_payload_u_type switch (rpc_loc_assist_data_request_e_type disc) { - case RPC_LOC_ASSIST_DATA_TIME_REQ: - rpc_loc_time_download_source_s_type time_download; - case RPC_LOC_ASSIST_DATA_PREDICTED_ORBITS_REQ: - rpc_loc_predicted_orbits_data_source_s_type data_download; - default: - void; -}; - -struct rpc_loc_assist_data_request_s_type { - rpc_loc_assist_data_request_e_type event; - rpc_loc_assist_data_request_payload_u_type payload; -}; - -typedef rpc_uint32 rpc_loc_server_connection_handle; - -enum rpc_loc_server_protocol_e_type { - RPC_LOC_SERVER_PROTOCOL_DEFAULT = 0, - RPC_LOC_SERVER_PROTOCOL_SUPL = 1, - RPC_LOC_SERVER_PROTOCOL_VX_MPC = 2, - RPC_LOC_SERVER_PROTOCOL_VX_PDE = 3, - RPC_LOC_SERVER_PROTOCOL_MAX = 16777216 -}; - -enum rpc_loc_server_request_e_type { - RPC_LOC_SERVER_REQUEST_OPEN = 1, - RPC_LOC_SERVER_REQUEST_CLOSE = 2, - RPC_LOC_SERVER_REQUEST_MAX = 268435456 -}; - -struct rpc_loc_server_open_req_s_type { - rpc_loc_server_connection_handle conn_handle; - rpc_loc_server_protocol_e_type protocol; -}; - -struct rpc_loc_server_close_req_s_type { - rpc_loc_server_connection_handle conn_handle; -}; - -union rpc_loc_server_request_u_type switch (rpc_loc_server_request_e_type disc) { - case RPC_LOC_SERVER_REQUEST_OPEN: - rpc_loc_server_open_req_s_type open_req; - case RPC_LOC_SERVER_REQUEST_CLOSE: - rpc_loc_server_close_req_s_type close_req; - default: - void; -}; - -struct rpc_loc_server_request_s_type { - rpc_loc_server_request_e_type event; - rpc_loc_server_request_u_type payload; -}; - -enum rpc_loc_qwip_request_e_type { - RPC_LOC_QWIP_START_PERIODIC_HI_FREQ_FIXES = 0, - RPC_LOC_QWIP_START_PERIODIC_KEEP_WARM, - RPC_LOC_QWIP_STOP_PERIODIC_FIXES, - RPC_LOC_QWIP_SUSPEND, - RPC_LOC_QWIP_REQUEST_MAX = 268435456 -}; - -struct rpc_loc_qwip_request_s_type { - rpc_loc_qwip_request_e_type request_type; - rpc_uint16 tbf_ms; -}; - -struct rpc_loc_reserved_payload_s_type { - rpc_uint16 data_size; - opaque data<>; -}; - -enum rpc_loc_ioctl_e_type { - RPC_LOC_IOCTL_GET_API_VERSION = 1, - RPC_LOC_IOCTL_SET_FIX_CRITERIA = 2, - RPC_LOC_IOCTL_GET_FIX_CRITERIA = 3, - RPC_LOC_IOCTL_SERVICE_START_INDEX = 400, - RPC_LOC_IOCTL_INFORM_NI_USER_RESPONSE = 400, - RPC_LOC_IOCTL_INJECT_PREDICTED_ORBITS_DATA = 401, - RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_VALIDITY = 402, - RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_SOURCE = 403, - RPC_LOC_IOCTL_SET_PREDICTED_ORBITS_DATA_AUTO_DOWNLOAD = 404, - RPC_LOC_IOCTL_INJECT_UTC_TIME = 405, - RPC_LOC_IOCTL_INJECT_RTC_VALUE = 406, - RPC_LOC_IOCTL_INJECT_POSITION = 407, - RPC_LOC_IOCTL_QUERY_ENGINE_STATE = 408, - RPC_LOC_IOCTL_INFORM_SERVER_OPEN_STATUS = 409, - RPC_LOC_IOCTL_INFORM_SERVER_CLOSE_STATUS = 410, - RPC_LOC_IOCTL_SEND_WIPER_POSITION_REPORT = 411, - RPC_LOC_IOCTL_NOTIFY_WIPER_STATUS = 412, - RPC_LOC_IOCTL_ACCESS_EFS_DATA = 413, - RPC_LOC_IOCTL_NV_SETTINGS_START_INDEX = 800, - RPC_LOC_IOCTL_SET_ENGINE_LOCK = 800, - RPC_LOC_IOCTL_GET_ENGINE_LOCK = 801, - RPC_LOC_IOCTL_SET_SBAS_CONFIG = 802, - RPC_LOC_IOCTL_GET_SBAS_CONFIG = 803, - RPC_LOC_IOCTL_SET_NMEA_TYPES = 804, - RPC_LOC_IOCTL_GET_NMEA_TYPES = 805, - RPC_LOC_IOCTL_SET_CDMA_PDE_SERVER_ADDR = 806, - RPC_LOC_IOCTL_GET_CDMA_PDE_SERVER_ADDR = 807, - RPC_LOC_IOCTL_SET_CDMA_MPC_SERVER_ADDR = 808, - RPC_LOC_IOCTL_GET_CDMA_MPC_SERVER_ADDR = 809, - RPC_LOC_IOCTL_SET_UMTS_SLP_SERVER_ADDR = 810, - RPC_LOC_IOCTL_GET_UMTS_SLP_SERVER_ADDR = 811, - RPC_LOC_IOCTL_SET_ON_DEMAND_LPM = 812, - RPC_LOC_IOCTL_GET_ON_DEMAND_LPM = 813, - RPC_LOC_IOCTL_PROPRIETARY_START_INDEX = 1000, - RPC_LOC_IOCTL_DELETE_ASSIST_DATA = 1000, - RPC_LOC_IOCTL_SET_CUSTOM_PDE_SERVER_ADDR = 1001, - RPC_LOC_IOCTL_GET_CUSTOM_PDE_SERVER_ADDR = 1002, - RPC_LOC_IOCTL_THIRD_PARTY_START_INDEX = 1073741824 -}; - -struct rpc_loc_api_version_s_type { - unsigned char major; - unsigned char minor; -}; - -enum rpc_loc_fix_recurrence_e_type { - RPC_LOC_PERIODIC_FIX = 1, - RPC_LOC_SINGLE_FIX = 2, - RPC_LOC_FIX_SESSION_TYPE_MAX = 268435456 -}; - -enum rpc_loc_operation_mode_e_type { - RPC_LOC_OPER_MODE_DEFAULT = 1, - RPC_LOC_OPER_MODE_MSB = 2, - RPC_LOC_OPER_MODE_MSA = 3, - RPC_LOC_OPER_MODE_STANDALONE = 4, - RPC_LOC_OPER_MODE_SPEED_OPTIMAL = 5, - RPC_LOC_OPER_MODE_ACCURACY_OPTIMAL = 6, - RPC_LOC_OPER_MODE_DATA_OPTIMAL = 7, - RPC_LOC_OPER_MODE_CELL_ID = 8, - RPC_LOC_OPER_MODE_MAX = 268435456 -}; - -enum rpc_loc_notify_e_type { - RPC_LOC_NOTIFY_ON_INTERVAL = 1, - RPC_LOC_NOTIFY_ON_DISTANCE = 2, - RPC_LOC_NOTIFY_ON_ANY = 3, - RPC_LOC_NOTIFY_ON_ALL = 4, - RPC_LOC_NOTIFY_TYPE_MAX = 268435456 -}; - -struct rpc_loc_fix_criteria_s_type { - rpc_uint32 valid_mask; - rpc_loc_fix_recurrence_e_type recurrence_type; - rpc_loc_operation_mode_e_type preferred_operation_mode; - rpc_uint32 preferred_accuracy; - rpc_uint32 preferred_response_time; - rpc_boolean intermediate_pos_report_enabled; - rpc_loc_notify_e_type notify_type; - rpc_uint32 min_interval; - float min_distance; - rpc_uint32 min_dist_sample_interval; -}; - -enum rpc_loc_ni_user_resp_e_type { - RPC_LOC_NI_LCS_NOTIFY_VERIFY_ACCEPT = 1, - RPC_LOC_NI_LCS_NOTIFY_VERIFY_DENY = 2, - RPC_LOC_NI_LCS_NOTIFY_VERIFY_NORESP = 3, - RPC_LOC_NI_LCS_NOTIFY_VERIFY_MAX = 268435456 -}; - -struct rpc_loc_user_verify_s_type { - rpc_loc_ni_user_resp_e_type user_resp; - rpc_loc_ni_event_s_type ni_event_pass_back; -}; - -enum rpc_loc_predicted_orbits_data_format_e_type { - RPC_LOC_PREDICTED_ORBITS_XTRA = 0, - RPC_LOC_PREDICTED_ORBITS_FORMAT_MAX = 268435456 -}; - -struct rpc_loc_predicted_orbits_data_s_type { - rpc_loc_predicted_orbits_data_format_e_type format_type; - rpc_uint32 total_size; - rpc_uint8 total_parts; - rpc_uint8 part; - rpc_uint16 part_len; - opaque data_ptr<>; -}; - -struct rpc_loc_predicted_orbits_data_validity_report_s_type { - rpc_uint64 start_time_utc; - rpc_uint16 valid_duration_hrs; -}; - -struct rpc_loc_predicted_orbits_auto_download_config_s_type { - rpc_boolean enable; - unsigned char auto_check_every_hrs; -}; - -struct rpc_loc_assist_data_time_s_type { - rpc_uint64 time_utc; - rpc_uint32 uncertainty; -}; - -typedef rpc_uint64 rpc_loc_assist_pos_valid_mask_type; - -struct rpc_loc_assist_data_pos_s_type { - rpc_loc_assist_pos_valid_mask_type valid_mask; - rpc_uint64 timestamp_utc; - double latitude; - double longitude; - float altitude_wrt_ellipsoid; - float altitude_wrt_mean_sea_level; - float hor_unc_circular; - float vert_unc; - unsigned char confidence_horizontal; - unsigned char confidence_vertical; - rpc_int32 timestamp_age; -}; - -enum rpc_loc_server_open_status_e_type { - RPC_LOC_SERVER_OPEN_SUCCESS = 1, - RPC_LOC_SERVER_OPEN_FAIL = 2, - RPC_LOC_SERVER_OPEN_STATUS_MAX = 268435456 -}; - -struct rpc_loc_server_open_status_s_type { - rpc_loc_server_connection_handle conn_handle; - rpc_loc_server_open_status_e_type open_status; - opaque apn_name[100]; /* EVAL:[100]*/ -}; - -enum rpc_loc_server_close_status_e_type { - RPC_LOC_SERVER_CLOSE_SUCCESS = 1, - RPC_LOC_SERVER_CLOSE_FAIL = 2, - RPC_LOC_SERVER_CLOSE_STATUS_MAX = 268435456 -}; - -struct rpc_loc_server_close_status_s_type { - rpc_loc_server_connection_handle conn_handle; - rpc_loc_server_close_status_e_type close_status; -}; - -struct rpc_loc_wiper_fix_time_s_type { - rpc_uint32 slow_clock_count; -}; - -struct rpc_loc_wiper_fix_pos_s_type { - rpc_int32 lat; - rpc_int32 lon; - rpc_uint16 HEPE; - rpc_uint8 num_of_aps_used; - rpc_uint8 fix_error_code; -}; - -struct rpc_loc_wiper_ap_info_s_type { - opaque mac_addr[6]; /* EVAL:[6]*/ - rpc_int32 rssi; - rpc_uint16 channel; - rpc_uint8 ap_qualifier; -}; - -struct rpc_loc_wiper_ap_set_s_type { - rpc_uint8 num_of_aps; - rpc_loc_wiper_ap_info_s_type ap_info[50]; /* EVAL:[50]*/ -}; - -struct rpc_loc_wiper_position_report_s_type { - rpc_uint8 wiper_valid_info_flag; - rpc_loc_wiper_fix_time_s_type wiper_fix_time; - rpc_loc_wiper_fix_pos_s_type wiper_fix_position; - rpc_loc_wiper_ap_set_s_type wiper_ap_set; -}; - -enum rpc_loc_wiper_status_e_type { - RPC_LOC_WIPER_STATUS_AVAILABLE = 1, - RPC_LOC_WIPER_STATUS_UNAVAILABLE = 2, - RPC_LOC_WIPER_STATUS_E_SIZE = 268435456 -}; - -enum rpc_loc_fs_operation_e_type { - RPC_LOC_FS_CREATE_WRITE_FILE = 1, - RPC_LOC_FS_APPEND_FILE = 2, - RPC_LOC_FS_DELETE_FILE = 3, - RPC_LOC_FS_READ_FILE = 4, - RPC_LOC_FS_MAX = 268435456 -}; - -struct rpc_loc_efs_data_s_type { - opaque filename[64]; /* EVAL:[64]*/ - rpc_loc_fs_operation_e_type operation; - rpc_uint32 total_size; - opaque data_ptr<>; - rpc_uint32 part_len; - rpc_uint8 part; - rpc_uint8 total_parts; - rpc_uint32 reserved; -}; - -enum rpc_loc_lock_e_type { - RPC_LOC_LOCK_NONE = 1, - RPC_LOC_LOCK_MI = 2, - RPC_LOC_LOCK_MT = 3, - RPC_LOC_LOCK_ALL = 4, - RPC_LOC_LOCK_MAX = 268435456 -}; - -typedef rpc_uint32 rpc_loc_nmea_sentence_type; - -typedef rpc_uint32 rpc_loc_assist_data_type; - -struct rpc_loc_assist_data_delete_s_type { - rpc_loc_assist_data_type type; - rpc_uint32 reserved[8]; /* EVAL:[8]*/ -}; - -union rpc_loc_ioctl_data_u_type switch (rpc_loc_ioctl_e_type disc) { - case RPC_LOC_IOCTL_SET_FIX_CRITERIA: - rpc_loc_fix_criteria_s_type fix_criteria; - case RPC_LOC_IOCTL_INFORM_NI_USER_RESPONSE: - rpc_loc_user_verify_s_type user_verify_resp; - case RPC_LOC_IOCTL_INJECT_PREDICTED_ORBITS_DATA: - rpc_loc_predicted_orbits_data_s_type predicted_orbits_data; - case RPC_LOC_IOCTL_SET_PREDICTED_ORBITS_DATA_AUTO_DOWNLOAD: - rpc_loc_predicted_orbits_auto_download_config_s_type predicted_orbits_auto_download; - case RPC_LOC_IOCTL_INJECT_UTC_TIME: - rpc_loc_assist_data_time_s_type assistance_data_time; - case RPC_LOC_IOCTL_INJECT_POSITION: - rpc_loc_assist_data_pos_s_type assistance_data_position; - case RPC_LOC_IOCTL_INFORM_SERVER_OPEN_STATUS: - rpc_loc_server_open_status_s_type conn_open_status; - case RPC_LOC_IOCTL_INFORM_SERVER_CLOSE_STATUS: - rpc_loc_server_close_status_s_type conn_close_status; - case RPC_LOC_IOCTL_SEND_WIPER_POSITION_REPORT: - rpc_loc_wiper_position_report_s_type wiper_pos; - case RPC_LOC_IOCTL_NOTIFY_WIPER_STATUS: - rpc_loc_wiper_status_e_type wiper_status; - case RPC_LOC_IOCTL_SET_ENGINE_LOCK: - rpc_loc_lock_e_type engine_lock; - case RPC_LOC_IOCTL_SET_SBAS_CONFIG: - rpc_boolean sbas_mode; - case RPC_LOC_IOCTL_SET_NMEA_TYPES: - rpc_loc_nmea_sentence_type nmea_types; - case RPC_LOC_IOCTL_SET_ON_DEMAND_LPM: - rpc_boolean on_demand_lpm; - case RPC_LOC_IOCTL_SET_CDMA_PDE_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_CDMA_MPC_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_UMTS_SLP_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_CUSTOM_PDE_SERVER_ADDR: - rpc_loc_server_info_s_type server_addr; - case RPC_LOC_IOCTL_DELETE_ASSIST_DATA: - rpc_loc_assist_data_delete_s_type assist_data_delete; - case RPC_LOC_IOCTL_ACCESS_EFS_DATA: - rpc_loc_efs_data_s_type efs_data; - default: - void; -}; - -union rpc_loc_ioctl_callback_data_u_type switch (rpc_loc_ioctl_e_type disc) { - case RPC_LOC_IOCTL_GET_API_VERSION: - rpc_loc_api_version_s_type api_version; - case RPC_LOC_IOCTL_GET_FIX_CRITERIA: - rpc_loc_fix_criteria_s_type fix_criteria; - case RPC_LOC_IOCTL_GET_ENGINE_LOCK: - rpc_loc_lock_e_type engine_lock; - case RPC_LOC_IOCTL_GET_SBAS_CONFIG: - rpc_boolean sbas_mode; - case RPC_LOC_IOCTL_GET_NMEA_TYPES: - rpc_loc_nmea_sentence_type nmea_types; - case RPC_LOC_IOCTL_GET_ON_DEMAND_LPM: - rpc_boolean on_demand_lpm; - case RPC_LOC_IOCTL_GET_CDMA_PDE_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_CDMA_MPC_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_UMTS_SLP_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_CUSTOM_PDE_SERVER_ADDR: - rpc_loc_server_info_s_type server_addr; - case RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_SOURCE: - rpc_loc_predicted_orbits_data_source_s_type predicted_orbits_data_source; - case RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_VALIDITY: - rpc_loc_predicted_orbits_data_validity_report_s_type predicted_orbits_data_validity; - default: - void; -}; - -struct rpc_loc_ioctl_callback_s_type { - rpc_loc_ioctl_e_type type; - rpc_int32 status; - rpc_loc_ioctl_callback_data_u_type data; -}; - -union rpc_loc_event_payload_u_type switch (unsigned hyper disc) { - case RPC_LOC_EVENT_PARSED_POSITION_REPORT: - rpc_loc_parsed_position_s_type parsed_location_report; - case RPC_LOC_EVENT_SATELLITE_REPORT: - rpc_loc_gnss_info_s_type gnss_report; - case RPC_LOC_EVENT_NMEA_POSITION_REPORT: - rpc_loc_nmea_report_s_type nmea_report; - case RPC_LOC_EVENT_NI_NOTIFY_VERIFY_REQUEST: - rpc_loc_ni_event_s_type ni_request; - case RPC_LOC_EVENT_ASSISTANCE_DATA_REQUEST: - rpc_loc_assist_data_request_s_type assist_data_request; - case RPC_LOC_EVENT_LOCATION_SERVER_REQUEST: - rpc_loc_server_request_s_type loc_server_request; - case RPC_LOC_EVENT_IOCTL_REPORT: - rpc_loc_ioctl_callback_s_type ioctl_report; - case RPC_LOC_EVENT_STATUS_REPORT: - rpc_loc_status_event_s_type status_report; - case RPC_LOC_EVENT_WPS_NEEDED_REQUEST: - rpc_loc_qwip_request_s_type qwip_request; - case RPC_LOC_EVENT_RESERVED: - rpc_loc_reserved_payload_s_type reserved; - default: - void; -}; - diff --git a/loc_api/libloc_api-rpc/gen-1240/loc_api_common_xdr.c b/loc_api/libloc_api-rpc/gen-1240/loc_api_common_xdr.c deleted file mode 100644 index 7c860bf3..00000000 --- a/loc_api/libloc_api-rpc/gen-1240/loc_api_common_xdr.c +++ /dev/null @@ -1,1650 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#include "loc_api_common.h" - -bool_t -xdr_rpc_boolean (XDR *xdrs, rpc_boolean *objp) -{ - register int32_t *buf; - - if (!xdr_bool (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_uint32 (XDR *xdrs, rpc_uint32 *objp) -{ - register int32_t *buf; - - if (!xdr_u_long (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_uint16 (XDR *xdrs, rpc_uint16 *objp) -{ - register int32_t *buf; - - if (!xdr_u_short (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_uint8 (XDR *xdrs, rpc_uint8 *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_int32 (XDR *xdrs, rpc_int32 *objp) -{ - register int32_t *buf; - - if (!xdr_long (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_byte (XDR *xdrs, rpc_byte *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_uint64 (XDR *xdrs, rpc_uint64 *objp) -{ - register int32_t *buf; - - if (!xdr_u_quad_t (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_client_handle_type (XDR *xdrs, rpc_loc_client_handle_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_int32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_event_mask_type (XDR *xdrs, rpc_loc_event_mask_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint64 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_position_valid_mask_type (XDR *xdrs, rpc_loc_position_valid_mask_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint64 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_pos_technology_mask_type (XDR *xdrs, rpc_loc_pos_technology_mask_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_session_status_e_type (XDR *xdrs, rpc_loc_session_status_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_calendar_time_s_type (XDR *xdrs, rpc_loc_calendar_time_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint16 (xdrs, &objp->year)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->month)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->day_of_week)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->day)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->hour)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->minute)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->second)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->millisecond)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_parsed_position_s_type (XDR *xdrs, rpc_loc_parsed_position_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_position_valid_mask_type (xdrs, &objp->valid_mask)) - return FALSE; - if (!xdr_rpc_loc_session_status_e_type (xdrs, &objp->session_status)) - return FALSE; - if (!xdr_rpc_loc_calendar_time_s_type (xdrs, &objp->timestamp_calendar)) - return FALSE; - if (!xdr_rpc_uint64 (xdrs, &objp->timestamp_utc)) - return FALSE; - if (!xdr_rpc_uint8 (xdrs, &objp->leap_seconds)) - return FALSE; - if (!xdr_float (xdrs, &objp->time_unc)) - return FALSE; - if (!xdr_double (xdrs, &objp->latitude)) - return FALSE; - if (!xdr_double (xdrs, &objp->longitude)) - return FALSE; - if (!xdr_float (xdrs, &objp->altitude_wrt_ellipsoid)) - return FALSE; - if (!xdr_float (xdrs, &objp->altitude_wrt_mean_sea_level)) - return FALSE; - if (!xdr_float (xdrs, &objp->speed_horizontal)) - return FALSE; - if (!xdr_float (xdrs, &objp->speed_vertical)) - return FALSE; - if (!xdr_float (xdrs, &objp->heading)) - return FALSE; - if (!xdr_float (xdrs, &objp->hor_unc_circular)) - return FALSE; - if (!xdr_float (xdrs, &objp->hor_unc_ellipse_semi_major)) - return FALSE; - if (!xdr_float (xdrs, &objp->hor_unc_ellipse_semi_minor)) - return FALSE; - if (!xdr_float (xdrs, &objp->hor_unc_ellipse_orient_azimuth)) - return FALSE; - if (!xdr_float (xdrs, &objp->vert_unc)) - return FALSE; - if (!xdr_float (xdrs, &objp->speed_unc)) - return FALSE; - if (!xdr_float (xdrs, &objp->heading_unc)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->confidence_horizontal)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->confidence_vertical)) - return FALSE; - if (!xdr_float (xdrs, &objp->magnetic_deviation)) - return FALSE; - if (!xdr_rpc_loc_pos_technology_mask_type (xdrs, &objp->technology_mask)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_sv_system_e_type (XDR *xdrs, rpc_loc_sv_system_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_sv_status_e_type (XDR *xdrs, rpc_loc_sv_status_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_sv_info_valid_mask_type (XDR *xdrs, rpc_loc_sv_info_valid_mask_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_sv_info_s_type (XDR *xdrs, rpc_loc_sv_info_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_sv_info_valid_mask_type (xdrs, &objp->valid_mask)) - return FALSE; - if (!xdr_rpc_loc_sv_system_e_type (xdrs, &objp->system)) - return FALSE; - if (!xdr_rpc_uint8 (xdrs, &objp->prn)) - return FALSE; - if (!xdr_rpc_uint8 (xdrs, &objp->health_status)) - return FALSE; - if (!xdr_rpc_loc_sv_status_e_type (xdrs, &objp->process_status)) - return FALSE; - if (!xdr_rpc_boolean (xdrs, &objp->has_eph)) - return FALSE; - if (!xdr_rpc_boolean (xdrs, &objp->has_alm)) - return FALSE; - if (!xdr_float (xdrs, &objp->elevation)) - return FALSE; - if (!xdr_float (xdrs, &objp->azimuth)) - return FALSE; - if (!xdr_float (xdrs, &objp->snr)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_gnss_info_valid_mask_type (XDR *xdrs, rpc_loc_gnss_info_valid_mask_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_gnss_info_s_type (XDR *xdrs, rpc_loc_gnss_info_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_gnss_info_valid_mask_type (xdrs, &objp->valid_mask)) - return FALSE; - if (!xdr_float (xdrs, &objp->position_dop)) - return FALSE; - if (!xdr_float (xdrs, &objp->horizontal_dop)) - return FALSE; - if (!xdr_float (xdrs, &objp->vertical_dop)) - return FALSE; - if (!xdr_rpc_boolean (xdrs, &objp->altitude_assumed)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->sv_count)) - return FALSE; - if (!xdr_array (xdrs, (char **)&objp->sv_list.sv_list_val, (u_int *) &objp->sv_list.sv_list_len, 80, - sizeof (rpc_loc_sv_info_s_type), (xdrproc_t) xdr_rpc_loc_sv_info_s_type)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_nmea_report_s_type (XDR *xdrs, rpc_loc_nmea_report_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_rpc_uint16 (xdrs, &objp->length)) - return FALSE; - if (!xdr_opaque (xdrs, objp->nmea_sentences, 1200)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_status_event_e_type (XDR *xdrs, rpc_loc_status_event_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_engine_state_e_type (XDR *xdrs, rpc_loc_engine_state_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_fix_session_state_e_type (XDR *xdrs, rpc_loc_fix_session_state_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_status_event_payload_u_type (XDR *xdrs, rpc_loc_status_event_payload_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_status_event_e_type (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_STATUS_EVENT_ENGINE_STATE: - if (!xdr_rpc_loc_engine_state_e_type (xdrs, &objp->rpc_loc_status_event_payload_u_type_u.engine_state)) - return FALSE; - break; - case RPC_LOC_STATUS_EVENT_FIX_SESSION_STATE: - if (!xdr_rpc_loc_fix_session_state_e_type (xdrs, &objp->rpc_loc_status_event_payload_u_type_u.fix_session_state)) - return FALSE; - break; - default: - break; - } - return TRUE; -} - -bool_t -xdr_rpc_loc_status_event_s_type (XDR *xdrs, rpc_loc_status_event_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_status_event_e_type (xdrs, &objp->event)) - return FALSE; - if (!xdr_rpc_loc_status_event_payload_u_type (xdrs, &objp->payload)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_addr_e_type (XDR *xdrs, rpc_loc_server_addr_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_addr_ipv4_type (XDR *xdrs, rpc_loc_server_addr_ipv4_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, &objp->addr)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->port)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_addr_url_type (XDR *xdrs, rpc_loc_server_addr_url_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_rpc_uint16 (xdrs, &objp->length)) - return FALSE; - if (!xdr_opaque (xdrs, objp->addr, 256)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_addr_u_type (XDR *xdrs, rpc_loc_server_addr_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_server_addr_e_type (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_SERVER_ADDR_IPV4: - if (!xdr_rpc_loc_server_addr_ipv4_type (xdrs, &objp->rpc_loc_server_addr_u_type_u.ipv4)) - return FALSE; - break; - case RPC_LOC_SERVER_ADDR_URL: - if (!xdr_rpc_loc_server_addr_url_type (xdrs, &objp->rpc_loc_server_addr_u_type_u.url)) - return FALSE; - break; - default: - break; - } - return TRUE; -} - -bool_t -xdr_rpc_loc_server_info_s_type (XDR *xdrs, rpc_loc_server_info_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_server_addr_e_type (xdrs, &objp->addr_type)) - return FALSE; - if (!xdr_rpc_loc_server_addr_u_type (xdrs, &objp->addr_info)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_notify_verify_e_type (XDR *xdrs, rpc_loc_ni_notify_verify_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_event_e_type (XDR *xdrs, rpc_loc_ni_event_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_datacoding_scheme_e_type (XDR *xdrs, rpc_loc_ni_datacoding_scheme_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_vx_requester_id_encoding_scheme_e_type (XDR *xdrs, rpc_loc_ni_vx_requester_id_encoding_scheme_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_vx_pos_mode_e_type (XDR *xdrs, rpc_loc_ni_vx_pos_mode_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_vx_requester_id_s_type (XDR *xdrs, rpc_loc_ni_vx_requester_id_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_u_char (xdrs, &objp->requester_id_length)) - return FALSE; - if (!xdr_opaque (xdrs, objp->requester_id, 200)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_vx_notify_verify_req_s_type (XDR *xdrs, rpc_loc_ni_vx_notify_verify_req_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ni_notify_verify_e_type (xdrs, &objp->notification_priv_type)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->pos_qos_incl)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->pos_qos)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->num_fixes)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->tbf)) - return FALSE; - if (!xdr_rpc_loc_ni_vx_pos_mode_e_type (xdrs, &objp->pos_mode)) - return FALSE; - if (!xdr_rpc_loc_ni_vx_requester_id_encoding_scheme_e_type (xdrs, &objp->encoding_scheme)) - return FALSE; - if (!xdr_rpc_loc_ni_vx_requester_id_s_type (xdrs, &objp->requester_id)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->user_resp_timer_val)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_supl_pos_method_e_type (XDR *xdrs, rpc_loc_ni_supl_pos_method_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_supl_slp_session_id_s_type (XDR *xdrs, rpc_loc_ni_supl_slp_session_id_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_u_char (xdrs, &objp->presence)) - return FALSE; - if (!xdr_opaque (xdrs, objp->session_id, 4)) - return FALSE; - if (!xdr_rpc_loc_server_info_s_type (xdrs, &objp->slp_address)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_requestor_id_s_type (XDR *xdrs, rpc_loc_ni_requestor_id_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_u_char (xdrs, &objp->data_coding_scheme)) - return FALSE; - if (!xdr_opaque (xdrs, objp->requestor_id_string, 200)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->string_len)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_supl_client_name_s_type (XDR *xdrs, rpc_loc_ni_supl_client_name_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_u_char (xdrs, &objp->data_coding_scheme)) - return FALSE; - if (!xdr_opaque (xdrs, objp->client_name_string, 64)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->string_len)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_supl_qop_s_type (XDR *xdrs, rpc_loc_ni_supl_qop_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, &objp->bit_mask)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->horacc)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->veracc)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->maxLocAge)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->delay)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_supl_notify_verify_req_s_type (XDR *xdrs, rpc_loc_ni_supl_notify_verify_req_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_rpc_loc_ni_notify_verify_e_type (xdrs, &objp->notification_priv_type)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->flags)) - return FALSE; - if (!xdr_rpc_loc_ni_supl_slp_session_id_s_type (xdrs, &objp->supl_slp_session_id)) - return FALSE; - if (!xdr_opaque (xdrs, objp->supl_hash, 8)) - return FALSE; - if (!xdr_rpc_loc_ni_datacoding_scheme_e_type (xdrs, &objp->datacoding_scheme)) - return FALSE; - if (!xdr_rpc_loc_ni_supl_pos_method_e_type (xdrs, &objp->pos_method)) - return FALSE; - if (!xdr_rpc_loc_ni_requestor_id_s_type (xdrs, &objp->requestor_id)) - return FALSE; - if (!xdr_rpc_loc_ni_supl_client_name_s_type (xdrs, &objp->client_name)) - return FALSE; - if (!xdr_rpc_loc_ni_supl_qop_s_type (xdrs, &objp->supl_qop)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->user_response_timer)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_ext_client_address_s_type (XDR *xdrs, rpc_loc_ni_ext_client_address_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_u_char (xdrs, &objp->ext_client_address_len)) - return FALSE; - if (!xdr_opaque (xdrs, objp->ext_client_address, 20)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_location_type_e_type (XDR *xdrs, rpc_loc_ni_location_type_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_deferred_location_s_type (XDR *xdrs, rpc_loc_ni_deferred_location_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, &objp->unused_bits)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->ms_available)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_codeword_string_s_type (XDR *xdrs, rpc_loc_ni_codeword_string_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_u_char (xdrs, &objp->data_coding_scheme)) - return FALSE; - if (!xdr_opaque (xdrs, objp->lcs_codeword_string, 20)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->string_len)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_service_type_id_s_type (XDR *xdrs, rpc_loc_ni_service_type_id_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, &objp->lcs_service_type_id)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_umts_cp_notify_verify_req_s_type (XDR *xdrs, rpc_loc_ni_umts_cp_notify_verify_req_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_rpc_loc_ni_notify_verify_e_type (xdrs, &objp->notification_priv_type)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->invoke_id)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->flags)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->notification_length)) - return FALSE; - if (!xdr_opaque (xdrs, objp->notification_text, 64)) - return FALSE; - if (!xdr_rpc_loc_ni_datacoding_scheme_e_type (xdrs, &objp->datacoding_scheme)) - return FALSE; - if (!xdr_rpc_loc_ni_ext_client_address_s_type (xdrs, &objp->ext_client_address_data)) - return FALSE; - if (!xdr_rpc_loc_ni_location_type_e_type (xdrs, &objp->location_type)) - return FALSE; - if (!xdr_rpc_loc_ni_deferred_location_s_type (xdrs, &objp->deferred_location)) - return FALSE; - if (!xdr_rpc_loc_ni_requestor_id_s_type (xdrs, &objp->requestor_id)) - return FALSE; - if (!xdr_rpc_loc_ni_codeword_string_s_type (xdrs, &objp->codeword_string)) - return FALSE; - if (!xdr_rpc_loc_ni_service_type_id_s_type (xdrs, &objp->service_type_id)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->user_response_timer)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_service_interaction_e_type (XDR *xdrs, rpc_loc_ni_service_interaction_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_vx_service_interaction_req_s_type (XDR *xdrs, rpc_loc_ni_vx_service_interaction_req_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ni_vx_notify_verify_req_s_type (xdrs, &objp->ni_vx_req)) - return FALSE; - if (!xdr_rpc_loc_ni_service_interaction_e_type (xdrs, &objp->service_interation_type)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_event_payload_u_type (XDR *xdrs, rpc_loc_ni_event_payload_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ni_event_e_type (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_NI_EVENT_VX_NOTIFY_VERIFY_REQ: - if (!xdr_rpc_loc_ni_vx_notify_verify_req_s_type (xdrs, &objp->rpc_loc_ni_event_payload_u_type_u.vx_req)) - return FALSE; - break; - case RPC_LOC_NI_EVENT_SUPL_NOTIFY_VERIFY_REQ: - if (!xdr_rpc_loc_ni_supl_notify_verify_req_s_type (xdrs, &objp->rpc_loc_ni_event_payload_u_type_u.supl_req)) - return FALSE; - break; - case RPC_LOC_NI_EVENT_UMTS_CP_NOTIFY_VERIFY_REQ: - if (!xdr_rpc_loc_ni_umts_cp_notify_verify_req_s_type (xdrs, &objp->rpc_loc_ni_event_payload_u_type_u.umts_cp_req)) - return FALSE; - break; - case RPC_LOC_NI_EVENT_VX_SERVICE_INTERACTION_REQ: - if (!xdr_rpc_loc_ni_vx_service_interaction_req_s_type (xdrs, &objp->rpc_loc_ni_event_payload_u_type_u.service_interaction_req)) - return FALSE; - break; - default: - break; - } - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_event_s_type (XDR *xdrs, rpc_loc_ni_event_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ni_event_e_type (xdrs, &objp->event)) - return FALSE; - if (!xdr_rpc_loc_ni_event_payload_u_type (xdrs, &objp->payload)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_data_request_e_type (XDR *xdrs, rpc_loc_assist_data_request_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_struct_loc_time_download_source_s_type_servers_ptr (XDR *xdrs, rpc_struct_loc_time_download_source_s_type_servers_ptr *objp) -{ - register int32_t *buf; - - if (!xdr_string (xdrs, objp, 256)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_struct_loc_time_download_source_s_type_servers (XDR *xdrs, rpc_struct_loc_time_download_source_s_type_servers objp) -{ - register int32_t *buf; - - if (!xdr_vector (xdrs, (char *)objp, 3, - sizeof (rpc_struct_loc_time_download_source_s_type_servers_ptr), (xdrproc_t) xdr_rpc_struct_loc_time_download_source_s_type_servers_ptr)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_time_download_source_s_type (XDR *xdrs, rpc_loc_time_download_source_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, &objp->delay_threshold)) - return FALSE; - if (!xdr_rpc_struct_loc_time_download_source_s_type_servers (xdrs, objp->servers)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr (XDR *xdrs, rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr *objp) -{ - register int32_t *buf; - - if (!xdr_string (xdrs, objp, 256)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers (XDR *xdrs, rpc_struct_loc_predicted_orbits_data_source_s_type_servers objp) -{ - register int32_t *buf; - - if (!xdr_vector (xdrs, (char *)objp, 3, - sizeof (rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr), (xdrproc_t) xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_predicted_orbits_data_source_s_type (XDR *xdrs, rpc_loc_predicted_orbits_data_source_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, &objp->max_file_size)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->max_part_size)) - return FALSE; - if (!xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers (xdrs, objp->servers)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_data_request_payload_u_type (XDR *xdrs, rpc_loc_assist_data_request_payload_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_assist_data_request_e_type (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_ASSIST_DATA_TIME_REQ: - if (!xdr_rpc_loc_time_download_source_s_type (xdrs, &objp->rpc_loc_assist_data_request_payload_u_type_u.time_download)) - return FALSE; - break; - case RPC_LOC_ASSIST_DATA_PREDICTED_ORBITS_REQ: - if (!xdr_rpc_loc_predicted_orbits_data_source_s_type (xdrs, &objp->rpc_loc_assist_data_request_payload_u_type_u.data_download)) - return FALSE; - break; - default: - break; - } - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_data_request_s_type (XDR *xdrs, rpc_loc_assist_data_request_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_assist_data_request_e_type (xdrs, &objp->event)) - return FALSE; - if (!xdr_rpc_loc_assist_data_request_payload_u_type (xdrs, &objp->payload)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_connection_handle (XDR *xdrs, rpc_loc_server_connection_handle *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_protocol_e_type (XDR *xdrs, rpc_loc_server_protocol_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_request_e_type (XDR *xdrs, rpc_loc_server_request_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_open_req_s_type (XDR *xdrs, rpc_loc_server_open_req_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_server_connection_handle (xdrs, &objp->conn_handle)) - return FALSE; - if (!xdr_rpc_loc_server_protocol_e_type (xdrs, &objp->protocol)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_close_req_s_type (XDR *xdrs, rpc_loc_server_close_req_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_server_connection_handle (xdrs, &objp->conn_handle)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_request_u_type (XDR *xdrs, rpc_loc_server_request_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_server_request_e_type (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_SERVER_REQUEST_OPEN: - if (!xdr_rpc_loc_server_open_req_s_type (xdrs, &objp->rpc_loc_server_request_u_type_u.open_req)) - return FALSE; - break; - case RPC_LOC_SERVER_REQUEST_CLOSE: - if (!xdr_rpc_loc_server_close_req_s_type (xdrs, &objp->rpc_loc_server_request_u_type_u.close_req)) - return FALSE; - break; - default: - break; - } - return TRUE; -} - -bool_t -xdr_rpc_loc_server_request_s_type (XDR *xdrs, rpc_loc_server_request_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_server_request_e_type (xdrs, &objp->event)) - return FALSE; - if (!xdr_rpc_loc_server_request_u_type (xdrs, &objp->payload)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_qwip_request_e_type (XDR *xdrs, rpc_loc_qwip_request_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_qwip_request_s_type (XDR *xdrs, rpc_loc_qwip_request_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_qwip_request_e_type (xdrs, &objp->request_type)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->tbf_ms)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_reserved_payload_s_type (XDR *xdrs, rpc_loc_reserved_payload_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint16 (xdrs, &objp->data_size)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->data.data_val, (u_int *) &objp->data.data_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ioctl_e_type (XDR *xdrs, rpc_loc_ioctl_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_api_version_s_type (XDR *xdrs, rpc_loc_api_version_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, &objp->major)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->minor)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_fix_recurrence_e_type (XDR *xdrs, rpc_loc_fix_recurrence_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_operation_mode_e_type (XDR *xdrs, rpc_loc_operation_mode_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_notify_e_type (XDR *xdrs, rpc_loc_notify_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_fix_criteria_s_type (XDR *xdrs, rpc_loc_fix_criteria_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, &objp->valid_mask)) - return FALSE; - if (!xdr_rpc_loc_fix_recurrence_e_type (xdrs, &objp->recurrence_type)) - return FALSE; - if (!xdr_rpc_loc_operation_mode_e_type (xdrs, &objp->preferred_operation_mode)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->preferred_accuracy)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->preferred_response_time)) - return FALSE; - if (!xdr_rpc_boolean (xdrs, &objp->intermediate_pos_report_enabled)) - return FALSE; - if (!xdr_rpc_loc_notify_e_type (xdrs, &objp->notify_type)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->min_interval)) - return FALSE; - if (!xdr_float (xdrs, &objp->min_distance)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->min_dist_sample_interval)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_user_resp_e_type (XDR *xdrs, rpc_loc_ni_user_resp_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_user_verify_s_type (XDR *xdrs, rpc_loc_user_verify_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ni_user_resp_e_type (xdrs, &objp->user_resp)) - return FALSE; - if (!xdr_rpc_loc_ni_event_s_type (xdrs, &objp->ni_event_pass_back)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_predicted_orbits_data_format_e_type (XDR *xdrs, rpc_loc_predicted_orbits_data_format_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_predicted_orbits_data_s_type (XDR *xdrs, rpc_loc_predicted_orbits_data_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_predicted_orbits_data_format_e_type (xdrs, &objp->format_type)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->total_size)) - return FALSE; - if (!xdr_rpc_uint8 (xdrs, &objp->total_parts)) - return FALSE; - if (!xdr_rpc_uint8 (xdrs, &objp->part)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->part_len)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->data_ptr.data_ptr_val, (u_int *) &objp->data_ptr.data_ptr_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_predicted_orbits_data_validity_report_s_type (XDR *xdrs, rpc_loc_predicted_orbits_data_validity_report_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint64 (xdrs, &objp->start_time_utc)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->valid_duration_hrs)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_predicted_orbits_auto_download_config_s_type (XDR *xdrs, rpc_loc_predicted_orbits_auto_download_config_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_boolean (xdrs, &objp->enable)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->auto_check_every_hrs)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_data_time_s_type (XDR *xdrs, rpc_loc_assist_data_time_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint64 (xdrs, &objp->time_utc)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->uncertainty)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_pos_valid_mask_type (XDR *xdrs, rpc_loc_assist_pos_valid_mask_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint64 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_data_pos_s_type (XDR *xdrs, rpc_loc_assist_data_pos_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_assist_pos_valid_mask_type (xdrs, &objp->valid_mask)) - return FALSE; - if (!xdr_rpc_uint64 (xdrs, &objp->timestamp_utc)) - return FALSE; - if (!xdr_double (xdrs, &objp->latitude)) - return FALSE; - if (!xdr_double (xdrs, &objp->longitude)) - return FALSE; - if (!xdr_float (xdrs, &objp->altitude_wrt_ellipsoid)) - return FALSE; - if (!xdr_float (xdrs, &objp->altitude_wrt_mean_sea_level)) - return FALSE; - if (!xdr_float (xdrs, &objp->hor_unc_circular)) - return FALSE; - if (!xdr_float (xdrs, &objp->vert_unc)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->confidence_horizontal)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->confidence_vertical)) - return FALSE; - if (!xdr_rpc_int32 (xdrs, &objp->timestamp_age)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_open_status_e_type (XDR *xdrs, rpc_loc_server_open_status_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_open_status_s_type (XDR *xdrs, rpc_loc_server_open_status_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_rpc_loc_server_connection_handle (xdrs, &objp->conn_handle)) - return FALSE; - if (!xdr_rpc_loc_server_open_status_e_type (xdrs, &objp->open_status)) - return FALSE; - if (!xdr_opaque (xdrs, objp->apn_name, 100)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_close_status_e_type (XDR *xdrs, rpc_loc_server_close_status_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_close_status_s_type (XDR *xdrs, rpc_loc_server_close_status_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_server_connection_handle (xdrs, &objp->conn_handle)) - return FALSE; - if (!xdr_rpc_loc_server_close_status_e_type (xdrs, &objp->close_status)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_wiper_fix_time_s_type (XDR *xdrs, rpc_loc_wiper_fix_time_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, &objp->slow_clock_count)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_wiper_fix_pos_s_type (XDR *xdrs, rpc_loc_wiper_fix_pos_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_int32 (xdrs, &objp->lat)) - return FALSE; - if (!xdr_rpc_int32 (xdrs, &objp->lon)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->HEPE)) - return FALSE; - if (!xdr_rpc_uint8 (xdrs, &objp->num_of_aps_used)) - return FALSE; - if (!xdr_rpc_uint8 (xdrs, &objp->fix_error_code)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_wiper_ap_info_s_type (XDR *xdrs, rpc_loc_wiper_ap_info_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_opaque (xdrs, objp->mac_addr, 6)) - return FALSE; - if (!xdr_rpc_int32 (xdrs, &objp->rssi)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->channel)) - return FALSE; - if (!xdr_rpc_uint8 (xdrs, &objp->ap_qualifier)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_wiper_ap_set_s_type (XDR *xdrs, rpc_loc_wiper_ap_set_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_rpc_uint8 (xdrs, &objp->num_of_aps)) - return FALSE; - if (!xdr_vector (xdrs, (char *)objp->ap_info, 50, - sizeof (rpc_loc_wiper_ap_info_s_type), (xdrproc_t) xdr_rpc_loc_wiper_ap_info_s_type)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_wiper_position_report_s_type (XDR *xdrs, rpc_loc_wiper_position_report_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint8 (xdrs, &objp->wiper_valid_info_flag)) - return FALSE; - if (!xdr_rpc_loc_wiper_fix_time_s_type (xdrs, &objp->wiper_fix_time)) - return FALSE; - if (!xdr_rpc_loc_wiper_fix_pos_s_type (xdrs, &objp->wiper_fix_position)) - return FALSE; - if (!xdr_rpc_loc_wiper_ap_set_s_type (xdrs, &objp->wiper_ap_set)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_wiper_status_e_type (XDR *xdrs, rpc_loc_wiper_status_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_fs_operation_e_type (XDR *xdrs, rpc_loc_fs_operation_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_efs_data_s_type (XDR *xdrs, rpc_loc_efs_data_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_opaque (xdrs, objp->filename, 64)) - return FALSE; - if (!xdr_rpc_loc_fs_operation_e_type (xdrs, &objp->operation)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->total_size)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->data_ptr.data_ptr_val, (u_int *) &objp->data_ptr.data_ptr_len, ~0)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->part_len)) - return FALSE; - if (!xdr_rpc_uint8 (xdrs, &objp->part)) - return FALSE; - if (!xdr_rpc_uint8 (xdrs, &objp->total_parts)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->reserved)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_lock_e_type (XDR *xdrs, rpc_loc_lock_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_nmea_sentence_type (XDR *xdrs, rpc_loc_nmea_sentence_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_data_type (XDR *xdrs, rpc_loc_assist_data_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_data_delete_s_type (XDR *xdrs, rpc_loc_assist_data_delete_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_rpc_loc_assist_data_type (xdrs, &objp->type)) - return FALSE; - if (!xdr_vector (xdrs, (char *)objp->reserved, 8, - sizeof (rpc_uint32), (xdrproc_t) xdr_rpc_uint32)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ioctl_data_u_type (XDR *xdrs, rpc_loc_ioctl_data_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ioctl_e_type (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_IOCTL_SET_FIX_CRITERIA: - if (!xdr_rpc_loc_fix_criteria_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.fix_criteria)) - return FALSE; - break; - case RPC_LOC_IOCTL_INFORM_NI_USER_RESPONSE: - if (!xdr_rpc_loc_user_verify_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.user_verify_resp)) - return FALSE; - break; - case RPC_LOC_IOCTL_INJECT_PREDICTED_ORBITS_DATA: - if (!xdr_rpc_loc_predicted_orbits_data_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.predicted_orbits_data)) - return FALSE; - break; - case RPC_LOC_IOCTL_SET_PREDICTED_ORBITS_DATA_AUTO_DOWNLOAD: - if (!xdr_rpc_loc_predicted_orbits_auto_download_config_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.predicted_orbits_auto_download)) - return FALSE; - break; - case RPC_LOC_IOCTL_INJECT_UTC_TIME: - if (!xdr_rpc_loc_assist_data_time_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.assistance_data_time)) - return FALSE; - break; - case RPC_LOC_IOCTL_INJECT_POSITION: - if (!xdr_rpc_loc_assist_data_pos_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.assistance_data_position)) - return FALSE; - break; - case RPC_LOC_IOCTL_INFORM_SERVER_OPEN_STATUS: - if (!xdr_rpc_loc_server_open_status_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.conn_open_status)) - return FALSE; - break; - case RPC_LOC_IOCTL_INFORM_SERVER_CLOSE_STATUS: - if (!xdr_rpc_loc_server_close_status_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.conn_close_status)) - return FALSE; - break; - case RPC_LOC_IOCTL_SEND_WIPER_POSITION_REPORT: - if (!xdr_rpc_loc_wiper_position_report_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.wiper_pos)) - return FALSE; - break; - case RPC_LOC_IOCTL_NOTIFY_WIPER_STATUS: - if (!xdr_rpc_loc_wiper_status_e_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.wiper_status)) - return FALSE; - break; - case RPC_LOC_IOCTL_SET_ENGINE_LOCK: - if (!xdr_rpc_loc_lock_e_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.engine_lock)) - return FALSE; - break; - case RPC_LOC_IOCTL_SET_SBAS_CONFIG: - if (!xdr_rpc_boolean (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.sbas_mode)) - return FALSE; - break; - case RPC_LOC_IOCTL_SET_NMEA_TYPES: - if (!xdr_rpc_loc_nmea_sentence_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.nmea_types)) - return FALSE; - break; - case RPC_LOC_IOCTL_SET_ON_DEMAND_LPM: - if (!xdr_rpc_boolean (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.on_demand_lpm)) - return FALSE; - break; - case RPC_LOC_IOCTL_SET_CDMA_PDE_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_CDMA_MPC_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_UMTS_SLP_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_CUSTOM_PDE_SERVER_ADDR: - if (!xdr_rpc_loc_server_info_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.server_addr)) - return FALSE; - break; - case RPC_LOC_IOCTL_DELETE_ASSIST_DATA: - if (!xdr_rpc_loc_assist_data_delete_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.assist_data_delete)) - return FALSE; - break; - case RPC_LOC_IOCTL_ACCESS_EFS_DATA: - if (!xdr_rpc_loc_efs_data_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.efs_data)) - return FALSE; - break; - default: - break; - } - return TRUE; -} - -bool_t -xdr_rpc_loc_ioctl_callback_data_u_type (XDR *xdrs, rpc_loc_ioctl_callback_data_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ioctl_e_type (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_IOCTL_GET_API_VERSION: - if (!xdr_rpc_loc_api_version_s_type (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.api_version)) - return FALSE; - break; - case RPC_LOC_IOCTL_GET_FIX_CRITERIA: - if (!xdr_rpc_loc_fix_criteria_s_type (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.fix_criteria)) - return FALSE; - break; - case RPC_LOC_IOCTL_GET_ENGINE_LOCK: - if (!xdr_rpc_loc_lock_e_type (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.engine_lock)) - return FALSE; - break; - case RPC_LOC_IOCTL_GET_SBAS_CONFIG: - if (!xdr_rpc_boolean (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.sbas_mode)) - return FALSE; - break; - case RPC_LOC_IOCTL_GET_NMEA_TYPES: - if (!xdr_rpc_loc_nmea_sentence_type (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.nmea_types)) - return FALSE; - break; - case RPC_LOC_IOCTL_GET_ON_DEMAND_LPM: - if (!xdr_rpc_boolean (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.on_demand_lpm)) - return FALSE; - break; - case RPC_LOC_IOCTL_GET_CDMA_PDE_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_CDMA_MPC_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_UMTS_SLP_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_CUSTOM_PDE_SERVER_ADDR: - if (!xdr_rpc_loc_server_info_s_type (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.server_addr)) - return FALSE; - break; - case RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_SOURCE: - if (!xdr_rpc_loc_predicted_orbits_data_source_s_type (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.predicted_orbits_data_source)) - return FALSE; - break; - case RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_VALIDITY: - if (!xdr_rpc_loc_predicted_orbits_data_validity_report_s_type (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.predicted_orbits_data_validity)) - return FALSE; - break; - default: - break; - } - return TRUE; -} - -bool_t -xdr_rpc_loc_ioctl_callback_s_type (XDR *xdrs, rpc_loc_ioctl_callback_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ioctl_e_type (xdrs, &objp->type)) - return FALSE; - if (!xdr_rpc_int32 (xdrs, &objp->status)) - return FALSE; - if (!xdr_rpc_loc_ioctl_callback_data_u_type (xdrs, &objp->data)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_event_payload_u_type (XDR *xdrs, rpc_loc_event_payload_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_u_quad_t (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_EVENT_PARSED_POSITION_REPORT: - if (!xdr_rpc_loc_parsed_position_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.parsed_location_report)) - return FALSE; - break; - case RPC_LOC_EVENT_SATELLITE_REPORT: - if (!xdr_rpc_loc_gnss_info_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.gnss_report)) - return FALSE; - break; - case RPC_LOC_EVENT_NMEA_POSITION_REPORT: - if (!xdr_rpc_loc_nmea_report_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.nmea_report)) - return FALSE; - break; - case RPC_LOC_EVENT_NI_NOTIFY_VERIFY_REQUEST: - if (!xdr_rpc_loc_ni_event_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.ni_request)) - return FALSE; - break; - case RPC_LOC_EVENT_ASSISTANCE_DATA_REQUEST: - if (!xdr_rpc_loc_assist_data_request_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.assist_data_request)) - return FALSE; - break; - case RPC_LOC_EVENT_LOCATION_SERVER_REQUEST: - if (!xdr_rpc_loc_server_request_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.loc_server_request)) - return FALSE; - break; - case RPC_LOC_EVENT_IOCTL_REPORT: - if (!xdr_rpc_loc_ioctl_callback_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.ioctl_report)) - return FALSE; - break; - case RPC_LOC_EVENT_STATUS_REPORT: - if (!xdr_rpc_loc_status_event_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.status_report)) - return FALSE; - break; - case RPC_LOC_EVENT_WPS_NEEDED_REQUEST: - if (!xdr_rpc_loc_qwip_request_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.qwip_request)) - return FALSE; - break; - case RPC_LOC_EVENT_RESERVED: - if (!xdr_rpc_loc_reserved_payload_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.reserved)) - return FALSE; - break; - default: - break; - } - return TRUE; -} diff --git a/loc_api/libloc_api-rpc/gen-1240/loc_api_fixup.c b/loc_api/libloc_api-rpc/gen-1240/loc_api_fixup.c deleted file mode 100644 index fe512f5d..00000000 --- a/loc_api/libloc_api-rpc/gen-1240/loc_api_fixup.c +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - L O C _ A P I _ F I X U P . C - -GENERAL DESCRIPTION - This file adds API constants that are not automatically transmitted to - the RPC stubs, and it also fixes other RPC-related problems. - - --------------------------------------------------------------------------- -Copyright (c) 2009, QUALCOMM USA, INC. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -· Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -· Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -· Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --------------------------------------------------------------------------- -=============================================================================*/ - -#include - -#include "loc_api_fixup.h" - -#ifdef ADD_XDR_FLOAT - -int -xdr_float(xdrp, fp) - XDR *xdrp; - float *fp; -{ - return xdr_long(xdrp, (long*)fp); -} - -int -xdr_double(xdrp, dp) - XDR *xdrp; - double *dp; -{ - return xdr_long(xdrp, (long*)dp + 1) - && xdr_long(xdrp, (long*)dp); -} - -#endif /* ADD_XDR_FLOAT */ diff --git a/loc_api/libloc_api-rpc/gen-1240/loc_api_rpc_glue.c b/loc_api/libloc_api-rpc/gen-1240/loc_api_rpc_glue.c deleted file mode 100644 index fbaca8b6..00000000 --- a/loc_api/libloc_api-rpc/gen-1240/loc_api_rpc_glue.c +++ /dev/null @@ -1,339 +0,0 @@ -/****************************************************************************** - @file loc_api_rpc_glue.c - @brief Android Loc API glue code using rpcgen. - - DESCRIPTION - Loc API glue code for Android - - ----------------------------------------------------------------------------- -Copyright (c) 2009, QUALCOMM USA, INC. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -· Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -· Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -· Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ----------------------------------------------------------------------------- - ******************************************************************************/ -/*===================================================================== - EDIT HISTORY FOR MODULE - - This section contains comments describing changes made to the module. - Notice that changes are listed in reverse chronological order. - -when who what, where, why --------- --- ------------------------------------------------------- -03/05/2009 dx Initial version - -======================================================================*/ -/*===================================================================== - - INCLUDE FILES FOR MODULE - -======================================================================*/ -//#define LOG_NDDEBUG 0 - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -/* Include RPC headers */ -#include "loc_api_rpc_glue.h" - -/* Callback init */ -#include "loc_apicb_appinit.h" - -/* Logging */ -#define LOG_TAG "lib_api_rpc_glue" -#include - -/* Comment this out to enable logging */ -#undef LOGD -#define LOGD(...) {} - -/*===================================================================== - External declarations -======================================================================*/ - -CLIENT* loc_api_clnt = NULL; - -/* Callback ID and pointer */ -#define LOC_API_CB_ID 1 -loc_event_cb_f_type *loc_api_saved_cb = NULL; /* the only callback of Loc API client */ - -#define RPC_FUNC_VERSION_BASE(a,b) a ## b -#define RPC_FUNC_VERSION(a,b) RPC_FUNC_VERSION_BASE(a,b) - -#define LOC_GLUE_CHECK_INIT(ret_type) \ - if (loc_api_clnt == NULL) { return (ret_type) RPC_LOC_API_RPC_FAILURE; } - -#define LOC_GLUE_CHECK_RESULT(stat, ret_type) \ - if (stat != RPC_SUCCESS) { return (ret_type) RPC_LOC_API_RPC_FAILURE; } - -/* Callback functions */ -/* Returns 1 if successful */ -bool_t rpc_loc_event_cb_f_type_0x00040001_svc( - rpc_loc_event_cb_f_type_args *argp, - rpc_loc_event_cb_f_type_rets *ret, - struct svc_req *req) -{ - /* Callback not registered, or unexpected ID (shouldn't happen) */ - if (loc_api_saved_cb == NULL || argp->cb_id != LOC_API_CB_ID) - { - LOGD("Warning: No callback handler.\n"); - ret->loc_event_cb_f_type_result = 0; - return 1; /* simply return */ - } - - LOGD("proc: %x prog: %x vers: %x\n", - (int) req->rq_proc, - (int) req->rq_prog, - (int) req->rq_vers); - - LOGD("Callback received: %x (handle=%d ret_ptr=%d)\n", - (int) argp->loc_event, - (int) argp->loc_handle, - (int) ret); - - /* Forward callback to real callback procedure */ - rpc_loc_client_handle_type loc_handle = argp->loc_handle; - rpc_loc_event_mask_type loc_event = argp->loc_event; - const rpc_loc_event_payload_u_type* loc_event_payload = - (const rpc_loc_event_payload_u_type*) argp->loc_event_payload; - - int32 rc = loc_api_saved_cb(loc_handle, loc_event, loc_event_payload); - ret->loc_event_cb_f_type_result = rc; - - return 1; /* ok */ -} - -int loc_apicbprog_freeresult (SVCXPRT *transp, xdrproc_t xdr_result, caddr_t result) -{ - xdr_free (xdr_result, result); - - /* - * Insert additional freeing code here, if needed - */ - // LOGD("***** loc_apicbprog_freeresult\n"); - - return 1; -} - -int loc_apicbprog_0x00040001_freeresult (SVCXPRT *transp, xdrproc_t xdr_result, caddr_t result) -{ - return loc_apicbprog_freeresult (transp, xdr_result, result); -} - -/*=========================================================================== - -FUNCTION loc_api_glue_init - -DESCRIPTION - Initiates the RPC client - -RETURN VALUE - 1 for success - 0 for failure - -===========================================================================*/ -int loc_api_glue_init(void) -{ - if (loc_api_clnt == NULL) - { - /* Print msg */ - LOGD("Trying to create RPC client...\n"); - loc_api_clnt = clnt_create(NULL, LOC_APIPROG, LOC_APIVERS, NULL); - LOGD("Created loc_api_clnt ---- %x\n", (unsigned int)loc_api_clnt); - - if (loc_api_clnt == NULL) - { - fprintf(stderr, "Error: cannot create RPC client.\n"); - return 0; - } - - /* Init RPC callbacks */ - int rc = loc_apicb_app_init(); - if (rc >= 0) - { - LOGD("Loc API callback initialized.\n"); - } else { - fprintf(stderr, "Loc API callback initialization failed.\n"); - return 0; - } - } - - return 1; -} - -rpc_loc_client_handle_type loc_open ( - rpc_loc_event_mask_type event_reg_mask, - loc_event_cb_f_type *event_callback - ) -{ - LOC_GLUE_CHECK_INIT(rpc_loc_client_handle_type); - - rpc_loc_open_args args; - args.event_reg_mask = event_reg_mask; - args.event_callback = LOC_API_CB_ID; - loc_api_saved_cb = event_callback; - - rpc_loc_open_rets rets; - enum clnt_stat stat = RPC_SUCCESS; - - stat = RPC_FUNC_VERSION(rpc_loc_open_, /* LOC_APIVERS */ 0x00040001)(&args, &rets, loc_api_clnt); - LOC_GLUE_CHECK_RESULT(stat, int32); - - return (rpc_loc_client_handle_type) rets.loc_open_result; -} - -int32 loc_close(rpc_loc_client_handle_type handle) -{ - LOC_GLUE_CHECK_INIT(int32); - - rpc_loc_close_args args; - args.handle = handle; - - rpc_loc_close_rets rets; - enum clnt_stat stat = RPC_SUCCESS; - - stat = RPC_FUNC_VERSION(rpc_loc_close_, /* LOC_APIVERS */ 0x00040001)(&args, &rets, loc_api_clnt); - LOC_GLUE_CHECK_RESULT(stat, int32); - - return (int32) rets.loc_close_result; -} - -int32 loc_start_fix(rpc_loc_client_handle_type handle) -{ - LOC_GLUE_CHECK_INIT(int32); - - rpc_loc_start_fix_args args; - args.handle = handle; - - rpc_loc_start_fix_rets rets; - enum clnt_stat stat = RPC_SUCCESS; - - stat = RPC_FUNC_VERSION(rpc_loc_start_fix_, /* LOC_APIVERS */ 0x00040001)(&args, &rets, loc_api_clnt); - LOC_GLUE_CHECK_RESULT(stat, int32); - - return (int32) rets.loc_start_fix_result; -} - -int32 loc_stop_fix(rpc_loc_client_handle_type handle) -{ - LOC_GLUE_CHECK_INIT(int32); - - rpc_loc_stop_fix_args args; - args.handle = handle; - - rpc_loc_stop_fix_rets rets; - enum clnt_stat stat = RPC_SUCCESS; - - stat = RPC_FUNC_VERSION(rpc_loc_stop_fix_, /* LOC_APIVERS */ 0x00040001)(&args, &rets, loc_api_clnt); - LOC_GLUE_CHECK_RESULT(stat, int32); - - return (int32) rets.loc_stop_fix_result; -} - -int32 loc_ioctl( - rpc_loc_client_handle_type handle, - rpc_loc_ioctl_e_type ioctl_type, - rpc_loc_ioctl_data_u_type* ioctl_data - ) -{ - LOC_GLUE_CHECK_INIT(int32); - - rpc_loc_ioctl_args args; - args.handle = handle; - args.ioctl_data = ioctl_data; - args.ioctl_type = ioctl_type; - if (ioctl_data != NULL) - { - /* Assign ioctl union discriminator */ - ioctl_data->disc = ioctl_type; - - /* In case the user hasn't filled in other disc fields, - automatically fill them in here */ - switch (ioctl_type) - { - case RPC_LOC_IOCTL_GET_API_VERSION: - case RPC_LOC_IOCTL_SET_FIX_CRITERIA: - case RPC_LOC_IOCTL_GET_FIX_CRITERIA: - case RPC_LOC_IOCTL_INFORM_NI_USER_RESPONSE: - case RPC_LOC_IOCTL_INJECT_PREDICTED_ORBITS_DATA: - case RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_VALIDITY: - case RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_SOURCE: - case RPC_LOC_IOCTL_SET_PREDICTED_ORBITS_DATA_AUTO_DOWNLOAD: - case RPC_LOC_IOCTL_INJECT_UTC_TIME: - case RPC_LOC_IOCTL_INJECT_RTC_VALUE: - case RPC_LOC_IOCTL_INJECT_POSITION: - case RPC_LOC_IOCTL_QUERY_ENGINE_STATE: - case RPC_LOC_IOCTL_INFORM_SERVER_OPEN_STATUS: - case RPC_LOC_IOCTL_INFORM_SERVER_CLOSE_STATUS: - case RPC_LOC_IOCTL_SET_ENGINE_LOCK: - case RPC_LOC_IOCTL_GET_ENGINE_LOCK: - case RPC_LOC_IOCTL_SET_SBAS_CONFIG: - case RPC_LOC_IOCTL_GET_SBAS_CONFIG: - case RPC_LOC_IOCTL_SET_NMEA_TYPES: - case RPC_LOC_IOCTL_GET_NMEA_TYPES: - break; - case RPC_LOC_IOCTL_SET_CDMA_PDE_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_CDMA_MPC_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_UMTS_SLP_SERVER_ADDR: - args.ioctl_data->rpc_loc_ioctl_data_u_type_u.server_addr.addr_info.disc = - args.ioctl_data->rpc_loc_ioctl_data_u_type_u.server_addr.addr_type; - break; - case RPC_LOC_IOCTL_GET_CDMA_PDE_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_CDMA_MPC_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_UMTS_SLP_SERVER_ADDR: - break; - case RPC_LOC_IOCTL_SET_ON_DEMAND_LPM: - case RPC_LOC_IOCTL_GET_ON_DEMAND_LPM: - case RPC_LOC_IOCTL_DELETE_ASSIST_DATA: - case RPC_LOC_IOCTL_SET_CUSTOM_PDE_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_CUSTOM_PDE_SERVER_ADDR: - default: - break; - } /* switch */ - } /* ioctl_data != NULL */ - - rpc_loc_ioctl_rets rets; - enum clnt_stat stat = RPC_SUCCESS; - - stat = RPC_FUNC_VERSION(rpc_loc_ioctl_, /* LOC_APIVERS */ 0x00040001)(&args, &rets, loc_api_clnt); - LOC_GLUE_CHECK_RESULT(stat, int32); - - return (int32) rets.loc_ioctl_result; -} - -/* Returns 0 if error */ -int32 loc_api_null(void) -{ - LOC_GLUE_CHECK_INIT(int32); - - int32 rets; - enum clnt_stat stat = RPC_SUCCESS; - - stat = RPC_FUNC_VERSION(rpc_loc_api_null_, LOC_APIVERS)(NULL, &rets, loc_api_clnt); - LOC_GLUE_CHECK_RESULT(stat, int32); - - return (int32) rets; -} diff --git a/loc_api/libloc_api-rpc/gen-1240/loc_api_xdr.c b/loc_api/libloc_api-rpc/gen-1240/loc_api_xdr.c deleted file mode 100644 index 835f6b18..00000000 --- a/loc_api/libloc_api-rpc/gen-1240/loc_api_xdr.c +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#include "loc_api.h" - -bool_t -xdr_rpc_loc_api_api_versions_return_type (XDR *xdrs, rpc_loc_api_api_versions_return_type *objp) -{ - register int32_t *buf; - - if (!xdr_array (xdrs, (char **)&objp->rpc_loc_api_api_versions_return_type_val, (u_int *) &objp->rpc_loc_api_api_versions_return_type_len, ~0, - sizeof (rpc_uint32), (xdrproc_t) xdr_rpc_uint32)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_event_cb_f_type (XDR *xdrs, rpc_loc_event_cb_f_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_open_args (XDR *xdrs, rpc_loc_open_args *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_event_mask_type (xdrs, &objp->event_reg_mask)) - return FALSE; - if (!xdr_rpc_loc_event_cb_f_type (xdrs, &objp->event_callback)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_close_args (XDR *xdrs, rpc_loc_close_args *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_client_handle_type (xdrs, &objp->handle)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_start_fix_args (XDR *xdrs, rpc_loc_start_fix_args *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_client_handle_type (xdrs, &objp->handle)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_stop_fix_args (XDR *xdrs, rpc_loc_stop_fix_args *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_client_handle_type (xdrs, &objp->handle)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ioctl_args (XDR *xdrs, rpc_loc_ioctl_args *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_client_handle_type (xdrs, &objp->handle)) - return FALSE; - if (!xdr_rpc_loc_ioctl_e_type (xdrs, &objp->ioctl_type)) - return FALSE; - if (!xdr_pointer (xdrs, (char **)&objp->ioctl_data, sizeof (rpc_loc_ioctl_data_u_type), (xdrproc_t) xdr_rpc_loc_ioctl_data_u_type)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_api_api_version_s_args (XDR *xdrs, rpc_loc_api_api_version_s_args *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_boolean (xdrs, &objp->len_not_null)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_api_rpc_glue_code_info_remote_rets (XDR *xdrs, rpc_loc_api_rpc_glue_code_info_remote_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, &objp->toolvers)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->features)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->proghash)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->cbproghash)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_open_rets (XDR *xdrs, rpc_loc_open_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_client_handle_type (xdrs, &objp->loc_open_result)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_close_rets (XDR *xdrs, rpc_loc_close_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_int32 (xdrs, &objp->loc_close_result)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_start_fix_rets (XDR *xdrs, rpc_loc_start_fix_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_int32 (xdrs, &objp->loc_start_fix_result)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_stop_fix_rets (XDR *xdrs, rpc_loc_stop_fix_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_int32 (xdrs, &objp->loc_stop_fix_result)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ioctl_rets (XDR *xdrs, rpc_loc_ioctl_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_int32 (xdrs, &objp->loc_ioctl_result)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_api_api_versions_rets (XDR *xdrs, rpc_loc_api_api_versions_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_api_api_versions_return_type (xdrs, &objp->loc_api_api_versions_result)) - return FALSE; - if (!xdr_pointer (xdrs, (char **)&objp->len, sizeof (rpc_uint32), (xdrproc_t) xdr_rpc_uint32)) - return FALSE; - return TRUE; -} diff --git a/loc_api/libloc_api-rpc/gen-3200/Makefile.xdr b/loc_api/libloc_api-rpc/gen-3200/Makefile.xdr deleted file mode 100644 index 5d9cf6c8..00000000 --- a/loc_api/libloc_api-rpc/gen-3200/Makefile.xdr +++ /dev/null @@ -1,29 +0,0 @@ -CLIENTS:= loc_api -SERVERS:= loc_api_cb -COMMON:= loc_api_common -RPC_INC:= inc-$(AMSS_VERSION) - -all: $(CLIENTS) $(SERVERS) $(COMMON) fixup - -$(CLIENTS) $(SERVERS) $(COMMON):: xdr = $(@:=.xdr) - -$(CLIENTS) $(SERVERS) $(COMMON):: - rpcgen -h -M $(xdr) -o ../$(RPC_INC)/$(addsuffix .h, $@) - rpcgen -c -M $(xdr) -o $(addsuffix _xdr.c, $@) - -$(CLIENTS):: - rpcgen -l -M $(xdr) -o $(addsuffix _clnt.c, $@) - -$(SERVERS):: - rpcgen -m -M $(xdr) -o $(addsuffix _svc.c, $@) - -fixup: - mv ../$(RPC_INC)/loc_api_common.h ../$(RPC_INC)/loc_api_common.h.bak - sed ../$(RPC_INC)/loc_api_common.h.bak -e "/#include ../$(RPC_INC)/loc_api_common.h - rm -f ../$(RPC_INC)/loc_api_common.h.bak - -clean: - rm -f $(addsuffix _clnt.c, $(CLIENTS)) - rm -f $(addsuffix _svc.c, $(SERVERS)) - rm -f $(addsuffix _xdr.c, $(CLIENTS) $(SERVERS) $(COMMON)) - rm -f $(addprefix ../$(RPC_INC)/, $(addsuffix .h, $(CLIENTS) $(SERVERS) $(COMMON))) diff --git a/loc_api/libloc_api-rpc/gen-3200/loc_api.xdr b/loc_api/libloc_api-rpc/gen-3200/loc_api.xdr deleted file mode 100644 index 981266b3..00000000 --- a/loc_api/libloc_api-rpc/gen-3200/loc_api.xdr +++ /dev/null @@ -1,164 +0,0 @@ -/* LOC_API TOOL VERSION: 3.28 */ -/*============================================================================= - L O C _ A P I . X D R - -GENERAL DESCRIPTION - This is an AUTO GENERATED file that provides an xdr compatible definition of - the loc_api API. - - --------------------------------------------------------------------------- -Copyright (c) 2009, QUALCOMM USA, INC. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -· Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -· Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -· Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --------------------------------------------------------------------------- -=============================================================================*/ - -/*============================================================================= - - Edit History - - AUTO GENERATED - -Generated by following versions of Htorpc modules: -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/htorpc.pl#9 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/Start.pm#4 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/Htoxdr.pm#1 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/XDR.pm#7 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/Output.pm#26 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/Parser.pm#3 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/Metacomments.pm#2 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/SymbolTable.pm#4 - -=============================================================================*/ -/*============================================================================= -$Header$ -=============================================================================*/ - - - -typedef rpc_uint32 rpc_loc_api_api_versions_return_type<>; - -/* - * Declare an rpc_uint32 type for each callback type in the API - */ -typedef rpc_uint32 rpc_loc_event_cb_f_type; - - - -/* - * These are struct declarations for the function arguments - */ - -struct rpc_loc_open_args { - rpc_loc_event_mask_type event_reg_mask; - rpc_loc_event_cb_f_type event_callback; -}; - -struct rpc_loc_close_args { - rpc_loc_client_handle_type handle; -}; - -struct rpc_loc_start_fix_args { - rpc_loc_client_handle_type handle; -}; - -struct rpc_loc_stop_fix_args { - rpc_loc_client_handle_type handle; -}; - -struct rpc_loc_ioctl_args { - rpc_loc_client_handle_type handle; - rpc_loc_ioctl_e_type ioctl_type; - rpc_loc_ioctl_data_u_type *ioctl_data; -}; - - - -struct rpc_loc_api_api_version_s_args { - rpc_boolean len_not_null; -}; - -/* - * These are struct declarations for the function results - */ - -struct rpc_loc_api_rpc_glue_code_info_remote_rets { - rpc_uint32 toolvers; /* Tool version */ - rpc_uint32 features; /* Features turned on in the code. - * 0x00000001 ONCRPC Server Cleanup Support - */ - rpc_uint32 proghash; /* Unique hash value for the API XDR definition */ - rpc_uint32 cbproghash; /* Unique hash value for the Callbacks' XDR definition */ -}; - -struct rpc_loc_open_rets { - rpc_loc_client_handle_type loc_open_result; -}; - -struct rpc_loc_close_rets { - rpc_int32 loc_close_result; -}; - -struct rpc_loc_start_fix_rets { - rpc_int32 loc_start_fix_result; -}; - -struct rpc_loc_stop_fix_rets { - rpc_int32 loc_stop_fix_result; -}; - -struct rpc_loc_ioctl_rets { - rpc_int32 loc_ioctl_result; -}; - - struct rpc_loc_api_api_versions_rets { - rpc_loc_api_api_versions_return_type loc_api_api_versions_result; - rpc_uint32 *len; -}; - -/* - * XDR definition of the LOC_API program ( vers. 0x00010001 ) - */ - -program LOC_APIPROG { - version LOC_APIVERS_0001 { - - void - rpc_loc_api_null( void ) = 0; - - rpc_loc_api_rpc_glue_code_info_remote_rets - rpc_loc_api_rpc_glue_code_info_remote( void ) = 1; - - rpc_loc_open_rets - rpc_loc_open( rpc_loc_open_args ) = 2; - - rpc_loc_close_rets - rpc_loc_close( rpc_loc_close_args ) = 3; - - rpc_loc_start_fix_rets - rpc_loc_start_fix( rpc_loc_start_fix_args ) = 4; - - rpc_loc_stop_fix_rets - rpc_loc_stop_fix( rpc_loc_stop_fix_args ) = 5; - - rpc_loc_ioctl_rets - rpc_loc_ioctl( rpc_loc_ioctl_args ) = 6; - - rpc_loc_api_api_versions_rets - rpc_loc_api_api_versions( void ) = 0xFFFFFFFF; - - - } = 0x00010001; -} = 0x3000008c; - -const LOC_APIVERS = 0x00010001; diff --git a/loc_api/libloc_api-rpc/gen-3200/loc_api_cb.xdr b/loc_api/libloc_api-rpc/gen-3200/loc_api_cb.xdr deleted file mode 100644 index 3f53504b..00000000 --- a/loc_api/libloc_api-rpc/gen-3200/loc_api_cb.xdr +++ /dev/null @@ -1,90 +0,0 @@ -/* LOC_API TOOL VERSION: 3.28 */ -/*============================================================================= - L O C _ A P I _ C B . X D R - -GENERAL DESCRIPTION - This is an AUTO GENERATED file that provides an xdr compatible definition of - an api that represents the grouping of the different callback functions the - loc_api API supports. - - --------------------------------------------------------------------------- -Copyright (c) 2009, QUALCOMM USA, INC. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -· Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -· Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -· Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --------------------------------------------------------------------------- -=============================================================================*/ - -/*============================================================================= - - Edit History - - AUTO GENERATED - -Generated by following versions of Htorpc modules: -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/htorpc.pl#9 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/Start.pm#4 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/Htoxdr.pm#1 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/XDR.pm#7 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/Output.pm#26 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/Parser.pm#3 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/Metacomments.pm#2 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/SymbolTable.pm#4 - -=============================================================================*/ -/*============================================================================= -$Header$ -=============================================================================*/ - - - - -/* - * These are struct declarations for the function arguments - */ - -struct rpc_loc_event_cb_f_type_args { - rpc_uint32 cb_id; - rpc_loc_client_handle_type loc_handle; - rpc_loc_event_mask_type loc_event; - rpc_loc_event_payload_u_type *loc_event_payload; -}; - - - - - -/* - * These are struct declaratios for the function results - */ - -struct rpc_loc_event_cb_f_type_rets { - rpc_int32 loc_event_cb_f_type_result; -}; - - - -/* - * XDR definition of the LOC_API callback program ( vers. 0x00010001 ) - */ - -program LOC_APICBPROG { - version LOC_APICBVERS_0001 { - - rpc_loc_event_cb_f_type_rets - rpc_loc_event_cb_f_type( rpc_loc_event_cb_f_type_args ) = 1; - - - } = 0x00010001; -} = 0x3100008c; - -const LOC_APICBVERS = 0x00010001; diff --git a/loc_api/libloc_api-rpc/gen-3200/loc_api_cb_svc.c b/loc_api/libloc_api-rpc/gen-3200/loc_api_cb_svc.c deleted file mode 100644 index b1aa1998..00000000 --- a/loc_api/libloc_api-rpc/gen-3200/loc_api_cb_svc.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#include "loc_api_cb.h" -#include -#include -#include -#include -#include -#include -#include - -#ifndef SIG_PF -#define SIG_PF void(*)(int) -#endif - -void -loc_apicbprog_0x00010001(struct svc_req *rqstp, register SVCXPRT *transp) -{ - union { - rpc_loc_event_cb_f_type_args rpc_loc_event_cb_f_type_0x00010001_arg; - } argument; - union { - rpc_loc_event_cb_f_type_rets rpc_loc_event_cb_f_type_0x00010001_res; - } result; - bool_t retval; - xdrproc_t _xdr_argument, _xdr_result; - bool_t (*local)(char *, void *, struct svc_req *); - - switch (rqstp->rq_proc) { - case NULLPROC: - (void) svc_sendreply (transp, (xdrproc_t) xdr_void, (char *)NULL); - return; - - case rpc_loc_event_cb_f_type: - _xdr_argument = (xdrproc_t) xdr_rpc_loc_event_cb_f_type_args; - _xdr_result = (xdrproc_t) xdr_rpc_loc_event_cb_f_type_rets; - local = (bool_t (*) (char *, void *, struct svc_req *))rpc_loc_event_cb_f_type_0x00010001_svc; - break; - - default: - svcerr_noproc (transp); - return; - } - memset ((char *)&argument, 0, sizeof (argument)); - if (!svc_getargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) { - svcerr_decode (transp); - return; - } - retval = (bool_t) (*local)((char *)&argument, (void *)&result, rqstp); - if (retval > 0 && !svc_sendreply(transp, (xdrproc_t) _xdr_result, (char *)&result)) { - svcerr_systemerr (transp); - } - if (!svc_freeargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) { - fprintf (stderr, "%s", "unable to free arguments"); - exit (1); - } - if (!loc_apicbprog_0x00010001_freeresult (transp, _xdr_result, (caddr_t) &result)) - fprintf (stderr, "%s", "unable to free results"); - - return; -} diff --git a/loc_api/libloc_api-rpc/gen-3200/loc_api_cb_xdr.c b/loc_api/libloc_api-rpc/gen-3200/loc_api_cb_xdr.c deleted file mode 100644 index 1d7795ed..00000000 --- a/loc_api/libloc_api-rpc/gen-3200/loc_api_cb_xdr.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#include "loc_api_cb.h" - -bool_t -xdr_rpc_loc_event_cb_f_type_args (XDR *xdrs, rpc_loc_event_cb_f_type_args *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, &objp->cb_id)) - return FALSE; - if (!xdr_rpc_loc_client_handle_type (xdrs, &objp->loc_handle)) - return FALSE; - if (!xdr_rpc_loc_event_mask_type (xdrs, &objp->loc_event)) - return FALSE; - if (!xdr_pointer (xdrs, (char **)&objp->loc_event_payload, sizeof (rpc_loc_event_payload_u_type), (xdrproc_t) xdr_rpc_loc_event_payload_u_type)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_event_cb_f_type_rets (XDR *xdrs, rpc_loc_event_cb_f_type_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_int32 (xdrs, &objp->loc_event_cb_f_type_result)) - return FALSE; - return TRUE; -} diff --git a/loc_api/libloc_api-rpc/gen-3200/loc_api_clnt.c b/loc_api/libloc_api-rpc/gen-3200/loc_api_clnt.c deleted file mode 100644 index 79814d42..00000000 --- a/loc_api/libloc_api-rpc/gen-3200/loc_api_clnt.c +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#include /* for memset */ -#include "loc_api.h" - -/* Default timeout can be changed using clnt_control() */ -static struct timeval TIMEOUT = { 25, 0 }; - -enum clnt_stat -rpc_loc_api_null_0x00010001(void *argp, void *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_api_null, - (xdrproc_t) xdr_void, (caddr_t) argp, - (xdrproc_t) xdr_void, (caddr_t) clnt_res, - TIMEOUT)); -} - -enum clnt_stat -rpc_loc_api_rpc_glue_code_info_remote_0x00010001(void *argp, rpc_loc_api_rpc_glue_code_info_remote_rets *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_api_rpc_glue_code_info_remote, - (xdrproc_t) xdr_void, (caddr_t) argp, - (xdrproc_t) xdr_rpc_loc_api_rpc_glue_code_info_remote_rets, (caddr_t) clnt_res, - TIMEOUT)); -} - -enum clnt_stat -rpc_loc_open_0x00010001(rpc_loc_open_args *argp, rpc_loc_open_rets *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_open, - (xdrproc_t) xdr_rpc_loc_open_args, (caddr_t) argp, - (xdrproc_t) xdr_rpc_loc_open_rets, (caddr_t) clnt_res, - TIMEOUT)); -} - -enum clnt_stat -rpc_loc_close_0x00010001(rpc_loc_close_args *argp, rpc_loc_close_rets *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_close, - (xdrproc_t) xdr_rpc_loc_close_args, (caddr_t) argp, - (xdrproc_t) xdr_rpc_loc_close_rets, (caddr_t) clnt_res, - TIMEOUT)); -} - -enum clnt_stat -rpc_loc_start_fix_0x00010001(rpc_loc_start_fix_args *argp, rpc_loc_start_fix_rets *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_start_fix, - (xdrproc_t) xdr_rpc_loc_start_fix_args, (caddr_t) argp, - (xdrproc_t) xdr_rpc_loc_start_fix_rets, (caddr_t) clnt_res, - TIMEOUT)); -} - -enum clnt_stat -rpc_loc_stop_fix_0x00010001(rpc_loc_stop_fix_args *argp, rpc_loc_stop_fix_rets *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_stop_fix, - (xdrproc_t) xdr_rpc_loc_stop_fix_args, (caddr_t) argp, - (xdrproc_t) xdr_rpc_loc_stop_fix_rets, (caddr_t) clnt_res, - TIMEOUT)); -} - -enum clnt_stat -rpc_loc_ioctl_0x00010001(rpc_loc_ioctl_args *argp, rpc_loc_ioctl_rets *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_ioctl, - (xdrproc_t) xdr_rpc_loc_ioctl_args, (caddr_t) argp, - (xdrproc_t) xdr_rpc_loc_ioctl_rets, (caddr_t) clnt_res, - TIMEOUT)); -} - -enum clnt_stat -rpc_loc_api_api_versions_0x00010001(void *argp, rpc_loc_api_api_versions_rets *clnt_res, CLIENT *clnt) -{ - return (clnt_call(clnt, rpc_loc_api_api_versions, - (xdrproc_t) xdr_void, (caddr_t) argp, - (xdrproc_t) xdr_rpc_loc_api_api_versions_rets, (caddr_t) clnt_res, - TIMEOUT)); -} diff --git a/loc_api/libloc_api-rpc/gen-3200/loc_api_common.xdr b/loc_api/libloc_api-rpc/gen-3200/loc_api_common.xdr deleted file mode 100644 index 7ef6357c..00000000 --- a/loc_api/libloc_api-rpc/gen-3200/loc_api_common.xdr +++ /dev/null @@ -1,803 +0,0 @@ -/* LOC_API TOOL VERSION: 3.28 */ -/*============================================================================= - L O C _ A P I _ C O M M O N . X D R - -GENERAL DESCRIPTION - This is an AUTO GENERATED file that provides an xdr compatible definition of - an api that represents the grouping of the different callback functions the - loc_api API supports. - - --------------------------------------------------------------------------- -Copyright (c) 2009, QUALCOMM USA, INC. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -· Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -· Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -· Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --------------------------------------------------------------------------- -=============================================================================*/ - -/*============================================================================= - - Edit History - - AUTO GENERATED - -Generated by following versions of Htorpc modules: -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/htorpc.pl#9 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/Start.pm#4 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/Htoxdr.pm#1 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/XDR.pm#7 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/Output.pm#26 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/Parser.pm#3 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/Metacomments.pm#2 -Id: //source/qcom/qct/core/mproc/tools/rel/03.01/htorpc/lib/Htorpc/SymbolTable.pm#4 - -=============================================================================*/ -/*============================================================================= -$Header$ -=============================================================================*/ - - - - -const RPC_LOC_EVENT_NI_NOTIFY_VERIFY_REQUEST = 0x00000010; - -const RPC_LOC_EVENT_IOCTL_REPORT = 0x00000080; - -const RPC_LOC_EVENT_LOCATION_SERVER_REQUEST = 0x00000040; - -const RPC_LOC_EVENT_RESERVED = 0x8000000000000000; - -const RPC_LOC_EVENT_PARSED_POSITION_REPORT = 0x00000001; - -const RPC_LOC_EVENT_ASSISTANCE_DATA_REQUEST = 0x00000020; - -const RPC_LOC_EVENT_NMEA_POSITION_REPORT = 0x00000008; - -const RPC_LOC_EVENT_SATELLITE_REPORT = 0x00000002; - -const RPC_LOC_EVENT_STATUS_REPORT = 0x00000100; - -const RPC_LOC_OPEN_VERSION = 0x00010001; -const RPC_LOC_CLOSE_VERSION = 0x00010001; -const RPC_LOC_START_FIX_VERSION = 0x00010001; -const RPC_LOC_STOP_FIX_VERSION = 0x00010001; -const RPC_LOC_IOCTL_VERSION = 0x00010001; -const RPC_LOC_EVENT_CB_F_TYPE_VERSION = 0x00010001; -const RPC_LOC_APIAPI_VERSION_IS_HASHKEY = 0; -const RPC_LOC_API_API_MAJOR_NUM = 0x0001; -typedef bool rpc_boolean; -typedef unsigned long rpc_uint32; - -typedef unsigned short rpc_uint16; - -typedef unsigned char rpc_uint8; - -typedef long rpc_int32; - -typedef unsigned char rpc_byte; - -typedef unsigned hyper rpc_uint64; - -typedef rpc_int32 rpc_loc_client_handle_type; - -typedef rpc_uint64 rpc_loc_event_mask_type; - -typedef rpc_uint64 rpc_loc_position_valid_mask_type; - -typedef rpc_uint32 rpc_loc_pos_technology_mask_type; - -enum rpc_loc_session_status_e_type { - RPC_LOC_SESS_STATUS_SUCCESS = 0, - RPC_LOC_SESS_STATUS_IN_PROGESS = 1, - RPC_LOC_SESS_STATUS_GENERAL_FAILURE = 2, - RPC_LOC_SESS_STATUS_TIMEOUT = 3, - RPC_LOC_SESS_STATUS_USER_END = 4, - RPC_LOC_SESS_STATUS_BAD_PARAMETER = 5, - RPC_LOC_SESS_STATUS_PHONE_OFFLINE = 6, - RPC_LOC_SESS_STATUS_ENGINE_LOCKED = 7, - RPC_LOC_SESS_STATUS_MAX = 268435456 -}; - -struct rpc_loc_calendar_time_s_type { - rpc_uint16 year; - unsigned char month; - unsigned char day_of_week; - unsigned char day; - unsigned char hour; - unsigned char minute; - unsigned char second; - rpc_uint16 millisecond; -}; - -struct rpc_loc_parsed_position_s_type { - rpc_loc_position_valid_mask_type valid_mask; - rpc_loc_session_status_e_type session_status; - rpc_loc_calendar_time_s_type timestamp_calendar; - rpc_uint64 timestamp_utc; - rpc_uint8 leap_seconds; - float time_unc; - double latitude; - double longitude; - float altitude_wrt_ellipsoid; - float altitude_wrt_mean_sea_level; - float speed_horizontal; - float speed_vertical; - float heading; - float hor_unc_circular; - float hor_unc_ellipse_semi_major; - float hor_unc_ellipse_semi_minor; - float hor_unc_ellipse_orient_azimuth; - float vert_unc; - float speed_unc; - float heading_unc; - unsigned char confidence_horizontal; - unsigned char confidence_vertical; - float magnetic_deviation; - rpc_loc_pos_technology_mask_type technology_mask; -}; - -enum rpc_loc_sv_system_e_type { - RPC_LOC_SV_SYSTEM_GPS = 1, - RPC_LOC_SV_SYSTEM_GALILEO = 2, - RPC_LOC_SV_SYSTEM_SBAS = 3, - RPC_LOC_SV_SYSTEM_COMPASS = 4, - RPC_LOC_SV_SYSTEM_GLONASS = 5, - RPC_LOC_SV_SYSTEM_MAX = 268435456 -}; - -enum rpc_loc_sv_status_e_type { - RPC_LOC_SV_STATUS_IDLE = 1, - RPC_LOC_SV_STATUS_SEARCH = 2, - RPC_LOC_SV_STATUS_TRACK = 3, - RPC_LOC_SV_STATUS_MAX = 268435456 -}; - -typedef rpc_uint32 rpc_loc_sv_info_valid_mask_type; - -struct rpc_loc_sv_info_s_type { - rpc_loc_sv_info_valid_mask_type valid_mask; - rpc_loc_sv_system_e_type system; - rpc_uint8 prn; - rpc_uint8 health_status; - rpc_loc_sv_status_e_type process_status; - rpc_boolean has_eph; - rpc_boolean has_alm; - float elevation; - float azimuth; - float snr; -}; - -typedef rpc_uint32 rpc_loc_gnss_info_valid_mask_type; - -struct rpc_loc_gnss_info_s_type { - rpc_loc_gnss_info_valid_mask_type valid_mask; - float position_dop; - float horizontal_dop; - float vertical_dop; - rpc_boolean altitude_assumed; - rpc_uint16 sv_count; - rpc_loc_sv_info_s_type sv_list; -}; - -struct rpc_loc_nmea_report_s_type { - rpc_uint16 length; - opaque nmea_sentences; -}; - -enum rpc_loc_status_event_e_type { - RPC_LOC_STATUS_EVENT_ENGINE_STATE = 1, - RPC_LOC_STATUS_EVENT_MAX = 268435456 -}; - -enum rpc_loc_engine_state_e_type { - RPC_LOC_ENGINE_STATE_ON = 1, - RPC_LOC_ENGINE_STATE_OFF = 2, - RPC_LOC_ENGINE_STATE_MAX = 268435456 -}; - -union rpc_loc_status_event_payload_u_type switch (rpc_loc_status_event_e_type disc) { - case RPC_LOC_STATUS_EVENT_ENGINE_STATE: - rpc_loc_engine_state_e_type engine_state; - default: - void; -}; - -struct rpc_loc_status_event_s_type { - rpc_loc_status_event_e_type event; - rpc_loc_status_event_payload_u_type payload; -}; - -enum rpc_loc_server_addr_e_type { - RPC_LOC_SERVER_ADDR_IPV4 = 1, - RPC_LOC_SERVER_ADDR_URL = 2, - RPC_LOC_SERVER_ADDR_MAX = 268435456 -}; - -struct rpc_loc_server_addr_ipv4_type { - rpc_uint32 addr; - rpc_uint16 port; -}; - -struct rpc_loc_server_addr_url_type { - rpc_uint16 length; - opaque addr; -}; - -union rpc_loc_server_addr_u_type switch (rpc_loc_server_addr_e_type disc) { - case RPC_LOC_SERVER_ADDR_IPV4: - rpc_loc_server_addr_ipv4_type ipv4; - case RPC_LOC_SERVER_ADDR_URL: - rpc_loc_server_addr_url_type url; - default: - void; -}; - -struct rpc_loc_server_info_s_type { - rpc_loc_server_addr_e_type addr_type; - rpc_loc_server_addr_u_type addr_info; -}; - -enum rpc_loc_ni_notify_verify_e_type { - RPC_LOC_NI_USER_NO_NOTIFY_NO_VERIFY = 1, - RPC_LOC_NI_USER_NOTIFY_ONLY = 2, - RPC_LOC_NI_USER_NOTIFY_VERIFY_ALLOW_NO_RESP = 3, - RPC_LOC_NI_USER_NOTIFY_VERIFY_NOT_ALLOW_NO_RESP = 4, - RPC_LOC_NI_USER_PRIVACY_OVERRIDE = 5, - RPC_LOC_NI_USER_NOTIFY_VERITY_TYPE_MAX = 268435456 -}; - -enum rpc_loc_ni_event_e_type { - RPC_LOC_NI_EVENT_VX_NOTIFY_VERIFY_REQ = 1, - RPC_LOC_NI_EVENT_SUPL_NOTIFY_VERIFY_REQ = 2, - RPC_LOC_NI_EVENT_UMTS_CP_NOTIFY_VERIFY_REQ = 3, - RPC_LOC_NI_EVENT_MAX = 268435456 -}; - -enum rpc_loc_ni_datacoding_scheme_e_type { - RPC_LOC_NI_PRESUPL_ISO646IRV = 0, - RPC_LOC_NI_PRESUPL_ISO8859 = 1, - RPC_LOC_NI_PRESUPL_UTF8 = 2, - RPC_LOC_NI_PRESUPL_UTF16 = 3, - RPC_LOC_NI_PRESUPL_UCS2 = 4, - RPC_LOC_NI_PRESUPL_GSM_DEFAULT = 5, - RPC_LOC_NI_PRESUPL_SHIFT_JIS = 6, - RPC_LOC_NI_PRESUPL_JIS = 7, - RPC_LOC_NI_PRESUPL_EUC = 8, - RPC_LOC_NI_PRESUPL_GB2312 = 9, - RPC_LOC_NI_PRESUPL_CNS11643 = 10, - RPC_LOC_NI_PRESUPL_KSC1001 = 11, - RPC_LOC_NI_PRESUPL_ENCODING_UNKNOWN = 2147483647, - RPC_LOC_NI_SS_GERMAN = 12, - RPC_LOC_NI_SS_ENGLISH = 13, - RPC_LOC_NI_SS_ITALIAN = 14, - RPC_LOC_NI_SS_FRENCH = 15, - RPC_LOC_NI_SS_SPANISH = 16, - RPC_LOC_NI_SS_DUTCH = 17, - RPC_LOC_NI_SS_SWEDISH = 18, - RPC_LOC_NI_SS_DANISH = 19, - RPC_LOC_NI_SS_PORTUGUESE = 20, - RPC_LOC_NI_SS_FINNISH = 21, - RPC_LOC_NI_SS_NORWEGIAN = 22, - RPC_LOC_NI_SS_GREEK = 23, - RPC_LOC_NI_SS_TURKISH = 24, - RPC_LOC_NI_SS_HUNGARIAN = 25, - RPC_LOC_NI_SS_POLISH = 26, - RPC_LOC_NI_SS_LANGUAGE_UNSPEC = 27, - RPC_LOC_NI_SUPL_UTF8 = 28, - RPC_LOC_NI_SUPL_UCS2 = 29, - RPC_LOC_NI_SUPL_GSM_DEFAULT = 30, - RPC_LOC_NI_SUPL_ENCODING_UNKNOWN = 2147483647 -}; - -enum rpc_loc_ni_vx_requester_id_encoding_scheme_e_type { - RPC_LOC_NI_VX_OCTET = 0, - RPC_LOC_NI_VX_EXN_PROTOCOL_MSG = 1, - RPC_LOC_NI_VX_ASCII = 2, - RPC_LOC_NI_VX_IA5 = 3, - RPC_LOC_NI_VX_UNICODE = 4, - RPC_LOC_NI_VX_SHIFT_JIS = 5, - RPC_LOC_NI_VX_KOREAN = 6, - RPC_LOC_NI_VX_LATIN_HEBREW = 7, - RPC_LOC_NI_VX_LATIN = 8, - RPC_LOC_NI_VX_GSM = 9, - RPC_LOC_NI_VX_ENCODING_TYPE_MAX = 268435456 -}; - -enum rpc_loc_ni_vx_pos_mode_e_type { - RPC_LOC_VX_MS_ASSISTED_ONLY = 1, - RPC_LOC_VX_MS_BASED_ONLY = 2, - RPC_LOC_VX_MS_ASSISTED_PREF_MSBASED_ALLWD = 3, - RPC_LOC_VX_MS_BASED_PREF_ASSISTED_ALLWD = 4, - RPC_LOC_VX_POS_MODE_MAX = 268435456 -}; - -struct rpc_loc_ni_vx_requester_id_s_type { - unsigned char requester_id_length; - opaque requester_id[200]; -}; - -struct rpc_loc_ni_vx_notify_verify_req_s_type { - rpc_loc_ni_notify_verify_e_type notification_priv_type; - unsigned char pos_qos_incl; - unsigned char pos_qos; - rpc_uint32 num_fixes; - rpc_uint32 tbf; - rpc_loc_ni_vx_pos_mode_e_type pos_mode; - rpc_loc_ni_vx_requester_id_encoding_scheme_e_type encoding_scheme; - rpc_loc_ni_vx_requester_id_s_type requester_id; - rpc_uint16 user_resp_timer_val; -}; - -enum rpc_loc_ni_supl_pos_method_e_type { - RPC_LOC_NI_POSMETHOD_AGPS_SETASSISTED = 1, - RPC_LOC_NI_POSMETHOD_AGPS_SETBASED = 2, - RPC_LOC_NI_POSMETHOD_AGPS_SETASSISTED_PREF = 3, - RPC_LOC_NI_POSMETHOD_AGPS_SETBASED_PREF = 4, - RPC_LOC_NI_POSMETHOD_AUTONOMOUS_GPS = 5, - RPC_LOC_NI_POSMETHOD_AFLT = 6, - RPC_LOC_NI_POSMETHOD_ECID = 7, - RPC_LOC_NI_POSMETHOD_EOTD = 8, - RPC_LOC_NI_POSMETHOD_OTDOA = 9, - RPC_LOC_NI_POSMETHOD_NO_POSITION = 10, - RPC_LOC_NI_POSMETHOD_MAX = 268435456 -}; - -struct rpc_loc_ni_supl_slp_session_id_s_type { - unsigned char presence; - opaque session_id[4]; - rpc_loc_server_info_s_type slp_address; -}; - -struct rpc_loc_ni_requestor_id_s_type { - unsigned char data_coding_scheme; - opaque requestor_id_string; - unsigned char string_len; -}; - -struct rpc_loc_ni_supl_client_name_s_type { - unsigned char data_coding_scheme; - opaque client_name_string; - unsigned char string_len; -}; - -struct rpc_loc_ni_supl_qop_s_type { - unsigned char bit_mask; - unsigned char horacc; - unsigned char veracc; - unsigned char maxLocAge; - unsigned char delay; -}; - -struct rpc_loc_ni_supl_notify_verify_req_s_type { - rpc_loc_ni_notify_verify_e_type notification_priv_type; - rpc_uint16 flags; - rpc_loc_ni_supl_slp_session_id_s_type supl_slp_session_id; - opaque supl_hash[8]; - rpc_loc_ni_datacoding_scheme_e_type datacoding_scheme; - rpc_loc_ni_supl_pos_method_e_type pos_method; - rpc_loc_ni_requestor_id_s_type requestor_id; - rpc_loc_ni_supl_client_name_s_type client_name; - rpc_loc_ni_supl_qop_s_type supl_qop; - rpc_uint16 user_response_timer; -}; - -struct rpc_loc_ni_ext_client_address_s_type { - unsigned char ext_client_address_len; - opaque ext_client_address; -}; - -enum rpc_loc_ni_location_type_e_type { - RPC_LOC_NI_LOCATIONTYPE_CURRENT_LOCATION = 1, - RPC_LOC_NI_LOCATIONTYPE_CURRENT_OR_LAST_KNOWN_LOCATION = 2, - RPC_LOC_NI_LOCATIONTYPE_INITIAL_LOCATION = 3, - RPC_LOC_NI_LOCATIONTYPE_MAX = 268435456 -}; - -struct rpc_loc_ni_deferred_location_s_type { - unsigned char unused_bits; - unsigned char ms_available; -}; - -struct rpc_loc_ni_codeword_string_s_type { - unsigned char data_coding_scheme; - opaque lcs_codeword_string; - unsigned char string_len; -}; - -struct rpc_loc_ni_service_type_id_s_type { - unsigned char lcs_service_type_id; -}; - -struct rpc_loc_ni_umts_cp_notify_verify_req_s_type { - rpc_loc_ni_notify_verify_e_type notification_priv_type; - unsigned char invoke_id; - rpc_uint16 flags; - unsigned char notification_length; - opaque notification_text; - rpc_loc_ni_datacoding_scheme_e_type datacoding_scheme; - rpc_loc_ni_ext_client_address_s_type ext_client_address_data; - rpc_loc_ni_location_type_e_type location_type; - rpc_loc_ni_deferred_location_s_type deferred_location; - rpc_loc_ni_requestor_id_s_type requestor_id; - rpc_loc_ni_codeword_string_s_type codeword_string; - rpc_loc_ni_service_type_id_s_type service_type_id; - rpc_uint16 user_response_timer; -}; - -union rpc_loc_ni_event_payload_u_type switch (rpc_loc_ni_event_e_type disc) { - case RPC_LOC_NI_EVENT_VX_NOTIFY_VERIFY_REQ: - rpc_loc_ni_vx_notify_verify_req_s_type vx_req; - case RPC_LOC_NI_EVENT_SUPL_NOTIFY_VERIFY_REQ: - rpc_loc_ni_supl_notify_verify_req_s_type supl_req; - case RPC_LOC_NI_EVENT_UMTS_CP_NOTIFY_VERIFY_REQ: - rpc_loc_ni_umts_cp_notify_verify_req_s_type umts_cp_req; - default: - void; -}; - -struct rpc_loc_ni_event_s_type { - rpc_loc_ni_event_e_type event; - rpc_loc_ni_event_payload_u_type payload; -}; - -enum rpc_loc_assist_data_request_e_type { - RPC_LOC_ASSIST_DATA_TIME_REQ = 1, - RPC_LOC_ASSIST_DATA_PREDICTED_ORBITS_REQ = 2, - RPC_LOC_ASSIST_DATA_MAX = 268435456 -}; - -typedef string rpc_struct_loc_time_download_source_s_type_servers_ptr; - -typedef rpc_struct_loc_time_download_source_s_type_servers_ptr rpc_struct_loc_time_download_source_s_type_servers[3]; - -struct rpc_loc_time_download_source_s_type { - rpc_uint32 delay_threshold; - rpc_struct_loc_time_download_source_s_type_servers servers; -}; - -typedef string rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr; - -typedef rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr rpc_struct_loc_predicted_orbits_data_source_s_type_servers[3]; - -struct rpc_loc_predicted_orbits_data_source_s_type { - rpc_uint32 max_file_size; - rpc_uint32 max_part_size; - rpc_struct_loc_predicted_orbits_data_source_s_type_servers servers; -}; - -union rpc_loc_assist_data_request_payload_u_type switch (rpc_loc_assist_data_request_e_type disc) { - case RPC_LOC_ASSIST_DATA_TIME_REQ: - rpc_loc_time_download_source_s_type time_download; - case RPC_LOC_ASSIST_DATA_PREDICTED_ORBITS_REQ: - rpc_loc_predicted_orbits_data_source_s_type data_download; - default: - void; -}; - -struct rpc_loc_assist_data_request_s_type { - rpc_loc_assist_data_request_e_type event; - rpc_loc_assist_data_request_payload_u_type payload; -}; - -typedef rpc_uint32 rpc_loc_server_connection_handle; - -enum rpc_loc_server_protocol_e_type { - RPC_LOC_SERVER_PROTOCOL_DEFAULT = 0, - RPC_LOC_SERVER_PROTOCOL_SUPL = 1, - RPC_LOC_SERVER_PROTOCOL_VX_MPC = 2, - RPC_LOC_SERVER_PROTOCOL_VX_PDE = 3, - RPC_LOC_SERVER_PROTOCOL_MAX = 16777216 -}; - -enum rpc_loc_server_request_e_type { - RPC_LOC_SERVER_REQUEST_OPEN = 1, - RPC_LOC_SERVER_REQUEST_CLOSE = 2, - RPC_LOC_SERVER_REQUEST_MAX = 268435456 -}; - -struct rpc_loc_server_open_req_s_type { - rpc_loc_server_connection_handle conn_handle; - rpc_loc_server_protocol_e_type protocol; -}; - -struct rpc_loc_server_close_req_s_type { - rpc_loc_server_connection_handle conn_handle; -}; - -union rpc_loc_server_request_u_type switch (rpc_loc_server_request_e_type disc) { - case RPC_LOC_SERVER_REQUEST_OPEN: - rpc_loc_server_open_req_s_type open_req; - case RPC_LOC_SERVER_REQUEST_CLOSE: - rpc_loc_server_close_req_s_type close_req; - default: - void; -}; - -struct rpc_loc_server_request_s_type { - rpc_loc_server_request_e_type event; - rpc_loc_server_request_u_type payload; -}; - -struct rpc_loc_reserved_payload_s_type { - rpc_uint16 data_size; - opaque data<>; -}; - -enum rpc_loc_ioctl_e_type { - RPC_LOC_IOCTL_GET_API_VERSION = 1, - RPC_LOC_IOCTL_SET_FIX_CRITERIA = 2, - RPC_LOC_IOCTL_GET_FIX_CRITERIA = 3, - RPC_LOC_IOCTL_SERVICE_START_INDEX = 400, - RPC_LOC_IOCTL_INFORM_NI_USER_RESPONSE = 400, - RPC_LOC_IOCTL_INJECT_PREDICTED_ORBITS_DATA = 401, - RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_VALIDITY = 402, - RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_SOURCE = 403, - RPC_LOC_IOCTL_SET_PREDICTED_ORBITS_DATA_AUTO_DOWNLOAD = 404, - RPC_LOC_IOCTL_INJECT_UTC_TIME = 405, - RPC_LOC_IOCTL_INJECT_RTC_VALUE = 406, - RPC_LOC_IOCTL_INJECT_POSITION = 407, - RPC_LOC_IOCTL_QUERY_ENGINE_STATE = 408, - RPC_LOC_IOCTL_INFORM_SERVER_OPEN_STATUS = 409, - RPC_LOC_IOCTL_INFORM_SERVER_CLOSE_STATUS = 410, - RPC_LOC_IOCTL_NV_SETTINGS_START_INDEX = 800, - RPC_LOC_IOCTL_SET_ENGINE_LOCK = 800, - RPC_LOC_IOCTL_GET_ENGINE_LOCK = 801, - RPC_LOC_IOCTL_SET_SBAS_CONFIG = 802, - RPC_LOC_IOCTL_GET_SBAS_CONFIG = 803, - RPC_LOC_IOCTL_SET_NMEA_TYPES = 804, - RPC_LOC_IOCTL_GET_NMEA_TYPES = 805, - RPC_LOC_IOCTL_SET_CDMA_PDE_SERVER_ADDR = 806, - RPC_LOC_IOCTL_GET_CDMA_PDE_SERVER_ADDR = 807, - RPC_LOC_IOCTL_SET_CDMA_MPC_SERVER_ADDR = 808, - RPC_LOC_IOCTL_GET_CDMA_MPC_SERVER_ADDR = 809, - RPC_LOC_IOCTL_SET_UMTS_SLP_SERVER_ADDR = 810, - RPC_LOC_IOCTL_GET_UMTS_SLP_SERVER_ADDR = 811, - RPC_LOC_IOCTL_SET_ON_DEMAND_LPM = 812, - RPC_LOC_IOCTL_GET_ON_DEMAND_LPM = 813, - RPC_LOC_IOCTL_PROPRIETARY_START_INDEX = 1000, - RPC_LOC_IOCTL_DELETE_ASSIST_DATA = 1000, - RPC_LOC_IOCTL_SET_CUSTOM_PDE_SERVER_ADDR = 1001, - RPC_LOC_IOCTL_GET_CUSTOM_PDE_SERVER_ADDR = 1002, - RPC_LOC_IOCTL_THIRD_PARTY_START_INDEX = 1073741824 -}; - -struct rpc_loc_api_version_s_type { - unsigned char major; - unsigned char minor; -}; - -enum rpc_loc_fix_recurrence_e_type { - RPC_LOC_PERIODIC_FIX = 1, - RPC_LOC_SINGLE_FIX = 2, - RPC_LOC_FIX_SESSION_TYPE_MAX = 268435456 -}; - -enum rpc_loc_operation_mode_e_type { - RPC_LOC_OPER_MODE_DEFAULT = 1, - RPC_LOC_OPER_MODE_MSB = 2, - RPC_LOC_OPER_MODE_MSA = 3, - RPC_LOC_OPER_MODE_STANDALONE = 4, - RPC_LOC_OPER_MODE_SPEED_OPTIMAL = 5, - RPC_LOC_OPER_MODE_ACCURACY_OPTIMAL = 6, - RPC_LOC_OPER_MODE_DATA_OPTIMAL = 7, - RPC_LOC_OPER_MODE_MAX = 268435456 -}; - -enum rpc_loc_notify_e_type { - RPC_LOC_NOTIFY_ON_INTERVAL = 1, - RPC_LOC_NOTIFY_ON_DISTANCE = 2, - RPC_LOC_NOTIFY_ON_ANY = 3, - RPC_LOC_NOTIFY_ON_ALL = 4, - RPC_LOC_NOTIFY_TYPE_MAX = 268435456 -}; - -struct rpc_loc_fix_criteria_s_type { - rpc_uint32 valid_mask; - rpc_loc_fix_recurrence_e_type recurrence_type; - rpc_loc_operation_mode_e_type preferred_operation_mode; - rpc_uint32 preferred_accuracy; - rpc_uint32 preferred_response_time; - rpc_boolean intermediate_pos_report_enabled; - rpc_loc_notify_e_type notify_type; - rpc_uint32 min_interval; - float min_distance; - rpc_uint32 min_dist_sample_interval; -}; - -enum rpc_loc_ni_user_resp_e_type { - RPC_LOC_NI_LCS_NOTIFY_VERIFY_ACCEPT = 1, - RPC_LOC_NI_LCS_NOTIFY_VERIFY_DENY = 2, - RPC_LOC_NI_LCS_NOTIFY_VERIFY_NORESP = 3, - RPC_LOC_NI_LCS_NOTIFY_VERIFY_MAX = 268435456 -}; - -struct rpc_loc_user_verify_s_type { - rpc_loc_ni_user_resp_e_type user_resp; - rpc_loc_ni_event_s_type ni_event_pass_back; -}; - -enum rpc_loc_predicted_orbits_data_format_e_type { - RPC_LOC_PREDICTED_ORBITS_XTRA = 0, - RPC_LOC_PREDICTED_ORBITS_FORMAT_MAX = 268435456 -}; - -struct rpc_loc_predicted_orbits_data_s_type { - rpc_loc_predicted_orbits_data_format_e_type format_type; - rpc_uint32 total_size; - rpc_uint8 total_parts; - rpc_uint8 part; - rpc_uint16 part_len; - opaque data_ptr<>; -}; - -struct rpc_loc_predicted_orbits_data_validity_report_s_type { - rpc_uint64 start_time_utc; - rpc_uint16 valid_duration_hrs; -}; - -struct rpc_loc_predicted_orbits_auto_download_config_s_type { - rpc_boolean enable; - unsigned char auto_check_every_hrs; -}; - -struct rpc_loc_assist_data_time_s_type { - rpc_uint64 time_utc; - rpc_uint32 uncertainty; -}; - -typedef rpc_uint64 rpc_loc_assist_pos_valid_mask_type; - -struct rpc_loc_assist_data_pos_s_type { - rpc_loc_assist_pos_valid_mask_type valid_mask; - rpc_uint64 timestamp_utc; - double latitude; - double longitude; - float altitude_wrt_ellipsoid; - float altitude_wrt_mean_sea_level; - float hor_unc_circular; - float vert_unc; - unsigned char confidence_horizontal; - unsigned char confidence_vertical; -}; - -enum rpc_loc_server_open_status_e_type { - RPC_LOC_SERVER_OPEN_SUCCESS = 1, - RPC_LOC_SERVER_OPEN_FAIL = 2, - RPC_LOC_SERVER_OPEN_STATUS_MAX = 268435456 -}; - -struct rpc_loc_server_open_status_s_type { - rpc_loc_server_connection_handle conn_handle; - rpc_loc_server_open_status_e_type open_status; - string apn_name<>; -}; - -enum rpc_loc_server_close_status_e_type { - RPC_LOC_SERVER_CLOSE_SUCCESS = 1, - RPC_LOC_SERVER_CLOSE_FAIL = 2, - RPC_LOC_SERVER_CLOSE_STATUS_MAX = 268435456 -}; - -struct rpc_loc_server_close_status_s_type { - rpc_loc_server_connection_handle conn_handle; - rpc_loc_server_close_status_e_type close_status; -}; - -enum rpc_loc_lock_e_type { - RPC_LOC_LOCK_NONE = 1, - RPC_LOC_LOCK_MI = 2, - RPC_LOC_LOCK_MT = 3, - RPC_LOC_LOCK_ALL = 4, - RPC_LOC_LOCK_MAX = 268435456 -}; - -typedef rpc_uint32 rpc_loc_nmea_sentence_type; - -typedef rpc_uint32 rpc_loc_assist_data_type; - -struct rpc_loc_assist_data_delete_s_type { - rpc_loc_assist_data_type type; - rpc_uint32 reserved[8]; -}; - -union rpc_loc_ioctl_data_u_type switch (rpc_loc_ioctl_e_type disc) { - case RPC_LOC_IOCTL_SET_FIX_CRITERIA: - rpc_loc_fix_criteria_s_type fix_criteria; - case RPC_LOC_IOCTL_INFORM_NI_USER_RESPONSE: - rpc_loc_user_verify_s_type user_verify_resp; - case RPC_LOC_IOCTL_INJECT_PREDICTED_ORBITS_DATA: - rpc_loc_predicted_orbits_data_s_type predicted_orbits_data; - case RPC_LOC_IOCTL_SET_PREDICTED_ORBITS_DATA_AUTO_DOWNLOAD: - rpc_loc_predicted_orbits_auto_download_config_s_type predicted_orbits_auto_download; - case RPC_LOC_IOCTL_INJECT_UTC_TIME: - rpc_loc_assist_data_time_s_type assistance_data_time; - case RPC_LOC_IOCTL_INJECT_POSITION: - rpc_loc_assist_data_pos_s_type assistance_data_position; - case RPC_LOC_IOCTL_INFORM_SERVER_OPEN_STATUS: - rpc_loc_server_open_status_s_type conn_open_status; - case RPC_LOC_IOCTL_INFORM_SERVER_CLOSE_STATUS: - rpc_loc_server_close_status_s_type conn_close_status; - case RPC_LOC_IOCTL_SET_ENGINE_LOCK: - rpc_loc_lock_e_type engine_lock; - case RPC_LOC_IOCTL_SET_SBAS_CONFIG: - rpc_boolean sbas_mode; - case RPC_LOC_IOCTL_SET_NMEA_TYPES: - rpc_loc_nmea_sentence_type nmea_types; - case RPC_LOC_IOCTL_SET_ON_DEMAND_LPM: - rpc_boolean on_demand_lpm; - case RPC_LOC_IOCTL_SET_CDMA_PDE_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_CDMA_MPC_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_UMTS_SLP_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_CUSTOM_PDE_SERVER_ADDR: - rpc_loc_server_info_s_type server_addr; - case RPC_LOC_IOCTL_DELETE_ASSIST_DATA: - rpc_loc_assist_data_delete_s_type assist_data_delete; - default: - void; -}; - -union rpc_loc_ioctl_callback_data_u_type switch (rpc_loc_ioctl_e_type disc) { - case RPC_LOC_IOCTL_GET_API_VERSION: - rpc_loc_api_version_s_type api_version; - case RPC_LOC_IOCTL_GET_FIX_CRITERIA: - rpc_loc_fix_criteria_s_type fix_criteria; - case RPC_LOC_IOCTL_GET_ENGINE_LOCK: - rpc_loc_lock_e_type engine_lock; - case RPC_LOC_IOCTL_GET_SBAS_CONFIG: - rpc_boolean sbas_mode; - case RPC_LOC_IOCTL_GET_NMEA_TYPES: - rpc_loc_nmea_sentence_type nmea_types; - case RPC_LOC_IOCTL_GET_ON_DEMAND_LPM: - rpc_boolean on_demand_lpm; - case RPC_LOC_IOCTL_GET_CDMA_PDE_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_CDMA_MPC_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_UMTS_SLP_SERVER_ADDR: - rpc_loc_server_info_s_type server_addr; - case RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_SOURCE: - rpc_loc_predicted_orbits_data_source_s_type predicted_orbits_data_source; - case RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_VALIDITY: - rpc_loc_predicted_orbits_data_validity_report_s_type predicted_orbits_data_validity; - default: - void; -}; - -struct rpc_loc_ioctl_callback_s_type { - rpc_loc_ioctl_e_type type; - rpc_int32 status; - rpc_loc_ioctl_callback_data_u_type data; -}; - -union rpc_loc_event_payload_u_type switch (unsigned hyper disc) { - case RPC_LOC_EVENT_PARSED_POSITION_REPORT: - rpc_loc_parsed_position_s_type parsed_location_report; - case RPC_LOC_EVENT_SATELLITE_REPORT: - rpc_loc_gnss_info_s_type gnss_report; - case RPC_LOC_EVENT_NMEA_POSITION_REPORT: - rpc_loc_nmea_report_s_type nmea_report; - case RPC_LOC_EVENT_NI_NOTIFY_VERIFY_REQUEST: - rpc_loc_ni_event_s_type ni_request; - case RPC_LOC_EVENT_ASSISTANCE_DATA_REQUEST: - rpc_loc_assist_data_request_s_type assist_data_request; - case RPC_LOC_EVENT_LOCATION_SERVER_REQUEST: - rpc_loc_server_request_s_type loc_server_request; - case RPC_LOC_EVENT_IOCTL_REPORT: - rpc_loc_ioctl_callback_s_type ioctl_report; - case RPC_LOC_EVENT_STATUS_REPORT: - rpc_loc_status_event_s_type status_report; - case RPC_LOC_EVENT_RESERVED: - rpc_loc_reserved_payload_s_type reserved; - default: - void; -}; - -const RPC_LOC_API_NULL_VERSION = 0x00010001; -const RPC_LOC_API_RPC_GLUE_CODE_INFO_REMOTE_VERSION = 0x00010001; diff --git a/loc_api/libloc_api-rpc/gen-3200/loc_api_common_xdr.c b/loc_api/libloc_api-rpc/gen-3200/loc_api_common_xdr.c deleted file mode 100644 index 7b37b9c3..00000000 --- a/loc_api/libloc_api-rpc/gen-3200/loc_api_common_xdr.c +++ /dev/null @@ -1,1441 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#include "loc_api_common.h" - -bool_t -xdr_rpc_boolean (XDR *xdrs, rpc_boolean *objp) -{ - register int32_t *buf; - - if (!xdr_bool (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_uint32 (XDR *xdrs, rpc_uint32 *objp) -{ - register int32_t *buf; - - if (!xdr_u_long (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_uint16 (XDR *xdrs, rpc_uint16 *objp) -{ - register int32_t *buf; - - if (!xdr_u_short (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_uint8 (XDR *xdrs, rpc_uint8 *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_int32 (XDR *xdrs, rpc_int32 *objp) -{ - register int32_t *buf; - - if (!xdr_long (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_byte (XDR *xdrs, rpc_byte *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_uint64 (XDR *xdrs, rpc_uint64 *objp) -{ - register int32_t *buf; - - if (!xdr_u_quad_t (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_client_handle_type (XDR *xdrs, rpc_loc_client_handle_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_int32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_event_mask_type (XDR *xdrs, rpc_loc_event_mask_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint64 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_position_valid_mask_type (XDR *xdrs, rpc_loc_position_valid_mask_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint64 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_pos_technology_mask_type (XDR *xdrs, rpc_loc_pos_technology_mask_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_session_status_e_type (XDR *xdrs, rpc_loc_session_status_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_calendar_time_s_type (XDR *xdrs, rpc_loc_calendar_time_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint16 (xdrs, &objp->year)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->month)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->day_of_week)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->day)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->hour)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->minute)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->second)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->millisecond)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_parsed_position_s_type (XDR *xdrs, rpc_loc_parsed_position_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_position_valid_mask_type (xdrs, &objp->valid_mask)) - return FALSE; - if (!xdr_rpc_loc_session_status_e_type (xdrs, &objp->session_status)) - return FALSE; - if (!xdr_rpc_loc_calendar_time_s_type (xdrs, &objp->timestamp_calendar)) - return FALSE; - if (!xdr_rpc_uint64 (xdrs, &objp->timestamp_utc)) - return FALSE; - if (!xdr_rpc_uint8 (xdrs, &objp->leap_seconds)) - return FALSE; - if (!xdr_float (xdrs, &objp->time_unc)) - return FALSE; - if (!xdr_double (xdrs, &objp->latitude)) - return FALSE; - if (!xdr_double (xdrs, &objp->longitude)) - return FALSE; - if (!xdr_float (xdrs, &objp->altitude_wrt_ellipsoid)) - return FALSE; - if (!xdr_float (xdrs, &objp->altitude_wrt_mean_sea_level)) - return FALSE; - if (!xdr_float (xdrs, &objp->speed_horizontal)) - return FALSE; - if (!xdr_float (xdrs, &objp->speed_vertical)) - return FALSE; - if (!xdr_float (xdrs, &objp->heading)) - return FALSE; - if (!xdr_float (xdrs, &objp->hor_unc_circular)) - return FALSE; - if (!xdr_float (xdrs, &objp->hor_unc_ellipse_semi_major)) - return FALSE; - if (!xdr_float (xdrs, &objp->hor_unc_ellipse_semi_minor)) - return FALSE; - if (!xdr_float (xdrs, &objp->hor_unc_ellipse_orient_azimuth)) - return FALSE; - if (!xdr_float (xdrs, &objp->vert_unc)) - return FALSE; - if (!xdr_float (xdrs, &objp->speed_unc)) - return FALSE; - if (!xdr_float (xdrs, &objp->heading_unc)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->confidence_horizontal)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->confidence_vertical)) - return FALSE; - if (!xdr_float (xdrs, &objp->magnetic_deviation)) - return FALSE; - if (!xdr_rpc_loc_pos_technology_mask_type (xdrs, &objp->technology_mask)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_sv_system_e_type (XDR *xdrs, rpc_loc_sv_system_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_sv_status_e_type (XDR *xdrs, rpc_loc_sv_status_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_sv_info_valid_mask_type (XDR *xdrs, rpc_loc_sv_info_valid_mask_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_sv_info_s_type (XDR *xdrs, rpc_loc_sv_info_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_sv_info_valid_mask_type (xdrs, &objp->valid_mask)) - return FALSE; - if (!xdr_rpc_loc_sv_system_e_type (xdrs, &objp->system)) - return FALSE; - if (!xdr_rpc_uint8 (xdrs, &objp->prn)) - return FALSE; - if (!xdr_rpc_uint8 (xdrs, &objp->health_status)) - return FALSE; - if (!xdr_rpc_loc_sv_status_e_type (xdrs, &objp->process_status)) - return FALSE; - if (!xdr_rpc_boolean (xdrs, &objp->has_eph)) - return FALSE; - if (!xdr_rpc_boolean (xdrs, &objp->has_alm)) - return FALSE; - if (!xdr_float (xdrs, &objp->elevation)) - return FALSE; - if (!xdr_float (xdrs, &objp->azimuth)) - return FALSE; - if (!xdr_float (xdrs, &objp->snr)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_gnss_info_valid_mask_type (XDR *xdrs, rpc_loc_gnss_info_valid_mask_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_gnss_info_s_type (XDR *xdrs, rpc_loc_gnss_info_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_gnss_info_valid_mask_type (xdrs, &objp->valid_mask)) - return FALSE; - if (!xdr_float (xdrs, &objp->position_dop)) - return FALSE; - if (!xdr_float (xdrs, &objp->horizontal_dop)) - return FALSE; - if (!xdr_float (xdrs, &objp->vertical_dop)) - return FALSE; - if (!xdr_rpc_boolean (xdrs, &objp->altitude_assumed)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->sv_count)) - return FALSE; - if (!xdr_array (xdrs, (char **)&objp->sv_list.sv_list_val, (u_int *) &objp->sv_list.sv_list_len, RPC_LOC_API_MAX_SV_COUNT, - sizeof (rpc_loc_sv_info_s_type), (xdrproc_t) xdr_rpc_loc_sv_info_s_type)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_nmea_report_s_type (XDR *xdrs, rpc_loc_nmea_report_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint16 (xdrs, &objp->length)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->nmea_sentences.nmea_sentences_val, (u_int *) &objp->nmea_sentences.nmea_sentences_len, RPC_LOC_API_MAX_NMEA_STRING_LENGTH)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_status_event_e_type (XDR *xdrs, rpc_loc_status_event_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_engine_state_e_type (XDR *xdrs, rpc_loc_engine_state_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_status_event_payload_u_type (XDR *xdrs, rpc_loc_status_event_payload_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_status_event_e_type (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_STATUS_EVENT_ENGINE_STATE: - if (!xdr_rpc_loc_engine_state_e_type (xdrs, &objp->rpc_loc_status_event_payload_u_type_u.engine_state)) - return FALSE; - break; - default: - break; - } - return TRUE; -} - -bool_t -xdr_rpc_loc_status_event_s_type (XDR *xdrs, rpc_loc_status_event_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_status_event_e_type (xdrs, &objp->event)) - return FALSE; - if (!xdr_rpc_loc_status_event_payload_u_type (xdrs, &objp->payload)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_addr_e_type (XDR *xdrs, rpc_loc_server_addr_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_addr_ipv4_type (XDR *xdrs, rpc_loc_server_addr_ipv4_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, &objp->addr)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->port)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_addr_url_type (XDR *xdrs, rpc_loc_server_addr_url_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint16 (xdrs, &objp->length)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->addr.addr_val, (u_int *) &objp->addr.addr_len, RPC_LOC_API_MAX_SERVER_ADDR_LENGTH)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_addr_u_type (XDR *xdrs, rpc_loc_server_addr_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_server_addr_e_type (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_SERVER_ADDR_IPV4: - if (!xdr_rpc_loc_server_addr_ipv4_type (xdrs, &objp->rpc_loc_server_addr_u_type_u.ipv4)) - return FALSE; - break; - case RPC_LOC_SERVER_ADDR_URL: - if (!xdr_rpc_loc_server_addr_url_type (xdrs, &objp->rpc_loc_server_addr_u_type_u.url)) - return FALSE; - break; - default: - break; - } - return TRUE; -} - -bool_t -xdr_rpc_loc_server_info_s_type (XDR *xdrs, rpc_loc_server_info_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_server_addr_e_type (xdrs, &objp->addr_type)) - return FALSE; - if (!xdr_rpc_loc_server_addr_u_type (xdrs, &objp->addr_info)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_notify_verify_e_type (XDR *xdrs, rpc_loc_ni_notify_verify_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_event_e_type (XDR *xdrs, rpc_loc_ni_event_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_datacoding_scheme_e_type (XDR *xdrs, rpc_loc_ni_datacoding_scheme_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_vx_requester_id_encoding_scheme_e_type (XDR *xdrs, rpc_loc_ni_vx_requester_id_encoding_scheme_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_vx_pos_mode_e_type (XDR *xdrs, rpc_loc_ni_vx_pos_mode_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_vx_requester_id_s_type (XDR *xdrs, rpc_loc_ni_vx_requester_id_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_u_char (xdrs, &objp->requester_id_length)) - return FALSE; - if (!xdr_opaque (xdrs, objp->requester_id, 200)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_vx_notify_verify_req_s_type (XDR *xdrs, rpc_loc_ni_vx_notify_verify_req_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ni_notify_verify_e_type (xdrs, &objp->notification_priv_type)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->pos_qos_incl)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->pos_qos)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->num_fixes)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->tbf)) - return FALSE; - if (!xdr_rpc_loc_ni_vx_pos_mode_e_type (xdrs, &objp->pos_mode)) - return FALSE; - if (!xdr_rpc_loc_ni_vx_requester_id_encoding_scheme_e_type (xdrs, &objp->encoding_scheme)) - return FALSE; - if (!xdr_rpc_loc_ni_vx_requester_id_s_type (xdrs, &objp->requester_id)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->user_resp_timer_val)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_supl_pos_method_e_type (XDR *xdrs, rpc_loc_ni_supl_pos_method_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_supl_slp_session_id_s_type (XDR *xdrs, rpc_loc_ni_supl_slp_session_id_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_u_char (xdrs, &objp->presence)) - return FALSE; - if (!xdr_opaque (xdrs, objp->session_id, 4)) - return FALSE; - if (!xdr_rpc_loc_server_info_s_type (xdrs, &objp->slp_address)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_requestor_id_s_type (XDR *xdrs, rpc_loc_ni_requestor_id_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, &objp->data_coding_scheme)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->requestor_id_string.requestor_id_string_val, (u_int *) &objp->requestor_id_string.requestor_id_string_len, RPC_LOC_NI_MAX_REQUESTOR_ID_LENGTH)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->string_len)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_supl_client_name_s_type (XDR *xdrs, rpc_loc_ni_supl_client_name_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, &objp->data_coding_scheme)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->client_name_string.client_name_string_val, (u_int *) &objp->client_name_string.client_name_string_len, RPC_LOC_NI_MAX_CLIENT_NAME_LENGTH)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->string_len)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_supl_qop_s_type (XDR *xdrs, rpc_loc_ni_supl_qop_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, &objp->bit_mask)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->horacc)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->veracc)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->maxLocAge)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->delay)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_supl_notify_verify_req_s_type (XDR *xdrs, rpc_loc_ni_supl_notify_verify_req_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_rpc_loc_ni_notify_verify_e_type (xdrs, &objp->notification_priv_type)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->flags)) - return FALSE; - if (!xdr_rpc_loc_ni_supl_slp_session_id_s_type (xdrs, &objp->supl_slp_session_id)) - return FALSE; - if (!xdr_opaque (xdrs, objp->supl_hash, 8)) - return FALSE; - if (!xdr_rpc_loc_ni_datacoding_scheme_e_type (xdrs, &objp->datacoding_scheme)) - return FALSE; - if (!xdr_rpc_loc_ni_supl_pos_method_e_type (xdrs, &objp->pos_method)) - return FALSE; - if (!xdr_rpc_loc_ni_requestor_id_s_type (xdrs, &objp->requestor_id)) - return FALSE; - if (!xdr_rpc_loc_ni_supl_client_name_s_type (xdrs, &objp->client_name)) - return FALSE; - if (!xdr_rpc_loc_ni_supl_qop_s_type (xdrs, &objp->supl_qop)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->user_response_timer)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_ext_client_address_s_type (XDR *xdrs, rpc_loc_ni_ext_client_address_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, &objp->ext_client_address_len)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->ext_client_address.ext_client_address_val, (u_int *) &objp->ext_client_address.ext_client_address_len, RPC_LOC_NI_MAX_EXT_CLIENT_ADDRESS)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_location_type_e_type (XDR *xdrs, rpc_loc_ni_location_type_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_deferred_location_s_type (XDR *xdrs, rpc_loc_ni_deferred_location_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, &objp->unused_bits)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->ms_available)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_codeword_string_s_type (XDR *xdrs, rpc_loc_ni_codeword_string_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, &objp->data_coding_scheme)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->lcs_codeword_string.lcs_codeword_string_val, (u_int *) &objp->lcs_codeword_string.lcs_codeword_string_len, RPC_LOC_NI_CODEWORD_LENGTH)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->string_len)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_service_type_id_s_type (XDR *xdrs, rpc_loc_ni_service_type_id_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, &objp->lcs_service_type_id)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_umts_cp_notify_verify_req_s_type (XDR *xdrs, rpc_loc_ni_umts_cp_notify_verify_req_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ni_notify_verify_e_type (xdrs, &objp->notification_priv_type)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->invoke_id)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->flags)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->notification_length)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->notification_text.notification_text_val, (u_int *) &objp->notification_text.notification_text_len, RPC_LOC_NI_MAX_CLIENT_NAME_LENGTH)) - return FALSE; - if (!xdr_rpc_loc_ni_datacoding_scheme_e_type (xdrs, &objp->datacoding_scheme)) - return FALSE; - if (!xdr_rpc_loc_ni_ext_client_address_s_type (xdrs, &objp->ext_client_address_data)) - return FALSE; - if (!xdr_rpc_loc_ni_location_type_e_type (xdrs, &objp->location_type)) - return FALSE; - if (!xdr_rpc_loc_ni_deferred_location_s_type (xdrs, &objp->deferred_location)) - return FALSE; - if (!xdr_rpc_loc_ni_requestor_id_s_type (xdrs, &objp->requestor_id)) - return FALSE; - if (!xdr_rpc_loc_ni_codeword_string_s_type (xdrs, &objp->codeword_string)) - return FALSE; - if (!xdr_rpc_loc_ni_service_type_id_s_type (xdrs, &objp->service_type_id)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->user_response_timer)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_event_payload_u_type (XDR *xdrs, rpc_loc_ni_event_payload_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ni_event_e_type (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_NI_EVENT_VX_NOTIFY_VERIFY_REQ: - if (!xdr_rpc_loc_ni_vx_notify_verify_req_s_type (xdrs, &objp->rpc_loc_ni_event_payload_u_type_u.vx_req)) - return FALSE; - break; - case RPC_LOC_NI_EVENT_SUPL_NOTIFY_VERIFY_REQ: - if (!xdr_rpc_loc_ni_supl_notify_verify_req_s_type (xdrs, &objp->rpc_loc_ni_event_payload_u_type_u.supl_req)) - return FALSE; - break; - case RPC_LOC_NI_EVENT_UMTS_CP_NOTIFY_VERIFY_REQ: - if (!xdr_rpc_loc_ni_umts_cp_notify_verify_req_s_type (xdrs, &objp->rpc_loc_ni_event_payload_u_type_u.umts_cp_req)) - return FALSE; - break; - default: - break; - } - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_event_s_type (XDR *xdrs, rpc_loc_ni_event_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ni_event_e_type (xdrs, &objp->event)) - return FALSE; - if (!xdr_rpc_loc_ni_event_payload_u_type (xdrs, &objp->payload)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_data_request_e_type (XDR *xdrs, rpc_loc_assist_data_request_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_struct_loc_time_download_source_s_type_servers_ptr (XDR *xdrs, rpc_struct_loc_time_download_source_s_type_servers_ptr *objp) -{ - register int32_t *buf; - - if (!xdr_string (xdrs, objp, RPC_LOC_API_MAX_SERVER_ADDR_LENGTH)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_struct_loc_time_download_source_s_type_servers (XDR *xdrs, rpc_struct_loc_time_download_source_s_type_servers objp) -{ - register int32_t *buf; - - if (!xdr_vector (xdrs, (char *)objp, 3, - sizeof (rpc_struct_loc_time_download_source_s_type_servers_ptr), (xdrproc_t) xdr_rpc_struct_loc_time_download_source_s_type_servers_ptr)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_time_download_source_s_type (XDR *xdrs, rpc_loc_time_download_source_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, &objp->delay_threshold)) - return FALSE; - if (!xdr_rpc_struct_loc_time_download_source_s_type_servers (xdrs, objp->servers)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr (XDR *xdrs, rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr *objp) -{ - register int32_t *buf; - - if (!xdr_string (xdrs, objp, RPC_LOC_API_MAX_SERVER_ADDR_LENGTH)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers (XDR *xdrs, rpc_struct_loc_predicted_orbits_data_source_s_type_servers objp) -{ - register int32_t *buf; - - if (!xdr_vector (xdrs, (char *)objp, 3, - sizeof (rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr), (xdrproc_t) xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_predicted_orbits_data_source_s_type (XDR *xdrs, rpc_loc_predicted_orbits_data_source_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, &objp->max_file_size)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->max_part_size)) - return FALSE; - if (!xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers (xdrs, objp->servers)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_data_request_payload_u_type (XDR *xdrs, rpc_loc_assist_data_request_payload_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_assist_data_request_e_type (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_ASSIST_DATA_TIME_REQ: - if (!xdr_rpc_loc_time_download_source_s_type (xdrs, &objp->rpc_loc_assist_data_request_payload_u_type_u.time_download)) - return FALSE; - break; - case RPC_LOC_ASSIST_DATA_PREDICTED_ORBITS_REQ: - if (!xdr_rpc_loc_predicted_orbits_data_source_s_type (xdrs, &objp->rpc_loc_assist_data_request_payload_u_type_u.data_download)) - return FALSE; - break; - default: - break; - } - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_data_request_s_type (XDR *xdrs, rpc_loc_assist_data_request_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_assist_data_request_e_type (xdrs, &objp->event)) - return FALSE; - if (!xdr_rpc_loc_assist_data_request_payload_u_type (xdrs, &objp->payload)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_connection_handle (XDR *xdrs, rpc_loc_server_connection_handle *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_protocol_e_type (XDR *xdrs, rpc_loc_server_protocol_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_request_e_type (XDR *xdrs, rpc_loc_server_request_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_open_req_s_type (XDR *xdrs, rpc_loc_server_open_req_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_server_connection_handle (xdrs, &objp->conn_handle)) - return FALSE; - if (!xdr_rpc_loc_server_protocol_e_type (xdrs, &objp->protocol)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_close_req_s_type (XDR *xdrs, rpc_loc_server_close_req_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_server_connection_handle (xdrs, &objp->conn_handle)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_request_u_type (XDR *xdrs, rpc_loc_server_request_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_server_request_e_type (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_SERVER_REQUEST_OPEN: - if (!xdr_rpc_loc_server_open_req_s_type (xdrs, &objp->rpc_loc_server_request_u_type_u.open_req)) - return FALSE; - break; - case RPC_LOC_SERVER_REQUEST_CLOSE: - if (!xdr_rpc_loc_server_close_req_s_type (xdrs, &objp->rpc_loc_server_request_u_type_u.close_req)) - return FALSE; - break; - default: - break; - } - return TRUE; -} - -bool_t -xdr_rpc_loc_server_request_s_type (XDR *xdrs, rpc_loc_server_request_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_server_request_e_type (xdrs, &objp->event)) - return FALSE; - if (!xdr_rpc_loc_server_request_u_type (xdrs, &objp->payload)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_reserved_payload_s_type (XDR *xdrs, rpc_loc_reserved_payload_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint16 (xdrs, &objp->data_size)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->data.data_val, (u_int *) &objp->data.data_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ioctl_e_type (XDR *xdrs, rpc_loc_ioctl_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_api_version_s_type (XDR *xdrs, rpc_loc_api_version_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_u_char (xdrs, &objp->major)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->minor)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_fix_recurrence_e_type (XDR *xdrs, rpc_loc_fix_recurrence_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_operation_mode_e_type (XDR *xdrs, rpc_loc_operation_mode_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_notify_e_type (XDR *xdrs, rpc_loc_notify_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_fix_criteria_s_type (XDR *xdrs, rpc_loc_fix_criteria_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, &objp->valid_mask)) - return FALSE; - if (!xdr_rpc_loc_fix_recurrence_e_type (xdrs, &objp->recurrence_type)) - return FALSE; - if (!xdr_rpc_loc_operation_mode_e_type (xdrs, &objp->preferred_operation_mode)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->preferred_accuracy)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->preferred_response_time)) - return FALSE; - if (!xdr_rpc_boolean (xdrs, &objp->intermediate_pos_report_enabled)) - return FALSE; - if (!xdr_rpc_loc_notify_e_type (xdrs, &objp->notify_type)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->min_interval)) - return FALSE; - if (!xdr_float (xdrs, &objp->min_distance)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->min_dist_sample_interval)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ni_user_resp_e_type (XDR *xdrs, rpc_loc_ni_user_resp_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_user_verify_s_type (XDR *xdrs, rpc_loc_user_verify_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ni_user_resp_e_type (xdrs, &objp->user_resp)) - return FALSE; - if (!xdr_rpc_loc_ni_event_s_type (xdrs, &objp->ni_event_pass_back)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_predicted_orbits_data_format_e_type (XDR *xdrs, rpc_loc_predicted_orbits_data_format_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_predicted_orbits_data_s_type (XDR *xdrs, rpc_loc_predicted_orbits_data_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_predicted_orbits_data_format_e_type (xdrs, &objp->format_type)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->total_size)) - return FALSE; - if (!xdr_rpc_uint8 (xdrs, &objp->total_parts)) - return FALSE; - if (!xdr_rpc_uint8 (xdrs, &objp->part)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->part_len)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->data_ptr.data_ptr_val, (u_int *) &objp->data_ptr.data_ptr_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_predicted_orbits_data_validity_report_s_type (XDR *xdrs, rpc_loc_predicted_orbits_data_validity_report_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint64 (xdrs, &objp->start_time_utc)) - return FALSE; - if (!xdr_rpc_uint16 (xdrs, &objp->valid_duration_hrs)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_predicted_orbits_auto_download_config_s_type (XDR *xdrs, rpc_loc_predicted_orbits_auto_download_config_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_boolean (xdrs, &objp->enable)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->auto_check_every_hrs)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_data_time_s_type (XDR *xdrs, rpc_loc_assist_data_time_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint64 (xdrs, &objp->time_utc)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->uncertainty)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_pos_valid_mask_type (XDR *xdrs, rpc_loc_assist_pos_valid_mask_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint64 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_data_pos_s_type (XDR *xdrs, rpc_loc_assist_data_pos_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_assist_pos_valid_mask_type (xdrs, &objp->valid_mask)) - return FALSE; - if (!xdr_rpc_uint64 (xdrs, &objp->timestamp_utc)) - return FALSE; - if (!xdr_double (xdrs, &objp->latitude)) - return FALSE; - if (!xdr_double (xdrs, &objp->longitude)) - return FALSE; - if (!xdr_float (xdrs, &objp->altitude_wrt_ellipsoid)) - return FALSE; - if (!xdr_float (xdrs, &objp->altitude_wrt_mean_sea_level)) - return FALSE; - if (!xdr_float (xdrs, &objp->hor_unc_circular)) - return FALSE; - if (!xdr_float (xdrs, &objp->vert_unc)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->confidence_horizontal)) - return FALSE; - if (!xdr_u_char (xdrs, &objp->confidence_vertical)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_open_status_e_type (XDR *xdrs, rpc_loc_server_open_status_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_open_status_s_type (XDR *xdrs, rpc_loc_server_open_status_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_server_connection_handle (xdrs, &objp->conn_handle)) - return FALSE; - if (!xdr_rpc_loc_server_open_status_e_type (xdrs, &objp->open_status)) - return FALSE; - if (!xdr_string (xdrs, &objp->apn_name, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_close_status_e_type (XDR *xdrs, rpc_loc_server_close_status_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_server_close_status_s_type (XDR *xdrs, rpc_loc_server_close_status_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_server_connection_handle (xdrs, &objp->conn_handle)) - return FALSE; - if (!xdr_rpc_loc_server_close_status_e_type (xdrs, &objp->close_status)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_lock_e_type (XDR *xdrs, rpc_loc_lock_e_type *objp) -{ - register int32_t *buf; - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_nmea_sentence_type (XDR *xdrs, rpc_loc_nmea_sentence_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_data_type (XDR *xdrs, rpc_loc_assist_data_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_assist_data_delete_s_type (XDR *xdrs, rpc_loc_assist_data_delete_s_type *objp) -{ - register int32_t *buf; - - int i; - if (!xdr_rpc_loc_assist_data_type (xdrs, &objp->type)) - return FALSE; - if (!xdr_vector (xdrs, (char *)objp->reserved, 8, - sizeof (rpc_uint32), (xdrproc_t) xdr_rpc_uint32)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ioctl_data_u_type (XDR *xdrs, rpc_loc_ioctl_data_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ioctl_e_type (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_IOCTL_SET_FIX_CRITERIA: - if (!xdr_rpc_loc_fix_criteria_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.fix_criteria)) - return FALSE; - break; - case RPC_LOC_IOCTL_INFORM_NI_USER_RESPONSE: - if (!xdr_rpc_loc_user_verify_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.user_verify_resp)) - return FALSE; - break; - case RPC_LOC_IOCTL_INJECT_PREDICTED_ORBITS_DATA: - if (!xdr_rpc_loc_predicted_orbits_data_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.predicted_orbits_data)) - return FALSE; - break; - case RPC_LOC_IOCTL_SET_PREDICTED_ORBITS_DATA_AUTO_DOWNLOAD: - if (!xdr_rpc_loc_predicted_orbits_auto_download_config_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.predicted_orbits_auto_download)) - return FALSE; - break; - case RPC_LOC_IOCTL_INJECT_UTC_TIME: - if (!xdr_rpc_loc_assist_data_time_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.assistance_data_time)) - return FALSE; - break; - case RPC_LOC_IOCTL_INJECT_POSITION: - if (!xdr_rpc_loc_assist_data_pos_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.assistance_data_position)) - return FALSE; - break; - case RPC_LOC_IOCTL_INFORM_SERVER_OPEN_STATUS: - if (!xdr_rpc_loc_server_open_status_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.conn_open_status)) - return FALSE; - break; - case RPC_LOC_IOCTL_INFORM_SERVER_CLOSE_STATUS: - if (!xdr_rpc_loc_server_close_status_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.conn_close_status)) - return FALSE; - break; - case RPC_LOC_IOCTL_SET_ENGINE_LOCK: - if (!xdr_rpc_loc_lock_e_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.engine_lock)) - return FALSE; - break; - case RPC_LOC_IOCTL_SET_SBAS_CONFIG: - if (!xdr_rpc_boolean (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.sbas_mode)) - return FALSE; - break; - case RPC_LOC_IOCTL_SET_NMEA_TYPES: - if (!xdr_rpc_loc_nmea_sentence_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.nmea_types)) - return FALSE; - break; - case RPC_LOC_IOCTL_SET_ON_DEMAND_LPM: - if (!xdr_rpc_boolean (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.on_demand_lpm)) - return FALSE; - break; - case RPC_LOC_IOCTL_SET_CDMA_PDE_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_CDMA_MPC_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_UMTS_SLP_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_CUSTOM_PDE_SERVER_ADDR: - if (!xdr_rpc_loc_server_info_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.server_addr)) - return FALSE; - break; - case RPC_LOC_IOCTL_DELETE_ASSIST_DATA: - if (!xdr_rpc_loc_assist_data_delete_s_type (xdrs, &objp->rpc_loc_ioctl_data_u_type_u.assist_data_delete)) - return FALSE; - break; - default: - break; - } - return TRUE; -} - -bool_t -xdr_rpc_loc_ioctl_callback_data_u_type (XDR *xdrs, rpc_loc_ioctl_callback_data_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ioctl_e_type (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_IOCTL_GET_API_VERSION: - if (!xdr_rpc_loc_api_version_s_type (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.api_version)) - return FALSE; - break; - case RPC_LOC_IOCTL_GET_FIX_CRITERIA: - if (!xdr_rpc_loc_fix_criteria_s_type (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.fix_criteria)) - return FALSE; - break; - case RPC_LOC_IOCTL_GET_ENGINE_LOCK: - if (!xdr_rpc_loc_lock_e_type (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.engine_lock)) - return FALSE; - break; - case RPC_LOC_IOCTL_GET_SBAS_CONFIG: - if (!xdr_rpc_boolean (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.sbas_mode)) - return FALSE; - break; - case RPC_LOC_IOCTL_GET_NMEA_TYPES: - if (!xdr_rpc_loc_nmea_sentence_type (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.nmea_types)) - return FALSE; - break; - case RPC_LOC_IOCTL_GET_ON_DEMAND_LPM: - if (!xdr_rpc_boolean (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.on_demand_lpm)) - return FALSE; - break; - case RPC_LOC_IOCTL_GET_CDMA_PDE_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_CDMA_MPC_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_UMTS_SLP_SERVER_ADDR: - if (!xdr_rpc_loc_server_info_s_type (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.server_addr)) - return FALSE; - break; - case RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_SOURCE: - if (!xdr_rpc_loc_predicted_orbits_data_source_s_type (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.predicted_orbits_data_source)) - return FALSE; - break; - case RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_VALIDITY: - if (!xdr_rpc_loc_predicted_orbits_data_validity_report_s_type (xdrs, &objp->rpc_loc_ioctl_callback_data_u_type_u.predicted_orbits_data_validity)) - return FALSE; - break; - default: - break; - } - return TRUE; -} - -bool_t -xdr_rpc_loc_ioctl_callback_s_type (XDR *xdrs, rpc_loc_ioctl_callback_s_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_ioctl_e_type (xdrs, &objp->type)) - return FALSE; - if (!xdr_rpc_int32 (xdrs, &objp->status)) - return FALSE; - if (!xdr_rpc_loc_ioctl_callback_data_u_type (xdrs, &objp->data)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_event_payload_u_type (XDR *xdrs, rpc_loc_event_payload_u_type *objp) -{ - register int32_t *buf; - - if (!xdr_u_quad_t (xdrs, &objp->disc)) - return FALSE; - switch (objp->disc) { - case RPC_LOC_EVENT_PARSED_POSITION_REPORT: - if (!xdr_rpc_loc_parsed_position_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.parsed_location_report)) - return FALSE; - break; - case RPC_LOC_EVENT_SATELLITE_REPORT: - if (!xdr_rpc_loc_gnss_info_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.gnss_report)) - return FALSE; - break; - case RPC_LOC_EVENT_NMEA_POSITION_REPORT: - if (!xdr_rpc_loc_nmea_report_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.nmea_report)) - return FALSE; - break; - case RPC_LOC_EVENT_NI_NOTIFY_VERIFY_REQUEST: - if (!xdr_rpc_loc_ni_event_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.ni_request)) - return FALSE; - break; - case RPC_LOC_EVENT_ASSISTANCE_DATA_REQUEST: - if (!xdr_rpc_loc_assist_data_request_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.assist_data_request)) - return FALSE; - break; - case RPC_LOC_EVENT_LOCATION_SERVER_REQUEST: - if (!xdr_rpc_loc_server_request_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.loc_server_request)) - return FALSE; - break; - case RPC_LOC_EVENT_IOCTL_REPORT: - if (!xdr_rpc_loc_ioctl_callback_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.ioctl_report)) - return FALSE; - break; - case RPC_LOC_EVENT_STATUS_REPORT: - if (!xdr_rpc_loc_status_event_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.status_report)) - return FALSE; - break; - case RPC_LOC_EVENT_RESERVED: - if (!xdr_rpc_loc_reserved_payload_s_type (xdrs, &objp->rpc_loc_event_payload_u_type_u.reserved)) - return FALSE; - break; - default: - break; - } - return TRUE; -} diff --git a/loc_api/libloc_api-rpc/gen-3200/loc_api_fixup.c b/loc_api/libloc_api-rpc/gen-3200/loc_api_fixup.c deleted file mode 100644 index fe512f5d..00000000 --- a/loc_api/libloc_api-rpc/gen-3200/loc_api_fixup.c +++ /dev/null @@ -1,48 +0,0 @@ -/*============================================================================= - L O C _ A P I _ F I X U P . C - -GENERAL DESCRIPTION - This file adds API constants that are not automatically transmitted to - the RPC stubs, and it also fixes other RPC-related problems. - - --------------------------------------------------------------------------- -Copyright (c) 2009, QUALCOMM USA, INC. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -· Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -· Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -· Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --------------------------------------------------------------------------- -=============================================================================*/ - -#include - -#include "loc_api_fixup.h" - -#ifdef ADD_XDR_FLOAT - -int -xdr_float(xdrp, fp) - XDR *xdrp; - float *fp; -{ - return xdr_long(xdrp, (long*)fp); -} - -int -xdr_double(xdrp, dp) - XDR *xdrp; - double *dp; -{ - return xdr_long(xdrp, (long*)dp + 1) - && xdr_long(xdrp, (long*)dp); -} - -#endif /* ADD_XDR_FLOAT */ diff --git a/loc_api/libloc_api-rpc/gen-3200/loc_api_rpc_glue.c b/loc_api/libloc_api-rpc/gen-3200/loc_api_rpc_glue.c deleted file mode 100644 index 8c171222..00000000 --- a/loc_api/libloc_api-rpc/gen-3200/loc_api_rpc_glue.c +++ /dev/null @@ -1,339 +0,0 @@ -/****************************************************************************** - @file loc_api_rpc_glue.c - @brief Android Loc API glue code using rpcgen. - - DESCRIPTION - Loc API glue code for Android - - ----------------------------------------------------------------------------- -Copyright (c) 2009, QUALCOMM USA, INC. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -· Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -· Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -· Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ----------------------------------------------------------------------------- - ******************************************************************************/ -/*===================================================================== - EDIT HISTORY FOR MODULE - - This section contains comments describing changes made to the module. - Notice that changes are listed in reverse chronological order. - -when who what, where, why --------- --- ------------------------------------------------------- -03/05/2009 dx Initial version - -======================================================================*/ -/*===================================================================== - - INCLUDE FILES FOR MODULE - -======================================================================*/ -//#define LOG_NDDEBUG 0 - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -/* Include RPC headers */ -#include "loc_api_rpc_glue.h" - -/* Callback init */ -#include "loc_apicb_appinit.h" - -/* Logging */ -#define LOG_TAG "lib_api_rpc_glue" -#include - -/* Comment this out to enable logging */ -#undef LOGD -#define LOGD(...) {} - -/*===================================================================== - External declarations -======================================================================*/ - -CLIENT* loc_api_clnt = NULL; - -/* Callback ID and pointer */ -#define LOC_API_CB_ID 1 -loc_event_cb_f_type *loc_api_saved_cb = NULL; /* the only callback of Loc API client */ - -#define RPC_FUNC_VERSION_BASE(a,b) a ## b -#define RPC_FUNC_VERSION(a,b) RPC_FUNC_VERSION_BASE(a,b) - -#define LOC_GLUE_CHECK_INIT(ret_type) \ - if (loc_api_clnt == NULL) { return (ret_type) RPC_LOC_API_RPC_FAILURE; } - -#define LOC_GLUE_CHECK_RESULT(stat, ret_type) \ - if (stat != RPC_SUCCESS) { return (ret_type) RPC_LOC_API_RPC_FAILURE; } - -/* Callback functions */ -/* Returns 1 if successful */ -bool_t rpc_loc_event_cb_f_type_0x00010001_svc( - rpc_loc_event_cb_f_type_args *argp, - rpc_loc_event_cb_f_type_rets *ret, - struct svc_req *req) -{ - /* Callback not registered, or unexpected ID (shouldn't happen) */ - if (loc_api_saved_cb == NULL || argp->cb_id != LOC_API_CB_ID) - { - LOGD("Warning: No callback handler.\n"); - ret->loc_event_cb_f_type_result = 0; - return 1; /* simply return */ - } - - LOGD("proc: %x prog: %x vers: %x\n", - (int) req->rq_proc, - (int) req->rq_prog, - (int) req->rq_vers); - - LOGD("Callback received: %x (handle=%d ret_ptr=%d)\n", - (int) argp->loc_event, - (int) argp->loc_handle, - (int) ret); - - /* Forward callback to real callback procedure */ - rpc_loc_client_handle_type loc_handle = argp->loc_handle; - rpc_loc_event_mask_type loc_event = argp->loc_event; - const rpc_loc_event_payload_u_type* loc_event_payload = - (const rpc_loc_event_payload_u_type*) argp->loc_event_payload; - - int32 rc = loc_api_saved_cb(loc_handle, loc_event, loc_event_payload); - ret->loc_event_cb_f_type_result = rc; - - return 1; /* ok */ -} - -int loc_apicbprog_freeresult (SVCXPRT *transp, xdrproc_t xdr_result, caddr_t result) -{ - xdr_free (xdr_result, result); - - /* - * Insert additional freeing code here, if needed - */ - // LOGD("***** loc_apicbprog_freeresult\n"); - - return 1; -} - -int loc_apicbprog_0x00010001_freeresult (SVCXPRT *transp, xdrproc_t xdr_result, caddr_t result) -{ - return loc_apicbprog_freeresult (transp, xdr_result, result); -} - -/*=========================================================================== - -FUNCTION loc_api_glue_init - -DESCRIPTION - Initiates the RPC client - -RETURN VALUE - 1 for success - 0 for failure - -===========================================================================*/ -int loc_api_glue_init(void) -{ - if (loc_api_clnt == NULL) - { - /* Print msg */ - LOGD("Trying to create RPC client...\n"); - loc_api_clnt = clnt_create(NULL, LOC_APIPROG, /*LOC_APIVERS*/ 0x00010000, NULL); - LOGD("Created loc_api_clnt ---- %x\n", (unsigned int)loc_api_clnt); - - if (loc_api_clnt == NULL) - { - fprintf(stderr, "Error: cannot create RPC client.\n"); - return 0; - } - - /* Init RPC callbacks */ - int rc = loc_apicb_app_init(); - if (rc >= 0) - { - LOGD("Loc API callback initialized.\n"); - } else { - fprintf(stderr, "Loc API callback initialization failed.\n"); - return 0; - } - } - - return 1; -} - -rpc_loc_client_handle_type loc_open ( - rpc_loc_event_mask_type event_reg_mask, - loc_event_cb_f_type *event_callback - ) -{ - LOC_GLUE_CHECK_INIT(rpc_loc_client_handle_type); - - rpc_loc_open_args args; - args.event_reg_mask = event_reg_mask; - args.event_callback = LOC_API_CB_ID; - loc_api_saved_cb = event_callback; - - rpc_loc_open_rets rets; - enum clnt_stat stat = RPC_SUCCESS; - - stat = RPC_FUNC_VERSION(rpc_loc_open_, LOC_APIVERS)(&args, &rets, loc_api_clnt); - LOC_GLUE_CHECK_RESULT(stat, int32); - - return (rpc_loc_client_handle_type) rets.loc_open_result; -} - -int32 loc_close(rpc_loc_client_handle_type handle) -{ - LOC_GLUE_CHECK_INIT(int32); - - rpc_loc_close_args args; - args.handle = handle; - - rpc_loc_close_rets rets; - enum clnt_stat stat = RPC_SUCCESS; - - stat = RPC_FUNC_VERSION(rpc_loc_close_, LOC_APIVERS)(&args, &rets, loc_api_clnt); - LOC_GLUE_CHECK_RESULT(stat, int32); - - return (int32) rets.loc_close_result; -} - -int32 loc_start_fix(rpc_loc_client_handle_type handle) -{ - LOC_GLUE_CHECK_INIT(int32); - - rpc_loc_start_fix_args args; - args.handle = handle; - - rpc_loc_start_fix_rets rets; - enum clnt_stat stat = RPC_SUCCESS; - - stat = RPC_FUNC_VERSION(rpc_loc_start_fix_, LOC_APIVERS)(&args, &rets, loc_api_clnt); - LOC_GLUE_CHECK_RESULT(stat, int32); - - return (int32) rets.loc_start_fix_result; -} - -int32 loc_stop_fix(rpc_loc_client_handle_type handle) -{ - LOC_GLUE_CHECK_INIT(int32); - - rpc_loc_stop_fix_args args; - args.handle = handle; - - rpc_loc_stop_fix_rets rets; - enum clnt_stat stat = RPC_SUCCESS; - - stat = RPC_FUNC_VERSION(rpc_loc_stop_fix_, LOC_APIVERS)(&args, &rets, loc_api_clnt); - LOC_GLUE_CHECK_RESULT(stat, int32); - - return (int32) rets.loc_stop_fix_result; -} - -int32 loc_ioctl( - rpc_loc_client_handle_type handle, - rpc_loc_ioctl_e_type ioctl_type, - rpc_loc_ioctl_data_u_type* ioctl_data - ) -{ - LOC_GLUE_CHECK_INIT(int32); - - rpc_loc_ioctl_args args; - args.handle = handle; - args.ioctl_data = ioctl_data; - args.ioctl_type = ioctl_type; - if (ioctl_data != NULL) - { - /* Assign ioctl union discriminator */ - ioctl_data->disc = ioctl_type; - - /* In case the user hasn't filled in other disc fields, - automatically fill them in here */ - switch (ioctl_type) - { - case RPC_LOC_IOCTL_GET_API_VERSION: - case RPC_LOC_IOCTL_SET_FIX_CRITERIA: - case RPC_LOC_IOCTL_GET_FIX_CRITERIA: - case RPC_LOC_IOCTL_INFORM_NI_USER_RESPONSE: - case RPC_LOC_IOCTL_INJECT_PREDICTED_ORBITS_DATA: - case RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_VALIDITY: - case RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_SOURCE: - case RPC_LOC_IOCTL_SET_PREDICTED_ORBITS_DATA_AUTO_DOWNLOAD: - case RPC_LOC_IOCTL_INJECT_UTC_TIME: - case RPC_LOC_IOCTL_INJECT_RTC_VALUE: - case RPC_LOC_IOCTL_INJECT_POSITION: - case RPC_LOC_IOCTL_QUERY_ENGINE_STATE: - case RPC_LOC_IOCTL_INFORM_SERVER_OPEN_STATUS: - case RPC_LOC_IOCTL_INFORM_SERVER_CLOSE_STATUS: - case RPC_LOC_IOCTL_SET_ENGINE_LOCK: - case RPC_LOC_IOCTL_GET_ENGINE_LOCK: - case RPC_LOC_IOCTL_SET_SBAS_CONFIG: - case RPC_LOC_IOCTL_GET_SBAS_CONFIG: - case RPC_LOC_IOCTL_SET_NMEA_TYPES: - case RPC_LOC_IOCTL_GET_NMEA_TYPES: - break; - case RPC_LOC_IOCTL_SET_CDMA_PDE_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_CDMA_MPC_SERVER_ADDR: - case RPC_LOC_IOCTL_SET_UMTS_SLP_SERVER_ADDR: - args.ioctl_data->rpc_loc_ioctl_data_u_type_u.server_addr.addr_info.disc = - args.ioctl_data->rpc_loc_ioctl_data_u_type_u.server_addr.addr_type; - break; - case RPC_LOC_IOCTL_GET_CDMA_PDE_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_CDMA_MPC_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_UMTS_SLP_SERVER_ADDR: - break; - case RPC_LOC_IOCTL_SET_ON_DEMAND_LPM: - case RPC_LOC_IOCTL_GET_ON_DEMAND_LPM: - case RPC_LOC_IOCTL_DELETE_ASSIST_DATA: - case RPC_LOC_IOCTL_SET_CUSTOM_PDE_SERVER_ADDR: - case RPC_LOC_IOCTL_GET_CUSTOM_PDE_SERVER_ADDR: - default: - break; - } /* switch */ - } /* ioctl_data != NULL */ - - rpc_loc_ioctl_rets rets; - enum clnt_stat stat = RPC_SUCCESS; - - stat = RPC_FUNC_VERSION(rpc_loc_ioctl_, LOC_APIVERS)(&args, &rets, loc_api_clnt); - LOC_GLUE_CHECK_RESULT(stat, int32); - - return (int32) rets.loc_ioctl_result; -} - -/* Returns 0 if error */ -int32 loc_api_null(void) -{ - LOC_GLUE_CHECK_INIT(int32); - - int32 rets; - enum clnt_stat stat = RPC_SUCCESS; - - stat = RPC_FUNC_VERSION(rpc_loc_api_null_, LOC_APIVERS)(NULL, &rets, loc_api_clnt); - LOC_GLUE_CHECK_RESULT(stat, int32); - - return (int32) rets; -} diff --git a/loc_api/libloc_api-rpc/gen-3200/loc_api_xdr.c b/loc_api/libloc_api-rpc/gen-3200/loc_api_xdr.c deleted file mode 100644 index 835f6b18..00000000 --- a/loc_api/libloc_api-rpc/gen-3200/loc_api_xdr.c +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#include "loc_api.h" - -bool_t -xdr_rpc_loc_api_api_versions_return_type (XDR *xdrs, rpc_loc_api_api_versions_return_type *objp) -{ - register int32_t *buf; - - if (!xdr_array (xdrs, (char **)&objp->rpc_loc_api_api_versions_return_type_val, (u_int *) &objp->rpc_loc_api_api_versions_return_type_len, ~0, - sizeof (rpc_uint32), (xdrproc_t) xdr_rpc_uint32)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_event_cb_f_type (XDR *xdrs, rpc_loc_event_cb_f_type *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_open_args (XDR *xdrs, rpc_loc_open_args *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_event_mask_type (xdrs, &objp->event_reg_mask)) - return FALSE; - if (!xdr_rpc_loc_event_cb_f_type (xdrs, &objp->event_callback)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_close_args (XDR *xdrs, rpc_loc_close_args *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_client_handle_type (xdrs, &objp->handle)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_start_fix_args (XDR *xdrs, rpc_loc_start_fix_args *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_client_handle_type (xdrs, &objp->handle)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_stop_fix_args (XDR *xdrs, rpc_loc_stop_fix_args *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_client_handle_type (xdrs, &objp->handle)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ioctl_args (XDR *xdrs, rpc_loc_ioctl_args *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_client_handle_type (xdrs, &objp->handle)) - return FALSE; - if (!xdr_rpc_loc_ioctl_e_type (xdrs, &objp->ioctl_type)) - return FALSE; - if (!xdr_pointer (xdrs, (char **)&objp->ioctl_data, sizeof (rpc_loc_ioctl_data_u_type), (xdrproc_t) xdr_rpc_loc_ioctl_data_u_type)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_api_api_version_s_args (XDR *xdrs, rpc_loc_api_api_version_s_args *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_boolean (xdrs, &objp->len_not_null)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_api_rpc_glue_code_info_remote_rets (XDR *xdrs, rpc_loc_api_rpc_glue_code_info_remote_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_uint32 (xdrs, &objp->toolvers)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->features)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->proghash)) - return FALSE; - if (!xdr_rpc_uint32 (xdrs, &objp->cbproghash)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_open_rets (XDR *xdrs, rpc_loc_open_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_client_handle_type (xdrs, &objp->loc_open_result)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_close_rets (XDR *xdrs, rpc_loc_close_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_int32 (xdrs, &objp->loc_close_result)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_start_fix_rets (XDR *xdrs, rpc_loc_start_fix_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_int32 (xdrs, &objp->loc_start_fix_result)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_stop_fix_rets (XDR *xdrs, rpc_loc_stop_fix_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_int32 (xdrs, &objp->loc_stop_fix_result)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_ioctl_rets (XDR *xdrs, rpc_loc_ioctl_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_int32 (xdrs, &objp->loc_ioctl_result)) - return FALSE; - return TRUE; -} - -bool_t -xdr_rpc_loc_api_api_versions_rets (XDR *xdrs, rpc_loc_api_api_versions_rets *objp) -{ - register int32_t *buf; - - if (!xdr_rpc_loc_api_api_versions_return_type (xdrs, &objp->loc_api_api_versions_result)) - return FALSE; - if (!xdr_pointer (xdrs, (char **)&objp->len, sizeof (rpc_uint32), (xdrproc_t) xdr_rpc_uint32)) - return FALSE; - return TRUE; -} diff --git a/loc_api/libloc_api-rpc/inc-1240/loc_api.h b/loc_api/libloc_api-rpc/inc-1240/loc_api.h deleted file mode 100644 index e02648cc..00000000 --- a/loc_api/libloc_api-rpc/inc-1240/loc_api.h +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#ifndef _LOC_API_H_RPCGEN -#define _LOC_API_H_RPCGEN - -#include - -#include - -#ifdef __cplusplus -extern "C" { -#endif - - -typedef struct { - u_int rpc_loc_api_api_versions_return_type_len; - rpc_uint32 *rpc_loc_api_api_versions_return_type_val; -} rpc_loc_api_api_versions_return_type; - -typedef rpc_uint32 rpc_loc_event_cb_f_type; - -struct rpc_loc_open_args { - rpc_loc_event_mask_type event_reg_mask; - rpc_loc_event_cb_f_type event_callback; -}; -typedef struct rpc_loc_open_args rpc_loc_open_args; - -struct rpc_loc_close_args { - rpc_loc_client_handle_type handle; -}; -typedef struct rpc_loc_close_args rpc_loc_close_args; - -struct rpc_loc_start_fix_args { - rpc_loc_client_handle_type handle; -}; -typedef struct rpc_loc_start_fix_args rpc_loc_start_fix_args; - -struct rpc_loc_stop_fix_args { - rpc_loc_client_handle_type handle; -}; -typedef struct rpc_loc_stop_fix_args rpc_loc_stop_fix_args; - -struct rpc_loc_ioctl_args { - rpc_loc_client_handle_type handle; - rpc_loc_ioctl_e_type ioctl_type; - rpc_loc_ioctl_data_u_type *ioctl_data; -}; -typedef struct rpc_loc_ioctl_args rpc_loc_ioctl_args; - -struct rpc_loc_api_api_version_s_args { - rpc_boolean len_not_null; -}; -typedef struct rpc_loc_api_api_version_s_args rpc_loc_api_api_version_s_args; - -struct rpc_loc_api_rpc_glue_code_info_remote_rets { - rpc_uint32 toolvers; - rpc_uint32 features; - rpc_uint32 proghash; - rpc_uint32 cbproghash; -}; -typedef struct rpc_loc_api_rpc_glue_code_info_remote_rets rpc_loc_api_rpc_glue_code_info_remote_rets; - -struct rpc_loc_open_rets { - rpc_loc_client_handle_type loc_open_result; -}; -typedef struct rpc_loc_open_rets rpc_loc_open_rets; - -struct rpc_loc_close_rets { - rpc_int32 loc_close_result; -}; -typedef struct rpc_loc_close_rets rpc_loc_close_rets; - -struct rpc_loc_start_fix_rets { - rpc_int32 loc_start_fix_result; -}; -typedef struct rpc_loc_start_fix_rets rpc_loc_start_fix_rets; - -struct rpc_loc_stop_fix_rets { - rpc_int32 loc_stop_fix_result; -}; -typedef struct rpc_loc_stop_fix_rets rpc_loc_stop_fix_rets; - -struct rpc_loc_ioctl_rets { - rpc_int32 loc_ioctl_result; -}; -typedef struct rpc_loc_ioctl_rets rpc_loc_ioctl_rets; - -struct rpc_loc_api_api_versions_rets { - rpc_loc_api_api_versions_return_type loc_api_api_versions_result; - rpc_uint32 *len; -}; -typedef struct rpc_loc_api_api_versions_rets rpc_loc_api_api_versions_rets; -#define LOC_APIVERS 0x00040002 - -#define LOC_APIPROG 0x3000008c -#define LOC_APIVERS_0001 0x00040001 - -#if defined(__STDC__) || defined(__cplusplus) -#define rpc_loc_api_null 0 -extern enum clnt_stat rpc_loc_api_null_0x00040001(void *, void *, CLIENT *); -extern bool_t rpc_loc_api_null_0x00040001_svc(void *, void *, struct svc_req *); -#define rpc_loc_api_rpc_glue_code_info_remote 1 -extern enum clnt_stat rpc_loc_api_rpc_glue_code_info_remote_0x00040001(void *, rpc_loc_api_rpc_glue_code_info_remote_rets *, CLIENT *); -extern bool_t rpc_loc_api_rpc_glue_code_info_remote_0x00040001_svc(void *, rpc_loc_api_rpc_glue_code_info_remote_rets *, struct svc_req *); -#define rpc_loc_open 2 -extern enum clnt_stat rpc_loc_open_0x00040001(rpc_loc_open_args *, rpc_loc_open_rets *, CLIENT *); -extern bool_t rpc_loc_open_0x00040001_svc(rpc_loc_open_args *, rpc_loc_open_rets *, struct svc_req *); -#define rpc_loc_close 3 -extern enum clnt_stat rpc_loc_close_0x00040001(rpc_loc_close_args *, rpc_loc_close_rets *, CLIENT *); -extern bool_t rpc_loc_close_0x00040001_svc(rpc_loc_close_args *, rpc_loc_close_rets *, struct svc_req *); -#define rpc_loc_start_fix 4 -extern enum clnt_stat rpc_loc_start_fix_0x00040001(rpc_loc_start_fix_args *, rpc_loc_start_fix_rets *, CLIENT *); -extern bool_t rpc_loc_start_fix_0x00040001_svc(rpc_loc_start_fix_args *, rpc_loc_start_fix_rets *, struct svc_req *); -#define rpc_loc_stop_fix 5 -extern enum clnt_stat rpc_loc_stop_fix_0x00040001(rpc_loc_stop_fix_args *, rpc_loc_stop_fix_rets *, CLIENT *); -extern bool_t rpc_loc_stop_fix_0x00040001_svc(rpc_loc_stop_fix_args *, rpc_loc_stop_fix_rets *, struct svc_req *); -#define rpc_loc_ioctl 6 -extern enum clnt_stat rpc_loc_ioctl_0x00040001(rpc_loc_ioctl_args *, rpc_loc_ioctl_rets *, CLIENT *); -extern bool_t rpc_loc_ioctl_0x00040001_svc(rpc_loc_ioctl_args *, rpc_loc_ioctl_rets *, struct svc_req *); -#define rpc_loc_api_api_versions 0xFFFFFFFF -extern enum clnt_stat rpc_loc_api_api_versions_0x00040001(void *, rpc_loc_api_api_versions_rets *, CLIENT *); -extern bool_t rpc_loc_api_api_versions_0x00040001_svc(void *, rpc_loc_api_api_versions_rets *, struct svc_req *); -extern int loc_apiprog_0x00040001_freeresult (SVCXPRT *, xdrproc_t, caddr_t); - -#else /* K&R C */ -#define rpc_loc_api_null 0 -extern enum clnt_stat rpc_loc_api_null_0x00040001(); -extern bool_t rpc_loc_api_null_0x00040001_svc(); -#define rpc_loc_api_rpc_glue_code_info_remote 1 -extern enum clnt_stat rpc_loc_api_rpc_glue_code_info_remote_0x00040001(); -extern bool_t rpc_loc_api_rpc_glue_code_info_remote_0x00040001_svc(); -#define rpc_loc_open 2 -extern enum clnt_stat rpc_loc_open_0x00040001(); -extern bool_t rpc_loc_open_0x00040001_svc(); -#define rpc_loc_close 3 -extern enum clnt_stat rpc_loc_close_0x00040001(); -extern bool_t rpc_loc_close_0x00040001_svc(); -#define rpc_loc_start_fix 4 -extern enum clnt_stat rpc_loc_start_fix_0x00040001(); -extern bool_t rpc_loc_start_fix_0x00040001_svc(); -#define rpc_loc_stop_fix 5 -extern enum clnt_stat rpc_loc_stop_fix_0x00040001(); -extern bool_t rpc_loc_stop_fix_0x00040001_svc(); -#define rpc_loc_ioctl 6 -extern enum clnt_stat rpc_loc_ioctl_0x00040001(); -extern bool_t rpc_loc_ioctl_0x00040001_svc(); -#define rpc_loc_api_api_versions 0xFFFFFFFF -extern enum clnt_stat rpc_loc_api_api_versions_0x00040001(); -extern bool_t rpc_loc_api_api_versions_0x00040001_svc(); -extern int loc_apiprog_0x00040001_freeresult (); -#endif /* K&R C */ -#define LOC_APIVERS_0002 0x00040002 - -#if defined(__STDC__) || defined(__cplusplus) -extern enum clnt_stat rpc_loc_api_null_0x00040002(void *, void *, CLIENT *); -extern bool_t rpc_loc_api_null_0x00040002_svc(void *, void *, struct svc_req *); -extern int loc_apiprog_0x00040002_freeresult (SVCXPRT *, xdrproc_t, caddr_t); - -#else /* K&R C */ -extern enum clnt_stat rpc_loc_api_null_0x00040002(); -extern bool_t rpc_loc_api_null_0x00040002_svc(); -extern int loc_apiprog_0x00040002_freeresult (); -#endif /* K&R C */ - -/* the xdr functions */ - -#if defined(__STDC__) || defined(__cplusplus) -extern bool_t xdr_rpc_loc_api_api_versions_return_type (XDR *, rpc_loc_api_api_versions_return_type*); -extern bool_t xdr_rpc_loc_event_cb_f_type (XDR *, rpc_loc_event_cb_f_type*); -extern bool_t xdr_rpc_loc_open_args (XDR *, rpc_loc_open_args*); -extern bool_t xdr_rpc_loc_close_args (XDR *, rpc_loc_close_args*); -extern bool_t xdr_rpc_loc_start_fix_args (XDR *, rpc_loc_start_fix_args*); -extern bool_t xdr_rpc_loc_stop_fix_args (XDR *, rpc_loc_stop_fix_args*); -extern bool_t xdr_rpc_loc_ioctl_args (XDR *, rpc_loc_ioctl_args*); -extern bool_t xdr_rpc_loc_api_api_version_s_args (XDR *, rpc_loc_api_api_version_s_args*); -extern bool_t xdr_rpc_loc_api_rpc_glue_code_info_remote_rets (XDR *, rpc_loc_api_rpc_glue_code_info_remote_rets*); -extern bool_t xdr_rpc_loc_open_rets (XDR *, rpc_loc_open_rets*); -extern bool_t xdr_rpc_loc_close_rets (XDR *, rpc_loc_close_rets*); -extern bool_t xdr_rpc_loc_start_fix_rets (XDR *, rpc_loc_start_fix_rets*); -extern bool_t xdr_rpc_loc_stop_fix_rets (XDR *, rpc_loc_stop_fix_rets*); -extern bool_t xdr_rpc_loc_ioctl_rets (XDR *, rpc_loc_ioctl_rets*); -extern bool_t xdr_rpc_loc_api_api_versions_rets (XDR *, rpc_loc_api_api_versions_rets*); - -#else /* K&R C */ -extern bool_t xdr_rpc_loc_api_api_versions_return_type (); -extern bool_t xdr_rpc_loc_event_cb_f_type (); -extern bool_t xdr_rpc_loc_open_args (); -extern bool_t xdr_rpc_loc_close_args (); -extern bool_t xdr_rpc_loc_start_fix_args (); -extern bool_t xdr_rpc_loc_stop_fix_args (); -extern bool_t xdr_rpc_loc_ioctl_args (); -extern bool_t xdr_rpc_loc_api_api_version_s_args (); -extern bool_t xdr_rpc_loc_api_rpc_glue_code_info_remote_rets (); -extern bool_t xdr_rpc_loc_open_rets (); -extern bool_t xdr_rpc_loc_close_rets (); -extern bool_t xdr_rpc_loc_start_fix_rets (); -extern bool_t xdr_rpc_loc_stop_fix_rets (); -extern bool_t xdr_rpc_loc_ioctl_rets (); -extern bool_t xdr_rpc_loc_api_api_versions_rets (); - -#endif /* K&R C */ - -#ifdef __cplusplus -} -#endif - -#endif /* !_LOC_API_H_RPCGEN */ diff --git a/loc_api/libloc_api-rpc/inc-1240/loc_api_cb.h b/loc_api/libloc_api-rpc/inc-1240/loc_api_cb.h deleted file mode 100644 index 67ac0846..00000000 --- a/loc_api/libloc_api-rpc/inc-1240/loc_api_cb.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#ifndef _LOC_API_CB_H_RPCGEN -#define _LOC_API_CB_H_RPCGEN - -#include - -#include - -#ifdef __cplusplus -extern "C" { -#endif - - -struct rpc_loc_event_cb_f_type_args { - rpc_uint32 cb_id; - rpc_loc_client_handle_type loc_handle; - rpc_loc_event_mask_type loc_event; - rpc_loc_event_payload_u_type *loc_event_payload; -}; -typedef struct rpc_loc_event_cb_f_type_args rpc_loc_event_cb_f_type_args; - -struct rpc_loc_event_cb_f_type_rets { - rpc_int32 loc_event_cb_f_type_result; -}; -typedef struct rpc_loc_event_cb_f_type_rets rpc_loc_event_cb_f_type_rets; -#define LOC_APICBVERS 0x00040002 - -#define LOC_APICBPROG 0x3100008c -#define LOC_APICBVERS_0001 0x00040001 - -#if defined(__STDC__) || defined(__cplusplus) -#define rpc_loc_event_cb_f_type 1 -extern enum clnt_stat rpc_loc_event_cb_f_type_0x00040001(rpc_loc_event_cb_f_type_args *, rpc_loc_event_cb_f_type_rets *, CLIENT *); -extern bool_t rpc_loc_event_cb_f_type_0x00040001_svc(rpc_loc_event_cb_f_type_args *, rpc_loc_event_cb_f_type_rets *, struct svc_req *); -extern int loc_apicbprog_0x00040001_freeresult (SVCXPRT *, xdrproc_t, caddr_t); - -#else /* K&R C */ -#define rpc_loc_event_cb_f_type 1 -extern enum clnt_stat rpc_loc_event_cb_f_type_0x00040001(); -extern bool_t rpc_loc_event_cb_f_type_0x00040001_svc(); -extern int loc_apicbprog_0x00040001_freeresult (); -#endif /* K&R C */ - -/* the xdr functions */ - -#if defined(__STDC__) || defined(__cplusplus) -extern bool_t xdr_rpc_loc_event_cb_f_type_args (XDR *, rpc_loc_event_cb_f_type_args*); -extern bool_t xdr_rpc_loc_event_cb_f_type_rets (XDR *, rpc_loc_event_cb_f_type_rets*); - -#else /* K&R C */ -extern bool_t xdr_rpc_loc_event_cb_f_type_args (); -extern bool_t xdr_rpc_loc_event_cb_f_type_rets (); - -#endif /* K&R C */ - -#ifdef __cplusplus -} -#endif - -#endif /* !_LOC_API_CB_H_RPCGEN */ diff --git a/loc_api/libloc_api-rpc/inc-1240/loc_api_common.h b/loc_api/libloc_api-rpc/inc-1240/loc_api_common.h deleted file mode 100644 index 6ff3baf1..00000000 --- a/loc_api/libloc_api-rpc/inc-1240/loc_api_common.h +++ /dev/null @@ -1,1154 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#ifndef _LOC_API_COMMON_H_RPCGEN -#define _LOC_API_COMMON_H_RPCGEN - -#include -#include "loc_api_fixup.h" - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#define LOC_API_TOOLVERS 0x00040024 -#define LOC_API_FEATURES 0x00000001 -#define RPC_LOC_EVENT_NI_NOTIFY_VERIFY_REQUEST 0x00000010 -#define RPC_LOC_EVENT_WPS_NEEDED_REQUEST 0x00000200 -#define RPC_LOC_EVENT_IOCTL_REPORT 0x00000080 -#define RPC_LOC_EVENT_LOCATION_SERVER_REQUEST 0x00000040 -#define RPC_LOC_EVENT_RESERVED 0x8000000000000000 -#define RPC_LOC_EVENT_PARSED_POSITION_REPORT 0x00000001 -#define RPC_LOC_EVENT_ASSISTANCE_DATA_REQUEST 0x00000020 -#define RPC_LOC_EVENT_NMEA_POSITION_REPORT 0x00000008 -#define RPC_LOC_EVENT_SATELLITE_REPORT 0x00000002 -#define RPC_LOC_EVENT_STATUS_REPORT 0x00000100 -#define RPC_LOC_EVENT_CB_F_TYPE_VERSION 0x00040001 -#define RPC_LOC_OPEN_VERSION 0x00040001 -#define RPC_LOC_API_RPC_GLUE_CODE_INFO_REMOTE_VERSION 0x00040001 -#define RPC_LOC_API_NULL_VERSION 0x00040001 -#define RPC_LOC_STOP_FIX_VERSION 0x00040001 -#define RPC_LOC_IOCTL_VERSION 0x00040001 -#define RPC_LOC_START_FIX_VERSION 0x00040001 -#define RPC_LOC_CLOSE_VERSION 0x00040001 -#define RPC_LOC_API_API_VERSIONS_VERSION 0x00040001 -#define RPC_LOC_API_API_MAJOR_NUM 0x0004 -#define RPC_LOC_APIAPI_VERSION_IS_HASHKEY 0 - -typedef bool_t rpc_boolean; - -typedef u_long rpc_uint32; - -typedef u_short rpc_uint16; - -typedef u_char rpc_uint8; - -typedef long rpc_int32; - -typedef u_char rpc_byte; - -typedef u_quad_t rpc_uint64; - -typedef rpc_int32 rpc_loc_client_handle_type; - -typedef rpc_uint64 rpc_loc_event_mask_type; - -typedef rpc_uint64 rpc_loc_position_valid_mask_type; - -typedef rpc_uint32 rpc_loc_pos_technology_mask_type; - -enum rpc_loc_session_status_e_type { - RPC_LOC_SESS_STATUS_SUCCESS = 0, - RPC_LOC_SESS_STATUS_IN_PROGESS = 1, - RPC_LOC_SESS_STATUS_GENERAL_FAILURE = 2, - RPC_LOC_SESS_STATUS_TIMEOUT = 3, - RPC_LOC_SESS_STATUS_USER_END = 4, - RPC_LOC_SESS_STATUS_BAD_PARAMETER = 5, - RPC_LOC_SESS_STATUS_PHONE_OFFLINE = 6, - RPC_LOC_SESS_STATUS_ENGINE_LOCKED = 7, - RPC_LOC_SESS_STATUS_MAX = 268435456, -}; -typedef enum rpc_loc_session_status_e_type rpc_loc_session_status_e_type; - -struct rpc_loc_calendar_time_s_type { - rpc_uint16 year; - u_char month; - u_char day_of_week; - u_char day; - u_char hour; - u_char minute; - u_char second; - rpc_uint16 millisecond; -}; -typedef struct rpc_loc_calendar_time_s_type rpc_loc_calendar_time_s_type; - -struct rpc_loc_parsed_position_s_type { - rpc_loc_position_valid_mask_type valid_mask; - rpc_loc_session_status_e_type session_status; - rpc_loc_calendar_time_s_type timestamp_calendar; - rpc_uint64 timestamp_utc; - rpc_uint8 leap_seconds; - float time_unc; - double latitude; - double longitude; - float altitude_wrt_ellipsoid; - float altitude_wrt_mean_sea_level; - float speed_horizontal; - float speed_vertical; - float heading; - float hor_unc_circular; - float hor_unc_ellipse_semi_major; - float hor_unc_ellipse_semi_minor; - float hor_unc_ellipse_orient_azimuth; - float vert_unc; - float speed_unc; - float heading_unc; - u_char confidence_horizontal; - u_char confidence_vertical; - float magnetic_deviation; - rpc_loc_pos_technology_mask_type technology_mask; -}; -typedef struct rpc_loc_parsed_position_s_type rpc_loc_parsed_position_s_type; - -enum rpc_loc_sv_system_e_type { - RPC_LOC_SV_SYSTEM_GPS = 1, - RPC_LOC_SV_SYSTEM_GALILEO = 2, - RPC_LOC_SV_SYSTEM_SBAS = 3, - RPC_LOC_SV_SYSTEM_COMPASS = 4, - RPC_LOC_SV_SYSTEM_GLONASS = 5, - RPC_LOC_SV_SYSTEM_MAX = 268435456, -}; -typedef enum rpc_loc_sv_system_e_type rpc_loc_sv_system_e_type; - -enum rpc_loc_sv_status_e_type { - RPC_LOC_SV_STATUS_IDLE = 1, - RPC_LOC_SV_STATUS_SEARCH = 2, - RPC_LOC_SV_STATUS_TRACK = 3, - RPC_LOC_SV_STATUS_MAX = 268435456, -}; -typedef enum rpc_loc_sv_status_e_type rpc_loc_sv_status_e_type; - -typedef rpc_uint32 rpc_loc_sv_info_valid_mask_type; - -struct rpc_loc_sv_info_s_type { - rpc_loc_sv_info_valid_mask_type valid_mask; - rpc_loc_sv_system_e_type system; - rpc_uint8 prn; - rpc_uint8 health_status; - rpc_loc_sv_status_e_type process_status; - rpc_boolean has_eph; - rpc_boolean has_alm; - float elevation; - float azimuth; - float snr; -}; -typedef struct rpc_loc_sv_info_s_type rpc_loc_sv_info_s_type; - -typedef rpc_uint32 rpc_loc_gnss_info_valid_mask_type; - -struct rpc_loc_gnss_info_s_type { - rpc_loc_gnss_info_valid_mask_type valid_mask; - float position_dop; - float horizontal_dop; - float vertical_dop; - rpc_boolean altitude_assumed; - rpc_uint16 sv_count; - struct { - u_int sv_list_len; - rpc_loc_sv_info_s_type *sv_list_val; - } sv_list; -}; -typedef struct rpc_loc_gnss_info_s_type rpc_loc_gnss_info_s_type; - -struct rpc_loc_nmea_report_s_type { - rpc_uint16 length; - char nmea_sentences[1200]; -}; -typedef struct rpc_loc_nmea_report_s_type rpc_loc_nmea_report_s_type; - -enum rpc_loc_status_event_e_type { - RPC_LOC_STATUS_EVENT_ENGINE_STATE = 1, - RPC_LOC_STATUS_EVENT_FIX_SESSION_STATE = 2, - RPC_LOC_STATUS_EVENT_MAX = 268435456, -}; -typedef enum rpc_loc_status_event_e_type rpc_loc_status_event_e_type; - -enum rpc_loc_engine_state_e_type { - RPC_LOC_ENGINE_STATE_ON = 1, - RPC_LOC_ENGINE_STATE_OFF = 2, - RPC_LOC_ENGINE_STATE_MAX = 268435456, -}; -typedef enum rpc_loc_engine_state_e_type rpc_loc_engine_state_e_type; - -enum rpc_loc_fix_session_state_e_type { - RPC_LOC_FIX_SESSION_STATE_BEGIN = 1, - RPC_LOC_FIX_SESSION_STATE_END = 2, - RPC_LOC_FIX_SESSION_STATE_MAX = 268435456, -}; -typedef enum rpc_loc_fix_session_state_e_type rpc_loc_fix_session_state_e_type; - -struct rpc_loc_status_event_payload_u_type { - rpc_loc_status_event_e_type disc; - union { - rpc_loc_engine_state_e_type engine_state; - rpc_loc_fix_session_state_e_type fix_session_state; - } rpc_loc_status_event_payload_u_type_u; -}; -typedef struct rpc_loc_status_event_payload_u_type rpc_loc_status_event_payload_u_type; - -struct rpc_loc_status_event_s_type { - rpc_loc_status_event_e_type event; - rpc_loc_status_event_payload_u_type payload; -}; -typedef struct rpc_loc_status_event_s_type rpc_loc_status_event_s_type; - -enum rpc_loc_server_addr_e_type { - RPC_LOC_SERVER_ADDR_IPV4 = 1, - RPC_LOC_SERVER_ADDR_URL = 2, - RPC_LOC_SERVER_ADDR_MAX = 268435456, -}; -typedef enum rpc_loc_server_addr_e_type rpc_loc_server_addr_e_type; - -struct rpc_loc_server_addr_ipv4_type { - rpc_uint32 addr; - rpc_uint16 port; -}; -typedef struct rpc_loc_server_addr_ipv4_type rpc_loc_server_addr_ipv4_type; - -struct rpc_loc_server_addr_url_type { - rpc_uint16 length; - char addr[256]; -}; -typedef struct rpc_loc_server_addr_url_type rpc_loc_server_addr_url_type; - -struct rpc_loc_server_addr_u_type { - rpc_loc_server_addr_e_type disc; - union { - rpc_loc_server_addr_ipv4_type ipv4; - rpc_loc_server_addr_url_type url; - } rpc_loc_server_addr_u_type_u; -}; -typedef struct rpc_loc_server_addr_u_type rpc_loc_server_addr_u_type; - -struct rpc_loc_server_info_s_type { - rpc_loc_server_addr_e_type addr_type; - rpc_loc_server_addr_u_type addr_info; -}; -typedef struct rpc_loc_server_info_s_type rpc_loc_server_info_s_type; - -enum rpc_loc_ni_notify_verify_e_type { - RPC_LOC_NI_USER_NO_NOTIFY_NO_VERIFY = 1, - RPC_LOC_NI_USER_NOTIFY_ONLY = 2, - RPC_LOC_NI_USER_NOTIFY_VERIFY_ALLOW_NO_RESP = 3, - RPC_LOC_NI_USER_NOTIFY_VERIFY_NOT_ALLOW_NO_RESP = 4, - RPC_LOC_NI_USER_PRIVACY_OVERRIDE = 5, - RPC_LOC_NI_USER_NOTIFY_VERITY_TYPE_MAX = 268435456, -}; -typedef enum rpc_loc_ni_notify_verify_e_type rpc_loc_ni_notify_verify_e_type; - -enum rpc_loc_ni_event_e_type { - RPC_LOC_NI_EVENT_VX_NOTIFY_VERIFY_REQ = 1, - RPC_LOC_NI_EVENT_SUPL_NOTIFY_VERIFY_REQ = 2, - RPC_LOC_NI_EVENT_UMTS_CP_NOTIFY_VERIFY_REQ = 3, - RPC_LOC_NI_EVENT_VX_SERVICE_INTERACTION_REQ = 4, - RPC_LOC_NI_EVENT_MAX = 268435456, -}; -typedef enum rpc_loc_ni_event_e_type rpc_loc_ni_event_e_type; - -enum rpc_loc_ni_datacoding_scheme_e_type { - RPC_LOC_NI_PRESUPL_ISO646IRV = 0, - RPC_LOC_NI_PRESUPL_ISO8859 = 1, - RPC_LOC_NI_PRESUPL_UTF8 = 2, - RPC_LOC_NI_PRESUPL_UTF16 = 3, - RPC_LOC_NI_PRESUPL_UCS2 = 4, - RPC_LOC_NI_PRESUPL_GSM_DEFAULT = 5, - RPC_LOC_NI_PRESUPL_SHIFT_JIS = 6, - RPC_LOC_NI_PRESUPL_JIS = 7, - RPC_LOC_NI_PRESUPL_EUC = 8, - RPC_LOC_NI_PRESUPL_GB2312 = 9, - RPC_LOC_NI_PRESUPL_CNS11643 = 10, - RPC_LOC_NI_PRESUPL_KSC1001 = 11, - RPC_LOC_NI_PRESUPL_ENCODING_UNKNOWN = 2147483647, - RPC_LOC_NI_SS_GERMAN = 12, - RPC_LOC_NI_SS_ENGLISH = 13, - RPC_LOC_NI_SS_ITALIAN = 14, - RPC_LOC_NI_SS_FRENCH = 15, - RPC_LOC_NI_SS_SPANISH = 16, - RPC_LOC_NI_SS_DUTCH = 17, - RPC_LOC_NI_SS_SWEDISH = 18, - RPC_LOC_NI_SS_DANISH = 19, - RPC_LOC_NI_SS_PORTUGUESE = 20, - RPC_LOC_NI_SS_FINNISH = 21, - RPC_LOC_NI_SS_NORWEGIAN = 22, - RPC_LOC_NI_SS_GREEK = 23, - RPC_LOC_NI_SS_TURKISH = 24, - RPC_LOC_NI_SS_HUNGARIAN = 25, - RPC_LOC_NI_SS_POLISH = 26, - RPC_LOC_NI_SS_LANGUAGE_UNSPEC = 27, - RPC_LOC_NI_SUPL_UTF8 = 28, - RPC_LOC_NI_SUPL_UCS2 = 29, - RPC_LOC_NI_SUPL_GSM_DEFAULT = 30, - RPC_LOC_NI_SUPL_ENCODING_UNKNOWN = 2147483647, -}; -typedef enum rpc_loc_ni_datacoding_scheme_e_type rpc_loc_ni_datacoding_scheme_e_type; - -enum rpc_loc_ni_vx_requester_id_encoding_scheme_e_type { - RPC_LOC_NI_VX_OCTET = 0, - RPC_LOC_NI_VX_EXN_PROTOCOL_MSG = 1, - RPC_LOC_NI_VX_ASCII = 2, - RPC_LOC_NI_VX_IA5 = 3, - RPC_LOC_NI_VX_UNICODE = 4, - RPC_LOC_NI_VX_SHIFT_JIS = 5, - RPC_LOC_NI_VX_KOREAN = 6, - RPC_LOC_NI_VX_LATIN_HEBREW = 7, - RPC_LOC_NI_VX_LATIN = 8, - RPC_LOC_NI_VX_GSM = 9, - RPC_LOC_NI_VX_ENCODING_TYPE_MAX = 268435456, -}; -typedef enum rpc_loc_ni_vx_requester_id_encoding_scheme_e_type rpc_loc_ni_vx_requester_id_encoding_scheme_e_type; - -enum rpc_loc_ni_vx_pos_mode_e_type { - RPC_LOC_VX_MS_ASSISTED_ONLY = 1, - RPC_LOC_VX_MS_BASED_ONLY = 2, - RPC_LOC_VX_MS_ASSISTED_PREF_MSBASED_ALLWD = 3, - RPC_LOC_VX_MS_BASED_PREF_ASSISTED_ALLWD = 4, - RPC_LOC_VX_POS_MODE_MAX = 268435456, -}; -typedef enum rpc_loc_ni_vx_pos_mode_e_type rpc_loc_ni_vx_pos_mode_e_type; - -struct rpc_loc_ni_vx_requester_id_s_type { - u_char requester_id_length; - char requester_id[200]; -}; -typedef struct rpc_loc_ni_vx_requester_id_s_type rpc_loc_ni_vx_requester_id_s_type; - -struct rpc_loc_ni_vx_notify_verify_req_s_type { - rpc_loc_ni_notify_verify_e_type notification_priv_type; - u_char pos_qos_incl; - u_char pos_qos; - rpc_uint32 num_fixes; - rpc_uint32 tbf; - rpc_loc_ni_vx_pos_mode_e_type pos_mode; - rpc_loc_ni_vx_requester_id_encoding_scheme_e_type encoding_scheme; - rpc_loc_ni_vx_requester_id_s_type requester_id; - rpc_uint16 user_resp_timer_val; -}; -typedef struct rpc_loc_ni_vx_notify_verify_req_s_type rpc_loc_ni_vx_notify_verify_req_s_type; - -enum rpc_loc_ni_supl_pos_method_e_type { - RPC_LOC_NI_POSMETHOD_AGPS_SETASSISTED = 1, - RPC_LOC_NI_POSMETHOD_AGPS_SETBASED = 2, - RPC_LOC_NI_POSMETHOD_AGPS_SETASSISTED_PREF = 3, - RPC_LOC_NI_POSMETHOD_AGPS_SETBASED_PREF = 4, - RPC_LOC_NI_POSMETHOD_AUTONOMOUS_GPS = 5, - RPC_LOC_NI_POSMETHOD_AFLT = 6, - RPC_LOC_NI_POSMETHOD_ECID = 7, - RPC_LOC_NI_POSMETHOD_EOTD = 8, - RPC_LOC_NI_POSMETHOD_OTDOA = 9, - RPC_LOC_NI_POSMETHOD_NO_POSITION = 10, - RPC_LOC_NI_POSMETHOD_MAX = 268435456, -}; -typedef enum rpc_loc_ni_supl_pos_method_e_type rpc_loc_ni_supl_pos_method_e_type; - -struct rpc_loc_ni_supl_slp_session_id_s_type { - u_char presence; - char session_id[4]; - rpc_loc_server_info_s_type slp_address; -}; -typedef struct rpc_loc_ni_supl_slp_session_id_s_type rpc_loc_ni_supl_slp_session_id_s_type; - -struct rpc_loc_ni_requestor_id_s_type { - u_char data_coding_scheme; - char requestor_id_string[200]; - u_char string_len; -}; -typedef struct rpc_loc_ni_requestor_id_s_type rpc_loc_ni_requestor_id_s_type; - -struct rpc_loc_ni_supl_client_name_s_type { - u_char data_coding_scheme; - char client_name_string[64]; - u_char string_len; -}; -typedef struct rpc_loc_ni_supl_client_name_s_type rpc_loc_ni_supl_client_name_s_type; - -struct rpc_loc_ni_supl_qop_s_type { - u_char bit_mask; - u_char horacc; - u_char veracc; - rpc_uint16 maxLocAge; - u_char delay; -}; -typedef struct rpc_loc_ni_supl_qop_s_type rpc_loc_ni_supl_qop_s_type; - -struct rpc_loc_ni_supl_notify_verify_req_s_type { - rpc_loc_ni_notify_verify_e_type notification_priv_type; - rpc_uint16 flags; - rpc_loc_ni_supl_slp_session_id_s_type supl_slp_session_id; - char supl_hash[8]; - rpc_loc_ni_datacoding_scheme_e_type datacoding_scheme; - rpc_loc_ni_supl_pos_method_e_type pos_method; - rpc_loc_ni_requestor_id_s_type requestor_id; - rpc_loc_ni_supl_client_name_s_type client_name; - rpc_loc_ni_supl_qop_s_type supl_qop; - rpc_uint16 user_response_timer; -}; -typedef struct rpc_loc_ni_supl_notify_verify_req_s_type rpc_loc_ni_supl_notify_verify_req_s_type; - -struct rpc_loc_ni_ext_client_address_s_type { - u_char ext_client_address_len; - char ext_client_address[20]; -}; -typedef struct rpc_loc_ni_ext_client_address_s_type rpc_loc_ni_ext_client_address_s_type; - -enum rpc_loc_ni_location_type_e_type { - RPC_LOC_NI_LOCATIONTYPE_CURRENT_LOCATION = 1, - RPC_LOC_NI_LOCATIONTYPE_CURRENT_OR_LAST_KNOWN_LOCATION = 2, - RPC_LOC_NI_LOCATIONTYPE_INITIAL_LOCATION = 3, - RPC_LOC_NI_LOCATIONTYPE_MAX = 268435456, -}; -typedef enum rpc_loc_ni_location_type_e_type rpc_loc_ni_location_type_e_type; - -struct rpc_loc_ni_deferred_location_s_type { - u_char unused_bits; - u_char ms_available; -}; -typedef struct rpc_loc_ni_deferred_location_s_type rpc_loc_ni_deferred_location_s_type; - -struct rpc_loc_ni_codeword_string_s_type { - u_char data_coding_scheme; - char lcs_codeword_string[20]; - u_char string_len; -}; -typedef struct rpc_loc_ni_codeword_string_s_type rpc_loc_ni_codeword_string_s_type; - -struct rpc_loc_ni_service_type_id_s_type { - u_char lcs_service_type_id; -}; -typedef struct rpc_loc_ni_service_type_id_s_type rpc_loc_ni_service_type_id_s_type; - -struct rpc_loc_ni_umts_cp_notify_verify_req_s_type { - rpc_loc_ni_notify_verify_e_type notification_priv_type; - u_char invoke_id; - rpc_uint16 flags; - u_char notification_length; - char notification_text[64]; - rpc_loc_ni_datacoding_scheme_e_type datacoding_scheme; - rpc_loc_ni_ext_client_address_s_type ext_client_address_data; - rpc_loc_ni_location_type_e_type location_type; - rpc_loc_ni_deferred_location_s_type deferred_location; - rpc_loc_ni_requestor_id_s_type requestor_id; - rpc_loc_ni_codeword_string_s_type codeword_string; - rpc_loc_ni_service_type_id_s_type service_type_id; - rpc_uint16 user_response_timer; -}; -typedef struct rpc_loc_ni_umts_cp_notify_verify_req_s_type rpc_loc_ni_umts_cp_notify_verify_req_s_type; - -enum rpc_loc_ni_service_interaction_e_type { - RPC_LOC_NI_SERVICE_INTERACTION_ONGOING_NI_INCOMING_MO = 1, - RPC_LOC_NI_SERVICE_INTERACTION_MAX = 268435456, -}; -typedef enum rpc_loc_ni_service_interaction_e_type rpc_loc_ni_service_interaction_e_type; - -struct rpc_loc_ni_vx_service_interaction_req_s_type { - rpc_loc_ni_vx_notify_verify_req_s_type ni_vx_req; - rpc_loc_ni_service_interaction_e_type service_interation_type; -}; -typedef struct rpc_loc_ni_vx_service_interaction_req_s_type rpc_loc_ni_vx_service_interaction_req_s_type; - -struct rpc_loc_ni_event_payload_u_type { - rpc_loc_ni_event_e_type disc; - union { - rpc_loc_ni_vx_notify_verify_req_s_type vx_req; - rpc_loc_ni_supl_notify_verify_req_s_type supl_req; - rpc_loc_ni_umts_cp_notify_verify_req_s_type umts_cp_req; - rpc_loc_ni_vx_service_interaction_req_s_type service_interaction_req; - } rpc_loc_ni_event_payload_u_type_u; -}; -typedef struct rpc_loc_ni_event_payload_u_type rpc_loc_ni_event_payload_u_type; - -struct rpc_loc_ni_event_s_type { - rpc_loc_ni_event_e_type event; - rpc_loc_ni_event_payload_u_type payload; -}; -typedef struct rpc_loc_ni_event_s_type rpc_loc_ni_event_s_type; - -enum rpc_loc_assist_data_request_e_type { - RPC_LOC_ASSIST_DATA_TIME_REQ = 1, - RPC_LOC_ASSIST_DATA_PREDICTED_ORBITS_REQ = 2, - RPC_LOC_ASSIST_DATA_MAX = 268435456, -}; -typedef enum rpc_loc_assist_data_request_e_type rpc_loc_assist_data_request_e_type; - -typedef char *rpc_struct_loc_time_download_source_s_type_servers_ptr; - -typedef rpc_struct_loc_time_download_source_s_type_servers_ptr rpc_struct_loc_time_download_source_s_type_servers[3]; - -struct rpc_loc_time_download_source_s_type { - rpc_uint32 delay_threshold; - rpc_struct_loc_time_download_source_s_type_servers servers; -}; -typedef struct rpc_loc_time_download_source_s_type rpc_loc_time_download_source_s_type; - -typedef char *rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr; - -typedef rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr rpc_struct_loc_predicted_orbits_data_source_s_type_servers[3]; - -struct rpc_loc_predicted_orbits_data_source_s_type { - rpc_uint32 max_file_size; - rpc_uint32 max_part_size; - rpc_struct_loc_predicted_orbits_data_source_s_type_servers servers; -}; -typedef struct rpc_loc_predicted_orbits_data_source_s_type rpc_loc_predicted_orbits_data_source_s_type; - -struct rpc_loc_assist_data_request_payload_u_type { - rpc_loc_assist_data_request_e_type disc; - union { - rpc_loc_time_download_source_s_type time_download; - rpc_loc_predicted_orbits_data_source_s_type data_download; - } rpc_loc_assist_data_request_payload_u_type_u; -}; -typedef struct rpc_loc_assist_data_request_payload_u_type rpc_loc_assist_data_request_payload_u_type; - -struct rpc_loc_assist_data_request_s_type { - rpc_loc_assist_data_request_e_type event; - rpc_loc_assist_data_request_payload_u_type payload; -}; -typedef struct rpc_loc_assist_data_request_s_type rpc_loc_assist_data_request_s_type; - -typedef rpc_uint32 rpc_loc_server_connection_handle; - -enum rpc_loc_server_protocol_e_type { - RPC_LOC_SERVER_PROTOCOL_DEFAULT = 0, - RPC_LOC_SERVER_PROTOCOL_SUPL = 1, - RPC_LOC_SERVER_PROTOCOL_VX_MPC = 2, - RPC_LOC_SERVER_PROTOCOL_VX_PDE = 3, - RPC_LOC_SERVER_PROTOCOL_MAX = 16777216, -}; -typedef enum rpc_loc_server_protocol_e_type rpc_loc_server_protocol_e_type; - -enum rpc_loc_server_request_e_type { - RPC_LOC_SERVER_REQUEST_OPEN = 1, - RPC_LOC_SERVER_REQUEST_CLOSE = 2, - RPC_LOC_SERVER_REQUEST_MAX = 268435456, -}; -typedef enum rpc_loc_server_request_e_type rpc_loc_server_request_e_type; - -struct rpc_loc_server_open_req_s_type { - rpc_loc_server_connection_handle conn_handle; - rpc_loc_server_protocol_e_type protocol; -}; -typedef struct rpc_loc_server_open_req_s_type rpc_loc_server_open_req_s_type; - -struct rpc_loc_server_close_req_s_type { - rpc_loc_server_connection_handle conn_handle; -}; -typedef struct rpc_loc_server_close_req_s_type rpc_loc_server_close_req_s_type; - -struct rpc_loc_server_request_u_type { - rpc_loc_server_request_e_type disc; - union { - rpc_loc_server_open_req_s_type open_req; - rpc_loc_server_close_req_s_type close_req; - } rpc_loc_server_request_u_type_u; -}; -typedef struct rpc_loc_server_request_u_type rpc_loc_server_request_u_type; - -struct rpc_loc_server_request_s_type { - rpc_loc_server_request_e_type event; - rpc_loc_server_request_u_type payload; -}; -typedef struct rpc_loc_server_request_s_type rpc_loc_server_request_s_type; - -enum rpc_loc_qwip_request_e_type { - RPC_LOC_QWIP_START_PERIODIC_HI_FREQ_FIXES = 0, - RPC_LOC_QWIP_START_PERIODIC_KEEP_WARM = 0 + 1, - RPC_LOC_QWIP_STOP_PERIODIC_FIXES = 0 + 2, - RPC_LOC_QWIP_SUSPEND = 0 + 3, - RPC_LOC_QWIP_REQUEST_MAX = 268435456, -}; -typedef enum rpc_loc_qwip_request_e_type rpc_loc_qwip_request_e_type; - -struct rpc_loc_qwip_request_s_type { - rpc_loc_qwip_request_e_type request_type; - rpc_uint16 tbf_ms; -}; -typedef struct rpc_loc_qwip_request_s_type rpc_loc_qwip_request_s_type; - -struct rpc_loc_reserved_payload_s_type { - rpc_uint16 data_size; - struct { - u_int data_len; - char *data_val; - } data; -}; -typedef struct rpc_loc_reserved_payload_s_type rpc_loc_reserved_payload_s_type; - -enum rpc_loc_ioctl_e_type { - RPC_LOC_IOCTL_GET_API_VERSION = 1, - RPC_LOC_IOCTL_SET_FIX_CRITERIA = 2, - RPC_LOC_IOCTL_GET_FIX_CRITERIA = 3, - RPC_LOC_IOCTL_SERVICE_START_INDEX = 400, - RPC_LOC_IOCTL_INFORM_NI_USER_RESPONSE = 400, - RPC_LOC_IOCTL_INJECT_PREDICTED_ORBITS_DATA = 401, - RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_VALIDITY = 402, - RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_SOURCE = 403, - RPC_LOC_IOCTL_SET_PREDICTED_ORBITS_DATA_AUTO_DOWNLOAD = 404, - RPC_LOC_IOCTL_INJECT_UTC_TIME = 405, - RPC_LOC_IOCTL_INJECT_RTC_VALUE = 406, - RPC_LOC_IOCTL_INJECT_POSITION = 407, - RPC_LOC_IOCTL_QUERY_ENGINE_STATE = 408, - RPC_LOC_IOCTL_INFORM_SERVER_OPEN_STATUS = 409, - RPC_LOC_IOCTL_INFORM_SERVER_CLOSE_STATUS = 410, - RPC_LOC_IOCTL_SEND_WIPER_POSITION_REPORT = 411, - RPC_LOC_IOCTL_NOTIFY_WIPER_STATUS = 412, - RPC_LOC_IOCTL_ACCESS_EFS_DATA = 413, - RPC_LOC_IOCTL_NV_SETTINGS_START_INDEX = 800, - RPC_LOC_IOCTL_SET_ENGINE_LOCK = 800, - RPC_LOC_IOCTL_GET_ENGINE_LOCK = 801, - RPC_LOC_IOCTL_SET_SBAS_CONFIG = 802, - RPC_LOC_IOCTL_GET_SBAS_CONFIG = 803, - RPC_LOC_IOCTL_SET_NMEA_TYPES = 804, - RPC_LOC_IOCTL_GET_NMEA_TYPES = 805, - RPC_LOC_IOCTL_SET_CDMA_PDE_SERVER_ADDR = 806, - RPC_LOC_IOCTL_GET_CDMA_PDE_SERVER_ADDR = 807, - RPC_LOC_IOCTL_SET_CDMA_MPC_SERVER_ADDR = 808, - RPC_LOC_IOCTL_GET_CDMA_MPC_SERVER_ADDR = 809, - RPC_LOC_IOCTL_SET_UMTS_SLP_SERVER_ADDR = 810, - RPC_LOC_IOCTL_GET_UMTS_SLP_SERVER_ADDR = 811, - RPC_LOC_IOCTL_SET_ON_DEMAND_LPM = 812, - RPC_LOC_IOCTL_GET_ON_DEMAND_LPM = 813, - RPC_LOC_IOCTL_PROPRIETARY_START_INDEX = 1000, - RPC_LOC_IOCTL_DELETE_ASSIST_DATA = 1000, - RPC_LOC_IOCTL_SET_CUSTOM_PDE_SERVER_ADDR = 1001, - RPC_LOC_IOCTL_GET_CUSTOM_PDE_SERVER_ADDR = 1002, - RPC_LOC_IOCTL_THIRD_PARTY_START_INDEX = 1073741824, -}; -typedef enum rpc_loc_ioctl_e_type rpc_loc_ioctl_e_type; - -struct rpc_loc_api_version_s_type { - u_char major; - u_char minor; -}; -typedef struct rpc_loc_api_version_s_type rpc_loc_api_version_s_type; - -enum rpc_loc_fix_recurrence_e_type { - RPC_LOC_PERIODIC_FIX = 1, - RPC_LOC_SINGLE_FIX = 2, - RPC_LOC_FIX_SESSION_TYPE_MAX = 268435456, -}; -typedef enum rpc_loc_fix_recurrence_e_type rpc_loc_fix_recurrence_e_type; - -enum rpc_loc_operation_mode_e_type { - RPC_LOC_OPER_MODE_DEFAULT = 1, - RPC_LOC_OPER_MODE_MSB = 2, - RPC_LOC_OPER_MODE_MSA = 3, - RPC_LOC_OPER_MODE_STANDALONE = 4, - RPC_LOC_OPER_MODE_SPEED_OPTIMAL = 5, - RPC_LOC_OPER_MODE_ACCURACY_OPTIMAL = 6, - RPC_LOC_OPER_MODE_DATA_OPTIMAL = 7, - RPC_LOC_OPER_MODE_CELL_ID = 8, - RPC_LOC_OPER_MODE_MAX = 268435456, -}; -typedef enum rpc_loc_operation_mode_e_type rpc_loc_operation_mode_e_type; - -enum rpc_loc_notify_e_type { - RPC_LOC_NOTIFY_ON_INTERVAL = 1, - RPC_LOC_NOTIFY_ON_DISTANCE = 2, - RPC_LOC_NOTIFY_ON_ANY = 3, - RPC_LOC_NOTIFY_ON_ALL = 4, - RPC_LOC_NOTIFY_TYPE_MAX = 268435456, -}; -typedef enum rpc_loc_notify_e_type rpc_loc_notify_e_type; - -struct rpc_loc_fix_criteria_s_type { - rpc_uint32 valid_mask; - rpc_loc_fix_recurrence_e_type recurrence_type; - rpc_loc_operation_mode_e_type preferred_operation_mode; - rpc_uint32 preferred_accuracy; - rpc_uint32 preferred_response_time; - rpc_boolean intermediate_pos_report_enabled; - rpc_loc_notify_e_type notify_type; - rpc_uint32 min_interval; - float min_distance; - rpc_uint32 min_dist_sample_interval; -}; -typedef struct rpc_loc_fix_criteria_s_type rpc_loc_fix_criteria_s_type; - -enum rpc_loc_ni_user_resp_e_type { - RPC_LOC_NI_LCS_NOTIFY_VERIFY_ACCEPT = 1, - RPC_LOC_NI_LCS_NOTIFY_VERIFY_DENY = 2, - RPC_LOC_NI_LCS_NOTIFY_VERIFY_NORESP = 3, - RPC_LOC_NI_LCS_NOTIFY_VERIFY_MAX = 268435456, -}; -typedef enum rpc_loc_ni_user_resp_e_type rpc_loc_ni_user_resp_e_type; - -struct rpc_loc_user_verify_s_type { - rpc_loc_ni_user_resp_e_type user_resp; - rpc_loc_ni_event_s_type ni_event_pass_back; -}; -typedef struct rpc_loc_user_verify_s_type rpc_loc_user_verify_s_type; - -enum rpc_loc_predicted_orbits_data_format_e_type { - RPC_LOC_PREDICTED_ORBITS_XTRA = 0, - RPC_LOC_PREDICTED_ORBITS_FORMAT_MAX = 268435456, -}; -typedef enum rpc_loc_predicted_orbits_data_format_e_type rpc_loc_predicted_orbits_data_format_e_type; - -struct rpc_loc_predicted_orbits_data_s_type { - rpc_loc_predicted_orbits_data_format_e_type format_type; - rpc_uint32 total_size; - rpc_uint8 total_parts; - rpc_uint8 part; - rpc_uint16 part_len; - struct { - u_int data_ptr_len; - char *data_ptr_val; - } data_ptr; -}; -typedef struct rpc_loc_predicted_orbits_data_s_type rpc_loc_predicted_orbits_data_s_type; - -struct rpc_loc_predicted_orbits_data_validity_report_s_type { - rpc_uint64 start_time_utc; - rpc_uint16 valid_duration_hrs; -}; -typedef struct rpc_loc_predicted_orbits_data_validity_report_s_type rpc_loc_predicted_orbits_data_validity_report_s_type; - -struct rpc_loc_predicted_orbits_auto_download_config_s_type { - rpc_boolean enable; - u_char auto_check_every_hrs; -}; -typedef struct rpc_loc_predicted_orbits_auto_download_config_s_type rpc_loc_predicted_orbits_auto_download_config_s_type; - -struct rpc_loc_assist_data_time_s_type { - rpc_uint64 time_utc; - rpc_uint32 uncertainty; -}; -typedef struct rpc_loc_assist_data_time_s_type rpc_loc_assist_data_time_s_type; - -typedef rpc_uint64 rpc_loc_assist_pos_valid_mask_type; - -struct rpc_loc_assist_data_pos_s_type { - rpc_loc_assist_pos_valid_mask_type valid_mask; - rpc_uint64 timestamp_utc; - double latitude; - double longitude; - float altitude_wrt_ellipsoid; - float altitude_wrt_mean_sea_level; - float hor_unc_circular; - float vert_unc; - u_char confidence_horizontal; - u_char confidence_vertical; - rpc_int32 timestamp_age; -}; -typedef struct rpc_loc_assist_data_pos_s_type rpc_loc_assist_data_pos_s_type; - -enum rpc_loc_server_open_status_e_type { - RPC_LOC_SERVER_OPEN_SUCCESS = 1, - RPC_LOC_SERVER_OPEN_FAIL = 2, - RPC_LOC_SERVER_OPEN_STATUS_MAX = 268435456, -}; -typedef enum rpc_loc_server_open_status_e_type rpc_loc_server_open_status_e_type; - -struct rpc_loc_server_open_status_s_type { - rpc_loc_server_connection_handle conn_handle; - rpc_loc_server_open_status_e_type open_status; - char apn_name[100]; -}; -typedef struct rpc_loc_server_open_status_s_type rpc_loc_server_open_status_s_type; - -enum rpc_loc_server_close_status_e_type { - RPC_LOC_SERVER_CLOSE_SUCCESS = 1, - RPC_LOC_SERVER_CLOSE_FAIL = 2, - RPC_LOC_SERVER_CLOSE_STATUS_MAX = 268435456, -}; -typedef enum rpc_loc_server_close_status_e_type rpc_loc_server_close_status_e_type; - -struct rpc_loc_server_close_status_s_type { - rpc_loc_server_connection_handle conn_handle; - rpc_loc_server_close_status_e_type close_status; -}; -typedef struct rpc_loc_server_close_status_s_type rpc_loc_server_close_status_s_type; - -struct rpc_loc_wiper_fix_time_s_type { - rpc_uint32 slow_clock_count; -}; -typedef struct rpc_loc_wiper_fix_time_s_type rpc_loc_wiper_fix_time_s_type; - -struct rpc_loc_wiper_fix_pos_s_type { - rpc_int32 lat; - rpc_int32 lon; - rpc_uint16 HEPE; - rpc_uint8 num_of_aps_used; - rpc_uint8 fix_error_code; -}; -typedef struct rpc_loc_wiper_fix_pos_s_type rpc_loc_wiper_fix_pos_s_type; - -struct rpc_loc_wiper_ap_info_s_type { - char mac_addr[6]; - rpc_int32 rssi; - rpc_uint16 channel; - rpc_uint8 ap_qualifier; -}; -typedef struct rpc_loc_wiper_ap_info_s_type rpc_loc_wiper_ap_info_s_type; - -struct rpc_loc_wiper_ap_set_s_type { - rpc_uint8 num_of_aps; - rpc_loc_wiper_ap_info_s_type ap_info[50]; -}; -typedef struct rpc_loc_wiper_ap_set_s_type rpc_loc_wiper_ap_set_s_type; - -struct rpc_loc_wiper_position_report_s_type { - rpc_uint8 wiper_valid_info_flag; - rpc_loc_wiper_fix_time_s_type wiper_fix_time; - rpc_loc_wiper_fix_pos_s_type wiper_fix_position; - rpc_loc_wiper_ap_set_s_type wiper_ap_set; -}; -typedef struct rpc_loc_wiper_position_report_s_type rpc_loc_wiper_position_report_s_type; - -enum rpc_loc_wiper_status_e_type { - RPC_LOC_WIPER_STATUS_AVAILABLE = 1, - RPC_LOC_WIPER_STATUS_UNAVAILABLE = 2, - RPC_LOC_WIPER_STATUS_E_SIZE = 268435456, -}; -typedef enum rpc_loc_wiper_status_e_type rpc_loc_wiper_status_e_type; - -enum rpc_loc_fs_operation_e_type { - RPC_LOC_FS_CREATE_WRITE_FILE = 1, - RPC_LOC_FS_APPEND_FILE = 2, - RPC_LOC_FS_DELETE_FILE = 3, - RPC_LOC_FS_READ_FILE = 4, - RPC_LOC_FS_MAX = 268435456, -}; -typedef enum rpc_loc_fs_operation_e_type rpc_loc_fs_operation_e_type; - -struct rpc_loc_efs_data_s_type { - char filename[64]; - rpc_loc_fs_operation_e_type operation; - rpc_uint32 total_size; - struct { - u_int data_ptr_len; - char *data_ptr_val; - } data_ptr; - rpc_uint32 part_len; - rpc_uint8 part; - rpc_uint8 total_parts; - rpc_uint32 reserved; -}; -typedef struct rpc_loc_efs_data_s_type rpc_loc_efs_data_s_type; - -enum rpc_loc_lock_e_type { - RPC_LOC_LOCK_NONE = 1, - RPC_LOC_LOCK_MI = 2, - RPC_LOC_LOCK_MT = 3, - RPC_LOC_LOCK_ALL = 4, - RPC_LOC_LOCK_MAX = 268435456, -}; -typedef enum rpc_loc_lock_e_type rpc_loc_lock_e_type; - -typedef rpc_uint32 rpc_loc_nmea_sentence_type; - -typedef rpc_uint32 rpc_loc_assist_data_type; - -struct rpc_loc_assist_data_delete_s_type { - rpc_loc_assist_data_type type; - rpc_uint32 reserved[8]; -}; -typedef struct rpc_loc_assist_data_delete_s_type rpc_loc_assist_data_delete_s_type; - -struct rpc_loc_ioctl_data_u_type { - rpc_loc_ioctl_e_type disc; - union { - rpc_loc_fix_criteria_s_type fix_criteria; - rpc_loc_user_verify_s_type user_verify_resp; - rpc_loc_predicted_orbits_data_s_type predicted_orbits_data; - rpc_loc_predicted_orbits_auto_download_config_s_type predicted_orbits_auto_download; - rpc_loc_assist_data_time_s_type assistance_data_time; - rpc_loc_assist_data_pos_s_type assistance_data_position; - rpc_loc_server_open_status_s_type conn_open_status; - rpc_loc_server_close_status_s_type conn_close_status; - rpc_loc_wiper_position_report_s_type wiper_pos; - rpc_loc_wiper_status_e_type wiper_status; - rpc_loc_lock_e_type engine_lock; - rpc_boolean sbas_mode; - rpc_loc_nmea_sentence_type nmea_types; - rpc_boolean on_demand_lpm; - rpc_loc_server_info_s_type server_addr; - rpc_loc_assist_data_delete_s_type assist_data_delete; - rpc_loc_efs_data_s_type efs_data; - } rpc_loc_ioctl_data_u_type_u; -}; -typedef struct rpc_loc_ioctl_data_u_type rpc_loc_ioctl_data_u_type; - -struct rpc_loc_ioctl_callback_data_u_type { - rpc_loc_ioctl_e_type disc; - union { - rpc_loc_api_version_s_type api_version; - rpc_loc_fix_criteria_s_type fix_criteria; - rpc_loc_lock_e_type engine_lock; - rpc_boolean sbas_mode; - rpc_loc_nmea_sentence_type nmea_types; - rpc_boolean on_demand_lpm; - rpc_loc_server_info_s_type server_addr; - rpc_loc_predicted_orbits_data_source_s_type predicted_orbits_data_source; - rpc_loc_predicted_orbits_data_validity_report_s_type predicted_orbits_data_validity; - } rpc_loc_ioctl_callback_data_u_type_u; -}; -typedef struct rpc_loc_ioctl_callback_data_u_type rpc_loc_ioctl_callback_data_u_type; - -struct rpc_loc_ioctl_callback_s_type { - rpc_loc_ioctl_e_type type; - rpc_int32 status; - rpc_loc_ioctl_callback_data_u_type data; -}; -typedef struct rpc_loc_ioctl_callback_s_type rpc_loc_ioctl_callback_s_type; - -struct rpc_loc_event_payload_u_type { - u_quad_t disc; - union { - rpc_loc_parsed_position_s_type parsed_location_report; - rpc_loc_gnss_info_s_type gnss_report; - rpc_loc_nmea_report_s_type nmea_report; - rpc_loc_ni_event_s_type ni_request; - rpc_loc_assist_data_request_s_type assist_data_request; - rpc_loc_server_request_s_type loc_server_request; - rpc_loc_ioctl_callback_s_type ioctl_report; - rpc_loc_status_event_s_type status_report; - rpc_loc_qwip_request_s_type qwip_request; - rpc_loc_reserved_payload_s_type reserved; - } rpc_loc_event_payload_u_type_u; -}; -typedef struct rpc_loc_event_payload_u_type rpc_loc_event_payload_u_type; - -/* the xdr functions */ - -#if defined(__STDC__) || defined(__cplusplus) -extern bool_t xdr_rpc_boolean (XDR *, rpc_boolean*); -extern bool_t xdr_rpc_uint32 (XDR *, rpc_uint32*); -extern bool_t xdr_rpc_uint16 (XDR *, rpc_uint16*); -extern bool_t xdr_rpc_uint8 (XDR *, rpc_uint8*); -extern bool_t xdr_rpc_int32 (XDR *, rpc_int32*); -extern bool_t xdr_rpc_byte (XDR *, rpc_byte*); -extern bool_t xdr_rpc_uint64 (XDR *, rpc_uint64*); -extern bool_t xdr_rpc_loc_client_handle_type (XDR *, rpc_loc_client_handle_type*); -extern bool_t xdr_rpc_loc_event_mask_type (XDR *, rpc_loc_event_mask_type*); -extern bool_t xdr_rpc_loc_position_valid_mask_type (XDR *, rpc_loc_position_valid_mask_type*); -extern bool_t xdr_rpc_loc_pos_technology_mask_type (XDR *, rpc_loc_pos_technology_mask_type*); -extern bool_t xdr_rpc_loc_session_status_e_type (XDR *, rpc_loc_session_status_e_type*); -extern bool_t xdr_rpc_loc_calendar_time_s_type (XDR *, rpc_loc_calendar_time_s_type*); -extern bool_t xdr_rpc_loc_parsed_position_s_type (XDR *, rpc_loc_parsed_position_s_type*); -extern bool_t xdr_rpc_loc_sv_system_e_type (XDR *, rpc_loc_sv_system_e_type*); -extern bool_t xdr_rpc_loc_sv_status_e_type (XDR *, rpc_loc_sv_status_e_type*); -extern bool_t xdr_rpc_loc_sv_info_valid_mask_type (XDR *, rpc_loc_sv_info_valid_mask_type*); -extern bool_t xdr_rpc_loc_sv_info_s_type (XDR *, rpc_loc_sv_info_s_type*); -extern bool_t xdr_rpc_loc_gnss_info_valid_mask_type (XDR *, rpc_loc_gnss_info_valid_mask_type*); -extern bool_t xdr_rpc_loc_gnss_info_s_type (XDR *, rpc_loc_gnss_info_s_type*); -extern bool_t xdr_rpc_loc_nmea_report_s_type (XDR *, rpc_loc_nmea_report_s_type*); -extern bool_t xdr_rpc_loc_status_event_e_type (XDR *, rpc_loc_status_event_e_type*); -extern bool_t xdr_rpc_loc_engine_state_e_type (XDR *, rpc_loc_engine_state_e_type*); -extern bool_t xdr_rpc_loc_fix_session_state_e_type (XDR *, rpc_loc_fix_session_state_e_type*); -extern bool_t xdr_rpc_loc_status_event_payload_u_type (XDR *, rpc_loc_status_event_payload_u_type*); -extern bool_t xdr_rpc_loc_status_event_s_type (XDR *, rpc_loc_status_event_s_type*); -extern bool_t xdr_rpc_loc_server_addr_e_type (XDR *, rpc_loc_server_addr_e_type*); -extern bool_t xdr_rpc_loc_server_addr_ipv4_type (XDR *, rpc_loc_server_addr_ipv4_type*); -extern bool_t xdr_rpc_loc_server_addr_url_type (XDR *, rpc_loc_server_addr_url_type*); -extern bool_t xdr_rpc_loc_server_addr_u_type (XDR *, rpc_loc_server_addr_u_type*); -extern bool_t xdr_rpc_loc_server_info_s_type (XDR *, rpc_loc_server_info_s_type*); -extern bool_t xdr_rpc_loc_ni_notify_verify_e_type (XDR *, rpc_loc_ni_notify_verify_e_type*); -extern bool_t xdr_rpc_loc_ni_event_e_type (XDR *, rpc_loc_ni_event_e_type*); -extern bool_t xdr_rpc_loc_ni_datacoding_scheme_e_type (XDR *, rpc_loc_ni_datacoding_scheme_e_type*); -extern bool_t xdr_rpc_loc_ni_vx_requester_id_encoding_scheme_e_type (XDR *, rpc_loc_ni_vx_requester_id_encoding_scheme_e_type*); -extern bool_t xdr_rpc_loc_ni_vx_pos_mode_e_type (XDR *, rpc_loc_ni_vx_pos_mode_e_type*); -extern bool_t xdr_rpc_loc_ni_vx_requester_id_s_type (XDR *, rpc_loc_ni_vx_requester_id_s_type*); -extern bool_t xdr_rpc_loc_ni_vx_notify_verify_req_s_type (XDR *, rpc_loc_ni_vx_notify_verify_req_s_type*); -extern bool_t xdr_rpc_loc_ni_supl_pos_method_e_type (XDR *, rpc_loc_ni_supl_pos_method_e_type*); -extern bool_t xdr_rpc_loc_ni_supl_slp_session_id_s_type (XDR *, rpc_loc_ni_supl_slp_session_id_s_type*); -extern bool_t xdr_rpc_loc_ni_requestor_id_s_type (XDR *, rpc_loc_ni_requestor_id_s_type*); -extern bool_t xdr_rpc_loc_ni_supl_client_name_s_type (XDR *, rpc_loc_ni_supl_client_name_s_type*); -extern bool_t xdr_rpc_loc_ni_supl_qop_s_type (XDR *, rpc_loc_ni_supl_qop_s_type*); -extern bool_t xdr_rpc_loc_ni_supl_notify_verify_req_s_type (XDR *, rpc_loc_ni_supl_notify_verify_req_s_type*); -extern bool_t xdr_rpc_loc_ni_ext_client_address_s_type (XDR *, rpc_loc_ni_ext_client_address_s_type*); -extern bool_t xdr_rpc_loc_ni_location_type_e_type (XDR *, rpc_loc_ni_location_type_e_type*); -extern bool_t xdr_rpc_loc_ni_deferred_location_s_type (XDR *, rpc_loc_ni_deferred_location_s_type*); -extern bool_t xdr_rpc_loc_ni_codeword_string_s_type (XDR *, rpc_loc_ni_codeword_string_s_type*); -extern bool_t xdr_rpc_loc_ni_service_type_id_s_type (XDR *, rpc_loc_ni_service_type_id_s_type*); -extern bool_t xdr_rpc_loc_ni_umts_cp_notify_verify_req_s_type (XDR *, rpc_loc_ni_umts_cp_notify_verify_req_s_type*); -extern bool_t xdr_rpc_loc_ni_service_interaction_e_type (XDR *, rpc_loc_ni_service_interaction_e_type*); -extern bool_t xdr_rpc_loc_ni_vx_service_interaction_req_s_type (XDR *, rpc_loc_ni_vx_service_interaction_req_s_type*); -extern bool_t xdr_rpc_loc_ni_event_payload_u_type (XDR *, rpc_loc_ni_event_payload_u_type*); -extern bool_t xdr_rpc_loc_ni_event_s_type (XDR *, rpc_loc_ni_event_s_type*); -extern bool_t xdr_rpc_loc_assist_data_request_e_type (XDR *, rpc_loc_assist_data_request_e_type*); -extern bool_t xdr_rpc_struct_loc_time_download_source_s_type_servers_ptr (XDR *, rpc_struct_loc_time_download_source_s_type_servers_ptr*); -extern bool_t xdr_rpc_struct_loc_time_download_source_s_type_servers (XDR *, rpc_struct_loc_time_download_source_s_type_servers); -extern bool_t xdr_rpc_loc_time_download_source_s_type (XDR *, rpc_loc_time_download_source_s_type*); -extern bool_t xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr (XDR *, rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr*); -extern bool_t xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers (XDR *, rpc_struct_loc_predicted_orbits_data_source_s_type_servers); -extern bool_t xdr_rpc_loc_predicted_orbits_data_source_s_type (XDR *, rpc_loc_predicted_orbits_data_source_s_type*); -extern bool_t xdr_rpc_loc_assist_data_request_payload_u_type (XDR *, rpc_loc_assist_data_request_payload_u_type*); -extern bool_t xdr_rpc_loc_assist_data_request_s_type (XDR *, rpc_loc_assist_data_request_s_type*); -extern bool_t xdr_rpc_loc_server_connection_handle (XDR *, rpc_loc_server_connection_handle*); -extern bool_t xdr_rpc_loc_server_protocol_e_type (XDR *, rpc_loc_server_protocol_e_type*); -extern bool_t xdr_rpc_loc_server_request_e_type (XDR *, rpc_loc_server_request_e_type*); -extern bool_t xdr_rpc_loc_server_open_req_s_type (XDR *, rpc_loc_server_open_req_s_type*); -extern bool_t xdr_rpc_loc_server_close_req_s_type (XDR *, rpc_loc_server_close_req_s_type*); -extern bool_t xdr_rpc_loc_server_request_u_type (XDR *, rpc_loc_server_request_u_type*); -extern bool_t xdr_rpc_loc_server_request_s_type (XDR *, rpc_loc_server_request_s_type*); -extern bool_t xdr_rpc_loc_qwip_request_e_type (XDR *, rpc_loc_qwip_request_e_type*); -extern bool_t xdr_rpc_loc_qwip_request_s_type (XDR *, rpc_loc_qwip_request_s_type*); -extern bool_t xdr_rpc_loc_reserved_payload_s_type (XDR *, rpc_loc_reserved_payload_s_type*); -extern bool_t xdr_rpc_loc_ioctl_e_type (XDR *, rpc_loc_ioctl_e_type*); -extern bool_t xdr_rpc_loc_api_version_s_type (XDR *, rpc_loc_api_version_s_type*); -extern bool_t xdr_rpc_loc_fix_recurrence_e_type (XDR *, rpc_loc_fix_recurrence_e_type*); -extern bool_t xdr_rpc_loc_operation_mode_e_type (XDR *, rpc_loc_operation_mode_e_type*); -extern bool_t xdr_rpc_loc_notify_e_type (XDR *, rpc_loc_notify_e_type*); -extern bool_t xdr_rpc_loc_fix_criteria_s_type (XDR *, rpc_loc_fix_criteria_s_type*); -extern bool_t xdr_rpc_loc_ni_user_resp_e_type (XDR *, rpc_loc_ni_user_resp_e_type*); -extern bool_t xdr_rpc_loc_user_verify_s_type (XDR *, rpc_loc_user_verify_s_type*); -extern bool_t xdr_rpc_loc_predicted_orbits_data_format_e_type (XDR *, rpc_loc_predicted_orbits_data_format_e_type*); -extern bool_t xdr_rpc_loc_predicted_orbits_data_s_type (XDR *, rpc_loc_predicted_orbits_data_s_type*); -extern bool_t xdr_rpc_loc_predicted_orbits_data_validity_report_s_type (XDR *, rpc_loc_predicted_orbits_data_validity_report_s_type*); -extern bool_t xdr_rpc_loc_predicted_orbits_auto_download_config_s_type (XDR *, rpc_loc_predicted_orbits_auto_download_config_s_type*); -extern bool_t xdr_rpc_loc_assist_data_time_s_type (XDR *, rpc_loc_assist_data_time_s_type*); -extern bool_t xdr_rpc_loc_assist_pos_valid_mask_type (XDR *, rpc_loc_assist_pos_valid_mask_type*); -extern bool_t xdr_rpc_loc_assist_data_pos_s_type (XDR *, rpc_loc_assist_data_pos_s_type*); -extern bool_t xdr_rpc_loc_server_open_status_e_type (XDR *, rpc_loc_server_open_status_e_type*); -extern bool_t xdr_rpc_loc_server_open_status_s_type (XDR *, rpc_loc_server_open_status_s_type*); -extern bool_t xdr_rpc_loc_server_close_status_e_type (XDR *, rpc_loc_server_close_status_e_type*); -extern bool_t xdr_rpc_loc_server_close_status_s_type (XDR *, rpc_loc_server_close_status_s_type*); -extern bool_t xdr_rpc_loc_wiper_fix_time_s_type (XDR *, rpc_loc_wiper_fix_time_s_type*); -extern bool_t xdr_rpc_loc_wiper_fix_pos_s_type (XDR *, rpc_loc_wiper_fix_pos_s_type*); -extern bool_t xdr_rpc_loc_wiper_ap_info_s_type (XDR *, rpc_loc_wiper_ap_info_s_type*); -extern bool_t xdr_rpc_loc_wiper_ap_set_s_type (XDR *, rpc_loc_wiper_ap_set_s_type*); -extern bool_t xdr_rpc_loc_wiper_position_report_s_type (XDR *, rpc_loc_wiper_position_report_s_type*); -extern bool_t xdr_rpc_loc_wiper_status_e_type (XDR *, rpc_loc_wiper_status_e_type*); -extern bool_t xdr_rpc_loc_fs_operation_e_type (XDR *, rpc_loc_fs_operation_e_type*); -extern bool_t xdr_rpc_loc_efs_data_s_type (XDR *, rpc_loc_efs_data_s_type*); -extern bool_t xdr_rpc_loc_lock_e_type (XDR *, rpc_loc_lock_e_type*); -extern bool_t xdr_rpc_loc_nmea_sentence_type (XDR *, rpc_loc_nmea_sentence_type*); -extern bool_t xdr_rpc_loc_assist_data_type (XDR *, rpc_loc_assist_data_type*); -extern bool_t xdr_rpc_loc_assist_data_delete_s_type (XDR *, rpc_loc_assist_data_delete_s_type*); -extern bool_t xdr_rpc_loc_ioctl_data_u_type (XDR *, rpc_loc_ioctl_data_u_type*); -extern bool_t xdr_rpc_loc_ioctl_callback_data_u_type (XDR *, rpc_loc_ioctl_callback_data_u_type*); -extern bool_t xdr_rpc_loc_ioctl_callback_s_type (XDR *, rpc_loc_ioctl_callback_s_type*); -extern bool_t xdr_rpc_loc_event_payload_u_type (XDR *, rpc_loc_event_payload_u_type*); - -#else /* K&R C */ -extern bool_t xdr_rpc_boolean (); -extern bool_t xdr_rpc_uint32 (); -extern bool_t xdr_rpc_uint16 (); -extern bool_t xdr_rpc_uint8 (); -extern bool_t xdr_rpc_int32 (); -extern bool_t xdr_rpc_byte (); -extern bool_t xdr_rpc_uint64 (); -extern bool_t xdr_rpc_loc_client_handle_type (); -extern bool_t xdr_rpc_loc_event_mask_type (); -extern bool_t xdr_rpc_loc_position_valid_mask_type (); -extern bool_t xdr_rpc_loc_pos_technology_mask_type (); -extern bool_t xdr_rpc_loc_session_status_e_type (); -extern bool_t xdr_rpc_loc_calendar_time_s_type (); -extern bool_t xdr_rpc_loc_parsed_position_s_type (); -extern bool_t xdr_rpc_loc_sv_system_e_type (); -extern bool_t xdr_rpc_loc_sv_status_e_type (); -extern bool_t xdr_rpc_loc_sv_info_valid_mask_type (); -extern bool_t xdr_rpc_loc_sv_info_s_type (); -extern bool_t xdr_rpc_loc_gnss_info_valid_mask_type (); -extern bool_t xdr_rpc_loc_gnss_info_s_type (); -extern bool_t xdr_rpc_loc_nmea_report_s_type (); -extern bool_t xdr_rpc_loc_status_event_e_type (); -extern bool_t xdr_rpc_loc_engine_state_e_type (); -extern bool_t xdr_rpc_loc_fix_session_state_e_type (); -extern bool_t xdr_rpc_loc_status_event_payload_u_type (); -extern bool_t xdr_rpc_loc_status_event_s_type (); -extern bool_t xdr_rpc_loc_server_addr_e_type (); -extern bool_t xdr_rpc_loc_server_addr_ipv4_type (); -extern bool_t xdr_rpc_loc_server_addr_url_type (); -extern bool_t xdr_rpc_loc_server_addr_u_type (); -extern bool_t xdr_rpc_loc_server_info_s_type (); -extern bool_t xdr_rpc_loc_ni_notify_verify_e_type (); -extern bool_t xdr_rpc_loc_ni_event_e_type (); -extern bool_t xdr_rpc_loc_ni_datacoding_scheme_e_type (); -extern bool_t xdr_rpc_loc_ni_vx_requester_id_encoding_scheme_e_type (); -extern bool_t xdr_rpc_loc_ni_vx_pos_mode_e_type (); -extern bool_t xdr_rpc_loc_ni_vx_requester_id_s_type (); -extern bool_t xdr_rpc_loc_ni_vx_notify_verify_req_s_type (); -extern bool_t xdr_rpc_loc_ni_supl_pos_method_e_type (); -extern bool_t xdr_rpc_loc_ni_supl_slp_session_id_s_type (); -extern bool_t xdr_rpc_loc_ni_requestor_id_s_type (); -extern bool_t xdr_rpc_loc_ni_supl_client_name_s_type (); -extern bool_t xdr_rpc_loc_ni_supl_qop_s_type (); -extern bool_t xdr_rpc_loc_ni_supl_notify_verify_req_s_type (); -extern bool_t xdr_rpc_loc_ni_ext_client_address_s_type (); -extern bool_t xdr_rpc_loc_ni_location_type_e_type (); -extern bool_t xdr_rpc_loc_ni_deferred_location_s_type (); -extern bool_t xdr_rpc_loc_ni_codeword_string_s_type (); -extern bool_t xdr_rpc_loc_ni_service_type_id_s_type (); -extern bool_t xdr_rpc_loc_ni_umts_cp_notify_verify_req_s_type (); -extern bool_t xdr_rpc_loc_ni_service_interaction_e_type (); -extern bool_t xdr_rpc_loc_ni_vx_service_interaction_req_s_type (); -extern bool_t xdr_rpc_loc_ni_event_payload_u_type (); -extern bool_t xdr_rpc_loc_ni_event_s_type (); -extern bool_t xdr_rpc_loc_assist_data_request_e_type (); -extern bool_t xdr_rpc_struct_loc_time_download_source_s_type_servers_ptr (); -extern bool_t xdr_rpc_struct_loc_time_download_source_s_type_servers (); -extern bool_t xdr_rpc_loc_time_download_source_s_type (); -extern bool_t xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr (); -extern bool_t xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers (); -extern bool_t xdr_rpc_loc_predicted_orbits_data_source_s_type (); -extern bool_t xdr_rpc_loc_assist_data_request_payload_u_type (); -extern bool_t xdr_rpc_loc_assist_data_request_s_type (); -extern bool_t xdr_rpc_loc_server_connection_handle (); -extern bool_t xdr_rpc_loc_server_protocol_e_type (); -extern bool_t xdr_rpc_loc_server_request_e_type (); -extern bool_t xdr_rpc_loc_server_open_req_s_type (); -extern bool_t xdr_rpc_loc_server_close_req_s_type (); -extern bool_t xdr_rpc_loc_server_request_u_type (); -extern bool_t xdr_rpc_loc_server_request_s_type (); -extern bool_t xdr_rpc_loc_qwip_request_e_type (); -extern bool_t xdr_rpc_loc_qwip_request_s_type (); -extern bool_t xdr_rpc_loc_reserved_payload_s_type (); -extern bool_t xdr_rpc_loc_ioctl_e_type (); -extern bool_t xdr_rpc_loc_api_version_s_type (); -extern bool_t xdr_rpc_loc_fix_recurrence_e_type (); -extern bool_t xdr_rpc_loc_operation_mode_e_type (); -extern bool_t xdr_rpc_loc_notify_e_type (); -extern bool_t xdr_rpc_loc_fix_criteria_s_type (); -extern bool_t xdr_rpc_loc_ni_user_resp_e_type (); -extern bool_t xdr_rpc_loc_user_verify_s_type (); -extern bool_t xdr_rpc_loc_predicted_orbits_data_format_e_type (); -extern bool_t xdr_rpc_loc_predicted_orbits_data_s_type (); -extern bool_t xdr_rpc_loc_predicted_orbits_data_validity_report_s_type (); -extern bool_t xdr_rpc_loc_predicted_orbits_auto_download_config_s_type (); -extern bool_t xdr_rpc_loc_assist_data_time_s_type (); -extern bool_t xdr_rpc_loc_assist_pos_valid_mask_type (); -extern bool_t xdr_rpc_loc_assist_data_pos_s_type (); -extern bool_t xdr_rpc_loc_server_open_status_e_type (); -extern bool_t xdr_rpc_loc_server_open_status_s_type (); -extern bool_t xdr_rpc_loc_server_close_status_e_type (); -extern bool_t xdr_rpc_loc_server_close_status_s_type (); -extern bool_t xdr_rpc_loc_wiper_fix_time_s_type (); -extern bool_t xdr_rpc_loc_wiper_fix_pos_s_type (); -extern bool_t xdr_rpc_loc_wiper_ap_info_s_type (); -extern bool_t xdr_rpc_loc_wiper_ap_set_s_type (); -extern bool_t xdr_rpc_loc_wiper_position_report_s_type (); -extern bool_t xdr_rpc_loc_wiper_status_e_type (); -extern bool_t xdr_rpc_loc_fs_operation_e_type (); -extern bool_t xdr_rpc_loc_efs_data_s_type (); -extern bool_t xdr_rpc_loc_lock_e_type (); -extern bool_t xdr_rpc_loc_nmea_sentence_type (); -extern bool_t xdr_rpc_loc_assist_data_type (); -extern bool_t xdr_rpc_loc_assist_data_delete_s_type (); -extern bool_t xdr_rpc_loc_ioctl_data_u_type (); -extern bool_t xdr_rpc_loc_ioctl_callback_data_u_type (); -extern bool_t xdr_rpc_loc_ioctl_callback_s_type (); -extern bool_t xdr_rpc_loc_event_payload_u_type (); - -#endif /* K&R C */ - -#ifdef __cplusplus -} -#endif - -#endif /* !_LOC_API_COMMON_H_RPCGEN */ diff --git a/loc_api/libloc_api-rpc/inc-1240/loc_api_fixup.h b/loc_api/libloc_api-rpc/inc-1240/loc_api_fixup.h deleted file mode 100644 index e62eb367..00000000 --- a/loc_api/libloc_api-rpc/inc-1240/loc_api_fixup.h +++ /dev/null @@ -1,188 +0,0 @@ -/****************************************************************************** - @file: loc_api_fixup.h - @brief: Loc API Android RPC amendment header - - DESCRIPTION - Loc API Android RPC amendment header - - INITIALIZATION AND SEQUENCING REQUIREMENTS - - ----------------------------------------------------------------------------- -Copyright (c) 2009, QUALCOMM USA, INC. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -· Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -· Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -· Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ----------------------------------------------------------------------------- - ******************************************************************************/ - -#ifndef LOC_API_FIXUP_H -#define LOC_API_FIXUP_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -#ifndef NULLPROC -#define NULLPROC 0 -#endif /* NULLPROC */ - -#ifdef ADD_XDR_FLOAT - -extern bool_t xdr_float (XDR *__xdrs, float *__fp); -extern bool_t xdr_double (XDR *__xdrs, double *__dp); - -#endif /* ADD_XDR_FLOAT */ - -#ifdef ADD_XDR_BOOL -extern bool_t xdr_bool(XDR *__xdrs, int *__bp); -#endif /* ADD_XDR_BOOL */ - -#define RPC_LOC_API_MAJOR_VERSION_NUMBER 1 -#define RPC_LOC_API_MINOR_VERSION_NUMBER 0 - -// Return value for loc_open in case of failure. -#define RPC_LOC_CLIENT_HANDLE_INVALID -1 - -// Return value of loc api calls for loc_close, loc_start_fix, loc_stop_fix and loc_ioctl -// These are also the status for the ioctl callback -#define RPC_LOC_API_SUCCESS 0 -#define RPC_LOC_API_GENERAL_FAILURE 1 -#define RPC_LOC_API_UNSUPPORTED 2 -#define RPC_LOC_API_INVALID_HANDLE 4 -#define RPC_LOC_API_INVALID_PARAMETER 5 -#define RPC_LOC_API_ENGINE_BUSY 6 -#define RPC_LOC_API_PHONE_OFFLINE 7 -#define RPC_LOC_API_TIMEOUT 8 - -// Special return value for loc api calls in case of RCP failure -#define RPC_LOC_API_RPC_FAILURE (-1234) - -#define RPC_LOC_API_MAX_SV_COUNT 80 -#define RPC_LOC_API_MAX_NMEA_STRING_LENGTH 1200 - -// Maximum server address that will be used in location API -#define RPC_LOC_API_MAX_SERVER_ADDR_LENGTH 256 -#define RPC_LOC_API_MAX_NUM_PREDICTED_ORBITS_SERVERS 3 -#define RPC_LOC_API_MAX_NUM_NTP_SERVERS 3 - -#define RPC_LOC_EVENT_PARSED_POSITION_REPORT 0x00000001 // Position report comes in loc_parsed_position_s_type -#define RPC_LOC_EVENT_SATELLITE_REPORT 0x00000002 // Satellite in view report -#define RPC_LOC_EVENT_NMEA_1HZ_REPORT 0x00000004 // NMEA report at 1HZ rate -#define RPC_LOC_EVENT_NMEA_POSITION_REPORT 0x00000008 // NMEA report at position report rate -#define RPC_LOC_EVENT_NI_NOTIFY_VERIFY_REQUEST 0x00000010 // NI notification/verification request -#define RPC_LOC_EVENT_ASSISTANCE_DATA_REQUEST 0x00000020 // Assistance data, eg: time, predicted orbits request -#define RPC_LOC_EVENT_LOCATION_SERVER_REQUEST 0x00000040 // Request for location server -#define RPC_LOC_EVENT_IOCTL_REPORT 0x00000080 // Callback report for loc_ioctl -#define RPC_LOC_EVENT_STATUS_REPORT 0x00000100 // Misc status report: eg, engine state - - -#define RPC_LOC_POS_VALID_SESSION_STATUS 0x00000001 -#define RPC_LOC_POS_VALID_TIMESTAMP_CALENDAR 0x00000002 -#define RPC_LOC_POS_VALID_TIMESTAMP_UTC 0x00000004 -#define RPC_LOC_POS_VALID_LEAP_SECONDS 0x00000008 -#define RPC_LOC_POS_VALID_TIME_UNC 0x00000010 -#define RPC_LOC_POS_VALID_LATITUDE 0x00000020 -#define RPC_LOC_POS_VALID_LONGITUDE 0x00000040 -#define RPC_LOC_POS_VALID_ALTITUDE_WRT_ELLIPSOID 0x00000080 -#define RPC_LOC_POS_VALID_ALTITUDE_WRT_MEAN_SEA_LEVEL 0x00000100 -#define RPC_LOC_POS_VALID_SPEED_HORIZONTAL 0x00000200 -#define RPC_LOC_POS_VALID_SPEED_VERTICAL 0x00000400 -#define RPC_LOC_POS_VALID_HEADING 0x00000800 -#define RPC_LOC_POS_VALID_HOR_UNC_CIRCULAR 0x00001000 -#define RPC_LOC_POS_VALID_HOR_UNC_ELLI_SEMI_MAJ 0x00002000 -#define RPC_LOC_POS_VALID_HOR_UNC_ELLI_SEMI_MIN 0x00004000 -#define RPC_LOC_POS_VALID_HOR_UNC_ELLI_ORIENT_AZIMUTH 0x00008000 -#define RPC_LOC_POS_VALID_VERTICAL_UNC 0x00010000 -#define RPC_LOC_POS_VALID_SPEED_UNC 0x00020000 -#define RPC_LOC_POS_VALID_HEADING_UNC 0x00040000 -#define RPC_LOC_POS_VALID_CONFIDENCE_HORIZONTAL 0x00080000 -#define RPC_LOC_POS_VALID_CONFIDENCE_VERTICAL 0x00100000 -#define RPC_LOC_POS_VALID_MAGNETIC_VARIATION 0x00200000 -#define RPC_LOC_POS_VALID_TECHNOLOGY_MASK 0x00400000 - -#define RPC_LOC_POS_TECH_SATELLITE 0x00000001 -#define RPC_LOC_POS_TECH_CELLID 0x00000002 -#define RPC_LOC_POS_TECH_WIFI 0x00000004 - -#define RPC_LOC_SV_INFO_VALID_SYSTEM 0x00000001 -#define RPC_LOC_SV_INFO_VALID_PRN 0x00000002 -#define RPC_LOC_SV_INFO_VALID_HEALTH_STATUS 0x00000004 -#define RPC_LOC_SV_INFO_VALID_PROCESS_STATUS 0x00000008 -#define RPC_LOC_SV_INFO_VALID_HAS_EPH 0x00000010 -#define RPC_LOC_SV_INFO_VALID_HAS_ALM 0x00000020 -#define RPC_LOC_SV_INFO_VALID_ELEVATION 0x00000040 -#define RPC_LOC_SV_INFO_VALID_AZIMUTH 0x00000080 -#define RPC_LOC_SV_INFO_VALID_SNR 0x00000100 - -#define RPC_LOC_GNSS_INFO_VALID_POS_DOP 0x00000001 -#define RPC_LOC_GNSS_INFO_VALID_HOR_DOP 0x00000002 -#define RPC_LOC_GNSS_INFO_VALID_VERT_DOP 0x00000004 -#define RPC_LOC_GNSS_INFO_VALID_ALTITUDE_ASSUMED 0x00000008 -#define RPC_LOC_GNSS_INFO_VALID_SV_COUNT 0x00000010 -#define RPC_LOC_GNSS_INFO_VALID_SV_LIST 0x00000020 - -#define RPC_LOC_NI_MAX_REQUESTOR_ID_LENGTH 200 -#define RPC_LOC_NI_SUPL_HASH_LENGTH 8 -#define RPC_LOC_NI_SUPL_SLP_SESSION_ID_BYTE_LENGTH 4 -#define RPC_LOC_NI_MAX_CLIENT_NAME_LENGTH 64 -#define RPC_LOC_NI_MAX_EXT_CLIENT_ADDRESS 20 -#define RPC_LOC_NI_CODEWORD_LENGTH 20 - -#define RPC_LOC_NI_SUPL_QOP_VALID 0x01 -#define RPC_LOC_NI_SUPL_QOP_VERACC_VALID 0x02 -#define RPC_LOC_NI_SUPL_QOP_MAXAGE_VALID 0x04 -#define RPC_LOC_NI_SUPL_QOP_DELAY_VALID 0x08 - -#define RPC_LOC_FIX_CRIT_VALID_RECURRENCE_TYPE 0x00000001 -#define RPC_LOC_FIX_CRIT_VALID_PREFERRED_OPERATION_MODE 0x00000002 -#define RPC_LOC_FIX_CRIT_VALID_PREFERRED_ACCURACY 0x00000004 -#define RPC_LOC_FIX_CRIT_VALID_PREFERRED_RESPONSE_TIME 0x00000008 -#define RPC_LOC_FIX_CRIT_VALID_INTERMEDIATE_POS_REPORT_ENABLED 0x00000010 -#define RPC_LOC_FIX_CRIT_VALID_NOTIFY_TYPE 0x00000020 -#define RPC_LOC_FIX_CRIT_VALID_MIN_INTERVAL 0x00000040 -#define RPC_LOC_FIX_CRIT_VALID_MIN_DISTANCE 0x00000080 -#define RPC_LOC_FIX_CRIT_VALID_MIN_DIST_SAMPLE_INTERVAL 0x00000100 - -#define RPC_LOC_ASSIST_POS_VALID_TIMESTAMP_UTC 0x00000001 -#define RPC_LOC_ASSIST_POS_VALID_LATITUDE 0x00000002 -#define RPC_LOC_ASSIST_POS_VALID_LONGITUDE 0x00000004 -#define RPC_LOC_ASSIST_POS_VALID_ALTITUDE_WRT_ELLIPSOID 0x00000008 -#define RPC_LOC_ASSIST_POS_VALID_ALTITUDE_WRT_MEAN_SEA_LEVEL 0x00000010 -#define RPC_LOC_ASSIST_POS_VALID_HOR_UNC_CIRCULAR 0x00000020 -#define RPC_LOC_ASSIST_POS_VALID_VERT_UNC 0x00000040 -#define RPC_LOC_ASSIST_POS_VALID_CONFIDENCE_HORIZONTAL 0x00000080 -#define RPC_LOC_ASSIST_POS_VALID_CONFIDENCE_VERTICAL 0x00000100 - -#define RPC_LOC_ASSIST_DATA_ALL 0xFFFFFFFF - -#define RPC_LOC_NMEA_MASK_ALL 0xffff -#define RPC_LOC_NMEA_MASK_GGA 0x0001 -#define RPC_LOC_NMEA_MASK_RMC 0x0002 -#define RPC_LOC_NMEA_MASK_GSV 0x0004 -#define RPC_LOC_NMEA_MASK_GSA 0x0008 -#define RPC_LOC_NMEA_MASK_VTG 0x0010 - -/* flags for notification */ -#define RPC_LOC_NI_CLIENT_NAME_PRESENT 0x0001 -#define RPC_LOC_NI_CLIENT_EXTADDR_PRESENT 0x0002 -#define RPC_LOC_NI_DEF_LOCATION_TYPE_PRESENT 0x0010 -#define RPC_LOC_NI_REQUESTOR_ID_PRESENT 0x0020 -#define RPC_LOC_NI_CODEWORD_PRESENT 0x0040 -#define RPC_LOC_NI_SERVICE_TYPE_ID_PRESENT 0x0080 -#define RPC_LOC_NI_ENCODING_TYPE_PRESENT 0x0100 - -#ifdef __cplusplus -} -#endif - -#endif /* LOC_API_FIXUP_H */ diff --git a/loc_api/libloc_api-rpc/inc-1240/loc_apicb_appinit.h b/loc_api/libloc_api-rpc/inc-1240/loc_apicb_appinit.h deleted file mode 100644 index 92d4e150..00000000 --- a/loc_api/libloc_api-rpc/inc-1240/loc_apicb_appinit.h +++ /dev/null @@ -1,34 +0,0 @@ -/* ------------------------------------------------------------------------------- -Copyright (c) 2009, QUALCOMM USA, INC. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -· Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -· Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -· Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ------------------------------------------------------------------------------- - */ - -#ifndef LOC_APICB_APPINIT_H -#define LOC_APICB_APPINIT_H - -#ifdef __cplusplus -extern "C" -{ -#endif - - /* Initialization function for callbacks */ -extern int loc_apicb_app_init(); -extern void loc_apicb_app_deinit(); - -#ifdef __cplusplus -} -#endif - -#endif /* LOC_APICB_APPINIT_H */ diff --git a/loc_api/libloc_api-rpc/inc-3200/loc_api.h b/loc_api/libloc_api-rpc/inc-3200/loc_api.h deleted file mode 100644 index 8998aca4..00000000 --- a/loc_api/libloc_api-rpc/inc-3200/loc_api.h +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#ifndef _LOC_API_H_RPCGEN -#define _LOC_API_H_RPCGEN - -#include - -#include - -#ifdef __cplusplus -extern "C" { -#endif - - -typedef struct { - u_int rpc_loc_api_api_versions_return_type_len; - rpc_uint32 *rpc_loc_api_api_versions_return_type_val; -} rpc_loc_api_api_versions_return_type; - -typedef rpc_uint32 rpc_loc_event_cb_f_type; - -struct rpc_loc_open_args { - rpc_loc_event_mask_type event_reg_mask; - rpc_loc_event_cb_f_type event_callback; -}; -typedef struct rpc_loc_open_args rpc_loc_open_args; - -struct rpc_loc_close_args { - rpc_loc_client_handle_type handle; -}; -typedef struct rpc_loc_close_args rpc_loc_close_args; - -struct rpc_loc_start_fix_args { - rpc_loc_client_handle_type handle; -}; -typedef struct rpc_loc_start_fix_args rpc_loc_start_fix_args; - -struct rpc_loc_stop_fix_args { - rpc_loc_client_handle_type handle; -}; -typedef struct rpc_loc_stop_fix_args rpc_loc_stop_fix_args; - -struct rpc_loc_ioctl_args { - rpc_loc_client_handle_type handle; - rpc_loc_ioctl_e_type ioctl_type; - rpc_loc_ioctl_data_u_type *ioctl_data; -}; -typedef struct rpc_loc_ioctl_args rpc_loc_ioctl_args; - -struct rpc_loc_api_api_version_s_args { - rpc_boolean len_not_null; -}; -typedef struct rpc_loc_api_api_version_s_args rpc_loc_api_api_version_s_args; - -struct rpc_loc_api_rpc_glue_code_info_remote_rets { - rpc_uint32 toolvers; - rpc_uint32 features; - rpc_uint32 proghash; - rpc_uint32 cbproghash; -}; -typedef struct rpc_loc_api_rpc_glue_code_info_remote_rets rpc_loc_api_rpc_glue_code_info_remote_rets; - -struct rpc_loc_open_rets { - rpc_loc_client_handle_type loc_open_result; -}; -typedef struct rpc_loc_open_rets rpc_loc_open_rets; - -struct rpc_loc_close_rets { - rpc_int32 loc_close_result; -}; -typedef struct rpc_loc_close_rets rpc_loc_close_rets; - -struct rpc_loc_start_fix_rets { - rpc_int32 loc_start_fix_result; -}; -typedef struct rpc_loc_start_fix_rets rpc_loc_start_fix_rets; - -struct rpc_loc_stop_fix_rets { - rpc_int32 loc_stop_fix_result; -}; -typedef struct rpc_loc_stop_fix_rets rpc_loc_stop_fix_rets; - -struct rpc_loc_ioctl_rets { - rpc_int32 loc_ioctl_result; -}; -typedef struct rpc_loc_ioctl_rets rpc_loc_ioctl_rets; - -struct rpc_loc_api_api_versions_rets { - rpc_loc_api_api_versions_return_type loc_api_api_versions_result; - rpc_uint32 *len; -}; -typedef struct rpc_loc_api_api_versions_rets rpc_loc_api_api_versions_rets; -#define LOC_APIVERS 0x00010001 - -#define LOC_APIPROG 0x3000008c -#define LOC_APIVERS_0001 0x00010001 - -#if defined(__STDC__) || defined(__cplusplus) -#define rpc_loc_api_null 0 -extern enum clnt_stat rpc_loc_api_null_0x00010001(void *, void *, CLIENT *); -extern bool_t rpc_loc_api_null_0x00010001_svc(void *, void *, struct svc_req *); -#define rpc_loc_api_rpc_glue_code_info_remote 1 -extern enum clnt_stat rpc_loc_api_rpc_glue_code_info_remote_0x00010001(void *, rpc_loc_api_rpc_glue_code_info_remote_rets *, CLIENT *); -extern bool_t rpc_loc_api_rpc_glue_code_info_remote_0x00010001_svc(void *, rpc_loc_api_rpc_glue_code_info_remote_rets *, struct svc_req *); -#define rpc_loc_open 2 -extern enum clnt_stat rpc_loc_open_0x00010001(rpc_loc_open_args *, rpc_loc_open_rets *, CLIENT *); -extern bool_t rpc_loc_open_0x00010001_svc(rpc_loc_open_args *, rpc_loc_open_rets *, struct svc_req *); -#define rpc_loc_close 3 -extern enum clnt_stat rpc_loc_close_0x00010001(rpc_loc_close_args *, rpc_loc_close_rets *, CLIENT *); -extern bool_t rpc_loc_close_0x00010001_svc(rpc_loc_close_args *, rpc_loc_close_rets *, struct svc_req *); -#define rpc_loc_start_fix 4 -extern enum clnt_stat rpc_loc_start_fix_0x00010001(rpc_loc_start_fix_args *, rpc_loc_start_fix_rets *, CLIENT *); -extern bool_t rpc_loc_start_fix_0x00010001_svc(rpc_loc_start_fix_args *, rpc_loc_start_fix_rets *, struct svc_req *); -#define rpc_loc_stop_fix 5 -extern enum clnt_stat rpc_loc_stop_fix_0x00010001(rpc_loc_stop_fix_args *, rpc_loc_stop_fix_rets *, CLIENT *); -extern bool_t rpc_loc_stop_fix_0x00010001_svc(rpc_loc_stop_fix_args *, rpc_loc_stop_fix_rets *, struct svc_req *); -#define rpc_loc_ioctl 6 -extern enum clnt_stat rpc_loc_ioctl_0x00010001(rpc_loc_ioctl_args *, rpc_loc_ioctl_rets *, CLIENT *); -extern bool_t rpc_loc_ioctl_0x00010001_svc(rpc_loc_ioctl_args *, rpc_loc_ioctl_rets *, struct svc_req *); -#define rpc_loc_api_api_versions 0xFFFFFFFF -extern enum clnt_stat rpc_loc_api_api_versions_0x00010001(void *, rpc_loc_api_api_versions_rets *, CLIENT *); -extern bool_t rpc_loc_api_api_versions_0x00010001_svc(void *, rpc_loc_api_api_versions_rets *, struct svc_req *); -extern int loc_apiprog_0x00010001_freeresult (SVCXPRT *, xdrproc_t, caddr_t); - -#else /* K&R C */ -#define rpc_loc_api_null 0 -extern enum clnt_stat rpc_loc_api_null_0x00010001(); -extern bool_t rpc_loc_api_null_0x00010001_svc(); -#define rpc_loc_api_rpc_glue_code_info_remote 1 -extern enum clnt_stat rpc_loc_api_rpc_glue_code_info_remote_0x00010001(); -extern bool_t rpc_loc_api_rpc_glue_code_info_remote_0x00010001_svc(); -#define rpc_loc_open 2 -extern enum clnt_stat rpc_loc_open_0x00010001(); -extern bool_t rpc_loc_open_0x00010001_svc(); -#define rpc_loc_close 3 -extern enum clnt_stat rpc_loc_close_0x00010001(); -extern bool_t rpc_loc_close_0x00010001_svc(); -#define rpc_loc_start_fix 4 -extern enum clnt_stat rpc_loc_start_fix_0x00010001(); -extern bool_t rpc_loc_start_fix_0x00010001_svc(); -#define rpc_loc_stop_fix 5 -extern enum clnt_stat rpc_loc_stop_fix_0x00010001(); -extern bool_t rpc_loc_stop_fix_0x00010001_svc(); -#define rpc_loc_ioctl 6 -extern enum clnt_stat rpc_loc_ioctl_0x00010001(); -extern bool_t rpc_loc_ioctl_0x00010001_svc(); -#define rpc_loc_api_api_versions 0xFFFFFFFF -extern enum clnt_stat rpc_loc_api_api_versions_0x00010001(); -extern bool_t rpc_loc_api_api_versions_0x00010001_svc(); -extern int loc_apiprog_0x00010001_freeresult (); -#endif /* K&R C */ - -/* the xdr functions */ - -#if defined(__STDC__) || defined(__cplusplus) -extern bool_t xdr_rpc_loc_api_api_versions_return_type (XDR *, rpc_loc_api_api_versions_return_type*); -extern bool_t xdr_rpc_loc_event_cb_f_type (XDR *, rpc_loc_event_cb_f_type*); -extern bool_t xdr_rpc_loc_open_args (XDR *, rpc_loc_open_args*); -extern bool_t xdr_rpc_loc_close_args (XDR *, rpc_loc_close_args*); -extern bool_t xdr_rpc_loc_start_fix_args (XDR *, rpc_loc_start_fix_args*); -extern bool_t xdr_rpc_loc_stop_fix_args (XDR *, rpc_loc_stop_fix_args*); -extern bool_t xdr_rpc_loc_ioctl_args (XDR *, rpc_loc_ioctl_args*); -extern bool_t xdr_rpc_loc_api_api_version_s_args (XDR *, rpc_loc_api_api_version_s_args*); -extern bool_t xdr_rpc_loc_api_rpc_glue_code_info_remote_rets (XDR *, rpc_loc_api_rpc_glue_code_info_remote_rets*); -extern bool_t xdr_rpc_loc_open_rets (XDR *, rpc_loc_open_rets*); -extern bool_t xdr_rpc_loc_close_rets (XDR *, rpc_loc_close_rets*); -extern bool_t xdr_rpc_loc_start_fix_rets (XDR *, rpc_loc_start_fix_rets*); -extern bool_t xdr_rpc_loc_stop_fix_rets (XDR *, rpc_loc_stop_fix_rets*); -extern bool_t xdr_rpc_loc_ioctl_rets (XDR *, rpc_loc_ioctl_rets*); -extern bool_t xdr_rpc_loc_api_api_versions_rets (XDR *, rpc_loc_api_api_versions_rets*); - -#else /* K&R C */ -extern bool_t xdr_rpc_loc_api_api_versions_return_type (); -extern bool_t xdr_rpc_loc_event_cb_f_type (); -extern bool_t xdr_rpc_loc_open_args (); -extern bool_t xdr_rpc_loc_close_args (); -extern bool_t xdr_rpc_loc_start_fix_args (); -extern bool_t xdr_rpc_loc_stop_fix_args (); -extern bool_t xdr_rpc_loc_ioctl_args (); -extern bool_t xdr_rpc_loc_api_api_version_s_args (); -extern bool_t xdr_rpc_loc_api_rpc_glue_code_info_remote_rets (); -extern bool_t xdr_rpc_loc_open_rets (); -extern bool_t xdr_rpc_loc_close_rets (); -extern bool_t xdr_rpc_loc_start_fix_rets (); -extern bool_t xdr_rpc_loc_stop_fix_rets (); -extern bool_t xdr_rpc_loc_ioctl_rets (); -extern bool_t xdr_rpc_loc_api_api_versions_rets (); - -#endif /* K&R C */ - -#ifdef __cplusplus -} -#endif - -#endif /* !_LOC_API_H_RPCGEN */ diff --git a/loc_api/libloc_api-rpc/inc-3200/loc_api_cb.h b/loc_api/libloc_api-rpc/inc-3200/loc_api_cb.h deleted file mode 100644 index 4f2f8f91..00000000 --- a/loc_api/libloc_api-rpc/inc-3200/loc_api_cb.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#ifndef _LOC_API_CB_H_RPCGEN -#define _LOC_API_CB_H_RPCGEN - -#include - -#include - -#ifdef __cplusplus -extern "C" { -#endif - - -struct rpc_loc_event_cb_f_type_args { - rpc_uint32 cb_id; - rpc_loc_client_handle_type loc_handle; - rpc_loc_event_mask_type loc_event; - rpc_loc_event_payload_u_type *loc_event_payload; -}; -typedef struct rpc_loc_event_cb_f_type_args rpc_loc_event_cb_f_type_args; - -struct rpc_loc_event_cb_f_type_rets { - rpc_int32 loc_event_cb_f_type_result; -}; -typedef struct rpc_loc_event_cb_f_type_rets rpc_loc_event_cb_f_type_rets; -#define LOC_APICBVERS 0x00010001 - -#define LOC_APICBPROG 0x3100008c -#define LOC_APICBVERS_0001 0x00010001 - -#if defined(__STDC__) || defined(__cplusplus) -#define rpc_loc_event_cb_f_type 1 -extern enum clnt_stat rpc_loc_event_cb_f_type_0x00010001(rpc_loc_event_cb_f_type_args *, rpc_loc_event_cb_f_type_rets *, CLIENT *); -extern bool_t rpc_loc_event_cb_f_type_0x00010001_svc(rpc_loc_event_cb_f_type_args *, rpc_loc_event_cb_f_type_rets *, struct svc_req *); -extern int loc_apicbprog_0x00010001_freeresult (SVCXPRT *, xdrproc_t, caddr_t); - -#else /* K&R C */ -#define rpc_loc_event_cb_f_type 1 -extern enum clnt_stat rpc_loc_event_cb_f_type_0x00010001(); -extern bool_t rpc_loc_event_cb_f_type_0x00010001_svc(); -extern int loc_apicbprog_0x00010001_freeresult (); -#endif /* K&R C */ - -/* the xdr functions */ - -#if defined(__STDC__) || defined(__cplusplus) -extern bool_t xdr_rpc_loc_event_cb_f_type_args (XDR *, rpc_loc_event_cb_f_type_args*); -extern bool_t xdr_rpc_loc_event_cb_f_type_rets (XDR *, rpc_loc_event_cb_f_type_rets*); - -#else /* K&R C */ -extern bool_t xdr_rpc_loc_event_cb_f_type_args (); -extern bool_t xdr_rpc_loc_event_cb_f_type_rets (); - -#endif /* K&R C */ - -#ifdef __cplusplus -} -#endif - -#endif /* !_LOC_API_CB_H_RPCGEN */ diff --git a/loc_api/libloc_api-rpc/inc-3200/loc_api_common.h b/loc_api/libloc_api-rpc/inc-3200/loc_api_common.h deleted file mode 100644 index 04be079f..00000000 --- a/loc_api/libloc_api-rpc/inc-3200/loc_api_common.h +++ /dev/null @@ -1,1031 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#ifndef _LOC_API_COMMON_H_RPCGEN -#define _LOC_API_COMMON_H_RPCGEN - -#include -#include "loc_api_fixup.h" - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#define RPC_LOC_EVENT_NI_NOTIFY_VERIFY_REQUEST 0x00000010 -#define RPC_LOC_EVENT_IOCTL_REPORT 0x00000080 -#define RPC_LOC_EVENT_LOCATION_SERVER_REQUEST 0x00000040 -#define RPC_LOC_EVENT_RESERVED 0x8000000000000000 -#define RPC_LOC_EVENT_PARSED_POSITION_REPORT 0x00000001 -#define RPC_LOC_EVENT_ASSISTANCE_DATA_REQUEST 0x00000020 -#define RPC_LOC_EVENT_NMEA_POSITION_REPORT 0x00000008 -#define RPC_LOC_EVENT_SATELLITE_REPORT 0x00000002 -#define RPC_LOC_EVENT_STATUS_REPORT 0x00000100 -#define RPC_LOC_OPEN_VERSION 0x00010001 -#define RPC_LOC_CLOSE_VERSION 0x00010001 -#define RPC_LOC_START_FIX_VERSION 0x00010001 -#define RPC_LOC_STOP_FIX_VERSION 0x00010001 -#define RPC_LOC_IOCTL_VERSION 0x00010001 -#define RPC_LOC_EVENT_CB_F_TYPE_VERSION 0x00010001 -#define RPC_LOC_APIAPI_VERSION_IS_HASHKEY 0 -#define RPC_LOC_API_API_MAJOR_NUM 0x0001 - -typedef bool_t rpc_boolean; - -typedef u_long rpc_uint32; - -typedef u_short rpc_uint16; - -typedef u_char rpc_uint8; - -typedef long rpc_int32; - -typedef u_char rpc_byte; - -typedef u_quad_t rpc_uint64; - -typedef rpc_int32 rpc_loc_client_handle_type; - -typedef rpc_uint64 rpc_loc_event_mask_type; - -typedef rpc_uint64 rpc_loc_position_valid_mask_type; - -typedef rpc_uint32 rpc_loc_pos_technology_mask_type; - -enum rpc_loc_session_status_e_type { - RPC_LOC_SESS_STATUS_SUCCESS = 0, - RPC_LOC_SESS_STATUS_IN_PROGESS = 1, - RPC_LOC_SESS_STATUS_GENERAL_FAILURE = 2, - RPC_LOC_SESS_STATUS_TIMEOUT = 3, - RPC_LOC_SESS_STATUS_USER_END = 4, - RPC_LOC_SESS_STATUS_BAD_PARAMETER = 5, - RPC_LOC_SESS_STATUS_PHONE_OFFLINE = 6, - RPC_LOC_SESS_STATUS_ENGINE_LOCKED = 7, - RPC_LOC_SESS_STATUS_MAX = 268435456, -}; -typedef enum rpc_loc_session_status_e_type rpc_loc_session_status_e_type; - -struct rpc_loc_calendar_time_s_type { - rpc_uint16 year; - u_char month; - u_char day_of_week; - u_char day; - u_char hour; - u_char minute; - u_char second; - rpc_uint16 millisecond; -}; -typedef struct rpc_loc_calendar_time_s_type rpc_loc_calendar_time_s_type; - -struct rpc_loc_parsed_position_s_type { - rpc_loc_position_valid_mask_type valid_mask; - rpc_loc_session_status_e_type session_status; - rpc_loc_calendar_time_s_type timestamp_calendar; - rpc_uint64 timestamp_utc; - rpc_uint8 leap_seconds; - float time_unc; - double latitude; - double longitude; - float altitude_wrt_ellipsoid; - float altitude_wrt_mean_sea_level; - float speed_horizontal; - float speed_vertical; - float heading; - float hor_unc_circular; - float hor_unc_ellipse_semi_major; - float hor_unc_ellipse_semi_minor; - float hor_unc_ellipse_orient_azimuth; - float vert_unc; - float speed_unc; - float heading_unc; - u_char confidence_horizontal; - u_char confidence_vertical; - float magnetic_deviation; - rpc_loc_pos_technology_mask_type technology_mask; -}; -typedef struct rpc_loc_parsed_position_s_type rpc_loc_parsed_position_s_type; - -enum rpc_loc_sv_system_e_type { - RPC_LOC_SV_SYSTEM_GPS = 1, - RPC_LOC_SV_SYSTEM_GALILEO = 2, - RPC_LOC_SV_SYSTEM_SBAS = 3, - RPC_LOC_SV_SYSTEM_COMPASS = 4, - RPC_LOC_SV_SYSTEM_GLONASS = 5, - RPC_LOC_SV_SYSTEM_MAX = 268435456, -}; -typedef enum rpc_loc_sv_system_e_type rpc_loc_sv_system_e_type; - -enum rpc_loc_sv_status_e_type { - RPC_LOC_SV_STATUS_IDLE = 1, - RPC_LOC_SV_STATUS_SEARCH = 2, - RPC_LOC_SV_STATUS_TRACK = 3, - RPC_LOC_SV_STATUS_MAX = 268435456, -}; -typedef enum rpc_loc_sv_status_e_type rpc_loc_sv_status_e_type; - -typedef rpc_uint32 rpc_loc_sv_info_valid_mask_type; - -struct rpc_loc_sv_info_s_type { - rpc_loc_sv_info_valid_mask_type valid_mask; - rpc_loc_sv_system_e_type system; - rpc_uint8 prn; - rpc_uint8 health_status; - rpc_loc_sv_status_e_type process_status; - rpc_boolean has_eph; - rpc_boolean has_alm; - float elevation; - float azimuth; - float snr; -}; -typedef struct rpc_loc_sv_info_s_type rpc_loc_sv_info_s_type; - -typedef rpc_uint32 rpc_loc_gnss_info_valid_mask_type; - -struct rpc_loc_gnss_info_s_type { - rpc_loc_gnss_info_valid_mask_type valid_mask; - float position_dop; - float horizontal_dop; - float vertical_dop; - rpc_boolean altitude_assumed; - rpc_uint16 sv_count; - struct { - u_int sv_list_len; - rpc_loc_sv_info_s_type *sv_list_val; - } sv_list; -}; -typedef struct rpc_loc_gnss_info_s_type rpc_loc_gnss_info_s_type; - -struct rpc_loc_nmea_report_s_type { - rpc_uint16 length; - struct { - u_int nmea_sentences_len; - char *nmea_sentences_val; - } nmea_sentences; -}; -typedef struct rpc_loc_nmea_report_s_type rpc_loc_nmea_report_s_type; - -enum rpc_loc_status_event_e_type { - RPC_LOC_STATUS_EVENT_ENGINE_STATE = 1, - RPC_LOC_STATUS_EVENT_MAX = 268435456, -}; -typedef enum rpc_loc_status_event_e_type rpc_loc_status_event_e_type; - -enum rpc_loc_engine_state_e_type { - RPC_LOC_ENGINE_STATE_ON = 1, - RPC_LOC_ENGINE_STATE_OFF = 2, - RPC_LOC_ENGINE_STATE_MAX = 268435456, -}; -typedef enum rpc_loc_engine_state_e_type rpc_loc_engine_state_e_type; - -struct rpc_loc_status_event_payload_u_type { - rpc_loc_status_event_e_type disc; - union { - rpc_loc_engine_state_e_type engine_state; - } rpc_loc_status_event_payload_u_type_u; -}; -typedef struct rpc_loc_status_event_payload_u_type rpc_loc_status_event_payload_u_type; - -struct rpc_loc_status_event_s_type { - rpc_loc_status_event_e_type event; - rpc_loc_status_event_payload_u_type payload; -}; -typedef struct rpc_loc_status_event_s_type rpc_loc_status_event_s_type; - -enum rpc_loc_server_addr_e_type { - RPC_LOC_SERVER_ADDR_IPV4 = 1, - RPC_LOC_SERVER_ADDR_URL = 2, - RPC_LOC_SERVER_ADDR_MAX = 268435456, -}; -typedef enum rpc_loc_server_addr_e_type rpc_loc_server_addr_e_type; - -struct rpc_loc_server_addr_ipv4_type { - rpc_uint32 addr; - rpc_uint16 port; -}; -typedef struct rpc_loc_server_addr_ipv4_type rpc_loc_server_addr_ipv4_type; - -struct rpc_loc_server_addr_url_type { - rpc_uint16 length; - struct { - u_int addr_len; - char *addr_val; - } addr; -}; -typedef struct rpc_loc_server_addr_url_type rpc_loc_server_addr_url_type; - -struct rpc_loc_server_addr_u_type { - rpc_loc_server_addr_e_type disc; - union { - rpc_loc_server_addr_ipv4_type ipv4; - rpc_loc_server_addr_url_type url; - } rpc_loc_server_addr_u_type_u; -}; -typedef struct rpc_loc_server_addr_u_type rpc_loc_server_addr_u_type; - -struct rpc_loc_server_info_s_type { - rpc_loc_server_addr_e_type addr_type; - rpc_loc_server_addr_u_type addr_info; -}; -typedef struct rpc_loc_server_info_s_type rpc_loc_server_info_s_type; - -enum rpc_loc_ni_notify_verify_e_type { - RPC_LOC_NI_USER_NO_NOTIFY_NO_VERIFY = 1, - RPC_LOC_NI_USER_NOTIFY_ONLY = 2, - RPC_LOC_NI_USER_NOTIFY_VERIFY_ALLOW_NO_RESP = 3, - RPC_LOC_NI_USER_NOTIFY_VERIFY_NOT_ALLOW_NO_RESP = 4, - RPC_LOC_NI_USER_PRIVACY_OVERRIDE = 5, - RPC_LOC_NI_USER_NOTIFY_VERITY_TYPE_MAX = 268435456, -}; -typedef enum rpc_loc_ni_notify_verify_e_type rpc_loc_ni_notify_verify_e_type; - -enum rpc_loc_ni_event_e_type { - RPC_LOC_NI_EVENT_VX_NOTIFY_VERIFY_REQ = 1, - RPC_LOC_NI_EVENT_SUPL_NOTIFY_VERIFY_REQ = 2, - RPC_LOC_NI_EVENT_UMTS_CP_NOTIFY_VERIFY_REQ = 3, - RPC_LOC_NI_EVENT_MAX = 268435456, -}; -typedef enum rpc_loc_ni_event_e_type rpc_loc_ni_event_e_type; - -enum rpc_loc_ni_datacoding_scheme_e_type { - RPC_LOC_NI_PRESUPL_ISO646IRV = 0, - RPC_LOC_NI_PRESUPL_ISO8859 = 1, - RPC_LOC_NI_PRESUPL_UTF8 = 2, - RPC_LOC_NI_PRESUPL_UTF16 = 3, - RPC_LOC_NI_PRESUPL_UCS2 = 4, - RPC_LOC_NI_PRESUPL_GSM_DEFAULT = 5, - RPC_LOC_NI_PRESUPL_SHIFT_JIS = 6, - RPC_LOC_NI_PRESUPL_JIS = 7, - RPC_LOC_NI_PRESUPL_EUC = 8, - RPC_LOC_NI_PRESUPL_GB2312 = 9, - RPC_LOC_NI_PRESUPL_CNS11643 = 10, - RPC_LOC_NI_PRESUPL_KSC1001 = 11, - RPC_LOC_NI_PRESUPL_ENCODING_UNKNOWN = 2147483647, - RPC_LOC_NI_SS_GERMAN = 12, - RPC_LOC_NI_SS_ENGLISH = 13, - RPC_LOC_NI_SS_ITALIAN = 14, - RPC_LOC_NI_SS_FRENCH = 15, - RPC_LOC_NI_SS_SPANISH = 16, - RPC_LOC_NI_SS_DUTCH = 17, - RPC_LOC_NI_SS_SWEDISH = 18, - RPC_LOC_NI_SS_DANISH = 19, - RPC_LOC_NI_SS_PORTUGUESE = 20, - RPC_LOC_NI_SS_FINNISH = 21, - RPC_LOC_NI_SS_NORWEGIAN = 22, - RPC_LOC_NI_SS_GREEK = 23, - RPC_LOC_NI_SS_TURKISH = 24, - RPC_LOC_NI_SS_HUNGARIAN = 25, - RPC_LOC_NI_SS_POLISH = 26, - RPC_LOC_NI_SS_LANGUAGE_UNSPEC = 27, - RPC_LOC_NI_SUPL_UTF8 = 28, - RPC_LOC_NI_SUPL_UCS2 = 29, - RPC_LOC_NI_SUPL_GSM_DEFAULT = 30, - RPC_LOC_NI_SUPL_ENCODING_UNKNOWN = 2147483647, -}; -typedef enum rpc_loc_ni_datacoding_scheme_e_type rpc_loc_ni_datacoding_scheme_e_type; - -enum rpc_loc_ni_vx_requester_id_encoding_scheme_e_type { - RPC_LOC_NI_VX_OCTET = 0, - RPC_LOC_NI_VX_EXN_PROTOCOL_MSG = 1, - RPC_LOC_NI_VX_ASCII = 2, - RPC_LOC_NI_VX_IA5 = 3, - RPC_LOC_NI_VX_UNICODE = 4, - RPC_LOC_NI_VX_SHIFT_JIS = 5, - RPC_LOC_NI_VX_KOREAN = 6, - RPC_LOC_NI_VX_LATIN_HEBREW = 7, - RPC_LOC_NI_VX_LATIN = 8, - RPC_LOC_NI_VX_GSM = 9, - RPC_LOC_NI_VX_ENCODING_TYPE_MAX = 268435456, -}; -typedef enum rpc_loc_ni_vx_requester_id_encoding_scheme_e_type rpc_loc_ni_vx_requester_id_encoding_scheme_e_type; - -enum rpc_loc_ni_vx_pos_mode_e_type { - RPC_LOC_VX_MS_ASSISTED_ONLY = 1, - RPC_LOC_VX_MS_BASED_ONLY = 2, - RPC_LOC_VX_MS_ASSISTED_PREF_MSBASED_ALLWD = 3, - RPC_LOC_VX_MS_BASED_PREF_ASSISTED_ALLWD = 4, - RPC_LOC_VX_POS_MODE_MAX = 268435456, -}; -typedef enum rpc_loc_ni_vx_pos_mode_e_type rpc_loc_ni_vx_pos_mode_e_type; - -struct rpc_loc_ni_vx_requester_id_s_type { - u_char requester_id_length; - char requester_id[200]; -}; -typedef struct rpc_loc_ni_vx_requester_id_s_type rpc_loc_ni_vx_requester_id_s_type; - -struct rpc_loc_ni_vx_notify_verify_req_s_type { - rpc_loc_ni_notify_verify_e_type notification_priv_type; - u_char pos_qos_incl; - u_char pos_qos; - rpc_uint32 num_fixes; - rpc_uint32 tbf; - rpc_loc_ni_vx_pos_mode_e_type pos_mode; - rpc_loc_ni_vx_requester_id_encoding_scheme_e_type encoding_scheme; - rpc_loc_ni_vx_requester_id_s_type requester_id; - rpc_uint16 user_resp_timer_val; -}; -typedef struct rpc_loc_ni_vx_notify_verify_req_s_type rpc_loc_ni_vx_notify_verify_req_s_type; - -enum rpc_loc_ni_supl_pos_method_e_type { - RPC_LOC_NI_POSMETHOD_AGPS_SETASSISTED = 1, - RPC_LOC_NI_POSMETHOD_AGPS_SETBASED = 2, - RPC_LOC_NI_POSMETHOD_AGPS_SETASSISTED_PREF = 3, - RPC_LOC_NI_POSMETHOD_AGPS_SETBASED_PREF = 4, - RPC_LOC_NI_POSMETHOD_AUTONOMOUS_GPS = 5, - RPC_LOC_NI_POSMETHOD_AFLT = 6, - RPC_LOC_NI_POSMETHOD_ECID = 7, - RPC_LOC_NI_POSMETHOD_EOTD = 8, - RPC_LOC_NI_POSMETHOD_OTDOA = 9, - RPC_LOC_NI_POSMETHOD_NO_POSITION = 10, - RPC_LOC_NI_POSMETHOD_MAX = 268435456, -}; -typedef enum rpc_loc_ni_supl_pos_method_e_type rpc_loc_ni_supl_pos_method_e_type; - -struct rpc_loc_ni_supl_slp_session_id_s_type { - u_char presence; - char session_id[4]; - rpc_loc_server_info_s_type slp_address; -}; -typedef struct rpc_loc_ni_supl_slp_session_id_s_type rpc_loc_ni_supl_slp_session_id_s_type; - -struct rpc_loc_ni_requestor_id_s_type { - u_char data_coding_scheme; - struct { - u_int requestor_id_string_len; - char *requestor_id_string_val; - } requestor_id_string; - u_char string_len; -}; -typedef struct rpc_loc_ni_requestor_id_s_type rpc_loc_ni_requestor_id_s_type; - -struct rpc_loc_ni_supl_client_name_s_type { - u_char data_coding_scheme; - struct { - u_int client_name_string_len; - char *client_name_string_val; - } client_name_string; - u_char string_len; -}; -typedef struct rpc_loc_ni_supl_client_name_s_type rpc_loc_ni_supl_client_name_s_type; - -struct rpc_loc_ni_supl_qop_s_type { - u_char bit_mask; - u_char horacc; - u_char veracc; - u_char maxLocAge; - u_char delay; -}; -typedef struct rpc_loc_ni_supl_qop_s_type rpc_loc_ni_supl_qop_s_type; - -struct rpc_loc_ni_supl_notify_verify_req_s_type { - rpc_loc_ni_notify_verify_e_type notification_priv_type; - rpc_uint16 flags; - rpc_loc_ni_supl_slp_session_id_s_type supl_slp_session_id; - char supl_hash[8]; - rpc_loc_ni_datacoding_scheme_e_type datacoding_scheme; - rpc_loc_ni_supl_pos_method_e_type pos_method; - rpc_loc_ni_requestor_id_s_type requestor_id; - rpc_loc_ni_supl_client_name_s_type client_name; - rpc_loc_ni_supl_qop_s_type supl_qop; - rpc_uint16 user_response_timer; -}; -typedef struct rpc_loc_ni_supl_notify_verify_req_s_type rpc_loc_ni_supl_notify_verify_req_s_type; - -struct rpc_loc_ni_ext_client_address_s_type { - u_char ext_client_address_len; - struct { - u_int ext_client_address_len; - char *ext_client_address_val; - } ext_client_address; -}; -typedef struct rpc_loc_ni_ext_client_address_s_type rpc_loc_ni_ext_client_address_s_type; - -enum rpc_loc_ni_location_type_e_type { - RPC_LOC_NI_LOCATIONTYPE_CURRENT_LOCATION = 1, - RPC_LOC_NI_LOCATIONTYPE_CURRENT_OR_LAST_KNOWN_LOCATION = 2, - RPC_LOC_NI_LOCATIONTYPE_INITIAL_LOCATION = 3, - RPC_LOC_NI_LOCATIONTYPE_MAX = 268435456, -}; -typedef enum rpc_loc_ni_location_type_e_type rpc_loc_ni_location_type_e_type; - -struct rpc_loc_ni_deferred_location_s_type { - u_char unused_bits; - u_char ms_available; -}; -typedef struct rpc_loc_ni_deferred_location_s_type rpc_loc_ni_deferred_location_s_type; - -struct rpc_loc_ni_codeword_string_s_type { - u_char data_coding_scheme; - struct { - u_int lcs_codeword_string_len; - char *lcs_codeword_string_val; - } lcs_codeword_string; - u_char string_len; -}; -typedef struct rpc_loc_ni_codeword_string_s_type rpc_loc_ni_codeword_string_s_type; - -struct rpc_loc_ni_service_type_id_s_type { - u_char lcs_service_type_id; -}; -typedef struct rpc_loc_ni_service_type_id_s_type rpc_loc_ni_service_type_id_s_type; - -struct rpc_loc_ni_umts_cp_notify_verify_req_s_type { - rpc_loc_ni_notify_verify_e_type notification_priv_type; - u_char invoke_id; - rpc_uint16 flags; - u_char notification_length; - struct { - u_int notification_text_len; - char *notification_text_val; - } notification_text; - rpc_loc_ni_datacoding_scheme_e_type datacoding_scheme; - rpc_loc_ni_ext_client_address_s_type ext_client_address_data; - rpc_loc_ni_location_type_e_type location_type; - rpc_loc_ni_deferred_location_s_type deferred_location; - rpc_loc_ni_requestor_id_s_type requestor_id; - rpc_loc_ni_codeword_string_s_type codeword_string; - rpc_loc_ni_service_type_id_s_type service_type_id; - rpc_uint16 user_response_timer; -}; -typedef struct rpc_loc_ni_umts_cp_notify_verify_req_s_type rpc_loc_ni_umts_cp_notify_verify_req_s_type; - -struct rpc_loc_ni_event_payload_u_type { - rpc_loc_ni_event_e_type disc; - union { - rpc_loc_ni_vx_notify_verify_req_s_type vx_req; - rpc_loc_ni_supl_notify_verify_req_s_type supl_req; - rpc_loc_ni_umts_cp_notify_verify_req_s_type umts_cp_req; - } rpc_loc_ni_event_payload_u_type_u; -}; -typedef struct rpc_loc_ni_event_payload_u_type rpc_loc_ni_event_payload_u_type; - -struct rpc_loc_ni_event_s_type { - rpc_loc_ni_event_e_type event; - rpc_loc_ni_event_payload_u_type payload; -}; -typedef struct rpc_loc_ni_event_s_type rpc_loc_ni_event_s_type; - -enum rpc_loc_assist_data_request_e_type { - RPC_LOC_ASSIST_DATA_TIME_REQ = 1, - RPC_LOC_ASSIST_DATA_PREDICTED_ORBITS_REQ = 2, - RPC_LOC_ASSIST_DATA_MAX = 268435456, -}; -typedef enum rpc_loc_assist_data_request_e_type rpc_loc_assist_data_request_e_type; - -typedef char *rpc_struct_loc_time_download_source_s_type_servers_ptr; - -typedef rpc_struct_loc_time_download_source_s_type_servers_ptr rpc_struct_loc_time_download_source_s_type_servers[3]; - -struct rpc_loc_time_download_source_s_type { - rpc_uint32 delay_threshold; - rpc_struct_loc_time_download_source_s_type_servers servers; -}; -typedef struct rpc_loc_time_download_source_s_type rpc_loc_time_download_source_s_type; - -typedef char *rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr; - -typedef rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr rpc_struct_loc_predicted_orbits_data_source_s_type_servers[3]; - -struct rpc_loc_predicted_orbits_data_source_s_type { - rpc_uint32 max_file_size; - rpc_uint32 max_part_size; - rpc_struct_loc_predicted_orbits_data_source_s_type_servers servers; -}; -typedef struct rpc_loc_predicted_orbits_data_source_s_type rpc_loc_predicted_orbits_data_source_s_type; - -struct rpc_loc_assist_data_request_payload_u_type { - rpc_loc_assist_data_request_e_type disc; - union { - rpc_loc_time_download_source_s_type time_download; - rpc_loc_predicted_orbits_data_source_s_type data_download; - } rpc_loc_assist_data_request_payload_u_type_u; -}; -typedef struct rpc_loc_assist_data_request_payload_u_type rpc_loc_assist_data_request_payload_u_type; - -struct rpc_loc_assist_data_request_s_type { - rpc_loc_assist_data_request_e_type event; - rpc_loc_assist_data_request_payload_u_type payload; -}; -typedef struct rpc_loc_assist_data_request_s_type rpc_loc_assist_data_request_s_type; - -typedef rpc_uint32 rpc_loc_server_connection_handle; - -enum rpc_loc_server_protocol_e_type { - RPC_LOC_SERVER_PROTOCOL_DEFAULT = 0, - RPC_LOC_SERVER_PROTOCOL_SUPL = 1, - RPC_LOC_SERVER_PROTOCOL_VX_MPC = 2, - RPC_LOC_SERVER_PROTOCOL_VX_PDE = 3, - RPC_LOC_SERVER_PROTOCOL_MAX = 16777216, -}; -typedef enum rpc_loc_server_protocol_e_type rpc_loc_server_protocol_e_type; - -enum rpc_loc_server_request_e_type { - RPC_LOC_SERVER_REQUEST_OPEN = 1, - RPC_LOC_SERVER_REQUEST_CLOSE = 2, - RPC_LOC_SERVER_REQUEST_MAX = 268435456, -}; -typedef enum rpc_loc_server_request_e_type rpc_loc_server_request_e_type; - -struct rpc_loc_server_open_req_s_type { - rpc_loc_server_connection_handle conn_handle; - rpc_loc_server_protocol_e_type protocol; -}; -typedef struct rpc_loc_server_open_req_s_type rpc_loc_server_open_req_s_type; - -struct rpc_loc_server_close_req_s_type { - rpc_loc_server_connection_handle conn_handle; -}; -typedef struct rpc_loc_server_close_req_s_type rpc_loc_server_close_req_s_type; - -struct rpc_loc_server_request_u_type { - rpc_loc_server_request_e_type disc; - union { - rpc_loc_server_open_req_s_type open_req; - rpc_loc_server_close_req_s_type close_req; - } rpc_loc_server_request_u_type_u; -}; -typedef struct rpc_loc_server_request_u_type rpc_loc_server_request_u_type; - -struct rpc_loc_server_request_s_type { - rpc_loc_server_request_e_type event; - rpc_loc_server_request_u_type payload; -}; -typedef struct rpc_loc_server_request_s_type rpc_loc_server_request_s_type; - -struct rpc_loc_reserved_payload_s_type { - rpc_uint16 data_size; - struct { - u_int data_len; - char *data_val; - } data; -}; -typedef struct rpc_loc_reserved_payload_s_type rpc_loc_reserved_payload_s_type; - -enum rpc_loc_ioctl_e_type { - RPC_LOC_IOCTL_GET_API_VERSION = 1, - RPC_LOC_IOCTL_SET_FIX_CRITERIA = 2, - RPC_LOC_IOCTL_GET_FIX_CRITERIA = 3, - RPC_LOC_IOCTL_SERVICE_START_INDEX = 400, - RPC_LOC_IOCTL_INFORM_NI_USER_RESPONSE = 400, - RPC_LOC_IOCTL_INJECT_PREDICTED_ORBITS_DATA = 401, - RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_VALIDITY = 402, - RPC_LOC_IOCTL_QUERY_PREDICTED_ORBITS_DATA_SOURCE = 403, - RPC_LOC_IOCTL_SET_PREDICTED_ORBITS_DATA_AUTO_DOWNLOAD = 404, - RPC_LOC_IOCTL_INJECT_UTC_TIME = 405, - RPC_LOC_IOCTL_INJECT_RTC_VALUE = 406, - RPC_LOC_IOCTL_INJECT_POSITION = 407, - RPC_LOC_IOCTL_QUERY_ENGINE_STATE = 408, - RPC_LOC_IOCTL_INFORM_SERVER_OPEN_STATUS = 409, - RPC_LOC_IOCTL_INFORM_SERVER_CLOSE_STATUS = 410, - RPC_LOC_IOCTL_NV_SETTINGS_START_INDEX = 800, - RPC_LOC_IOCTL_SET_ENGINE_LOCK = 800, - RPC_LOC_IOCTL_GET_ENGINE_LOCK = 801, - RPC_LOC_IOCTL_SET_SBAS_CONFIG = 802, - RPC_LOC_IOCTL_GET_SBAS_CONFIG = 803, - RPC_LOC_IOCTL_SET_NMEA_TYPES = 804, - RPC_LOC_IOCTL_GET_NMEA_TYPES = 805, - RPC_LOC_IOCTL_SET_CDMA_PDE_SERVER_ADDR = 806, - RPC_LOC_IOCTL_GET_CDMA_PDE_SERVER_ADDR = 807, - RPC_LOC_IOCTL_SET_CDMA_MPC_SERVER_ADDR = 808, - RPC_LOC_IOCTL_GET_CDMA_MPC_SERVER_ADDR = 809, - RPC_LOC_IOCTL_SET_UMTS_SLP_SERVER_ADDR = 810, - RPC_LOC_IOCTL_GET_UMTS_SLP_SERVER_ADDR = 811, - RPC_LOC_IOCTL_SET_ON_DEMAND_LPM = 812, - RPC_LOC_IOCTL_GET_ON_DEMAND_LPM = 813, - RPC_LOC_IOCTL_PROPRIETARY_START_INDEX = 1000, - RPC_LOC_IOCTL_DELETE_ASSIST_DATA = 1000, - RPC_LOC_IOCTL_SET_CUSTOM_PDE_SERVER_ADDR = 1001, - RPC_LOC_IOCTL_GET_CUSTOM_PDE_SERVER_ADDR = 1002, - RPC_LOC_IOCTL_THIRD_PARTY_START_INDEX = 1073741824, -}; -typedef enum rpc_loc_ioctl_e_type rpc_loc_ioctl_e_type; - -struct rpc_loc_api_version_s_type { - u_char major; - u_char minor; -}; -typedef struct rpc_loc_api_version_s_type rpc_loc_api_version_s_type; - -enum rpc_loc_fix_recurrence_e_type { - RPC_LOC_PERIODIC_FIX = 1, - RPC_LOC_SINGLE_FIX = 2, - RPC_LOC_FIX_SESSION_TYPE_MAX = 268435456, -}; -typedef enum rpc_loc_fix_recurrence_e_type rpc_loc_fix_recurrence_e_type; - -enum rpc_loc_operation_mode_e_type { - RPC_LOC_OPER_MODE_DEFAULT = 1, - RPC_LOC_OPER_MODE_MSB = 2, - RPC_LOC_OPER_MODE_MSA = 3, - RPC_LOC_OPER_MODE_STANDALONE = 4, - RPC_LOC_OPER_MODE_SPEED_OPTIMAL = 5, - RPC_LOC_OPER_MODE_ACCURACY_OPTIMAL = 6, - RPC_LOC_OPER_MODE_DATA_OPTIMAL = 7, - RPC_LOC_OPER_MODE_MAX = 268435456, -}; -typedef enum rpc_loc_operation_mode_e_type rpc_loc_operation_mode_e_type; - -enum rpc_loc_notify_e_type { - RPC_LOC_NOTIFY_ON_INTERVAL = 1, - RPC_LOC_NOTIFY_ON_DISTANCE = 2, - RPC_LOC_NOTIFY_ON_ANY = 3, - RPC_LOC_NOTIFY_ON_ALL = 4, - RPC_LOC_NOTIFY_TYPE_MAX = 268435456, -}; -typedef enum rpc_loc_notify_e_type rpc_loc_notify_e_type; - -struct rpc_loc_fix_criteria_s_type { - rpc_uint32 valid_mask; - rpc_loc_fix_recurrence_e_type recurrence_type; - rpc_loc_operation_mode_e_type preferred_operation_mode; - rpc_uint32 preferred_accuracy; - rpc_uint32 preferred_response_time; - rpc_boolean intermediate_pos_report_enabled; - rpc_loc_notify_e_type notify_type; - rpc_uint32 min_interval; - float min_distance; - rpc_uint32 min_dist_sample_interval; -}; -typedef struct rpc_loc_fix_criteria_s_type rpc_loc_fix_criteria_s_type; - -enum rpc_loc_ni_user_resp_e_type { - RPC_LOC_NI_LCS_NOTIFY_VERIFY_ACCEPT = 1, - RPC_LOC_NI_LCS_NOTIFY_VERIFY_DENY = 2, - RPC_LOC_NI_LCS_NOTIFY_VERIFY_NORESP = 3, - RPC_LOC_NI_LCS_NOTIFY_VERIFY_MAX = 268435456, -}; -typedef enum rpc_loc_ni_user_resp_e_type rpc_loc_ni_user_resp_e_type; - -struct rpc_loc_user_verify_s_type { - rpc_loc_ni_user_resp_e_type user_resp; - rpc_loc_ni_event_s_type ni_event_pass_back; -}; -typedef struct rpc_loc_user_verify_s_type rpc_loc_user_verify_s_type; - -enum rpc_loc_predicted_orbits_data_format_e_type { - RPC_LOC_PREDICTED_ORBITS_XTRA = 0, - RPC_LOC_PREDICTED_ORBITS_FORMAT_MAX = 268435456, -}; -typedef enum rpc_loc_predicted_orbits_data_format_e_type rpc_loc_predicted_orbits_data_format_e_type; - -struct rpc_loc_predicted_orbits_data_s_type { - rpc_loc_predicted_orbits_data_format_e_type format_type; - rpc_uint32 total_size; - rpc_uint8 total_parts; - rpc_uint8 part; - rpc_uint16 part_len; - struct { - u_int data_ptr_len; - char *data_ptr_val; - } data_ptr; -}; -typedef struct rpc_loc_predicted_orbits_data_s_type rpc_loc_predicted_orbits_data_s_type; - -struct rpc_loc_predicted_orbits_data_validity_report_s_type { - rpc_uint64 start_time_utc; - rpc_uint16 valid_duration_hrs; -}; -typedef struct rpc_loc_predicted_orbits_data_validity_report_s_type rpc_loc_predicted_orbits_data_validity_report_s_type; - -struct rpc_loc_predicted_orbits_auto_download_config_s_type { - rpc_boolean enable; - u_char auto_check_every_hrs; -}; -typedef struct rpc_loc_predicted_orbits_auto_download_config_s_type rpc_loc_predicted_orbits_auto_download_config_s_type; - -struct rpc_loc_assist_data_time_s_type { - rpc_uint64 time_utc; - rpc_uint32 uncertainty; -}; -typedef struct rpc_loc_assist_data_time_s_type rpc_loc_assist_data_time_s_type; - -typedef rpc_uint64 rpc_loc_assist_pos_valid_mask_type; - -struct rpc_loc_assist_data_pos_s_type { - rpc_loc_assist_pos_valid_mask_type valid_mask; - rpc_uint64 timestamp_utc; - double latitude; - double longitude; - float altitude_wrt_ellipsoid; - float altitude_wrt_mean_sea_level; - float hor_unc_circular; - float vert_unc; - u_char confidence_horizontal; - u_char confidence_vertical; -}; -typedef struct rpc_loc_assist_data_pos_s_type rpc_loc_assist_data_pos_s_type; - -enum rpc_loc_server_open_status_e_type { - RPC_LOC_SERVER_OPEN_SUCCESS = 1, - RPC_LOC_SERVER_OPEN_FAIL = 2, - RPC_LOC_SERVER_OPEN_STATUS_MAX = 268435456, -}; -typedef enum rpc_loc_server_open_status_e_type rpc_loc_server_open_status_e_type; - -struct rpc_loc_server_open_status_s_type { - rpc_loc_server_connection_handle conn_handle; - rpc_loc_server_open_status_e_type open_status; - char *apn_name; -}; -typedef struct rpc_loc_server_open_status_s_type rpc_loc_server_open_status_s_type; - -enum rpc_loc_server_close_status_e_type { - RPC_LOC_SERVER_CLOSE_SUCCESS = 1, - RPC_LOC_SERVER_CLOSE_FAIL = 2, - RPC_LOC_SERVER_CLOSE_STATUS_MAX = 268435456, -}; -typedef enum rpc_loc_server_close_status_e_type rpc_loc_server_close_status_e_type; - -struct rpc_loc_server_close_status_s_type { - rpc_loc_server_connection_handle conn_handle; - rpc_loc_server_close_status_e_type close_status; -}; -typedef struct rpc_loc_server_close_status_s_type rpc_loc_server_close_status_s_type; - -enum rpc_loc_lock_e_type { - RPC_LOC_LOCK_NONE = 1, - RPC_LOC_LOCK_MI = 2, - RPC_LOC_LOCK_MT = 3, - RPC_LOC_LOCK_ALL = 4, - RPC_LOC_LOCK_MAX = 268435456, -}; -typedef enum rpc_loc_lock_e_type rpc_loc_lock_e_type; - -typedef rpc_uint32 rpc_loc_nmea_sentence_type; - -typedef rpc_uint32 rpc_loc_assist_data_type; - -struct rpc_loc_assist_data_delete_s_type { - rpc_loc_assist_data_type type; - rpc_uint32 reserved[8]; -}; -typedef struct rpc_loc_assist_data_delete_s_type rpc_loc_assist_data_delete_s_type; - -struct rpc_loc_ioctl_data_u_type { - rpc_loc_ioctl_e_type disc; - union { - rpc_loc_fix_criteria_s_type fix_criteria; - rpc_loc_user_verify_s_type user_verify_resp; - rpc_loc_predicted_orbits_data_s_type predicted_orbits_data; - rpc_loc_predicted_orbits_auto_download_config_s_type predicted_orbits_auto_download; - rpc_loc_assist_data_time_s_type assistance_data_time; - rpc_loc_assist_data_pos_s_type assistance_data_position; - rpc_loc_server_open_status_s_type conn_open_status; - rpc_loc_server_close_status_s_type conn_close_status; - rpc_loc_lock_e_type engine_lock; - rpc_boolean sbas_mode; - rpc_loc_nmea_sentence_type nmea_types; - rpc_boolean on_demand_lpm; - rpc_loc_server_info_s_type server_addr; - rpc_loc_assist_data_delete_s_type assist_data_delete; - } rpc_loc_ioctl_data_u_type_u; -}; -typedef struct rpc_loc_ioctl_data_u_type rpc_loc_ioctl_data_u_type; - -struct rpc_loc_ioctl_callback_data_u_type { - rpc_loc_ioctl_e_type disc; - union { - rpc_loc_api_version_s_type api_version; - rpc_loc_fix_criteria_s_type fix_criteria; - rpc_loc_lock_e_type engine_lock; - rpc_boolean sbas_mode; - rpc_loc_nmea_sentence_type nmea_types; - rpc_boolean on_demand_lpm; - rpc_loc_server_info_s_type server_addr; - rpc_loc_predicted_orbits_data_source_s_type predicted_orbits_data_source; - rpc_loc_predicted_orbits_data_validity_report_s_type predicted_orbits_data_validity; - } rpc_loc_ioctl_callback_data_u_type_u; -}; -typedef struct rpc_loc_ioctl_callback_data_u_type rpc_loc_ioctl_callback_data_u_type; - -struct rpc_loc_ioctl_callback_s_type { - rpc_loc_ioctl_e_type type; - rpc_int32 status; - rpc_loc_ioctl_callback_data_u_type data; -}; -typedef struct rpc_loc_ioctl_callback_s_type rpc_loc_ioctl_callback_s_type; - -struct rpc_loc_event_payload_u_type { - u_quad_t disc; - union { - rpc_loc_parsed_position_s_type parsed_location_report; - rpc_loc_gnss_info_s_type gnss_report; - rpc_loc_nmea_report_s_type nmea_report; - rpc_loc_ni_event_s_type ni_request; - rpc_loc_assist_data_request_s_type assist_data_request; - rpc_loc_server_request_s_type loc_server_request; - rpc_loc_ioctl_callback_s_type ioctl_report; - rpc_loc_status_event_s_type status_report; - rpc_loc_reserved_payload_s_type reserved; - } rpc_loc_event_payload_u_type_u; -}; -typedef struct rpc_loc_event_payload_u_type rpc_loc_event_payload_u_type; -#define RPC_LOC_API_NULL_VERSION 0x00010001 -#define RPC_LOC_API_RPC_GLUE_CODE_INFO_REMOTE_VERSION 0x00010001 - -/* the xdr functions */ - -#if defined(__STDC__) || defined(__cplusplus) -extern bool_t xdr_rpc_boolean (XDR *, rpc_boolean*); -extern bool_t xdr_rpc_uint32 (XDR *, rpc_uint32*); -extern bool_t xdr_rpc_uint16 (XDR *, rpc_uint16*); -extern bool_t xdr_rpc_uint8 (XDR *, rpc_uint8*); -extern bool_t xdr_rpc_int32 (XDR *, rpc_int32*); -extern bool_t xdr_rpc_byte (XDR *, rpc_byte*); -extern bool_t xdr_rpc_uint64 (XDR *, rpc_uint64*); -extern bool_t xdr_rpc_loc_client_handle_type (XDR *, rpc_loc_client_handle_type*); -extern bool_t xdr_rpc_loc_event_mask_type (XDR *, rpc_loc_event_mask_type*); -extern bool_t xdr_rpc_loc_position_valid_mask_type (XDR *, rpc_loc_position_valid_mask_type*); -extern bool_t xdr_rpc_loc_pos_technology_mask_type (XDR *, rpc_loc_pos_technology_mask_type*); -extern bool_t xdr_rpc_loc_session_status_e_type (XDR *, rpc_loc_session_status_e_type*); -extern bool_t xdr_rpc_loc_calendar_time_s_type (XDR *, rpc_loc_calendar_time_s_type*); -extern bool_t xdr_rpc_loc_parsed_position_s_type (XDR *, rpc_loc_parsed_position_s_type*); -extern bool_t xdr_rpc_loc_sv_system_e_type (XDR *, rpc_loc_sv_system_e_type*); -extern bool_t xdr_rpc_loc_sv_status_e_type (XDR *, rpc_loc_sv_status_e_type*); -extern bool_t xdr_rpc_loc_sv_info_valid_mask_type (XDR *, rpc_loc_sv_info_valid_mask_type*); -extern bool_t xdr_rpc_loc_sv_info_s_type (XDR *, rpc_loc_sv_info_s_type*); -extern bool_t xdr_rpc_loc_gnss_info_valid_mask_type (XDR *, rpc_loc_gnss_info_valid_mask_type*); -extern bool_t xdr_rpc_loc_gnss_info_s_type (XDR *, rpc_loc_gnss_info_s_type*); -extern bool_t xdr_rpc_loc_nmea_report_s_type (XDR *, rpc_loc_nmea_report_s_type*); -extern bool_t xdr_rpc_loc_status_event_e_type (XDR *, rpc_loc_status_event_e_type*); -extern bool_t xdr_rpc_loc_engine_state_e_type (XDR *, rpc_loc_engine_state_e_type*); -extern bool_t xdr_rpc_loc_status_event_payload_u_type (XDR *, rpc_loc_status_event_payload_u_type*); -extern bool_t xdr_rpc_loc_status_event_s_type (XDR *, rpc_loc_status_event_s_type*); -extern bool_t xdr_rpc_loc_server_addr_e_type (XDR *, rpc_loc_server_addr_e_type*); -extern bool_t xdr_rpc_loc_server_addr_ipv4_type (XDR *, rpc_loc_server_addr_ipv4_type*); -extern bool_t xdr_rpc_loc_server_addr_url_type (XDR *, rpc_loc_server_addr_url_type*); -extern bool_t xdr_rpc_loc_server_addr_u_type (XDR *, rpc_loc_server_addr_u_type*); -extern bool_t xdr_rpc_loc_server_info_s_type (XDR *, rpc_loc_server_info_s_type*); -extern bool_t xdr_rpc_loc_ni_notify_verify_e_type (XDR *, rpc_loc_ni_notify_verify_e_type*); -extern bool_t xdr_rpc_loc_ni_event_e_type (XDR *, rpc_loc_ni_event_e_type*); -extern bool_t xdr_rpc_loc_ni_datacoding_scheme_e_type (XDR *, rpc_loc_ni_datacoding_scheme_e_type*); -extern bool_t xdr_rpc_loc_ni_vx_requester_id_encoding_scheme_e_type (XDR *, rpc_loc_ni_vx_requester_id_encoding_scheme_e_type*); -extern bool_t xdr_rpc_loc_ni_vx_pos_mode_e_type (XDR *, rpc_loc_ni_vx_pos_mode_e_type*); -extern bool_t xdr_rpc_loc_ni_vx_requester_id_s_type (XDR *, rpc_loc_ni_vx_requester_id_s_type*); -extern bool_t xdr_rpc_loc_ni_vx_notify_verify_req_s_type (XDR *, rpc_loc_ni_vx_notify_verify_req_s_type*); -extern bool_t xdr_rpc_loc_ni_supl_pos_method_e_type (XDR *, rpc_loc_ni_supl_pos_method_e_type*); -extern bool_t xdr_rpc_loc_ni_supl_slp_session_id_s_type (XDR *, rpc_loc_ni_supl_slp_session_id_s_type*); -extern bool_t xdr_rpc_loc_ni_requestor_id_s_type (XDR *, rpc_loc_ni_requestor_id_s_type*); -extern bool_t xdr_rpc_loc_ni_supl_client_name_s_type (XDR *, rpc_loc_ni_supl_client_name_s_type*); -extern bool_t xdr_rpc_loc_ni_supl_qop_s_type (XDR *, rpc_loc_ni_supl_qop_s_type*); -extern bool_t xdr_rpc_loc_ni_supl_notify_verify_req_s_type (XDR *, rpc_loc_ni_supl_notify_verify_req_s_type*); -extern bool_t xdr_rpc_loc_ni_ext_client_address_s_type (XDR *, rpc_loc_ni_ext_client_address_s_type*); -extern bool_t xdr_rpc_loc_ni_location_type_e_type (XDR *, rpc_loc_ni_location_type_e_type*); -extern bool_t xdr_rpc_loc_ni_deferred_location_s_type (XDR *, rpc_loc_ni_deferred_location_s_type*); -extern bool_t xdr_rpc_loc_ni_codeword_string_s_type (XDR *, rpc_loc_ni_codeword_string_s_type*); -extern bool_t xdr_rpc_loc_ni_service_type_id_s_type (XDR *, rpc_loc_ni_service_type_id_s_type*); -extern bool_t xdr_rpc_loc_ni_umts_cp_notify_verify_req_s_type (XDR *, rpc_loc_ni_umts_cp_notify_verify_req_s_type*); -extern bool_t xdr_rpc_loc_ni_event_payload_u_type (XDR *, rpc_loc_ni_event_payload_u_type*); -extern bool_t xdr_rpc_loc_ni_event_s_type (XDR *, rpc_loc_ni_event_s_type*); -extern bool_t xdr_rpc_loc_assist_data_request_e_type (XDR *, rpc_loc_assist_data_request_e_type*); -extern bool_t xdr_rpc_struct_loc_time_download_source_s_type_servers_ptr (XDR *, rpc_struct_loc_time_download_source_s_type_servers_ptr*); -extern bool_t xdr_rpc_struct_loc_time_download_source_s_type_servers (XDR *, rpc_struct_loc_time_download_source_s_type_servers); -extern bool_t xdr_rpc_loc_time_download_source_s_type (XDR *, rpc_loc_time_download_source_s_type*); -extern bool_t xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr (XDR *, rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr*); -extern bool_t xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers (XDR *, rpc_struct_loc_predicted_orbits_data_source_s_type_servers); -extern bool_t xdr_rpc_loc_predicted_orbits_data_source_s_type (XDR *, rpc_loc_predicted_orbits_data_source_s_type*); -extern bool_t xdr_rpc_loc_assist_data_request_payload_u_type (XDR *, rpc_loc_assist_data_request_payload_u_type*); -extern bool_t xdr_rpc_loc_assist_data_request_s_type (XDR *, rpc_loc_assist_data_request_s_type*); -extern bool_t xdr_rpc_loc_server_connection_handle (XDR *, rpc_loc_server_connection_handle*); -extern bool_t xdr_rpc_loc_server_protocol_e_type (XDR *, rpc_loc_server_protocol_e_type*); -extern bool_t xdr_rpc_loc_server_request_e_type (XDR *, rpc_loc_server_request_e_type*); -extern bool_t xdr_rpc_loc_server_open_req_s_type (XDR *, rpc_loc_server_open_req_s_type*); -extern bool_t xdr_rpc_loc_server_close_req_s_type (XDR *, rpc_loc_server_close_req_s_type*); -extern bool_t xdr_rpc_loc_server_request_u_type (XDR *, rpc_loc_server_request_u_type*); -extern bool_t xdr_rpc_loc_server_request_s_type (XDR *, rpc_loc_server_request_s_type*); -extern bool_t xdr_rpc_loc_reserved_payload_s_type (XDR *, rpc_loc_reserved_payload_s_type*); -extern bool_t xdr_rpc_loc_ioctl_e_type (XDR *, rpc_loc_ioctl_e_type*); -extern bool_t xdr_rpc_loc_api_version_s_type (XDR *, rpc_loc_api_version_s_type*); -extern bool_t xdr_rpc_loc_fix_recurrence_e_type (XDR *, rpc_loc_fix_recurrence_e_type*); -extern bool_t xdr_rpc_loc_operation_mode_e_type (XDR *, rpc_loc_operation_mode_e_type*); -extern bool_t xdr_rpc_loc_notify_e_type (XDR *, rpc_loc_notify_e_type*); -extern bool_t xdr_rpc_loc_fix_criteria_s_type (XDR *, rpc_loc_fix_criteria_s_type*); -extern bool_t xdr_rpc_loc_ni_user_resp_e_type (XDR *, rpc_loc_ni_user_resp_e_type*); -extern bool_t xdr_rpc_loc_user_verify_s_type (XDR *, rpc_loc_user_verify_s_type*); -extern bool_t xdr_rpc_loc_predicted_orbits_data_format_e_type (XDR *, rpc_loc_predicted_orbits_data_format_e_type*); -extern bool_t xdr_rpc_loc_predicted_orbits_data_s_type (XDR *, rpc_loc_predicted_orbits_data_s_type*); -extern bool_t xdr_rpc_loc_predicted_orbits_data_validity_report_s_type (XDR *, rpc_loc_predicted_orbits_data_validity_report_s_type*); -extern bool_t xdr_rpc_loc_predicted_orbits_auto_download_config_s_type (XDR *, rpc_loc_predicted_orbits_auto_download_config_s_type*); -extern bool_t xdr_rpc_loc_assist_data_time_s_type (XDR *, rpc_loc_assist_data_time_s_type*); -extern bool_t xdr_rpc_loc_assist_pos_valid_mask_type (XDR *, rpc_loc_assist_pos_valid_mask_type*); -extern bool_t xdr_rpc_loc_assist_data_pos_s_type (XDR *, rpc_loc_assist_data_pos_s_type*); -extern bool_t xdr_rpc_loc_server_open_status_e_type (XDR *, rpc_loc_server_open_status_e_type*); -extern bool_t xdr_rpc_loc_server_open_status_s_type (XDR *, rpc_loc_server_open_status_s_type*); -extern bool_t xdr_rpc_loc_server_close_status_e_type (XDR *, rpc_loc_server_close_status_e_type*); -extern bool_t xdr_rpc_loc_server_close_status_s_type (XDR *, rpc_loc_server_close_status_s_type*); -extern bool_t xdr_rpc_loc_lock_e_type (XDR *, rpc_loc_lock_e_type*); -extern bool_t xdr_rpc_loc_nmea_sentence_type (XDR *, rpc_loc_nmea_sentence_type*); -extern bool_t xdr_rpc_loc_assist_data_type (XDR *, rpc_loc_assist_data_type*); -extern bool_t xdr_rpc_loc_assist_data_delete_s_type (XDR *, rpc_loc_assist_data_delete_s_type*); -extern bool_t xdr_rpc_loc_ioctl_data_u_type (XDR *, rpc_loc_ioctl_data_u_type*); -extern bool_t xdr_rpc_loc_ioctl_callback_data_u_type (XDR *, rpc_loc_ioctl_callback_data_u_type*); -extern bool_t xdr_rpc_loc_ioctl_callback_s_type (XDR *, rpc_loc_ioctl_callback_s_type*); -extern bool_t xdr_rpc_loc_event_payload_u_type (XDR *, rpc_loc_event_payload_u_type*); - -#else /* K&R C */ -extern bool_t xdr_rpc_boolean (); -extern bool_t xdr_rpc_uint32 (); -extern bool_t xdr_rpc_uint16 (); -extern bool_t xdr_rpc_uint8 (); -extern bool_t xdr_rpc_int32 (); -extern bool_t xdr_rpc_byte (); -extern bool_t xdr_rpc_uint64 (); -extern bool_t xdr_rpc_loc_client_handle_type (); -extern bool_t xdr_rpc_loc_event_mask_type (); -extern bool_t xdr_rpc_loc_position_valid_mask_type (); -extern bool_t xdr_rpc_loc_pos_technology_mask_type (); -extern bool_t xdr_rpc_loc_session_status_e_type (); -extern bool_t xdr_rpc_loc_calendar_time_s_type (); -extern bool_t xdr_rpc_loc_parsed_position_s_type (); -extern bool_t xdr_rpc_loc_sv_system_e_type (); -extern bool_t xdr_rpc_loc_sv_status_e_type (); -extern bool_t xdr_rpc_loc_sv_info_valid_mask_type (); -extern bool_t xdr_rpc_loc_sv_info_s_type (); -extern bool_t xdr_rpc_loc_gnss_info_valid_mask_type (); -extern bool_t xdr_rpc_loc_gnss_info_s_type (); -extern bool_t xdr_rpc_loc_nmea_report_s_type (); -extern bool_t xdr_rpc_loc_status_event_e_type (); -extern bool_t xdr_rpc_loc_engine_state_e_type (); -extern bool_t xdr_rpc_loc_status_event_payload_u_type (); -extern bool_t xdr_rpc_loc_status_event_s_type (); -extern bool_t xdr_rpc_loc_server_addr_e_type (); -extern bool_t xdr_rpc_loc_server_addr_ipv4_type (); -extern bool_t xdr_rpc_loc_server_addr_url_type (); -extern bool_t xdr_rpc_loc_server_addr_u_type (); -extern bool_t xdr_rpc_loc_server_info_s_type (); -extern bool_t xdr_rpc_loc_ni_notify_verify_e_type (); -extern bool_t xdr_rpc_loc_ni_event_e_type (); -extern bool_t xdr_rpc_loc_ni_datacoding_scheme_e_type (); -extern bool_t xdr_rpc_loc_ni_vx_requester_id_encoding_scheme_e_type (); -extern bool_t xdr_rpc_loc_ni_vx_pos_mode_e_type (); -extern bool_t xdr_rpc_loc_ni_vx_requester_id_s_type (); -extern bool_t xdr_rpc_loc_ni_vx_notify_verify_req_s_type (); -extern bool_t xdr_rpc_loc_ni_supl_pos_method_e_type (); -extern bool_t xdr_rpc_loc_ni_supl_slp_session_id_s_type (); -extern bool_t xdr_rpc_loc_ni_requestor_id_s_type (); -extern bool_t xdr_rpc_loc_ni_supl_client_name_s_type (); -extern bool_t xdr_rpc_loc_ni_supl_qop_s_type (); -extern bool_t xdr_rpc_loc_ni_supl_notify_verify_req_s_type (); -extern bool_t xdr_rpc_loc_ni_ext_client_address_s_type (); -extern bool_t xdr_rpc_loc_ni_location_type_e_type (); -extern bool_t xdr_rpc_loc_ni_deferred_location_s_type (); -extern bool_t xdr_rpc_loc_ni_codeword_string_s_type (); -extern bool_t xdr_rpc_loc_ni_service_type_id_s_type (); -extern bool_t xdr_rpc_loc_ni_umts_cp_notify_verify_req_s_type (); -extern bool_t xdr_rpc_loc_ni_event_payload_u_type (); -extern bool_t xdr_rpc_loc_ni_event_s_type (); -extern bool_t xdr_rpc_loc_assist_data_request_e_type (); -extern bool_t xdr_rpc_struct_loc_time_download_source_s_type_servers_ptr (); -extern bool_t xdr_rpc_struct_loc_time_download_source_s_type_servers (); -extern bool_t xdr_rpc_loc_time_download_source_s_type (); -extern bool_t xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers_ptr (); -extern bool_t xdr_rpc_struct_loc_predicted_orbits_data_source_s_type_servers (); -extern bool_t xdr_rpc_loc_predicted_orbits_data_source_s_type (); -extern bool_t xdr_rpc_loc_assist_data_request_payload_u_type (); -extern bool_t xdr_rpc_loc_assist_data_request_s_type (); -extern bool_t xdr_rpc_loc_server_connection_handle (); -extern bool_t xdr_rpc_loc_server_protocol_e_type (); -extern bool_t xdr_rpc_loc_server_request_e_type (); -extern bool_t xdr_rpc_loc_server_open_req_s_type (); -extern bool_t xdr_rpc_loc_server_close_req_s_type (); -extern bool_t xdr_rpc_loc_server_request_u_type (); -extern bool_t xdr_rpc_loc_server_request_s_type (); -extern bool_t xdr_rpc_loc_reserved_payload_s_type (); -extern bool_t xdr_rpc_loc_ioctl_e_type (); -extern bool_t xdr_rpc_loc_api_version_s_type (); -extern bool_t xdr_rpc_loc_fix_recurrence_e_type (); -extern bool_t xdr_rpc_loc_operation_mode_e_type (); -extern bool_t xdr_rpc_loc_notify_e_type (); -extern bool_t xdr_rpc_loc_fix_criteria_s_type (); -extern bool_t xdr_rpc_loc_ni_user_resp_e_type (); -extern bool_t xdr_rpc_loc_user_verify_s_type (); -extern bool_t xdr_rpc_loc_predicted_orbits_data_format_e_type (); -extern bool_t xdr_rpc_loc_predicted_orbits_data_s_type (); -extern bool_t xdr_rpc_loc_predicted_orbits_data_validity_report_s_type (); -extern bool_t xdr_rpc_loc_predicted_orbits_auto_download_config_s_type (); -extern bool_t xdr_rpc_loc_assist_data_time_s_type (); -extern bool_t xdr_rpc_loc_assist_pos_valid_mask_type (); -extern bool_t xdr_rpc_loc_assist_data_pos_s_type (); -extern bool_t xdr_rpc_loc_server_open_status_e_type (); -extern bool_t xdr_rpc_loc_server_open_status_s_type (); -extern bool_t xdr_rpc_loc_server_close_status_e_type (); -extern bool_t xdr_rpc_loc_server_close_status_s_type (); -extern bool_t xdr_rpc_loc_lock_e_type (); -extern bool_t xdr_rpc_loc_nmea_sentence_type (); -extern bool_t xdr_rpc_loc_assist_data_type (); -extern bool_t xdr_rpc_loc_assist_data_delete_s_type (); -extern bool_t xdr_rpc_loc_ioctl_data_u_type (); -extern bool_t xdr_rpc_loc_ioctl_callback_data_u_type (); -extern bool_t xdr_rpc_loc_ioctl_callback_s_type (); -extern bool_t xdr_rpc_loc_event_payload_u_type (); - -#endif /* K&R C */ - -#ifdef __cplusplus -} -#endif - -#endif /* !_LOC_API_COMMON_H_RPCGEN */ diff --git a/loc_api/libloc_api-rpc/inc-3200/loc_api_fixup.h b/loc_api/libloc_api-rpc/inc-3200/loc_api_fixup.h deleted file mode 100644 index e62eb367..00000000 --- a/loc_api/libloc_api-rpc/inc-3200/loc_api_fixup.h +++ /dev/null @@ -1,188 +0,0 @@ -/****************************************************************************** - @file: loc_api_fixup.h - @brief: Loc API Android RPC amendment header - - DESCRIPTION - Loc API Android RPC amendment header - - INITIALIZATION AND SEQUENCING REQUIREMENTS - - ----------------------------------------------------------------------------- -Copyright (c) 2009, QUALCOMM USA, INC. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -· Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -· Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -· Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ----------------------------------------------------------------------------- - ******************************************************************************/ - -#ifndef LOC_API_FIXUP_H -#define LOC_API_FIXUP_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -#ifndef NULLPROC -#define NULLPROC 0 -#endif /* NULLPROC */ - -#ifdef ADD_XDR_FLOAT - -extern bool_t xdr_float (XDR *__xdrs, float *__fp); -extern bool_t xdr_double (XDR *__xdrs, double *__dp); - -#endif /* ADD_XDR_FLOAT */ - -#ifdef ADD_XDR_BOOL -extern bool_t xdr_bool(XDR *__xdrs, int *__bp); -#endif /* ADD_XDR_BOOL */ - -#define RPC_LOC_API_MAJOR_VERSION_NUMBER 1 -#define RPC_LOC_API_MINOR_VERSION_NUMBER 0 - -// Return value for loc_open in case of failure. -#define RPC_LOC_CLIENT_HANDLE_INVALID -1 - -// Return value of loc api calls for loc_close, loc_start_fix, loc_stop_fix and loc_ioctl -// These are also the status for the ioctl callback -#define RPC_LOC_API_SUCCESS 0 -#define RPC_LOC_API_GENERAL_FAILURE 1 -#define RPC_LOC_API_UNSUPPORTED 2 -#define RPC_LOC_API_INVALID_HANDLE 4 -#define RPC_LOC_API_INVALID_PARAMETER 5 -#define RPC_LOC_API_ENGINE_BUSY 6 -#define RPC_LOC_API_PHONE_OFFLINE 7 -#define RPC_LOC_API_TIMEOUT 8 - -// Special return value for loc api calls in case of RCP failure -#define RPC_LOC_API_RPC_FAILURE (-1234) - -#define RPC_LOC_API_MAX_SV_COUNT 80 -#define RPC_LOC_API_MAX_NMEA_STRING_LENGTH 1200 - -// Maximum server address that will be used in location API -#define RPC_LOC_API_MAX_SERVER_ADDR_LENGTH 256 -#define RPC_LOC_API_MAX_NUM_PREDICTED_ORBITS_SERVERS 3 -#define RPC_LOC_API_MAX_NUM_NTP_SERVERS 3 - -#define RPC_LOC_EVENT_PARSED_POSITION_REPORT 0x00000001 // Position report comes in loc_parsed_position_s_type -#define RPC_LOC_EVENT_SATELLITE_REPORT 0x00000002 // Satellite in view report -#define RPC_LOC_EVENT_NMEA_1HZ_REPORT 0x00000004 // NMEA report at 1HZ rate -#define RPC_LOC_EVENT_NMEA_POSITION_REPORT 0x00000008 // NMEA report at position report rate -#define RPC_LOC_EVENT_NI_NOTIFY_VERIFY_REQUEST 0x00000010 // NI notification/verification request -#define RPC_LOC_EVENT_ASSISTANCE_DATA_REQUEST 0x00000020 // Assistance data, eg: time, predicted orbits request -#define RPC_LOC_EVENT_LOCATION_SERVER_REQUEST 0x00000040 // Request for location server -#define RPC_LOC_EVENT_IOCTL_REPORT 0x00000080 // Callback report for loc_ioctl -#define RPC_LOC_EVENT_STATUS_REPORT 0x00000100 // Misc status report: eg, engine state - - -#define RPC_LOC_POS_VALID_SESSION_STATUS 0x00000001 -#define RPC_LOC_POS_VALID_TIMESTAMP_CALENDAR 0x00000002 -#define RPC_LOC_POS_VALID_TIMESTAMP_UTC 0x00000004 -#define RPC_LOC_POS_VALID_LEAP_SECONDS 0x00000008 -#define RPC_LOC_POS_VALID_TIME_UNC 0x00000010 -#define RPC_LOC_POS_VALID_LATITUDE 0x00000020 -#define RPC_LOC_POS_VALID_LONGITUDE 0x00000040 -#define RPC_LOC_POS_VALID_ALTITUDE_WRT_ELLIPSOID 0x00000080 -#define RPC_LOC_POS_VALID_ALTITUDE_WRT_MEAN_SEA_LEVEL 0x00000100 -#define RPC_LOC_POS_VALID_SPEED_HORIZONTAL 0x00000200 -#define RPC_LOC_POS_VALID_SPEED_VERTICAL 0x00000400 -#define RPC_LOC_POS_VALID_HEADING 0x00000800 -#define RPC_LOC_POS_VALID_HOR_UNC_CIRCULAR 0x00001000 -#define RPC_LOC_POS_VALID_HOR_UNC_ELLI_SEMI_MAJ 0x00002000 -#define RPC_LOC_POS_VALID_HOR_UNC_ELLI_SEMI_MIN 0x00004000 -#define RPC_LOC_POS_VALID_HOR_UNC_ELLI_ORIENT_AZIMUTH 0x00008000 -#define RPC_LOC_POS_VALID_VERTICAL_UNC 0x00010000 -#define RPC_LOC_POS_VALID_SPEED_UNC 0x00020000 -#define RPC_LOC_POS_VALID_HEADING_UNC 0x00040000 -#define RPC_LOC_POS_VALID_CONFIDENCE_HORIZONTAL 0x00080000 -#define RPC_LOC_POS_VALID_CONFIDENCE_VERTICAL 0x00100000 -#define RPC_LOC_POS_VALID_MAGNETIC_VARIATION 0x00200000 -#define RPC_LOC_POS_VALID_TECHNOLOGY_MASK 0x00400000 - -#define RPC_LOC_POS_TECH_SATELLITE 0x00000001 -#define RPC_LOC_POS_TECH_CELLID 0x00000002 -#define RPC_LOC_POS_TECH_WIFI 0x00000004 - -#define RPC_LOC_SV_INFO_VALID_SYSTEM 0x00000001 -#define RPC_LOC_SV_INFO_VALID_PRN 0x00000002 -#define RPC_LOC_SV_INFO_VALID_HEALTH_STATUS 0x00000004 -#define RPC_LOC_SV_INFO_VALID_PROCESS_STATUS 0x00000008 -#define RPC_LOC_SV_INFO_VALID_HAS_EPH 0x00000010 -#define RPC_LOC_SV_INFO_VALID_HAS_ALM 0x00000020 -#define RPC_LOC_SV_INFO_VALID_ELEVATION 0x00000040 -#define RPC_LOC_SV_INFO_VALID_AZIMUTH 0x00000080 -#define RPC_LOC_SV_INFO_VALID_SNR 0x00000100 - -#define RPC_LOC_GNSS_INFO_VALID_POS_DOP 0x00000001 -#define RPC_LOC_GNSS_INFO_VALID_HOR_DOP 0x00000002 -#define RPC_LOC_GNSS_INFO_VALID_VERT_DOP 0x00000004 -#define RPC_LOC_GNSS_INFO_VALID_ALTITUDE_ASSUMED 0x00000008 -#define RPC_LOC_GNSS_INFO_VALID_SV_COUNT 0x00000010 -#define RPC_LOC_GNSS_INFO_VALID_SV_LIST 0x00000020 - -#define RPC_LOC_NI_MAX_REQUESTOR_ID_LENGTH 200 -#define RPC_LOC_NI_SUPL_HASH_LENGTH 8 -#define RPC_LOC_NI_SUPL_SLP_SESSION_ID_BYTE_LENGTH 4 -#define RPC_LOC_NI_MAX_CLIENT_NAME_LENGTH 64 -#define RPC_LOC_NI_MAX_EXT_CLIENT_ADDRESS 20 -#define RPC_LOC_NI_CODEWORD_LENGTH 20 - -#define RPC_LOC_NI_SUPL_QOP_VALID 0x01 -#define RPC_LOC_NI_SUPL_QOP_VERACC_VALID 0x02 -#define RPC_LOC_NI_SUPL_QOP_MAXAGE_VALID 0x04 -#define RPC_LOC_NI_SUPL_QOP_DELAY_VALID 0x08 - -#define RPC_LOC_FIX_CRIT_VALID_RECURRENCE_TYPE 0x00000001 -#define RPC_LOC_FIX_CRIT_VALID_PREFERRED_OPERATION_MODE 0x00000002 -#define RPC_LOC_FIX_CRIT_VALID_PREFERRED_ACCURACY 0x00000004 -#define RPC_LOC_FIX_CRIT_VALID_PREFERRED_RESPONSE_TIME 0x00000008 -#define RPC_LOC_FIX_CRIT_VALID_INTERMEDIATE_POS_REPORT_ENABLED 0x00000010 -#define RPC_LOC_FIX_CRIT_VALID_NOTIFY_TYPE 0x00000020 -#define RPC_LOC_FIX_CRIT_VALID_MIN_INTERVAL 0x00000040 -#define RPC_LOC_FIX_CRIT_VALID_MIN_DISTANCE 0x00000080 -#define RPC_LOC_FIX_CRIT_VALID_MIN_DIST_SAMPLE_INTERVAL 0x00000100 - -#define RPC_LOC_ASSIST_POS_VALID_TIMESTAMP_UTC 0x00000001 -#define RPC_LOC_ASSIST_POS_VALID_LATITUDE 0x00000002 -#define RPC_LOC_ASSIST_POS_VALID_LONGITUDE 0x00000004 -#define RPC_LOC_ASSIST_POS_VALID_ALTITUDE_WRT_ELLIPSOID 0x00000008 -#define RPC_LOC_ASSIST_POS_VALID_ALTITUDE_WRT_MEAN_SEA_LEVEL 0x00000010 -#define RPC_LOC_ASSIST_POS_VALID_HOR_UNC_CIRCULAR 0x00000020 -#define RPC_LOC_ASSIST_POS_VALID_VERT_UNC 0x00000040 -#define RPC_LOC_ASSIST_POS_VALID_CONFIDENCE_HORIZONTAL 0x00000080 -#define RPC_LOC_ASSIST_POS_VALID_CONFIDENCE_VERTICAL 0x00000100 - -#define RPC_LOC_ASSIST_DATA_ALL 0xFFFFFFFF - -#define RPC_LOC_NMEA_MASK_ALL 0xffff -#define RPC_LOC_NMEA_MASK_GGA 0x0001 -#define RPC_LOC_NMEA_MASK_RMC 0x0002 -#define RPC_LOC_NMEA_MASK_GSV 0x0004 -#define RPC_LOC_NMEA_MASK_GSA 0x0008 -#define RPC_LOC_NMEA_MASK_VTG 0x0010 - -/* flags for notification */ -#define RPC_LOC_NI_CLIENT_NAME_PRESENT 0x0001 -#define RPC_LOC_NI_CLIENT_EXTADDR_PRESENT 0x0002 -#define RPC_LOC_NI_DEF_LOCATION_TYPE_PRESENT 0x0010 -#define RPC_LOC_NI_REQUESTOR_ID_PRESENT 0x0020 -#define RPC_LOC_NI_CODEWORD_PRESENT 0x0040 -#define RPC_LOC_NI_SERVICE_TYPE_ID_PRESENT 0x0080 -#define RPC_LOC_NI_ENCODING_TYPE_PRESENT 0x0100 - -#ifdef __cplusplus -} -#endif - -#endif /* LOC_API_FIXUP_H */ diff --git a/loc_api/libloc_api-rpc/inc-3200/loc_apicb_appinit.h b/loc_api/libloc_api-rpc/inc-3200/loc_apicb_appinit.h deleted file mode 100644 index 92d4e150..00000000 --- a/loc_api/libloc_api-rpc/inc-3200/loc_apicb_appinit.h +++ /dev/null @@ -1,34 +0,0 @@ -/* ------------------------------------------------------------------------------- -Copyright (c) 2009, QUALCOMM USA, INC. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -· Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -· Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -· Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ------------------------------------------------------------------------------- - */ - -#ifndef LOC_APICB_APPINIT_H -#define LOC_APICB_APPINIT_H - -#ifdef __cplusplus -extern "C" -{ -#endif - - /* Initialization function for callbacks */ -extern int loc_apicb_app_init(); -extern void loc_apicb_app_deinit(); - -#ifdef __cplusplus -} -#endif - -#endif /* LOC_APICB_APPINIT_H */ diff --git a/loc_api/libloc_api-rpc/inc/debug.h b/loc_api/libloc_api-rpc/inc/debug.h deleted file mode 100644 index a71b23a0..00000000 --- a/loc_api/libloc_api-rpc/inc/debug.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright (c) 2009, QUALCOMM USA, INC. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -· Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -· Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -· Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef DEBUG_H -#define DEBUG_H - -#include - -#define LOG_TAG "libgps-rpc" -#include - -#define PRINT(x...) do { \ - fprintf(stdout, "%s(%d) ", __FUNCTION__, __LINE__); \ - fprintf(stdout, ##x); \ - LOGD(x); \ - } while(0) - -#ifdef DEBUG -#define D PRINT -#else -#define D(x...) do { } while(0) -#endif - -#ifdef VERBOSE -#define V PRINT -#else -#define V(x...) do { } while(0) -#endif - -#define E(x...) do { \ - fprintf(stderr, "%s(%d) ", __FUNCTION__, __LINE__); \ - fprintf(stderr, ##x); \ - LOGE(x); \ - } while(0) - -#define FAILIF(cond, msg...) do { \ - if (__builtin_expect (cond, 0)) { \ - fprintf(stderr, "%s:%s:(%d): ", __FILE__, __FUNCTION__, __LINE__); \ - fprintf(stderr, ##msg); \ - LOGE(##msg); \ - } \ - } while(0) - -#endif/*DEBUG_H*/ diff --git a/loc_api/libloc_api-rpc/inc/loc_api_rpc_glue.h b/loc_api/libloc_api-rpc/inc/loc_api_rpc_glue.h deleted file mode 100644 index ef972bd6..00000000 --- a/loc_api/libloc_api-rpc/inc/loc_api_rpc_glue.h +++ /dev/null @@ -1,100 +0,0 @@ -/****************************************************************************** - @file: loc_api_rpc_glue.h - @brief: Loc API Android glue code header - - DESCRIPTION - Loc API Android glue code header - - INITIALIZATION AND SEQUENCING REQUIREMENTS - - ----------------------------------------------------------------------------- -Copyright (c) 2009, QUALCOMM USA, INC. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -· Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -· Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -· Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ----------------------------------------------------------------------------- - ******************************************************************************/ - -/*===================================================================== - EDIT HISTORY FOR MODULE - - This section contains comments describing changes made to the module. - Notice that changes are listed in reverse chronological order. - -when who what, where, why --------- --- ------------------------------------------------------- -03/17/09 dx Initial version - -$Id: //source/qcom/qct/modem/gps/cgps/dev/locationmiddleware/locapi/app-linux/source/test/loc_api_test/loc_api_cb_log.h#4 $ -======================================================================*/ - -#ifndef LOC_API_RPC_GLUE_H -#define LOC_API_RPC_GLUE_H - -/* Include RPC headers */ -#include "loc_api_common.h" -#include "loc_api.h" -#include "loc_api_cb.h" -#include "loc_api_fixup.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Boolean */ -/* Other data types in comdef.h are defined in rpc stubs, so fix it here */ -typedef unsigned char boolean; -#define TRUE 1 -#define FALSE 0 - -extern int loc_api_glue_init(void); -extern int loc_api_null(void); - -typedef int32 (loc_event_cb_f_type)( - rpc_loc_client_handle_type loc_handle, /* handle of the client */ - rpc_loc_event_mask_type loc_event, /* event mask */ - const rpc_loc_event_payload_u_type* loc_event_payload /* payload */ -); - -extern rpc_loc_client_handle_type loc_open( - rpc_loc_event_mask_type event_reg_mask, - loc_event_cb_f_type *event_callback -); - -extern int32 loc_close -( - rpc_loc_client_handle_type handle -); - -extern int32 loc_start_fix -( - rpc_loc_client_handle_type handle -); - -extern int32 loc_stop_fix -( - rpc_loc_client_handle_type handle -); - -extern int32 loc_ioctl -( - rpc_loc_client_handle_type handle, - rpc_loc_ioctl_e_type ioctl_type, - rpc_loc_ioctl_data_u_type* ioctl_data -); - -#ifdef __cplusplus -} -#endif - -#endif /* LOC_API_RPC_GLUE_H */ diff --git a/loc_api/libloc_api-rpc/src/loc_apicb_appinit.c b/loc_api/libloc_api-rpc/src/loc_apicb_appinit.c deleted file mode 100644 index 7fcfd6cb..00000000 --- a/loc_api/libloc_api-rpc/src/loc_apicb_appinit.c +++ /dev/null @@ -1,61 +0,0 @@ -/* ------------------------------------------------------------------------------- -Copyright (c) 2009, QUALCOMM USA, INC. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -· Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -· Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -· Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ------------------------------------------------------------------------------- - */ -#include "rpc/rpc.h" -#include "loc_api_common.h" -#include "loc_api.h" -#include "loc_api_cb.h" -#include "loc_api_fixup.h" - -#include "loc_apicb_appinit.h" - -#define RPC_FUNC_VERSION_BASE(a,b) a ## b -#define RPC_CB_FUNC_VERS(a,b) RPC_FUNC_VERSION_BASE(a,b) - -static SVCXPRT* svrPort = NULL; - -extern void RPC_CB_FUNC_VERS(loc_apicbprog_,LOC_APICBVERS_0001)(struct svc_req *rqstp, register SVCXPRT *transp); - -int loc_apicb_app_init(void) -{ - /* Register a callback server to use the loc_apicbprog_* function */ - if (svrPort == NULL) { - svrPort = svcrtr_create(); - } - if (!svrPort) return -1; - - xprt_register(svrPort); - if(svc_register(svrPort, LOC_APICBPROG, LOC_APICBVERS_0001, RPC_CB_FUNC_VERS(loc_apicbprog_,LOC_APICBVERS_0001),0)) - { - return 0; - } - else - { - return -1; - } -} - -void loc_apicb_app_deinit(void) -{ - if (svrPort == NULL) - { - return; - } - xprt_unregister(svrPort); - svc_destroy(svrPort); - //svc_unregister(svrPort, LOC_APICBPROG, LOC_APICBVERS_0001); - svrPort = NULL; -} From 4d44ce3d6c9e0f6c2ba885316401e5103c92dc22 Mon Sep 17 00:00:00 2001 From: Qiang Chen Date: Mon, 8 Jun 2015 13:01:43 -0700 Subject: [PATCH 10/37] Fix gps.conf capabilities overwrited by carrier If overwrite happened, loc config update will restore gps.conf capabilities based on target type. Change-Id: I958ce8da0e8062549f12808aca4aebcf4a7fb95d CRs-Fixed: 850144 --- loc_api/libloc_api_50001/loc.cpp | 15 ++++++++++++--- loc_api/libloc_api_50001/loc_eng.cpp | 18 +++++++----------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/loc_api/libloc_api_50001/loc.cpp b/loc_api/libloc_api_50001/loc.cpp index 2c39e925..fda34604 100644 --- a/loc_api/libloc_api_50001/loc.cpp +++ b/loc_api/libloc_api_50001/loc.cpp @@ -202,7 +202,7 @@ static const GnssConfigurationInterface sLocEngConfigInterface = static loc_eng_data_s_type loc_afw_data; static int gss_fd = -1; - +static int sGnssType = GNSS_UNKNOWN; /*=========================================================================== FUNCTION gps_get_hardware_interface @@ -254,8 +254,8 @@ extern "C" const GpsInterface* get_gps_interface() target = loc_get_target(); LOC_LOGD("Target name check returned %s", loc_get_target_name(target)); - int gnssType = getTargetGnssType(target); - switch (gnssType) + sGnssType = getTargetGnssType(target); + switch (sGnssType) { case GNSS_GSS: case GNSS_AUTO: @@ -1157,6 +1157,15 @@ static void loc_configuration_update(const char* config_data, int32_t length) { ENTRY_LOG(); loc_eng_configuration_update(loc_afw_data, config_data, length); + switch (sGnssType) + { + case GNSS_GSS: + case GNSS_AUTO: + case GNSS_QCA1530: + //APQ + gps_conf.CAPABILITIES &= ~(GPS_CAPABILITY_MSA | GPS_CAPABILITY_MSB); + break; + } EXIT_LOG(%s, VOID_RET); } diff --git a/loc_api/libloc_api_50001/loc_eng.cpp b/loc_api/libloc_api_50001/loc_eng.cpp index d3b06bff..8bf6bfac 100644 --- a/loc_api/libloc_api_50001/loc_eng.cpp +++ b/loc_api/libloc_api_50001/loc_eng.cpp @@ -2052,14 +2052,12 @@ int loc_eng_set_position_mode(loc_eng_data_s_type &loc_eng_data, ENTRY_LOG_CALLFLOW(); INIT_CHECK(loc_eng_data.adapter, return -1); - int gnssType = getTargetGnssType(loc_get_target()); - - // The position mode for GSS/QCA1530 can only be standalone - bool is1530 = gnssType == GNSS_QCA1530; - bool isAPQ = gnssType == GNSS_GSS; - if ((isAPQ || is1530) && params.mode != LOC_POSITION_MODE_STANDALONE) { + // The position mode for AUTO/GSS/QCA1530 can only be standalone + if (!(gps_conf.CAPABILITIES & GPS_CAPABILITY_MSB) && + !(gps_conf.CAPABILITIES & GPS_CAPABILITY_MSA) && + (params.mode != LOC_POSITION_MODE_STANDALONE)) { params.mode = LOC_POSITION_MODE_STANDALONE; - LOC_LOGD("Position mode changed to standalone for target with GSS/qca1530."); + LOC_LOGD("Position mode changed to standalone for target with AUTO/GSS/qca1530."); } if(! loc_eng_data.adapter->getUlpProxy()->sendFixMode(params)) @@ -2334,10 +2332,8 @@ void loc_eng_agps_init(loc_eng_data_s_type &loc_eng_data, AGpsExtCallbacks* call AGPS_TYPE_WIFI, true); - int gnssType = getTargetGnssType(loc_get_target()); - bool isAPQ = (gnssType == GNSS_GSS); - bool is1530 = (gnssType == GNSS_QCA1530); - if (!isAPQ && !is1530) { + if ((gps_conf.CAPABILITIES & GPS_CAPABILITY_MSA) || + (gps_conf.CAPABILITIES & GPS_CAPABILITY_MSB)) { loc_eng_data.agnss_nif = new AgpsStateMachine(servicerTypeAgps, (void *)loc_eng_data.agps_status_cb, AGPS_TYPE_SUPL, From 339a4fc58f11c054568c0b69a5a8d7b2dd041690 Mon Sep 17 00:00:00 2001 From: Qaing Chen Date: Thu, 11 Jun 2015 16:52:05 -0700 Subject: [PATCH 11/37] Fix Memory leak in util/loc_cfg.cpp deallocate conf_copy after usage. Change-Id: I8ad4e4e8007a2d8b608f3f74503515f062b86c4b CRs-fixed: 852809 --- utils/loc_cfg.cpp | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/utils/loc_cfg.cpp b/utils/loc_cfg.cpp index 7ffe6a43..a7697762 100644 --- a/utils/loc_cfg.cpp +++ b/utils/loc_cfg.cpp @@ -330,24 +330,25 @@ int loc_update_conf(const char* conf_data, int32_t length, // make a copy, so we do not tokenize the original data char* conf_copy = (char*)malloc(length+1); - if(conf_copy !=NULL) + if (conf_copy != NULL) { - memcpy(conf_copy, conf_data, length); - // we hard NULL the end of string to be safe - conf_copy[length] = 0; - } + memcpy(conf_copy, conf_data, length); + // we hard NULL the end of string to be safe + conf_copy[length] = 0; - // start with one record off - uint32_t num_params = table_length - 1; - char* saveptr = NULL; - char* input_buf = strtok_r(conf_copy, "\n", &saveptr); - ret = 0; + // start with one record off + uint32_t num_params = table_length - 1; + char* saveptr = NULL; + char* input_buf = strtok_r(conf_copy, "\n", &saveptr); + ret = 0; - LOC_LOGD("%s:%d]: num_params: %d\n", __func__, __LINE__, num_params); - while(num_params && input_buf) { - ret++; - num_params -= loc_fill_conf_item(input_buf, config_table, table_length); - input_buf = strtok_r(NULL, "\n", &saveptr); + LOC_LOGD("%s:%d]: num_params: %d\n", __func__, __LINE__, num_params); + while(num_params && input_buf) { + ret++; + num_params -= loc_fill_conf_item(input_buf, config_table, table_length); + input_buf = strtok_r(NULL, "\n", &saveptr); + } + free(conf_copy); } } From 0826e30db247cb8873f65b14f5e5b054688c5bbb Mon Sep 17 00:00:00 2001 From: Kevin Tang Date: Thu, 18 Jun 2015 16:02:16 -0700 Subject: [PATCH 12/37] Disable ESUPL from configuration ESUPL initialization path waits on data services to come-up whichtakes approx. 10 sec adding to TTFF. The GSS in APQ will not beused for Emergency services (for VoLTE) hence disabling for APQautomitive Change-Id: Ifc82abadcaa4a859d344251fac065c5e632c8c6f --- etc/gps.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/gps.conf b/etc/gps.conf index a1d5d2cc..142c8288 100644 --- a/etc/gps.conf +++ b/etc/gps.conf @@ -49,7 +49,7 @@ SUPL_ES=1 #Choose PDN for Emergency SUPL #1 - Use emergency PDN #0 - Use regular SUPL PDN for Emergency SUPL -USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=1 +USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=0 #SUPL_MODE is a bit mask set in config.xml per carrier by default. #If it is uncommented here, this value will over write the value from From 447fe95020858e01834716bb627883a7da34126f Mon Sep 17 00:00:00 2001 From: Dante Russo Date: Thu, 2 Jul 2015 17:29:29 -0700 Subject: [PATCH 13/37] LCA additions to ULP and log_util defines 1. Add two new ulp location sources (PIP and NLP) ULP_LOCATION_IS_FROM_NLP to mark locations from NLP ULP_LOCATION_IS_FROM_PIP to mark locations from PIP 2. Introduce a macro for printing exit log with error. CRs-Fixed: 694343 Change-Id: Ifa11803df2ed4fc249a5c339acfeeb5d89bf55d5 --- core/gps_extended_c.h | 7 +++++-- utils/loc_log.cpp | 1 + utils/log_util.h | 10 +++++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/core/gps_extended_c.h b/core/gps_extended_c.h index 7a359823..29375883 100644 --- a/core/gps_extended_c.h +++ b/core/gps_extended_c.h @@ -63,9 +63,12 @@ extern "C" { #define ULP_LOCATION_IS_FROM_GEOFENCE 0X0008 /** Positioin is from Hardware FLP */ #define ULP_LOCATION_IS_FROM_HW_FLP 0x0010 -#define ULP_LOCATION_IS_FROM_NLP 0x0020 +/** Position is from NLP */ +#define ULP_LOCATION_IS_FROM_NLP 0x0020 +/** Position is from PIP */ +#define ULP_LOCATION_IS_FROM_PIP 0x0040 /** Position is from external DR solution*/ -#define ULP_LOCATION_IS_FROM_EXT_DR 0X0040 +#define ULP_LOCATION_IS_FROM_EXT_DR 0X0080 #define ULP_MIN_INTERVAL_INVALID 0xffffffff diff --git a/utils/loc_log.cpp b/utils/loc_log.cpp index 18182b74..5500dead 100644 --- a/utils/loc_log.cpp +++ b/utils/loc_log.cpp @@ -51,6 +51,7 @@ const char FROM_MODEM[] = "<---"; const char TO_AFW[] = "<==="; const char EXIT_TAG[] = "Exiting"; const char ENTRY_TAG[] = "Entering"; +const char EXIT_ERROR_TAG[] = "Exiting with error"; /* Logging Mechanism */ loc_logger_s_type loc_logger; diff --git a/utils/log_util.h b/utils/log_util.h index 8ff6b5a3..ffd5ca97 100644 --- a/utils/log_util.h +++ b/utils/log_util.h @@ -81,6 +81,8 @@ extern const char FROM_MODEM[]; extern const char TO_AFW[]; extern const char EXIT_TAG[]; extern const char ENTRY_TAG[]; +extern const char EXIT_ERROR_TAG[]; + /*============================================================================= * * MODULE EXPORTED FUNCTIONS @@ -157,12 +159,18 @@ else if (loc_logger.DEBUG_LEVEL == 0xff) { ALOGV("V/" __VA_ARGS__); } } \ } while(0) - #define LOG_I(ID, WHAT, SPEC, VAL) LOG_(LOC_LOGI, ID, WHAT, SPEC, VAL) #define LOG_V(ID, WHAT, SPEC, VAL) LOG_(LOC_LOGV, ID, WHAT, SPEC, VAL) +#define LOG_E(ID, WHAT, SPEC, VAL) LOG_(LOC_LOGE, ID, WHAT, SPEC, VAL) #define ENTRY_LOG() LOG_V(ENTRY_TAG, __func__, %s, "") #define EXIT_LOG(SPEC, VAL) LOG_V(EXIT_TAG, __func__, SPEC, VAL) +#define EXIT_LOG_WITH_ERROR(SPEC, VAL) \ + if (VAL != 0) { \ + LOG_E(EXIT_ERROR_TAG, __func__, SPEC, VAL); \ + } else { \ + LOG_V(EXIT_TAG, __func__, SPEC, VAL); \ + } // Used for logging callflow from Android Framework From 8834b304c9219de6dd592a2399ca1ac5c0b7eb0c Mon Sep 17 00:00:00 2001 From: Dante Russo Date: Thu, 2 Jul 2015 17:29:55 -0700 Subject: [PATCH 14/37] Fix implicit declaration errors in gps hal Including string.h and stdlib.h to fix compiler errors. Change-Id: I4e79c71b9e5691e51850adcc52f52b36f8e3d088 --- core/gps_extended_c.h | 4 +++- loc_api/libloc_api_50001/gps.c | 3 ++- utils/loc_target.cpp | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/core/gps_extended_c.h b/core/gps_extended_c.h index 29375883..1014bab2 100644 --- a/core/gps_extended_c.h +++ b/core/gps_extended_c.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -35,6 +35,8 @@ extern "C" { #include #include +#include +#include #include #include diff --git a/loc_api/libloc_api_50001/gps.c b/loc_api/libloc_api_50001/gps.c index b0669af2..29f20f42 100644 --- a/loc_api/libloc_api_50001/gps.c +++ b/loc_api/libloc_api_50001/gps.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2011 The Linux Foundation. All rights reserved. +/* Copyright (c) 2011,2015 The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -30,6 +30,7 @@ #include #include +#include extern const GpsInterface* get_gps_interface(); diff --git a/utils/loc_target.cpp b/utils/loc_target.cpp index 08f5584d..faaedf6c 100644 --- a/utils/loc_target.cpp +++ b/utils/loc_target.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -29,6 +29,7 @@ #include #include +#include #include #include #include From db7fc90da2f6d85cf3f6844c2a580d24bd344de5 Mon Sep 17 00:00:00 2001 From: Dante Russo Date: Thu, 2 Jul 2015 17:30:09 -0700 Subject: [PATCH 15/37] Move modem power vote out of hal The modem power vote feature needs to move out of hal as it has non-aosp dependency CRs-fixed: 831075 Change-Id: Ic83276e9d3c0d125a01f50719102fcd7c0455385 --- core/ContextBase.h | 1 + core/LBSProxyBase.h | 1 + core/LocAdapterBase.cpp | 4 - core/LocAdapterBase.h | 1 - loc_api/libloc_api_50001/Android.mk | 13 -- loc_api/libloc_api_50001/LocEngAdapter.cpp | 4 - loc_api/libloc_api_50001/LocEngAdapter.h | 2 +- loc_api/libloc_api_50001/loc.cpp | 168 +-------------------- loc_api/libloc_api_50001/loc.h | 2 - loc_api/libloc_api_50001/loc_eng.cpp | 48 ------ loc_api/libloc_api_50001/loc_eng.h | 1 - loc_api/libloc_api_50001/loc_eng_msg.h | 7 - 12 files changed, 4 insertions(+), 248 deletions(-) diff --git a/core/ContextBase.h b/core/ContextBase.h index 2adbedd6..ff7a4b33 100644 --- a/core/ContextBase.h +++ b/core/ContextBase.h @@ -58,6 +58,7 @@ public: inline LocApiProxyBase* getLocApiProxy() { return mLocApiProxy; } inline bool hasAgpsExtendedCapabilities() { return mLBSProxy->hasAgpsExtendedCapabilities(); } inline bool hasCPIExtendedCapabilities() { return mLBSProxy->hasCPIExtendedCapabilities(); } + inline void modemPowerVote(bool power) const { return mLBSProxy->modemPowerVote(power); } inline void requestUlp(LocAdapterBase* adapter, unsigned long capabilities) { mLBSProxy->requestUlp(adapter, capabilities); diff --git a/core/LBSProxyBase.h b/core/LBSProxyBase.h index 0b7dbdf1..75ae9922 100644 --- a/core/LBSProxyBase.h +++ b/core/LBSProxyBase.h @@ -53,6 +53,7 @@ public: unsigned long capabilities) const {} inline virtual bool hasAgpsExtendedCapabilities() const { return false; } inline virtual bool hasCPIExtendedCapabilities() const { return false; } + inline virtual void modemPowerVote(bool power) const {} virtual void injectFeatureConfig(ContextBase* context) const {} }; diff --git a/core/LocAdapterBase.cpp b/core/LocAdapterBase.cpp index 9eb75ec1..19fab0e5 100644 --- a/core/LocAdapterBase.cpp +++ b/core/LocAdapterBase.cpp @@ -142,10 +142,6 @@ bool LocAdapterBase:: requestNiNotify(GpsNiNotification ¬ify, const void* data) DEFAULT_IMPL(false) -void LocAdapterBase:: - shutdown() -DEFAULT_IMPL() - void LocAdapterBase:: reportGpsMeasurementData(GpsData &gpsMeasurementData) DEFAULT_IMPL() diff --git a/core/LocAdapterBase.h b/core/LocAdapterBase.h index 8e817b78..7e0b0ebc 100644 --- a/core/LocAdapterBase.h +++ b/core/LocAdapterBase.h @@ -112,7 +112,6 @@ public: virtual bool requestNiNotify(GpsNiNotification ¬ify, const void* data); inline virtual bool isInSession() { return false; } - virtual void shutdown(); ContextBase* getContext() const { return mContext; } virtual void reportGpsMeasurementData(GpsData &gpsMeasurementData); }; diff --git a/loc_api/libloc_api_50001/Android.mk b/loc_api/libloc_api_50001/Android.mk index 27c53cf2..4f80e0a6 100644 --- a/loc_api/libloc_api_50001/Android.mk +++ b/loc_api/libloc_api_50001/Android.mk @@ -96,19 +96,6 @@ LOCAL_C_INCLUDES:= \ $(TARGET_OUT_HEADERS)/gps.utils \ $(TARGET_OUT_HEADERS)/libloc_core -ifeq ($(filter $(TARGET_DEVICE), apq8064 msm8960),) -$(call print-vars, $(TARGET_DEVICE)) -LOCAL_SHARED_LIBRARIES += \ - libmdmdetect \ - libperipheral_client - -LOCAL_C_INCLUDES += \ - $(TARGET_OUT_HEADERS)/libmdmdetect/inc \ - $(TARGET_OUT_HEADERS)/libperipheralclient/inc -LOCAL_CFLAGS += \ - -DMODEM_POWER_VOTE -endif - LOCAL_PRELINK_MODULE := false LOCAL_MODULE_RELATIVE_PATH := hw diff --git a/loc_api/libloc_api_50001/LocEngAdapter.cpp b/loc_api/libloc_api_50001/LocEngAdapter.cpp index 4b4cd5e3..7089741b 100644 --- a/loc_api/libloc_api_50001/LocEngAdapter.cpp +++ b/loc_api/libloc_api_50001/LocEngAdapter.cpp @@ -53,10 +53,6 @@ void LocInternalAdapter::getZppInt() { sendMsg(new LocEngGetZpp(mLocEngAdapter)); } -void LocInternalAdapter::shutdown() { - sendMsg(new LocEngShutdown(mLocEngAdapter)); -} - LocEngAdapter::LocEngAdapter(LOC_API_ADAPTER_EVENT_MASK_T mask, void* owner, ContextBase* context, MsgTask::tCreate tCreator) : diff --git a/loc_api/libloc_api_50001/LocEngAdapter.h b/loc_api/libloc_api_50001/LocEngAdapter.h index b8fedec2..bc41ac1d 100644 --- a/loc_api/libloc_api_50001/LocEngAdapter.h +++ b/loc_api/libloc_api_50001/LocEngAdapter.h @@ -64,7 +64,6 @@ public: virtual void stopFixInt(); virtual void getZppInt(); virtual void setUlpProxy(UlpProxyBase* ulp); - virtual void shutdown(); }; typedef void (*loc_msg_sender)(void* loc_eng_data_p, void* msgp); @@ -307,6 +306,7 @@ public: mPowerVote = powerOn ? (mPowerVote | POWER_VOTE_VALUE) : (mPowerVote & ~POWER_VOTE_VALUE); requestPowerVote(); + mContext->modemPowerVote(powerOn); } inline bool getPowerVote() const { return (mPowerVote & POWER_VOTE_VALUE) != 0 ; diff --git a/loc_api/libloc_api_50001/loc.cpp b/loc_api/libloc_api_50001/loc.cpp index fda34604..ed9ff9b9 100644 --- a/loc_api/libloc_api_50001/loc.cpp +++ b/loc_api/libloc_api_50001/loc.cpp @@ -45,17 +45,6 @@ #include #include -#ifdef MODEM_POWER_VOTE -#include -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ -#include -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /*MODEM_POWER_VOTE*/ - using namespace loc_core; #define LOC_PM_CLIENT_NAME "GPS" @@ -81,7 +70,6 @@ static int loc_set_position_mode(GpsPositionMode mode, GpsPositionRecurrence re uint32_t min_interval, uint32_t preferred_accuracy, uint32_t preferred_time); static const void* loc_get_extension(const char* name); -static void loc_close_mdm_node(); // Defines the GpsInterface in gps.h static const GpsInterface sLocEngInterface = { @@ -134,24 +122,6 @@ static const GpsNiInterface sLocEngNiInterface = loc_ni_respond, }; -#ifdef MODEM_POWER_VOTE -typedef struct { - //MAX_NAME_LEN defined in mdm_detect.h - char modem_name[MAX_NAME_LEN]; - //MAX_PATH_LEN defined in mdm_detect.h - char powerup_node[MAX_PATH_LEN]; - //this handle is used by peripheral mgr - void *handle; - int mdm_fd; - MdmType mdm_type; - bool peripheral_mgr_supported; - bool peripheral_mgr_registered; -}s_loc_mdm_info; -static s_loc_mdm_info loc_mdm_info; -static void loc_pm_event_notifier(void *client_data, enum pm_event event); -#endif /*MODEM_POWER_VOTE*/ -// For shutting down MDM in fusion devices -static int mdm_fd = -1; static int loc_gps_measurement_init(GpsMeasurementCallbacks* callbacks); static void loc_gps_measurement_close(); @@ -303,11 +273,6 @@ SIDE EFFECTS static int loc_init(GpsCallbacks* callbacks) { int retVal = -1; -#ifdef MODEM_POWER_VOTE - enum pm_event mdm_state; - static int mdm_index = -1; - int peripheral_mgr_ret = PM_RET_FAILED; -#endif /*MODEM_POWER_VOTE*/ unsigned int target = (unsigned int) -1; ENTRY_LOG(); LOC_API_ADAPTER_EVENT_MASK_T event; @@ -347,7 +312,7 @@ static int loc_init(GpsCallbacks* callbacks) NULL, /* location_ext_parser */ NULL, /* sv_ext_parser */ callbacks->request_utc_time_cb, /* request_utc_time_cb */ - loc_close_mdm_node /*loc_shutdown_cb*/}; + }; gps_loc_cb = callbacks->location_cb; gps_sv_cb = callbacks->sv_status_cb; @@ -369,132 +334,11 @@ static int loc_init(GpsCallbacks* callbacks) LOC_LOGD("loc_eng_init() success!"); -#ifdef MODEM_POWER_VOTE - //if index is 0 or more, then we've looked for mdm already - LOC_LOGD("%s:%d]: mdm_index: %d", __func__, __LINE__, - mdm_index); - if (mdm_index < 0) { - struct dev_info modem_info; - memset(&modem_info, 0, sizeof(struct dev_info)); - if(get_system_info(&modem_info) != RET_SUCCESS) { - LOC_LOGE("%s:%d]: Error: get_system_info returned error\n", - __func__, __LINE__); - goto err; - } - - for(mdm_index = 0; - mdm_index < modem_info.num_modems; - mdm_index++) { - if(modem_info.mdm_list[mdm_index].mdm_name) { - //Copy modem name to register with peripheral manager - strlcpy(loc_mdm_info.modem_name, - modem_info.mdm_list[mdm_index].mdm_name, - sizeof(loc_mdm_info.modem_name)); - //copy powerup node name if we need to use mdmdetect method - strlcpy(loc_mdm_info.powerup_node, - modem_info.mdm_list[mdm_index].powerup_node, - sizeof(loc_mdm_info.powerup_node)); - loc_mdm_info.mdm_type = modem_info.mdm_list[mdm_index].type; - LOC_LOGD("%s:%d]: Found modem: %s, powerup node:%s at index: %d", - __func__, __LINE__, loc_mdm_info.modem_name, loc_mdm_info.powerup_node, - mdm_index); - break; - } - } - } - - if(loc_mdm_info.peripheral_mgr_registered != true) { - peripheral_mgr_ret = pm_client_register(loc_pm_event_notifier, - &loc_mdm_info, - loc_mdm_info.modem_name, - LOC_PM_CLIENT_NAME, - &mdm_state, - &loc_mdm_info.handle); - if(peripheral_mgr_ret == PM_RET_SUCCESS) { - loc_mdm_info.peripheral_mgr_supported = true; - loc_mdm_info.peripheral_mgr_registered = true; - LOC_LOGD("%s:%d]: registered with peripheral mgr for %s", - __func__, __LINE__, loc_mdm_info.modem_name); - } - else if(peripheral_mgr_ret == PM_RET_UNSUPPORTED) { - loc_mdm_info.peripheral_mgr_registered = true; - loc_mdm_info.peripheral_mgr_supported = false; - LOC_LOGD("%s:%d]: peripheral mgr unsupported for: %s", - __func__, __LINE__, loc_mdm_info.modem_name); - } - else { - //Not setting any flags here so that we can try again the next time around - LOC_LOGE("%s:%d]: Error: pm_client_register returned: %d", - __func__, __LINE__, peripheral_mgr_ret); - } - } - - if(loc_mdm_info.peripheral_mgr_supported == false && - loc_mdm_info.peripheral_mgr_registered == true) { - //Peripheral mgr is not supported - //use legacy method to open the powerup node - LOC_LOGD("%s:%d]: powerup_node: %s", __func__, __LINE__, - loc_mdm_info.powerup_node); - loc_mdm_info.mdm_fd = open(loc_mdm_info.powerup_node, O_RDONLY); - - if (loc_mdm_info.mdm_fd < 0) { - LOC_LOGE("Error: %s open failed: %s\n", - loc_mdm_info.powerup_node, strerror(errno)); - } else { - LOC_LOGD("%s opens success!", loc_mdm_info.powerup_node); - } - } - else if(loc_mdm_info.peripheral_mgr_supported == true && - loc_mdm_info.peripheral_mgr_registered == true) { - LOC_LOGD("%s:%d]: Voting for modem power up", __func__, __LINE__); - pm_client_connect(loc_mdm_info.handle); - } - else { - LOC_LOGD("%s:%d]: Not voted for modem power up due to errors", __func__, __LINE__); - } -#endif /*MODEM_POWER_VOTE*/ err: EXIT_LOG(%d, retVal); return retVal; } -/*=========================================================================== -FUNCTION loc_close_mdm_node - -DESCRIPTION - closes loc_mdm_info.mdm_fd which is the modem powerup node obtained in loc_init - -DEPENDENCIES - None - -RETURN VALUE - None - -SIDE EFFECTS - N/A - -===========================================================================*/ -static void loc_close_mdm_node() -{ - ENTRY_LOG(); -#ifdef MODEM_POWER_VOTE - if(loc_mdm_info.peripheral_mgr_supported == true) { - LOC_LOGD("%s:%d]: Voting for modem power down", __func__, __LINE__); - pm_client_disconnect(loc_mdm_info.handle); - } - else if (loc_mdm_info.mdm_fd >= 0) { - LOC_LOGD("closing the powerup node"); - close(loc_mdm_info.mdm_fd); - loc_mdm_info.mdm_fd = -1; - LOC_LOGD("finished closing the powerup node"); - } - else { - LOC_LOGD("powerup node has not been opened yet."); - } -#endif /*MODEM_POWER_VOTE*/ - EXIT_LOG(%s, VOID_RET); -} - /*=========================================================================== FUNCTION loc_cleanup @@ -519,7 +363,6 @@ static void loc_cleanup() loc_afw_data.adapter->setGpsLockMsg(gps_conf.GPS_LOCK); loc_eng_cleanup(loc_afw_data); - loc_close_mdm_node(); gps_loc_cb = NULL; gps_sv_cb = NULL; @@ -1192,12 +1035,3 @@ static void local_sv_cb(GpsSvStatus* sv_status, void* svExt) EXIT_LOG(%s, VOID_RET); } -#ifdef MODEM_POWER_VOTE -static void loc_pm_event_notifier(void *client_data, enum pm_event event) -{ - ENTRY_LOG(); - LOC_LOGD("%s:%d]: event: %d", __func__, __LINE__, (int)event); - pm_client_event_acknowledge(loc_mdm_info.handle, event); - EXIT_LOG(%s, VOID_RET); -} -#endif /*MODEM_POWER_VOTE*/ diff --git a/loc_api/libloc_api_50001/loc.h b/loc_api/libloc_api_50001/loc.h index 63528664..e56fdcf8 100644 --- a/loc_api/libloc_api_50001/loc.h +++ b/loc_api/libloc_api_50001/loc.h @@ -44,7 +44,6 @@ extern "C" { typedef void (*loc_location_cb_ext) (UlpLocation* location, void* locExt); typedef void (*loc_sv_status_cb_ext) (GpsSvStatus* sv_status, void* svExt); typedef void* (*loc_ext_parser)(void* data); -typedef void (*loc_shutdown_cb) (void); typedef struct { loc_location_cb_ext location_cb; @@ -58,7 +57,6 @@ typedef struct { loc_ext_parser location_ext_parser; loc_ext_parser sv_ext_parser; gps_request_utc_time request_utc_time_cb; - loc_shutdown_cb shutdown_cb; } LocCallbacks; #ifdef __cplusplus diff --git a/loc_api/libloc_api_50001/loc_eng.cpp b/loc_api/libloc_api_50001/loc_eng.cpp index 8bf6bfac..a81df97b 100644 --- a/loc_api/libloc_api_50001/loc_eng.cpp +++ b/loc_api/libloc_api_50001/loc_eng.cpp @@ -205,7 +205,6 @@ static void loc_eng_handle_engine_up(loc_eng_data_s_type &loc_eng_data) ; static int loc_eng_start_handler(loc_eng_data_s_type &loc_eng_data); static int loc_eng_stop_handler(loc_eng_data_s_type &loc_eng_data); static int loc_eng_get_zpp_handler(loc_eng_data_s_type &loc_eng_data); -static void loc_eng_handle_shutdown(loc_eng_data_s_type &loc_eng_data); static void deleteAidingData(loc_eng_data_s_type &logEng); static AgpsStateMachine* getAgpsStateMachine(loc_eng_data_s_type& logEng, AGpsExtType agpsType); @@ -345,28 +344,6 @@ void LocEngGetZpp::send() const { mAdapter->sendMsg(this); } - -LocEngShutdown::LocEngShutdown(LocEngAdapter* adapter) : - LocMsg(), mAdapter(adapter) -{ - locallog(); -} -inline void LocEngShutdown::proc() const -{ - loc_eng_data_s_type* locEng = (loc_eng_data_s_type*)mAdapter->getOwner(); - LOC_LOGD("%s:%d]: Calling loc_eng_handle_shutdown", __func__, __LINE__); - loc_eng_handle_shutdown(*locEng); -} -inline void LocEngShutdown::locallog() const -{ - LOC_LOGV("LocEngShutdown"); -} -inline void LocEngShutdown::log() const -{ - locallog(); -} - -// case LOC_ENG_MSG_SET_TIME: struct LocEngSetTime : public LocMsg { LocEngAdapter* mAdapter; const GpsUtcTime mTime; @@ -1774,7 +1751,6 @@ int loc_eng_init(loc_eng_data_s_type &loc_eng_data, LocCallbacks* callbacks, loc_eng_data.sv_ext_parser = callbacks->sv_ext_parser ? callbacks->sv_ext_parser : noProc; loc_eng_data.intermediateFix = gps_conf.INTERMEDIATE_POS; - loc_eng_data.shutdown_cb = callbacks->shutdown_cb; // initial states taken care of by the memset above // loc_eng_data.engine_status -- GPS_STATUS_NONE; // loc_eng_data.fix_session_status -- GPS_STATUS_NONE; @@ -2948,30 +2924,6 @@ int loc_eng_read_config(void) return 0; } -/*=========================================================================== -FUNCTION loc_eng_handle_shutdown - -DESCRIPTION - Calls the shutdown callback function in the loc interface to close - the modem node - -DEPENDENCIES - None - -RETURN VALUE - 0: success - -SIDE EFFECTS - N/A - -===========================================================================*/ -void loc_eng_handle_shutdown(loc_eng_data_s_type &locEng) -{ - ENTRY_LOG(); - locEng.shutdown_cb(); - EXIT_LOG(%d, 0); -} - /*=========================================================================== FUNCTION loc_eng_gps_measurement_init diff --git a/loc_api/libloc_api_50001/loc_eng.h b/loc_api/libloc_api_50001/loc_eng.h index 813da482..a203e6bb 100644 --- a/loc_api/libloc_api_50001/loc_eng.h +++ b/loc_api/libloc_api_50001/loc_eng.h @@ -137,7 +137,6 @@ typedef struct loc_eng_data_s loc_ext_parser location_ext_parser; loc_ext_parser sv_ext_parser; - loc_shutdown_cb shutdown_cb; } loc_eng_data_s_type; /* GPS.conf support */ diff --git a/loc_api/libloc_api_50001/loc_eng_msg.h b/loc_api/libloc_api_50001/loc_eng_msg.h index e3c48fb4..5626c346 100644 --- a/loc_api/libloc_api_50001/loc_eng_msg.h +++ b/loc_api/libloc_api_50001/loc_eng_msg.h @@ -299,13 +299,6 @@ struct LocEngReportGpsMeasurement : public LocMsg { virtual void log() const; }; -struct LocEngShutdown : public LocMsg { - LocEngAdapter* mAdapter; - LocEngShutdown(LocEngAdapter* adapter); - virtual void proc() const; - void locallog() const; - virtual void log() const; -}; #ifdef __cplusplus } #endif /* __cplusplus */ From d33d2162677a787774e4cecbf0982c24f39ff98b Mon Sep 17 00:00:00 2001 From: Dante Russo Date: Thu, 2 Jul 2015 17:30:14 -0700 Subject: [PATCH 16/37] Add feature set configuration Some features are flagged out builds because of a lack of support. Change-Id: I067bcf88432d74b49e60eaab86409f178cf45e7d --- core/Android.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/Android.mk b/core/Android.mk index e076dcc4..6a08b6a9 100644 --- a/core/Android.mk +++ b/core/Android.mk @@ -12,6 +12,8 @@ LOCAL_MODULE_TAGS := optional ifeq ($(TARGET_DEVICE),apq8026_lw) LOCAL_CFLAGS += -DPDK_FEATURE_SET +else ifeq ($(BOARD_VENDOR_QCOM_LOC_PDK_FEATURE_SET),true) +LOCAL_CFLAGS += -DPDK_FEATURE_SET endif LOCAL_SHARED_LIBRARIES := \ From 509979c39540f68b7f1325ae5439c6dc16b1440c Mon Sep 17 00:00:00 2001 From: Dante Russo Date: Fri, 22 May 2015 15:05:48 -0700 Subject: [PATCH 17/37] Remove DeleteAidingData additions The additions of more Satellite types that require gps.h changes are removed. Change-Id: Ib0ab285af7b9bee886c5f7a256d638f2fd7fee9d --- core/loc_core_log.cpp | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/core/loc_core_log.cpp b/core/loc_core_log.cpp index 1b220104..216dd598 100644 --- a/core/loc_core_log.cpp +++ b/core/loc_core_log.cpp @@ -116,23 +116,6 @@ static loc_name_val_s_type loc_eng_aiding_data_bits[] = NAME_VAL( GPS_DELETE_SADATA ), NAME_VAL( GPS_DELETE_RTI ), NAME_VAL( GPS_DELETE_CELLDB_INFO ), -#ifndef PDK_FEATURE_SET - NAME_VAL( GPS_DELETE_ALMANAC_CORR ), - NAME_VAL( GPS_DELETE_FREQ_BIAS_EST ), - NAME_VAL( GLO_DELETE_EPHEMERIS ), - NAME_VAL( GLO_DELETE_ALMANAC ), - NAME_VAL( GLO_DELETE_SVDIR ), - NAME_VAL( GLO_DELETE_SVSTEER ), - NAME_VAL( GLO_DELETE_ALMANAC_CORR ), - NAME_VAL( GPS_DELETE_TIME_GPS ), - NAME_VAL( GLO_DELETE_TIME ), - NAME_VAL( BDS_DELETE_SVDIR ), - NAME_VAL( BDS_DELETE_SVSTEER ), - NAME_VAL( BDS_DELETE_TIME ), - NAME_VAL( BDS_DELETE_ALMANAC_CORR ), - NAME_VAL( BDS_DELETE_EPHEMERIS ), - NAME_VAL( BDS_DELETE_ALMANAC ), -#endif NAME_VAL( GPS_DELETE_ALL) }; static int loc_eng_aiding_data_bit_num = sizeof(loc_eng_aiding_data_bits) / sizeof(loc_name_val_s_type); From 8da6427472edff7dbdbb9adc9dbeb9785548cea9 Mon Sep 17 00:00:00 2001 From: Kevin Tang Date: Tue, 14 Jul 2015 20:58:42 -0700 Subject: [PATCH 18/37] Add AP Timestamp for coarse/fine time to position reports Change to add APTimestamp field to position reports to carry Coarse or fine timestamp. Change-Id: Iaf5490cb991865d4b6376b0934b306a31528d90c --- core/gps_extended_c.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/core/gps_extended_c.h b/core/gps_extended_c.h index 1014bab2..7debee9b 100644 --- a/core/gps_extended_c.h +++ b/core/gps_extended_c.h @@ -263,6 +263,13 @@ typedef uint16_t GpsLocationExtendedFlags; /** GpsLocationExtended has valid speed uncertainty */ #define GPS_LOCATION_EXTENDED_HAS_SPEED_UNC 0x0020 +typedef struct { + struct timespec apTimeStamp; + /*boottime received from pps-ktimer*/ + float apTimeStampUncertaintyMs; + /* timestamp uncertainty in milli seconds */ +}Gnss_ApTimeStampStructType; + /** Represents gps location extended. */ typedef struct { /** set to sizeof(GpsLocationExtended) */ @@ -283,6 +290,7 @@ typedef struct { float vert_unc; /** speed uncertainty in m/s */ float speed_unc; + Gnss_ApTimeStampStructType timeStamp; } GpsLocationExtended; typedef struct GpsExtLocation_s { @@ -911,13 +919,6 @@ typedef struct */ } Gnss_ClockMeasurementStructType; -typedef struct -{ - struct timespec apTimeStamp; - /*boottime received from pps-ktimer*/ - float apTimeStampUncertaintyMs; - /* timestamp uncertainty in milli seconds */ -}Gnss_ApTimeStampStructType; typedef struct { From 594daf969230b494783b0e6c11bf7613bb46d6f1 Mon Sep 17 00:00:00 2001 From: Kevin Tang Date: Mon, 19 Oct 2015 22:30:58 -0700 Subject: [PATCH 19/37] Add AP Coarse Timestamp Uncertainty configuration parameter Change-Id: Ic93291d451704ced88bdf45df3cb9215acf6f2de --- etc/gps.conf | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/etc/gps.conf b/etc/gps.conf index 142c8288..9c9e5e92 100644 --- a/etc/gps.conf +++ b/etc/gps.conf @@ -115,3 +115,45 @@ SGLTE_TARGET=0 # 0x2: RRLP UPlane # 0x4: LLP Uplane A_GLONASS_POS_PROTOCOL_SELECT = 0 + +################################################## +# AP Coarse Timestamp Uncertainty +################################################## +# default : 10 +# or as per clock uncertainty of product +AP_TIMESTAMP_UNCERTAINTY = 10 + +##################################### +# GNSS PPS settings +##################################### +#AP DR engine availability status +# 0 : NO AP DR (default) +# 1 : AP DR enabled +#EXTERNAL_DR_ENABLED = 0 + +##################################### +#DR_SYNC Pulse Availability +##################################### +# 0 : DR_SYNC pulse not available (default) +# 1 : DR_SYNC pulse available +DR_SYNC_ENABLED = 0 + +##################################### +#PPS Device name +##################################### +PPS_DEVICENAME = /dev/pps0 + +##################################### +#AP Clock Accuracy +##################################### +AP_CLOCK_PPM = 100 + +##################################### +#MAX ms difference to detect missing pulse +##################################### +MISSING_PULSE_TIME_DELTA = 900 + +##################################### +#Propagation time uncertainty +##################################### +PROPAGATION_TIME_UNCERTAINTY = 1 From f5e6e2eeee213112bcfc074d1d78d6f0d4f883f1 Mon Sep 17 00:00:00 2001 From: Dante Russo Date: Tue, 13 Oct 2015 18:15:16 -0700 Subject: [PATCH 20/37] Add glo and bds to used-in-fix mask The used-in-fix mask is only keeping track of GPS SVs, so add a used-in-fix mask for GlONASS SVs and BDS SVs as well to avoid NMEA generation issues CRs-fixed: 826152 Change-Id: I33862cf8d40db1d667179ef68d18703edc359843 --- core/LocAdapterBase.cpp | 2 +- core/LocAdapterBase.h | 2 +- core/LocApiBase.cpp | 9 ++-- core/LocApiBase.h | 2 +- core/UlpProxyBase.h | 2 +- core/gps_extended_c.h | 41 +++++++++++++++++++ .../libloc_api-rpc-glue/src/LocApiRpc.cpp | 12 ++++-- loc_api/libloc_api_50001/LocEngAdapter.cpp | 4 +- loc_api/libloc_api_50001/LocEngAdapter.h | 4 +- loc_api/libloc_api_50001/loc_eng.cpp | 2 +- loc_api/libloc_api_50001/loc_eng_msg.h | 4 +- loc_api/libloc_api_50001/loc_eng_nmea.cpp | 8 ++-- loc_api/libloc_api_50001/loc_eng_nmea.h | 3 +- 13 files changed, 73 insertions(+), 22 deletions(-) diff --git a/core/LocAdapterBase.cpp b/core/LocAdapterBase.cpp index 19fab0e5..8da9ff1d 100644 --- a/core/LocAdapterBase.cpp +++ b/core/LocAdapterBase.cpp @@ -79,7 +79,7 @@ void LocAdapterBase:: } void LocAdapterBase:: - reportSv(GpsSvStatus &svStatus, + reportSv(GnssSvStatus &svStatus, GpsLocationExtended &locationExtended, void* svExt) DEFAULT_IMPL() diff --git a/core/LocAdapterBase.h b/core/LocAdapterBase.h index 7e0b0ebc..197b1c64 100644 --- a/core/LocAdapterBase.h +++ b/core/LocAdapterBase.h @@ -92,7 +92,7 @@ public: void* locationExt, enum loc_sess_status status, LocPosTechMask loc_technology_mask); - virtual void reportSv(GpsSvStatus &svStatus, + virtual void reportSv(GnssSvStatus &svStatus, GpsLocationExtended &locationExtended, void* svExt); virtual void reportSvMeasurement(GnssSvMeasurementSet &svMeasurementSet); diff --git a/core/LocApiBase.cpp b/core/LocApiBase.cpp index 565967ae..23424583 100644 --- a/core/LocApiBase.cpp +++ b/core/LocApiBase.cpp @@ -253,15 +253,16 @@ void LocApiBase::reportPosition(UlpLocation &location, ); } -void LocApiBase::reportSv(GpsSvStatus &svStatus, +void LocApiBase::reportSv(GnssSvStatus &svStatus, GpsLocationExtended &locationExtended, void* svExt) { // print the SV info before delivering - LOC_LOGV("num sv: %d\n ephemeris mask: %dxn almanac mask: %x\n used" - " in fix mask: %x\n sv: prn snr elevation azimuth", + LOC_LOGV("num sv: %d\n ephemeris mask: %dxn almanac mask: %x\n gps/glo/bds in use" + " mask: %x/%x/%x\n sv: prn snr elevation azimuth", svStatus.num_svs, svStatus.ephemeris_mask, - svStatus.almanac_mask, svStatus.used_in_fix_mask); + svStatus.almanac_mask, svStatus.gps_used_in_fix_mask, + svStatus.glo_used_in_fix_mask, svStatus.bds_used_in_fix_mask); for (int i = 0; i < svStatus.num_svs && i < GPS_MAX_SVS; i++) { LOC_LOGV(" %d: %d %f %f %f", i, diff --git a/core/LocApiBase.h b/core/LocApiBase.h index c71100f4..59622a6c 100644 --- a/core/LocApiBase.h +++ b/core/LocApiBase.h @@ -113,7 +113,7 @@ public: enum loc_sess_status status, LocPosTechMask loc_technology_mask = LOC_POS_TECH_MASK_DEFAULT); - void reportSv(GpsSvStatus &svStatus, + void reportSv(GnssSvStatus &svStatus, GpsLocationExtended &locationExtended, void* svExt); void reportSvMeasurement(GnssSvMeasurementSet &svMeasurementSet); diff --git a/core/UlpProxyBase.h b/core/UlpProxyBase.h index 5270cfb3..9eb450bd 100644 --- a/core/UlpProxyBase.h +++ b/core/UlpProxyBase.h @@ -58,7 +58,7 @@ public: LocPosTechMask loc_technology_mask) { return false; } - inline virtual bool reportSv(GpsSvStatus &svStatus, + inline virtual bool reportSv(GnssSvStatus &svStatus, GpsLocationExtended &locationExtended, void* svExt) { return false; diff --git a/core/gps_extended_c.h b/core/gps_extended_c.h index 7debee9b..04fab59b 100644 --- a/core/gps_extended_c.h +++ b/core/gps_extended_c.h @@ -306,6 +306,47 @@ typedef struct GpsExtLocation_s { uint32_t sources_used; } GpsExtLocation; +/** Represents SV status. */ +typedef struct { + /** set to sizeof(GnssSvStatus) */ + size_t size; + + /** Number of SVs currently visible. */ + int num_svs; + + /** Contains an array of SV information. */ + GpsSvInfo sv_list[GPS_MAX_SVS]; + + /** Represents a bit mask indicating which SVs + * have ephemeris data. + */ + uint32_t ephemeris_mask; + + /** Represents a bit mask indicating which SVs + * have almanac data. + */ + uint32_t almanac_mask; + + /** + * Represents a bit mask indicating which GPS SVs + * were used for computing the most recent position fix. + */ + uint32_t gps_used_in_fix_mask; + + /** + * Represents a bit mask indicating which GLONASS SVs + * were used for computing the most recent position fix. + */ + uint32_t glo_used_in_fix_mask; + + /** + * Represents a bit mask indicating which BDS SVs + * were used for computing the most recent position fix. + */ + uint64_t bds_used_in_fix_mask; + +} GnssSvStatus; + enum loc_sess_status { LOC_SESS_SUCCESS, LOC_SESS_INTERMEDIATE, diff --git a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/src/LocApiRpc.cpp b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/src/LocApiRpc.cpp index dbfc2fb7..c7447543 100644 --- a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/src/LocApiRpc.cpp +++ b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/src/LocApiRpc.cpp @@ -797,7 +797,7 @@ void LocApiRpc::reportPosition(const rpc_loc_parsed_position_s_type *location_re void LocApiRpc::reportSv(const rpc_loc_gnss_info_s_type *gnss_report_ptr) { - GpsSvStatus SvStatus = {0}; + GnssSvStatus SvStatus = {0}; GpsLocationExtended locationExtended = {0}; locationExtended.size = sizeof(locationExtended); int num_svs_max = 0; @@ -823,7 +823,7 @@ void LocApiRpc::reportSv(const rpc_loc_gnss_info_s_type *gnss_report_ptr) { if (sv_info_ptr->system == RPC_LOC_SV_SYSTEM_GPS) { - SvStatus.sv_list[SvStatus.num_svs].size = sizeof(GpsSvStatus); + SvStatus.sv_list[SvStatus.num_svs].size = sizeof(GpsSvInfo); SvStatus.sv_list[SvStatus.num_svs].prn = sv_info_ptr->prn; // We only have the data field to report gps eph and alm mask @@ -842,7 +842,7 @@ void LocApiRpc::reportSv(const rpc_loc_gnss_info_s_type *gnss_report_ptr) if ((sv_info_ptr->valid_mask & RPC_LOC_SV_INFO_VALID_PROCESS_STATUS) && (sv_info_ptr->process_status == RPC_LOC_SV_STATUS_TRACK)) { - SvStatus.used_in_fix_mask |= (1 << (sv_info_ptr->prn-1)); + SvStatus.gps_used_in_fix_mask |= (1 << (sv_info_ptr->prn-1)); } } // SBAS: GPS RPN: 120-151, @@ -855,6 +855,12 @@ void LocApiRpc::reportSv(const rpc_loc_gnss_info_s_type *gnss_report_ptr) // In extended measurement report, we follow nmea standard, which is 65-96 else if (sv_info_ptr->system == RPC_LOC_SV_SYSTEM_GLONASS) { + if ((sv_info_ptr->valid_mask & RPC_LOC_SV_INFO_VALID_PROCESS_STATUS) && + (sv_info_ptr->process_status == RPC_LOC_SV_STATUS_TRACK)) + { + SvStatus.glo_used_in_fix_mask |= (1 << (sv_info_ptr->prn-1)); + } + SvStatus.sv_list[SvStatus.num_svs].prn = sv_info_ptr->prn + (65-1); } // Unsupported SV system diff --git a/loc_api/libloc_api_50001/LocEngAdapter.cpp b/loc_api/libloc_api_50001/LocEngAdapter.cpp index 7089741b..d1b8f8fc 100644 --- a/loc_api/libloc_api_50001/LocEngAdapter.cpp +++ b/loc_api/libloc_api_50001/LocEngAdapter.cpp @@ -199,14 +199,14 @@ void LocEngAdapter::reportPosition(UlpLocation &location, } } -void LocInternalAdapter::reportSv(GpsSvStatus &svStatus, +void LocInternalAdapter::reportSv(GnssSvStatus &svStatus, GpsLocationExtended &locationExtended, void* svExt){ sendMsg(new LocEngReportSv(mLocEngAdapter, svStatus, locationExtended, svExt)); } -void LocEngAdapter::reportSv(GpsSvStatus &svStatus, +void LocEngAdapter::reportSv(GnssSvStatus &svStatus, GpsLocationExtended &locationExtended, void* svExt) { diff --git a/loc_api/libloc_api_50001/LocEngAdapter.h b/loc_api/libloc_api_50001/LocEngAdapter.h index bc41ac1d..e1d8f098 100644 --- a/loc_api/libloc_api_50001/LocEngAdapter.h +++ b/loc_api/libloc_api_50001/LocEngAdapter.h @@ -55,7 +55,7 @@ public: void* locationExt, enum loc_sess_status status, LocPosTechMask loc_technology_mask); - virtual void reportSv(GpsSvStatus &svStatus, + virtual void reportSv(GnssSvStatus &svStatus, GpsLocationExtended &locationExtended, void* svExt); virtual void reportStatus(GpsStatusValue status); @@ -268,7 +268,7 @@ public: void* locationExt, enum loc_sess_status status, LocPosTechMask loc_technology_mask); - virtual void reportSv(GpsSvStatus &svStatus, + virtual void reportSv(GnssSvStatus &svStatus, GpsLocationExtended &locationExtended, void* svExt); virtual void reportSvMeasurement(GnssSvMeasurementSet &svMeasurementSet); diff --git a/loc_api/libloc_api_50001/loc_eng.cpp b/loc_api/libloc_api_50001/loc_eng.cpp index a81df97b..917c2ae2 100644 --- a/loc_api/libloc_api_50001/loc_eng.cpp +++ b/loc_api/libloc_api_50001/loc_eng.cpp @@ -827,7 +827,7 @@ void LocEngReportPosition::send() const { // case LOC_ENG_MSG_REPORT_SV: LocEngReportSv::LocEngReportSv(LocAdapterBase* adapter, - GpsSvStatus &sv, + GnssSvStatus &sv, GpsLocationExtended &locExtended, void* svExt) : LocMsg(), mAdapter(adapter), mSvStatus(sv), diff --git a/loc_api/libloc_api_50001/loc_eng_msg.h b/loc_api/libloc_api_50001/loc_eng_msg.h index 5626c346..9c7b9bcd 100644 --- a/loc_api/libloc_api_50001/loc_eng_msg.h +++ b/loc_api/libloc_api_50001/loc_eng_msg.h @@ -105,11 +105,11 @@ struct LocEngReportPosition : public LocMsg { struct LocEngReportSv : public LocMsg { LocAdapterBase* mAdapter; - const GpsSvStatus mSvStatus; + const GnssSvStatus mSvStatus; const GpsLocationExtended mLocationExtended; const void* mSvExt; LocEngReportSv(LocAdapterBase* adapter, - GpsSvStatus &sv, + GnssSvStatus &sv, GpsLocationExtended &locExtended, void* svExtended); virtual void proc() const; diff --git a/loc_api/libloc_api_50001/loc_eng_nmea.cpp b/loc_api/libloc_api_50001/loc_eng_nmea.cpp index 4c6b9a3a..7bc58bd0 100644 --- a/loc_api/libloc_api_50001/loc_eng_nmea.cpp +++ b/loc_api/libloc_api_50001/loc_eng_nmea.cpp @@ -604,7 +604,7 @@ SIDE EFFECTS ===========================================================================*/ void loc_eng_nmea_generate_sv(loc_eng_data_s_type *loc_eng_data_p, - const GpsSvStatus &svStatus, const GpsLocationExtended &locationExtended) + const GnssSvStatus &svStatus, const GpsLocationExtended &locationExtended) { ENTRY_LOG(); @@ -790,7 +790,9 @@ void loc_eng_nmea_generate_sv(loc_eng_data_s_type *loc_eng_data_p, }//if - if (svStatus.used_in_fix_mask == 0) + if (svStatus.gps_used_in_fix_mask == 0 && + svStatus.glo_used_in_fix_mask == 0 && + svStatus.bds_used_in_fix_mask == 0) { // No sv used, so there will be no position report, so send // blank NMEA sentences strlcpy(sentence, "$GPGSA,A,1,,,,,,,,,,,,,,,", sizeof(sentence)); @@ -812,7 +814,7 @@ void loc_eng_nmea_generate_sv(loc_eng_data_s_type *loc_eng_data_p, else { // cache the used in fix mask, as it will be needed to send $GPGSA // during the position report - loc_eng_data_p->sv_used_mask = svStatus.used_in_fix_mask; + loc_eng_data_p->sv_used_mask = svStatus.gps_used_in_fix_mask; // For RPC, the DOP are sent during sv report, so cache them // now to be sent during position report. diff --git a/loc_api/libloc_api_50001/loc_eng_nmea.h b/loc_api/libloc_api_50001/loc_eng_nmea.h index 40c6dbbd..066943aa 100644 --- a/loc_api/libloc_api_50001/loc_eng_nmea.h +++ b/loc_api/libloc_api_50001/loc_eng_nmea.h @@ -31,12 +31,13 @@ #define LOC_ENG_NMEA_H #include +#include #define NMEA_SENTENCE_MAX_LENGTH 200 void loc_eng_nmea_send(char *pNmea, int length, loc_eng_data_s_type *loc_eng_data_p); int loc_eng_nmea_put_checksum(char *pNmea, int maxSize); -void loc_eng_nmea_generate_sv(loc_eng_data_s_type *loc_eng_data_p, const GpsSvStatus &svStatus, const GpsLocationExtended &locationExtended); +void loc_eng_nmea_generate_sv(loc_eng_data_s_type *loc_eng_data_p, const GnssSvStatus &svStatus, const GpsLocationExtended &locationExtended); void loc_eng_nmea_generate_pos(loc_eng_data_s_type *loc_eng_data_p, const UlpLocation &location, const GpsLocationExtended &locationExtended, unsigned char generate_nmea); #endif // LOC_ENG_NMEA_H From 58c3d32868997c8607dafe05de047e1a04aac6cc Mon Sep 17 00:00:00 2001 From: Kevin Tang Date: Tue, 16 Jun 2015 09:57:42 -0700 Subject: [PATCH 21/37] Adding a number of utilities LocHeap, LocThread, LocTimer, and moved MsgTask to utils. Also added are LocRankable and LocRunnable abstract classes. Change-Id: I76975455d24f2c84a95dcc1b04f79fea562ea5ba CRs-Fixed: 855222 --- core/Android.mk | 2 - utils/Android.mk | 12 +- utils/LocHeap.cpp | 354 +++++++++++++++++++ utils/LocHeap.h | 96 ++++++ utils/LocThread.cpp | 252 ++++++++++++++ utils/LocThread.h | 87 +++++ utils/LocTimer.cpp | 664 ++++++++++++++++++++++++++++++++++++ utils/LocTimer.h | 67 ++++ {core => utils}/MsgTask.cpp | 149 ++++---- {core => utils}/MsgTask.h | 41 ++- utils/loc_timer.c | 202 ----------- utils/loc_timer.h | 32 +- 12 files changed, 1644 insertions(+), 314 deletions(-) create mode 100644 utils/LocHeap.cpp create mode 100644 utils/LocHeap.h create mode 100644 utils/LocThread.cpp create mode 100644 utils/LocThread.h create mode 100644 utils/LocTimer.cpp create mode 100644 utils/LocTimer.h rename {core => utils}/MsgTask.cpp (55%) rename {core => utils}/MsgTask.h (71%) delete mode 100644 utils/loc_timer.c diff --git a/core/Android.mk b/core/Android.mk index 6a08b6a9..267b31f7 100644 --- a/core/Android.mk +++ b/core/Android.mk @@ -23,7 +23,6 @@ LOCAL_SHARED_LIBRARIES := \ libdl LOCAL_SRC_FILES += \ - MsgTask.cpp \ LocApiBase.cpp \ LocAdapterBase.cpp \ ContextBase.cpp \ @@ -39,7 +38,6 @@ LOCAL_C_INCLUDES:= \ LOCAL_COPY_HEADERS_TO:= libloc_core/ LOCAL_COPY_HEADERS:= \ - MsgTask.h \ LocApiBase.h \ LocAdapterBase.h \ ContextBase.h \ diff --git a/utils/Android.mk b/utils/Android.mk index d672e3a1..c9b1788d 100644 --- a/utils/Android.mk +++ b/utils/Android.mk @@ -18,13 +18,17 @@ LOCAL_SRC_FILES += \ msg_q.c \ linked_list.c \ loc_target.cpp \ - loc_timer.c \ platform_lib_abstractions/elapsed_millis_since_boot.cpp \ + LocHeap.cpp \ + LocTimer.cpp \ + LocThread.cpp \ + MsgTask.cpp \ loc_misc_utils.cpp LOCAL_CFLAGS += \ -fno-short-enums \ - -D_ANDROID_ + -D_ANDROID_ \ + -std=c++11 ifeq ($(TARGET_BUILD_VARIANT),user) LOCAL_CFLAGS += -DTARGET_BUILD_VARIANT_USER @@ -43,6 +47,10 @@ LOCAL_COPY_HEADERS:= \ log_util.h \ linked_list.h \ msg_q.h \ + MsgTask.h \ + LocHeap.h \ + LocThread.h \ + LocTimer.h \ loc_target.h \ loc_timer.h \ platform_lib_abstractions/platform_lib_includes.h \ diff --git a/utils/LocHeap.cpp b/utils/LocHeap.cpp new file mode 100644 index 00000000..41268789 --- /dev/null +++ b/utils/LocHeap.cpp @@ -0,0 +1,354 @@ +/* Copyright (c) 2015, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation, nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ +#include + +class LocHeapNode { + friend class LocHeap; + + // size of of the subtree, excluding self, 1 if no subtree + int mSize; + LocHeapNode* mLeft; + LocHeapNode* mRight; + LocRankable* mData; +public: + inline LocHeapNode(LocRankable& data) : + mSize(1), mLeft(NULL), mRight(NULL), mData(&data) {} + ~LocHeapNode(); + + // this only swaps the data of the two nodes, so no + // detach / re-attached is necessary + void swap(LocHeapNode& node); + + LocRankable* detachData(); + + // push a node into the tree stucture, keeping sorted by rank + void push(LocHeapNode& node); + + // pop the head node out of the tree stucture. keeping sorted by rank + static LocHeapNode* pop(LocHeapNode*& top); + + // remove a specific node from the tree + // returns the pointer to the node removed, which would be either the + // same as input (if successfully removed); or NULL (if failed). + static LocHeapNode* remove(LocHeapNode*& top, LocRankable& data); + + // convenience method to compare data ranking + inline bool outRanks(LocHeapNode& node) { return mData->outRanks(*node.mData); } + inline bool outRanks(LocRankable& data) { return mData->outRanks(data); } + + // checks if mSize is correct, AND this node is the highest ranking + // of the entire subtree + bool checkNodes(); + + inline int getSize() { return mSize; } +}; + +inline +LocHeapNode::~LocHeapNode() { + if (mLeft) { + delete mLeft; + mLeft = NULL; + } + if (mRight) { + delete mRight; + mRight = NULL; + } + if (mData) { + mData = NULL; + } +} + +inline +void LocHeapNode::swap(LocHeapNode& node) { + LocRankable* tmpData = node.mData; + node.mData = mData; + mData = tmpData; +} + +inline +LocRankable* LocHeapNode::detachData() { + LocRankable* data = mData; + mData = NULL; + return data; +} + +// push keeps the tree sorted by rank, it also tries to balance the +// tree by adding the new node to the smaller of the subtrees. +// The pointer to the tree and internal links never change. If the +// mData of tree top ranks lower than that of the incoming node, +// mData will be swapped with that of the incoming node to ensure +// ranking, no restructuring the container nodes. +void LocHeapNode::push(LocHeapNode& node) { + // ensure the current node ranks higher than in the incoming one + if (node.outRanks(*this)) { + swap(node); + } + + // now drop the new node (ensured lower than *this) into a subtree + if (NULL == mLeft) { + mLeft = &node; + } else if (NULL == mRight) { + mRight = &node; + } else if (mLeft->mSize <= mRight->mSize) { + mLeft->push(node); + } else { + mRight->push(node); + } + mSize++; +} + +// pop keeps the tree sorted by rank, but it does not try to balance +// the tree. It recursively swaps with the higher ranked top of the +// subtrees. +// The return is a popped out node from leaf level, that has the data +// swapped all the way down from the top. The pinter to the tree and +// internal links will not be changed or restructured, except for the +// node that is popped out. +// If the return pointer == this, this the last node in the tree. +LocHeapNode* LocHeapNode::pop(LocHeapNode*& top) { + // we know the top has the highest ranking at this point, else + // the tree is broken. This top will be popped out. But we need + // a node from the left or right child, whichever ranks higher, + // to replace the current top. This then will need to be done + // recursively to the leaf level. So we swap the mData of the + // current top node all the way down to the leaf level. + LocHeapNode* poppedNode = top; + // top is losing a node in its subtree + top->mSize--; + if (top->mLeft || top->mRight) { + // if mLeft is NULL, mRight for sure is NOT NULL, take that; + // else if mRight is NULL, mLeft for sure is NOT, take that; + // else we take the address of whatever has higher ranking mData + LocHeapNode*& subTop = (NULL == top->mLeft) ? top->mRight : + ((NULL == top->mRight) ? top->mLeft : + (top->mLeft->outRanks(*(top->mRight)) ? top->mLeft : top->mRight)); + // swap mData, the tree top gets updated with the new data. + top->swap(*subTop); + // pop out from the subtree + poppedNode = pop(subTop); + } else { + // if the top has only single node + // detach the poppedNode from the tree + // subTop is the reference of ether mLeft or mRight + // NOT a local stack pointer. so it MUST be NULL'ed here. + top = NULL; + } + + return poppedNode; +} + +// navigating through the tree and find the node that hass the input +// data. Since this is a heap, we do recursive linear search. +// returns the pointer to the node removed, which would be either the +// same as input (if successfully removed); or NULL (if failed). +LocHeapNode* LocHeapNode::remove(LocHeapNode*& top, LocRankable& data) { + LocHeapNode* removedNode = NULL; + // this is the node, by address + if (&data == (LocRankable*)(top->mData)) { + // pop this node out + removedNode = pop(top); + } else if (!data.outRanks(*top->mData)) { + // subtrees might have this node + if (top->mLeft) { + removedNode = remove(top->mLeft, data); + } + // if we did not find in mLeft, and mRight is not empty + if (!removedNode && top->mRight) { + removedNode = remove(top->mRight, data); + } + + // top lost a node in its subtree + if (removedNode) { + top->mSize--; + } + } + + return removedNode; +} + +// checks if mSize is correct, AND this node is the highest ranking +// of the entire subtree +bool LocHeapNode::checkNodes() { + // size of the current subtree + int totalSize = mSize; + if (mLeft) { + // check the consistency of left subtree + if (!outRanks(*mLeft) || !mLeft->checkNodes()) { + return false; + } + // subtract the size of left subtree (with subtree head) + totalSize -= mLeft->mSize; + } + + if (mRight) { + // check the consistency of right subtree + if (!outRanks(*mRight) || !mRight->checkNodes()) { + return false; + } + // subtract the size of right subtree (with subtree head) + totalSize -= mRight->mSize; + } + + // for the tree nodes to consistent, totalSize must be 1 now + return totalSize == 1; +} + +LocHeap::~LocHeap() { + if (mTree) { + delete mTree; + } +} + +void LocHeap::push(LocRankable& node) { + LocHeapNode* heapNode = new LocHeapNode(node); + if (!mTree) { + mTree = heapNode; + } else { + mTree->push(*heapNode); + } +} + +LocRankable* LocHeap::peek() { + LocRankable* top = NULL; + if (mTree) { + top = mTree->mData; + } + return top; +} + +LocRankable* LocHeap::pop() { + LocRankable* locNode = NULL; + if (mTree) { + // mTree may become NULL after this call + LocHeapNode* heapNode = LocHeapNode::pop(mTree); + locNode = heapNode->detachData(); + delete heapNode; + } + return locNode; +} + +LocRankable* LocHeap::remove(LocRankable& rankable) { + LocRankable* locNode = NULL; + if (mTree) { + // mTree may become NULL after this call + LocHeapNode* heapNode = LocHeapNode::remove(mTree, rankable); + if (heapNode) { + locNode = heapNode->detachData(); + delete heapNode; + } + } + return locNode; +} + +#ifdef __LOC_UNIT_TEST__ +bool LocHeap::checkTree() { + return ((NULL == mTree) || mTree->checkNodes()); +} +uint32_t LocHeap::getTreeSize() { + return (NULL == mTree) ? 0 : mTree->getSize(); +} +#endif + +#ifdef __LOC_DEBUG__ + +#include +#include +#include + +class LocHeapDebug : public LocHeap { +public: + bool checkTree() { + return ((NULL == mTree) || mTree->checkNodes()); + } + + uint32_t getTreeSize() { + return (NULL == mTree) ? 0 : (mTree->getSize()); + } +}; + +class LocHeapDebugData : public LocRankable { + const int mID; +public: + LocHeapDebugData(int id) : mID(id) {} + inline virtual int ranks(LocRankable& rankable) { + LocHeapDebugData* testData = dynamic_cast(&rankable); + return testData->mID - mID; + } +}; + +// For Linux command line testing: +// compilation: g++ -D__LOC_HOST_DEBUG__ -D__LOC_DEBUG__ -g -I. -I../../../../vendor/qcom/proprietary/gps-internal/unit-tests/fakes_for_host -I../../../../system/core/include LocHeap.cpp +// test: valgrind --leak-check=full ./a.out 100 +int main(int argc, char** argv) { + srand(time(NULL)); + int tries = atoi(argv[1]); + int checks = tries >> 3; + LocHeapDebug heap; + int treeSize = 0; + + for (int i = 0; i < tries; i++) { + if (i % checks == 0 && !heap.checkTree()) { + printf("tree check failed before %dth op\n", i); + } + int r = rand(); + + if (r & 1) { + LocHeapDebugData* data = new LocHeapDebugData(r >> 1); + heap.push(dynamic_cast(*data)); + treeSize++; + } else { + LocRankable* rankable = heap.pop(); + if (rankable) { + delete rankable; + } + treeSize ? treeSize-- : 0; + } + + printf("%s: %d == %d\n", (r&1)?"push":"pop", treeSize, heap.getTreeSize()); + if (treeSize != heap.getTreeSize()) { + printf("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + tries = i+1; + break; + } + } + + if (!heap.checkTree()) { + printf("!!!!!!!!!!tree check failed at the end after %d ops!!!!!!!\n", tries); + } else { + printf("success!\n"); + } + + for (LocRankable* data = heap.pop(); NULL != data; data = heap.pop()) { + delete data; + } + + return 0; +} + +#endif diff --git a/utils/LocHeap.h b/utils/LocHeap.h new file mode 100644 index 00000000..b491948a --- /dev/null +++ b/utils/LocHeap.h @@ -0,0 +1,96 @@ +/* Copyright (c) 2015, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation, nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ +#ifndef __LOC_HEAP__ +#define __LOC_HEAP__ + +#include +#include + +// abstract class to be implemented by client to provide a rankable class +class LocRankable { +public: + virtual inline ~LocRankable() {} + + // method to rank objects of such type for sorting purposes. + // The pointer of the input node would be stored in the heap. + // >0 if ranks higher than the input; + // ==0 if equally ranks with the input; + // <0 if ranks lower than the input + virtual int ranks(LocRankable& rankable) = 0; + + // convenient method to rank objects of such type for sorting purposes. + inline bool outRanks(LocRankable& rankable) { return ranks(rankable) > 0; } +}; + +// opaque class to provide service implementation. +class LocHeapNode; + +// a heap whose left and right children are not sorted. It is sorted only vertically, +// i.e. parent always ranks higher than children, if they exist. Ranking algorithm is +// implemented in Rankable. The reason that there is no sort between children is to +// help beter balance the tree with lower cost. When a node is pushed to the tree, +// it is guaranteed that the subtree that is smaller gets to have the new node. +class LocHeap { +protected: + LocHeapNode* mTree; +public: + inline LocHeap() : mTree(NULL) {} + ~LocHeap(); + + // push keeps the tree sorted by rank, it also tries to balance the + // tree by adding the new node to the smaller of the subtrees. + // node is reference to an obj that is managed by client, that client + // creates and destroyes. The destroy should happen after the + // node is popped out from the heap. + void push(LocRankable& node); + + // Peeks the node data on tree top, which has currently the highest ranking + // There is no change the tree structure with this operation + // Returns NULL if the tree is empty, otherwise pointer to the node data of + // the tree top. + LocRankable* peek(); + + // pop keeps the tree sorted by rank, but it does not try to balance + // the tree. + // Return - pointer to the node popped out, or NULL if heap is already empty + LocRankable* pop(); + + // navigating through the tree and find the node that ranks the same + // as the input data, then remove it from the tree. Rank is implemented + // by rankable obj. + // returns the pointer to the node removed; or NULL (if failed). + LocRankable* remove(LocRankable& rankable); + +#ifdef __LOC_UNIT_TEST__ + bool checkTree(); + uint32_t getTreeSize(); +#endif +}; + +#endif //__LOC_HEAP__ diff --git a/utils/LocThread.cpp b/utils/LocThread.cpp new file mode 100644 index 00000000..ec1e0719 --- /dev/null +++ b/utils/LocThread.cpp @@ -0,0 +1,252 @@ +/* Copyright (c) 2015, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation, nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ +#include +#include +#include + +class LocThreadDelegate { + LocRunnable* mRunnable; + bool mJoinable; + pthread_t mThandle; + pthread_mutex_t mMutex; + int mRefCount; + ~LocThreadDelegate(); + LocThreadDelegate(const char* threadName, + LocRunnable* runnable, bool joinable); + void destroy(); +public: + static LocThreadDelegate* create(const char* threadName, + LocRunnable* runnable, bool joinable); + void stop(); + // bye() is for the parent thread to go away. if joinable, + // parent must stop the spawned thread, join, and then + // destroy(); if detached, the parent can go straight + // ahead to destroy() + inline void bye() { mJoinable ? stop() : destroy(); } + inline bool isRunning() { return (NULL != mRunnable); } + static void* threadMain(void* arg); +}; + +// it is important to note that internal members must be +// initialized to values as if pthread_create succeeds. +// This is to avoid the race condition between the threads, +// once the thread is created, some of these values will +// be check in the spawned thread, and must set correctly +// then and there. +// However, upon pthread_create failure, the data members +// must be set to indicate failure, e.g. mRunnable, and +// threashold approprietly for destroy(), e.g. mRefCount. +LocThreadDelegate::LocThreadDelegate(const char* threadName, + LocRunnable* runnable, bool joinable) : + mRunnable(runnable), mJoinable(joinable), + mMutex(PTHREAD_MUTEX_INITIALIZER), mRefCount(2) { + // create the thread here, then if successful + // and a name is given, we set the thread name + if (!pthread_create(&mThandle, NULL, threadMain, this)) { + // set thread name + char lname[16]; + const char* defaultName = "LocThread"; + if (!threadName) { + threadName = defaultName; + } + int len = sizeof(lname) - 1; + memcpy(lname, threadName, len); + lname[len] = 0; + // set the thread name here + pthread_setname_np(mThandle, lname); + + // detach, if not joinable + if (!joinable) { + pthread_detach(mThandle); + } + } else { + // must set these values upon failure + mRunnable = NULL; + mJoinable = false; + mRefCount = 1; + } +} + +inline +LocThreadDelegate::~LocThreadDelegate() { + // at this point nothing should need done any more +} + +// factory method so that we could return NULL upon failure +LocThreadDelegate* LocThreadDelegate::create(const char* threadName, + LocRunnable* runnable, bool joinable) { + LocThreadDelegate* thread = NULL; + if (runnable) { + thread = new LocThreadDelegate(threadName, runnable, joinable); + if (thread && !thread->isRunning()) { + thread->destroy(); + thread = NULL; + } + } + + return thread; +} + +// The order is importang +// NULLing mRunnalbe stops the while loop in threadMain() +// join() if mJoinble must come before destroy() call, as +// the obj must remain alive at this time so that mThandle +// remains valud. +void LocThreadDelegate::stop() { + // mRunnable and mJoinable are reset on different triggers. + // mRunnable may get nulled on the spawned thread's way out; + // or here. + // mJouinable (if ever been true) gets falsed when client + // thread triggers stop, with either a stop() + // call or the client releases thread obj handle. + if (mRunnable) { + mRunnable = NULL; + } + if (mJoinable) { + mJoinable = false; + pthread_join(mThandle, NULL); + } + // call destroy() to possibly delete the obj + destroy(); +} + +// method for clients to call to release the obj +// when it is a detached thread, the client thread +// and the spawned thread can both try to destroy() +// asynchronously. And we delete this obj when +// mRefCount becomes 0. +void LocThreadDelegate::destroy() { + // else case shouldn't happen, unless there is a + // leaking obj. But only our code here has such + // obj, so if we test our code well, else case + // will never happen + if (mRefCount > 0) { + // we need a flag on the stack + bool callDelete = false; + + // critical section between threads + pthread_mutex_lock(&mMutex); + // last destroy() call + callDelete = (1 == mRefCount--); + pthread_mutex_unlock(&mMutex); + + // upon last destroy() call we delete this obj + if (callDelete) { + delete this; + } + } +} + +void* LocThreadDelegate::threadMain(void* arg) { + LocThreadDelegate* locThread = (LocThreadDelegate*)(arg); + + if (locThread) { + LocRunnable* runnable = locThread->mRunnable; + + if (runnable) { + if (locThread->isRunning()) { + runnable->prerun(); + } + + while (locThread->isRunning() && runnable->run()); + + if (locThread->isRunning()) { + runnable->postrun(); + } + + // at this time, locThread->mRunnable may or may not be NULL + // NULL it just to be safe and clean, as we want the field + // in the released memory slot to be NULL. + locThread->mRunnable = NULL; + delete runnable; + } + locThread->destroy(); + } + + return NULL; +} + +LocThread::~LocThread() { + if (mThread) { + mThread->bye(); + mThread = NULL; + } +} + +bool LocThread::start(const char* threadName, LocRunnable* runnable, bool joinable) { + mThread = LocThreadDelegate::create(threadName, runnable, joinable); + + // true only if thread is created successfully + return (NULL != mThread); +} + +void LocThread::stop() { + if (mThread) { + mThread->stop(); + mThread = NULL; + } +} + +#ifdef __LOC_DEBUG__ + +#include +#include +#include + +class LocRunnableTest1 : public LocRunnable { + int mID; +public: + LocRunnableTest1(int id) : LocRunnable(), mID(id) {} + virtual bool run() { + printf("LocRunnableTest1: %d\n", mID++); + sleep(1); + return true; + } +}; + +// on linux command line: +// compile: g++ -D__LOC_HOST_DEBUG__ -D__LOC_DEBUG__ -g -std=c++0x -I. -I../../../../vendor/qcom/proprietary/gps-internal/unit-tests/fakes_for_host -I../../../../system/core/include -lpthread LocThread.cpp +// test detached thread: valgrind ./a.out 0 +// test joinable thread: valgrind ./a.out 1 +int main(int argc, char** argv) { + LocRunnableTest1 test(10); + + LocThread thread; + thread.start("LocThreadTest", test, atoi(argv[1])); + + sleep(10); + + thread.stop(); + + sleep(5); + + return 0; +} + +#endif diff --git a/utils/LocThread.h b/utils/LocThread.h new file mode 100644 index 00000000..490d3099 --- /dev/null +++ b/utils/LocThread.h @@ -0,0 +1,87 @@ +/* Copyright (c) 2015, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation, nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ +#ifndef __LOC_THREAD__ +#define __LOC_THREAD__ + +#include + +// abstract class to be implemented by client to provide a runnable class +// which gets scheduled by LocThread +class LocRunnable { +public: + inline LocRunnable() {} + inline virtual ~LocRunnable() {} + + // The method to be implemented by thread clients + // and be scheduled by LocThread + // This method will be repeated called until it returns false; or + // until thread is stopped. + virtual bool run() = 0; + + // The method to be run before thread loop (conditionally repeatedly) + // calls run() + inline virtual void prerun() {} + + // The method to be run after thread loop (conditionally repeatedly) + // calls run() + inline virtual void postrun() {} +}; + +// opaque class to provide service implementation. +class LocThreadDelegate; + +// A utility class to create a thread and run LocRunnable +// caller passes in. +class LocThread { + LocThreadDelegate* mThread; +public: + inline LocThread() : mThread(NULL) {} + virtual ~LocThread(); + + // client starts thread with a runnable, which implements + // the logics to fun in the created thread context. + // The thread could be either joinable or detached. + // runnable is an obj managed by client. Client creates and + // frees it (but must be after stop() is called, or + // this LocThread obj is deleted). + // The obj will be deleted by LocThread if start() + // returns true. Else it is client's responsibility + // to delete the object + // Returns 0 if success; false if failure. + bool start(const char* threadName, LocRunnable* runnable, bool joinable = true); + + // NOTE: if this is a joinable thread, this stop may block + // for a while until the thread is joined. + void stop(); + + // thread status check + inline bool isRunning() { return NULL != mThread; } +}; + +#endif //__LOC_THREAD__ diff --git a/utils/LocTimer.cpp b/utils/LocTimer.cpp new file mode 100644 index 00000000..22098091 --- /dev/null +++ b/utils/LocTimer.cpp @@ -0,0 +1,664 @@ +/* Copyright (c) 2015, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation, nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef __HOST_UNIT_TEST__ +#define EPOLLWAKEUP 0 +#define CLOCK_BOOTTIME CLOCK_MONOTONIC +#define CLOCK_BOOTTIME_ALARM CLOCK_MONOTONIC +#endif + +using namespace loc_core; + +/* +There are implementations of 5 classes in this file: +LocTimer, LocTimerDelegate, LocTimerContainer, LocTimerPollTask, LocTimerWrapper + +LocTimer - client front end, interface for client to start / stop timers, also + to provide a callback. +LocTimerDelegate - an internal timer entity, which also is a LocRankable obj. + Its life cycle is different than that of LocTimer. It gets + created when LocTimer::start() is called, and gets deleted + when it expires or clients calls the hosting LocTimer obj's + stop() method. When a LocTimerDelegate obj is ticking, it + stays in the corresponding LocTimerContainer. When expired + or stopped, the obj is removed from the container. Since it + is also a LocRankable obj, and LocTimerContainer also is a + heap, its ranks() implementation decides where it is placed + in the heap. +LocTimerContainer - core of the timer service. It is a container (derived from + LocHeap) for LocTimerDelegate (implements LocRankable) objs. + There are 2 of such containers, one for sw timers (or Linux + timers) one for hw timers (or Linux alarms). It adds one of + each (those that expire the soonest) to kernel via services + provided by LocTimerPollTask. All the heap management on the + LocTimerDelegate objs are done in the MsgTask context, such + that synchronization is ensured. +LocTimerPollTask - is a class that wraps timerfd and epoll POXIS APIs. It also + both implements LocRunnalbe with epoll_wait() in the run() + method. It is also a LocThread client, so as to loop the run + method. +LocTimerWrapper - a LocTimer client itself, to implement the existing C API with + APIs, loc_timer_start() and loc_timer_stop(). + +*/ + +class LocTimerPollTask; + +// This is a multi-functaional class that: +// * extends the LocHeap class for the detection of head update upon add / remove +// events. When that happens, soonest time out changes, so timerfd needs update. +// * contains the timers, and add / remove them into the heap +// * provides and maps 2 of such containers, one for timers (or mSwTimers), one +// for alarms (or mHwTimers); +// * provides a polling thread; +// * provides a MsgTask thread for synchronized add / remove / timer client callback. +class LocTimerContainer : public LocHeap { + // mutex to synchronize getters of static members + static pthread_mutex_t mMutex; + // Container of timers + static LocTimerContainer* mSwTimers; + // Container of alarms + static LocTimerContainer* mHwTimers; + // Msg task to provider msg Q, sender and reader. + static MsgTask* mMsgTask; + // Poll task to provide epoll call and threading to poll. + static LocTimerPollTask* mPollTask; + // timer / alarm fd + const int mDevFd; + // ctor + LocTimerContainer(bool wakeOnExpire); + // dtor + ~LocTimerContainer(); + static MsgTask* getMsgTaskLocked(); + static LocTimerPollTask* getPollTaskLocked(); + // extend LocHeap and pop if the top outRanks input + LocTimerDelegate* popIfOutRanks(LocTimerDelegate& timer); + +public: + // factory method to control the creation of mSwTimers / mHwTimers + static LocTimerContainer* get(bool wakeOnExpire); + + LocTimerDelegate* getSoonestTimer(); + int getTimerFd(); + // add a timer / alarm obj into the container + void add(LocTimerDelegate& timer); + // remove a timer / alarm obj from the container + void remove(LocTimerDelegate& timer); + // handling of timer / alarm expiration + void expire(); +}; + +// This class implements the polling thread that epolls imer / alarm fds. +// The LocRunnable::run() contains the actual polling. The other methods +// will be run in the caller's thread context to add / remove timer / alarm +// fds the kernel, while the polling is blocked on epoll_wait() call. +// Since the design is that we have maximally 2 polls, one for all the +// timers; one for all the alarms, we will poll at most on 2 fds. But it +// is possile that all we have are only timers or alarms at one time, so we +// allow dynamically add / remove fds we poll on. The design decision of +// having 1 fd per container of timer / alarm is such that, we may not need +// to make a system call each time a timer / alarm is added / removed, unless +// that changes the "soonest" time out of that of all the timers / alarms. +class LocTimerPollTask : public LocRunnable { + // the epoll fd + const int mFd; + // the thread that calls run() method + LocThread* mThread; + friend class LocThreadDelegate; + // dtor + ~LocTimerPollTask(); +public: + // ctor + LocTimerPollTask(); + // this obj will be deleted once thread is deleted + void destroy(); + // add a container of timers. Each contain has a unique device fd, i.e. + // either timer or alarm fd, and a heap of timers / alarms. It is expected + // that container would have written to the device fd with the soonest + // time out value in the heap at the time of calling this method. So all + // this method does is to add the fd of the input container to the poll + // and also add the pointer of the container to the event data ptr, such + // when poll_wait wakes up on events, we know who is the owner of the fd. + void addPoll(LocTimerContainer& timerContainer); + // remove a fd that is assciated with a container. The expectation is that + // the atual timer would have been removed from the container. + void removePoll(LocTimerContainer& timerContainer); + // The polling thread context will call this method. This is where + // epoll_wait() is blocking and waiting for events.. + virtual bool run(); +}; + +// Internal class of timer obj. It gets born when client calls LocTimer::start(); +// and gets deleted when client calls LocTimer::stop() or when the it expire()'s. +// This class implements LocRankable::ranks() so that when an obj is added into +// the container (of LocHeap), it gets placed in sorted order. +class LocTimerDelegate : public LocRankable { + friend class LocTimerContainer; + friend class LocTimer; + LocTimer* mClient; + struct timespec mFutureTime; + LocTimerContainer* mContainer; + // not a complete obj, just ctor for LocRankable comparisons + inline LocTimerDelegate(struct timespec& delay) + : mClient(NULL), mFutureTime(delay), mContainer(NULL) {} + inline ~LocTimerDelegate() {} +public: + LocTimerDelegate(LocTimer& client, struct timespec& futureTime, bool wakeOnExpire); + void destroy(); + // LocRankable virtual method + virtual int ranks(LocRankable& rankable); + void expire(); + inline struct timespec getFutureTime() { return mFutureTime; } +}; + +/***************************LocTimerContainer methods***************************/ + +// Most of these static recources are created on demand. They however are never +// destoyed. The theory is that there are processes that link to this util lib +// but never use timer, then these resources would never need to be created. +// For those processes that do use timer, it will likely also need to every +// once in a while. It might be cheaper keeping them around. +pthread_mutex_t LocTimerContainer::mMutex = PTHREAD_MUTEX_INITIALIZER; +LocTimerContainer* LocTimerContainer::mSwTimers = NULL; +LocTimerContainer* LocTimerContainer::mHwTimers = NULL; +MsgTask* LocTimerContainer::mMsgTask = NULL; +LocTimerPollTask* LocTimerContainer::mPollTask = NULL; + +// ctor - initialize timer heaps +// A container for swTimer (timer) is created, when wakeOnExpire is true; or +// HwTimer (alarm), when wakeOnExpire is false. +LocTimerContainer::LocTimerContainer(bool wakeOnExpire) : + mDevFd(timerfd_create(wakeOnExpire ? CLOCK_BOOTTIME_ALARM : CLOCK_BOOTTIME, 0)) { + if (-1 != mDevFd) { + // ensure we have the necessary resources created + LocTimerContainer::getPollTaskLocked(); + LocTimerContainer::getMsgTaskLocked(); + } else { + LOC_LOGE("%s: timerfd_create failure - %s", __FUNCTION__, strerror(errno)); + } +} + +// dtor +// we do not ever destroy the static resources. +inline +LocTimerContainer::~LocTimerContainer() { + close(mDevFd); +} + +LocTimerContainer* LocTimerContainer::get(bool wakeOnExpire) { + // get the reference of either mHwTimer or mSwTimers per wakeOnExpire + LocTimerContainer*& container = wakeOnExpire ? mHwTimers : mSwTimers; + // it is cheap to check pointer first than locking mutext unconditionally + if (!container) { + pthread_mutex_lock(&mMutex); + // let's check one more time to be safe + if (!container) { + container = new LocTimerContainer(wakeOnExpire); + // timerfd_create failure + if (-1 == container->getTimerFd()) { + delete container; + container = NULL; + } + } + pthread_mutex_unlock(&mMutex); + } + return container; +} + +MsgTask* LocTimerContainer::getMsgTaskLocked() { + // it is cheap to check pointer first than locking mutext unconditionally + if (!mMsgTask) { + mMsgTask = new MsgTask("LocTimerMsgTask", false); + } + return mMsgTask; +} + +LocTimerPollTask* LocTimerContainer::getPollTaskLocked() { + // it is cheap to check pointer first than locking mutext unconditionally + if (!mPollTask) { + mPollTask = new LocTimerPollTask(); + } + return mPollTask; +} + +inline +LocTimerDelegate* LocTimerContainer::getSoonestTimer() { + return (LocTimerDelegate*)(peek()); +} + +inline +int LocTimerContainer::getTimerFd() { + return mDevFd; +} + +// all the heap management is done in the MsgTask context. +inline +void LocTimerContainer::add(LocTimerDelegate& timer) { + struct MsgTimerPush : public LocMsg { + LocTimerContainer* mTimerContainer; + LocHeapNode* mTree; + LocTimerPollTask* mPollTask; + LocTimerDelegate* mTimer; + inline MsgTimerPush(LocTimerContainer& container, LocTimerPollTask& pollTask, LocTimerDelegate& timer) : + LocMsg(), mTimerContainer(&container), mPollTask(&pollTask), mTimer(&timer) {} + inline virtual void proc() const { + LocTimerDelegate* priorTop = mTimerContainer->getSoonestTimer(); + mTimerContainer->push((LocRankable&)(*mTimer)); + + // if the tree top changed (new top is the new node), we need to update + // timerfd with the new timerout value. + if (priorTop != mTimerContainer->getSoonestTimer()) { + // if tree was empty before, we need to let poll task poll on this + // do this first to avoid race condition, in case settime is called + // with too small an interval + if (!priorTop) { + mPollTask->addPoll(*mTimerContainer); + } + struct itimerspec delay = {0}; + delay.it_value = mTimer->getFutureTime(); + timerfd_settime(mTimerContainer->getTimerFd(), TFD_TIMER_ABSTIME, &delay, NULL); + } + } + }; + + mMsgTask->sendMsg(new MsgTimerPush(*this, *mPollTask, timer)); +} + +// all the heap management is done in the MsgTask context. +void LocTimerContainer::remove(LocTimerDelegate& timer) { + struct MsgTimerRemove : public LocMsg { + LocTimerContainer* mTimerContainer; + LocTimerPollTask* mPollTask; + LocTimerDelegate* mTimer; + inline MsgTimerRemove(LocTimerContainer& container, LocTimerPollTask& pollTask, LocTimerDelegate& timer) : + LocMsg(), mTimerContainer(&container), mPollTask(&pollTask), mTimer(&timer) {} + inline virtual void proc() const { + LocTimerDelegate* priorTop = mTimerContainer->getSoonestTimer(); + ((LocHeap*)mTimerContainer)->remove((LocRankable&)*mTimer); + delete mTimer; + LocTimerDelegate* curTop = mTimerContainer->getSoonestTimer(); + + // if the tree top changed (the removed the node was the tree top), we need + // to update the timerfd with the new timeout value from the new top. + if (priorTop != curTop) { + struct itimerspec delay = {0}; + // if tree is empty now, we need to remove poll from poll task + if (!curTop) { + mPollTask->removePoll(*mTimerContainer); + // setting the values to disarm timer + delay.it_value.tv_sec = 0; + delay.it_value.tv_nsec = 0; + } else { + delay.it_value = curTop->getFutureTime(); + } + // this will either update the timer with the new soonest timeout + // or disarm the timer, if the current tree top empty + timerfd_settime(mTimerContainer->getTimerFd(), TFD_TIMER_ABSTIME, &delay, NULL); + } + } + }; + + mMsgTask->sendMsg(new MsgTimerRemove(*this, *mPollTask, timer)); +} + +// all the heap management is done in the MsgTask context. +// Upon expire, we check and continuously pop the heap until +// the top node's timeout is in the future. +void LocTimerContainer::expire() { + struct MsgTimerExpire : public LocMsg { + LocTimerContainer* mTimerContainer; + inline MsgTimerExpire(LocTimerContainer& container) : + LocMsg(), mTimerContainer(&container) {} + inline virtual void proc() const { + struct timespec now; + // get time spec of now + clock_gettime(CLOCK_BOOTTIME, &now); + LocTimerDelegate timerOfNow(now); + // pop everything in the heap that outRanks now, i.e. has time older than now + // and then call expire() on that timer. + for (LocTimerDelegate* timer = mTimerContainer->popIfOutRanks(timerOfNow); + NULL != timer; + timer = mTimerContainer->popIfOutRanks(timerOfNow)) { + // the timer delegate obj will be deleted before the return of this call + timer->expire(); + } + } + }; + + mMsgTask->sendMsg(new MsgTimerExpire(*this)); +} + +LocTimerDelegate* LocTimerContainer::popIfOutRanks(LocTimerDelegate& timer) { + LocTimerDelegate* poppedNode = NULL; + + if (mTree && peek()->outRanks((LocRankable&)(timer))) { + poppedNode = (LocTimerDelegate*)(pop()); + } + + return poppedNode; +} + + +/***************************LocTimerPollTask methods***************************/ + +inline +LocTimerPollTask::LocTimerPollTask() + : mFd(epoll_create(2)), mThread(new LocThread()) { + // before a next call returens, a thread will be created. The run() method + // could already be running in parallel. Also, since each of the objs + // creates a thread, the container will make sure that there will be only + // one of such obj for our timer implementation. + if (!mThread->start("LocTimerPollTask", this)) { + delete mThread; + mThread = NULL; + } +} + +inline +LocTimerPollTask::~LocTimerPollTask() { + // when fs is closed, epoll_wait() should fail run() should return false + // and the spawned thread should exit. + close(mFd); +} + +void LocTimerPollTask::destroy() { + if (mThread) { + LocThread* thread = mThread; + mThread = NULL; + delete thread; + } else { + delete this; + } +} + +void LocTimerPollTask::addPoll(LocTimerContainer& timerContainer) { + struct epoll_event ev; + memset(&ev, 0, sizeof(ev)); + + ev.events = EPOLLIN | EPOLLWAKEUP; + // it is important that we set this context pointer with the input + // timer container this is how we know which container should handle + // which expiration. + ev.data.ptr = &timerContainer; + epoll_ctl(mFd, EPOLL_CTL_ADD, timerContainer.getTimerFd(), &ev); +} + +inline +void LocTimerPollTask::removePoll(LocTimerContainer& timerContainer) { + epoll_ctl(mFd, EPOLL_CTL_DEL, timerContainer.getTimerFd(), NULL); +} + +// The polling thread context will call this method. If run() method needs to +// be repetitvely called, it must return true from the previous call. +bool LocTimerPollTask::run() { + struct epoll_event ev[2]; + // we have max 2 descriptors to poll from + int fds = epoll_wait(mFd, ev, 2, -1); + // we pretty much want to continually poll until the fd is closed + bool rerun = (fds > 0) || (errno == EINTR); + if (fds > 0) { + // we may have 2 events + for (int i = 0; i < fds; i++) { + // each fd will has a context pointer associated with the right timer container + LocTimerContainer* container = (LocTimerContainer*)(ev[i].data.ptr); + if (container) { + container->expire(); + } + } + } + + // if rerun is true, we are requesting to be scheduled again + return rerun; +} + +/***************************LocTimerDelegate methods***************************/ + +inline +LocTimerDelegate::LocTimerDelegate(LocTimer& client, struct timespec& futureTime, bool wakeOnExpire) + : mClient(&client), mFutureTime(futureTime), mContainer(LocTimerContainer::get(wakeOnExpire)) { + // adding the timer into the container + mContainer->add(*this); +} + +inline +void LocTimerDelegate::destroy() { + if (mContainer) { + mContainer->remove(*this); + mContainer = NULL; + } +} + +int LocTimerDelegate::ranks(LocRankable& rankable) { + int rank = -1; + LocTimerDelegate* timer = (LocTimerDelegate*)(&rankable); + if (timer) { + // larger time ranks lower!!! + // IOW, if input obj has bigger tv_sec, this obj outRanks higher + rank = timer->mFutureTime.tv_sec - mFutureTime.tv_sec; + } + return rank; +} + +inline +void LocTimerDelegate::expire() { + // keeping a copy of client pointer to be safe + // when timeOutCallback() is called at the end of this + // method, this obj is already deleted. + LocTimer* client = mClient; + // this obj is already removed from mContainer. + // NULL it here so that dtor won't try to call remove again + mContainer = NULL; + // force a stop, which will force a delete of this obj + mClient->stop(); + // calling client callback with a pointer save on the stack + client->timeOutCallback(); +} + + +/***************************LocTimer methods***************************/ + +bool LocTimer::start(unsigned int timeOutInMs, bool wakeOnExpire) { + bool success = false; + if (!mTimer) { + struct timespec futureTime; + clock_gettime(CLOCK_BOOTTIME, &futureTime); + futureTime.tv_sec += timeOutInMs / 1000; + futureTime.tv_nsec += (timeOutInMs % 1000) * 1000000; + if (futureTime.tv_nsec >= 1000000000) { + futureTime.tv_sec += futureTime.tv_nsec / 1000000000; + futureTime.tv_nsec %= 1000000000; + } + mTimer = new LocTimerDelegate(*this, futureTime, wakeOnExpire); + // if mTimer is non 0, success should be 0; or vice versa + success = (NULL != mTimer); + } + return success; +} + +bool LocTimer::stop() { + bool success = false; + if (mTimer) { + mTimer->destroy(); + mTimer = NULL; + success = true; + } + return success; +} + +/***************************LocTimerWrapper methods***************************/ +////////////////////////////////////////////////////////////////////////// +// This section below wraps for the C style APIs +////////////////////////////////////////////////////////////////////////// +class LocTimerWrapper : public LocTimer { + loc_timer_callback mCb; + void* mCallerData; +public: + inline LocTimerWrapper(loc_timer_callback cb, void* callerData) : + mCb(cb), mCallerData(callerData) {} + inline virtual void timeOutCallback() { mCb(mCallerData, 0); } +}; + +void* loc_timer_start(uint64_t msec, loc_timer_callback cb_func, + void *caller_data, bool wake_on_expire) +{ + LocTimerWrapper* locTimerWrapper = new LocTimerWrapper(cb_func, caller_data); + + if (locTimerWrapper) { + locTimerWrapper->start(msec, wake_on_expire); + } + + return locTimerWrapper; +} + +void loc_timer_stop(void*& handle) +{ + if (handle) { + LocTimerWrapper* locTimerWrapper = (LocTimerWrapper*)(handle); + locTimerWrapper->stop(); + delete locTimerWrapper; + handle = NULL; + } +} + +////////////////////////////////////////////////////////////////////////// +// This section above wraps for the C style APIs +////////////////////////////////////////////////////////////////////////// + +#ifdef __LOC_DEBUG__ + +double getDeltaSeconds(struct timespec from, struct timespec to) { + return (double)to.tv_sec + (double)to.tv_nsec / 1000000000 + - from.tv_sec - (double)from.tv_nsec / 1000000000; +} + +struct timespec getNow() { + struct timespec now; + clock_gettime(CLOCK_BOOTTIME, &now); + return now; +} + +class LocTimerTest : public LocTimer, public LocRankable { + int mTimeOut; + const struct timespec mTimeOfBirth; + inline struct timespec getTimerWrapper(int timeout) { + struct timespec now; + clock_gettime(CLOCK_BOOTTIME, &now); + now.tv_sec += timeout; + return now; + } +public: + inline LocTimerTest(int timeout) : LocTimer(), LocRankable(), + mTimeOut(timeout), mTimeOfBirth(getTimerWrapper(0)) {} + inline virtual int ranks(LocRankable& rankable) { + LocTimerTest* timer = dynamic_cast(&rankable); + return timer->mTimeOut - mTimeOut; + } + inline virtual void timeOutCallback() { + printf("timeOutCallback() - "); + deviation(); + } + double deviation() { + struct timespec now = getTimerWrapper(0); + double delta = getDeltaSeconds(mTimeOfBirth, now); + printf("%lf: %lf\n", delta, delta * 100 / mTimeOut); + return delta / mTimeOut; + } +}; + +// For Linux command line testing: +// compilation: +// g++ -D__LOC_HOST_DEBUG__ -D__LOC_DEBUG__ -g -I. -I../../../../system/core/include -o LocHeap.o LocHeap.cpp +// g++ -D__LOC_HOST_DEBUG__ -D__LOC_DEBUG__ -g -std=c++0x -I. -I../../../../system/core/include -lpthread -o LocThread.o LocThread.cpp +// g++ -D__LOC_HOST_DEBUG__ -D__LOC_DEBUG__ -g -I. -I../../../../system/core/include -o LocTimer.o LocTimer.cpp +int main(int argc, char** argv) { + struct timespec timeOfStart=getNow(); + srand(time(NULL)); + int tries = atoi(argv[1]); + int checks = tries >> 3; + LocTimerTest** timerArray = new LocTimerTest*[tries]; + memset(timerArray, NULL, tries); + + for (int i = 0; i < tries; i++) { + int r = rand() % tries; + LocTimerTest* timer = new LocTimerTest(r); + if (timerArray[r]) { + if (!timer->stop()) { + printf("%lf:\n", getDeltaSeconds(timeOfStart, getNow())); + printf("ERRER: %dth timer, id %d, not running when it should be\n", i, r); + exit(0); + } else { + printf("stop() - %d\n", r); + delete timer; + timerArray[r] = NULL; + } + } else { + if (!timer->start(r, false)) { + printf("%lf:\n", getDeltaSeconds(timeOfStart, getNow())); + printf("ERRER: %dth timer, id %d, running when it should not be\n", i, r); + exit(0); + } else { + printf("stop() - %d\n", r); + timerArray[r] = timer; + } + } + } + + for (int i = 0; i < tries; i++) { + if (timerArray[i]) { + if (!timerArray[i]->stop()) { + printf("%lf:\n", getDeltaSeconds(timeOfStart, getNow())); + printf("ERRER: %dth timer, not running when it should be\n", i); + exit(0); + } else { + printf("stop() - %d\n", i); + delete timerArray[i]; + timerArray[i] = NULL; + } + } + } + + delete[] timerArray; + + return 0; +} + +#endif diff --git a/utils/LocTimer.h b/utils/LocTimer.h new file mode 100644 index 00000000..c5012927 --- /dev/null +++ b/utils/LocTimer.h @@ -0,0 +1,67 @@ +/* Copyright (c) 2015, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation, nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef __LOC_TIMER_CPP_H__ +#define __LOC_TIMER_CPP_H__ + +#include +#include + +// opaque class to provide service implementation. +class LocTimerDelegate; + +// LocTimer client must extend this class and implementthe callback. +// start() / stop() methods are to arm / disarm timer. +class LocTimer +{ + LocTimerDelegate* mTimer; +public: + inline LocTimer() : mTimer(NULL) {} + inline virtual ~LocTimer() { stop(); } + + // timeOutInMs: timeout delay in ms + // wakeOnExpire: true if to wake up CPU (if sleeping) upon timer + // expiration and notify the client. + // false if to wait until next time CPU wakes up (if + // sleeping) and then notify the client. + // return: true on success; + // false on failure, e.g. timer is already running. + bool start(uint32_t timeOutInMs, bool wakeOnExpire); + + // return: true on success; + // false on failure, e.g. timer is not running. + bool stop(); + + // LocTimer client Should implement this method. + // This method is used for timeout calling back to client. This method + // should be short enough (eg: send a message to your own thread). + virtual void timeOutCallback() = 0; +}; + +#endif //__LOC_DELAY_H__ diff --git a/core/MsgTask.cpp b/utils/MsgTask.cpp similarity index 55% rename from core/MsgTask.cpp rename to utils/MsgTask.cpp index 5d375aa5..8b645dd5 100644 --- a/core/MsgTask.cpp +++ b/utils/MsgTask.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. +/* Copyright (c) 2011-2013,2015 The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -38,66 +38,31 @@ namespace loc_core { -#define MAX_TASK_COMM_LEN 15 - static void LocMsgDestroy(void* msg) { delete (LocMsg*)msg; } -MsgTask::MsgTask(tCreate tCreator, const char* threadName) : - mQ(msg_q_init2()), mAssociator(NULL){ - if (tCreator) { - tCreator(threadName, loopMain, - (void*)new MsgTask(mQ, mAssociator)); - } else { - createPThread(threadName); +MsgTask::MsgTask(const char* threadName, bool joinable) : + mQ(msg_q_init2()), mThread(new LocThread()) { + if (!mThread->start(threadName, this, joinable)) { + delete mThread; + mThread = NULL; } } -MsgTask::MsgTask(tAssociate tAssociator, const char* threadName) : - mQ(msg_q_init2()), mAssociator(tAssociator){ - createPThread(threadName); -} - -inline -MsgTask::MsgTask(const void* q, tAssociate associator) : - mQ(q), mAssociator(associator){ -} - MsgTask::~MsgTask() { + msg_q_flush((void*)mQ); + msg_q_destroy((void**)&mQ); +} + +void MsgTask::destroy() { msg_q_unblock((void*)mQ); -} - -void MsgTask::associate(tAssociate tAssociator) const { - struct LocAssociateMsg : public LocMsg { - tAssociate mAssociator; - inline LocAssociateMsg(tAssociate associator) : - LocMsg(), mAssociator(associator) {} - inline virtual void proc() const { - if (mAssociator) { - LOC_LOGD("MsgTask::associate"); - mAssociator(); - } - } - }; - sendMsg(new LocAssociateMsg(tAssociator)); -} - -void MsgTask::createPThread(const char* threadName) { - pthread_attr_t attr; - pthread_attr_init(&attr); - pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); - - pthread_t tid; - // create the thread here, then if successful - // and a name is given, we set the thread name - if (!pthread_create(&tid, &attr, loopMain, - (void*)new MsgTask(mQ, mAssociator)) && - NULL != threadName) { - char lname[MAX_TASK_COMM_LEN+1]; - memcpy(lname, threadName, MAX_TASK_COMM_LEN); - lname[MAX_TASK_COMM_LEN] = 0; - pthread_setname_np(tid, lname); + if (mThread) { + LocThread* thread = mThread; + mThread = NULL; + delete thread; + } else { + delete this; } } @@ -105,43 +70,63 @@ void MsgTask::sendMsg(const LocMsg* msg) const { msg_q_snd((void*)mQ, (void*)msg, LocMsgDestroy); } -void* MsgTask::loopMain(void* arg) { - MsgTask* copy = (MsgTask*)arg; - +void MsgTask::prerun() { // make sure we do not run in background scheduling group set_sched_policy(gettid(), SP_FOREGROUND); +} - if (NULL != copy->mAssociator) { - copy->mAssociator(); - } - +bool MsgTask::run() { + LOC_LOGD("MsgTask::loop() listening ...\n"); LocMsg* msg; - int cnt = 0; - - while (1) { - LOC_LOGD("MsgTask::loop() %d listening ...\n", cnt++); - - msq_q_err_type result = msg_q_rcv((void*)copy->mQ, (void **)&msg); - - if (eMSG_Q_SUCCESS != result) { - LOC_LOGE("%s:%d] fail receiving msg: %s\n", __func__, __LINE__, - loc_get_msg_q_status(result)); - // destroy the Q and exit - msg_q_destroy((void**)&(copy->mQ)); - delete copy; - return NULL; - } - - msg->log(); - // there is where each individual msg handling is invoked - msg->proc(); - - delete msg; + msq_q_err_type result = msg_q_rcv((void*)mQ, (void **)&msg); + if (eMSG_Q_SUCCESS != result) { + LOC_LOGE("%s:%d] fail receiving msg: %s\n", __func__, __LINE__, + loc_get_msg_q_status(result)); + return false; } - delete copy; + msg->log(); + // there is where each individual msg handling is invoked + msg->proc(); - return NULL; + delete msg; + + return true; } +// TODO: remove the below in the next patch +void MsgTask::associate(tAssociate tAssociator) const { + struct LocAssociateMsg : public LocMsg { + tAssociate mAssociator; + LocAssociateMsg(tAssociate associator) : + mAssociator(associator) {} + inline virtual void proc() const { + static bool sAssociated = false; + if (!sAssociated) { + sAssociated = true; + mAssociator(); + } + } + }; + sendMsg(new LocAssociateMsg(tAssociator)); } + +MsgTask::MsgTask(tCreate tCreator, const char* threadName) : + mQ(msg_q_init2()), mThread(new LocThread()) { + if (!mThread->start(threadName, this, false)) { + delete mThread; + mThread = NULL; + } +} + +MsgTask::MsgTask(tAssociate tAssociator, const char* threadName) : + mQ(msg_q_init2()), mThread(new LocThread()) { + if (!mThread->start(threadName, this, false)) { + delete mThread; + mThread = NULL; + } else { + associate(tAssociator); + } +} + +} // namespace loc_core diff --git a/core/MsgTask.h b/utils/MsgTask.h similarity index 71% rename from core/MsgTask.h rename to utils/MsgTask.h index d50bb31a..c397ee10 100644 --- a/core/MsgTask.h +++ b/utils/MsgTask.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. +/* Copyright (c) 2011-2013,2015 The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -29,9 +29,8 @@ #ifndef __MSG_TASK__ #define __MSG_TASK__ -#include -#include -#include +#include +// TODO: remove this include in the next patch #include namespace loc_core { @@ -43,23 +42,37 @@ struct LocMsg { inline virtual void log() const {} }; -class MsgTask { +class MsgTask : public LocRunnable{ + const void* mQ; + LocThread* mThread; + friend class LocThreadDelegate; +protected: + virtual ~MsgTask(); public: + MsgTask(const char* threadName = NULL, bool joinable = true); + // this obj will be deleted once thread is deleted + void destroy(); + void sendMsg(const LocMsg* msg) const; + // Overrides of LocRunnable methods + // This method will be repeated called until it returns false; or + // until thread is stopped. + virtual bool run(); + + // The method to be run before thread loop (conditionally repeatedly) + // calls run() + virtual void prerun(); + + // The method to be run after thread loop (conditionally repeatedly) + // calls run() + inline virtual void postrun() {} + + // TODO: remove the below in the next patch typedef void* (*tStart)(void*); typedef pthread_t (*tCreate)(const char* name, tStart start, void* arg); typedef int (*tAssociate)(); MsgTask(tCreate tCreator, const char* threadName); MsgTask(tAssociate tAssociator, const char* threadName); - ~MsgTask(); - void sendMsg(const LocMsg* msg) const; void associate(tAssociate tAssociator) const; - -private: - const void* mQ; - tAssociate mAssociator; - MsgTask(const void* q, tAssociate associator); - static void* loopMain(void* copy); - void createPThread(const char* name); }; } // namespace loc_core diff --git a/utils/loc_timer.c b/utils/loc_timer.c deleted file mode 100644 index 2beca5fa..00000000 --- a/utils/loc_timer.c +++ /dev/null @@ -1,202 +0,0 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of The Linux Foundation, nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include -#include -#include -#include "loc_timer.h" -#include -#include - -enum timer_state { - READY = 100, - WAITING, - DONE, - ABORT -}; - -typedef struct { - loc_timer_callback callback_func; - void *user_data; - unsigned int time_msec; - pthread_cond_t timer_cond; - pthread_mutex_t timer_mutex; - enum timer_state state; -}timer_data; - -static void *timer_thread(void *thread_data) -{ - int ret = -ETIMEDOUT; - struct timespec ts; - struct timeval tv; - timer_data* t = (timer_data*)thread_data; - - LOC_LOGD("%s:%d]: Enter. Delay = %d\n", __func__, __LINE__, t->time_msec); - - gettimeofday(&tv, NULL); - clock_gettime(CLOCK_REALTIME, &ts); - if(t->time_msec >= 1000) { - ts.tv_sec += t->time_msec/1000; - t->time_msec = t->time_msec % 1000; - } - if(t->time_msec) - ts.tv_nsec += t->time_msec * 1000000; - if(ts.tv_nsec > 999999999) { - LOC_LOGD("%s:%d]: Large nanosecs\n", __func__, __LINE__); - ts.tv_sec += 1; - ts.tv_nsec -= 1000000000; - } - LOC_LOGD("%s:%d]: ts.tv_sec:%d; ts.tv_nsec:%d\n" - "\t Current time: %d sec; %d nsec", - __func__, __LINE__, (int)ts.tv_sec, (int)ts.tv_nsec, - (int)tv.tv_sec, (int)tv.tv_usec*1000); - - pthread_mutex_lock(&(t->timer_mutex)); - if (READY == t->state) { - t->state = WAITING; - ret = pthread_cond_timedwait(&t->timer_cond, &t->timer_mutex, &ts); - t->state = DONE; - } - pthread_mutex_unlock(&(t->timer_mutex)); - - switch (ret) { - case ETIMEDOUT: - LOC_LOGV("%s:%d]: loc_timer timed out", __func__, __LINE__); - break; - case 0: - LOC_LOGV("%s:%d]: loc_timer stopped", __func__, __LINE__); - break; - case -ETIMEDOUT: - LOC_LOGV("%s:%d]: loc_timer cancelled", __func__, __LINE__); - break; - default: - LOC_LOGE("%s:%d]: Call to pthread timedwait failed; ret=%d\n", - __func__, __LINE__, ret); - break; - } - - if(ETIMEDOUT == ret) - t->callback_func(t->user_data, ret); - - // A (should be rare) race condition is that, when the loc_time_stop is called - // and acquired mutex, we reach here. pthread_mutex_destroy will fail with - // error code EBUSY. We give it 6 tries in 5 seconds. Should be eanough time - // for loc_timer_stop to complete. With the 7th try, we also perform unlock - // prior to destroy. - { - int i; - for (i = 0; EBUSY == pthread_mutex_destroy(&t->timer_mutex) && i <= 5; i++) { - if (i < 5) { - sleep(1); - } else { - // nah, forget it, something is seriously wrong. Mutex has been - // held too long. Unlock the mutext here. - pthread_mutex_unlock(&t->timer_mutex); - } - } - } - pthread_cond_destroy(&t->timer_cond); - - free(t); - LOC_LOGD("%s:%d]: Exit\n", __func__, __LINE__); - return NULL; -} - -void* loc_timer_start(unsigned int msec, loc_timer_callback cb_func, - void* caller_data) -{ - timer_data *t=NULL; - pthread_attr_t tattr; - pthread_t id; - LOC_LOGD("%s:%d]: Enter\n", __func__, __LINE__); - if(cb_func == NULL || msec == 0) { - LOC_LOGE("%s:%d]: Error: Wrong parameters\n", __func__, __LINE__); - goto _err; - } - t = (timer_data *)calloc(1, sizeof(timer_data)); - if(t == NULL) { - LOC_LOGE("%s:%d]: Could not allocate memory. Failing.\n", - __func__, __LINE__); - goto _err; - } - - if(pthread_cond_init(&(t->timer_cond), NULL)) { - LOC_LOGE("%s:%d]: Pthread cond init failed\n", __func__, __LINE__); - goto t_err; - } - if(pthread_mutex_init(&(t->timer_mutex), NULL)) { - LOC_LOGE("%s:%d]: Pthread mutex init failed\n", __func__, __LINE__); - goto cond_err; - } - - t->callback_func = cb_func; - t->user_data = caller_data; - t->time_msec = msec; - t->state = READY; - - if (pthread_attr_init(&tattr)) { - LOC_LOGE("%s:%d]: Pthread mutex init failed\n", __func__, __LINE__); - goto mutex_err; - } - pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_DETACHED); - - if(pthread_create(&(id), &tattr, timer_thread, (void *)t)) { - LOC_LOGE("%s:%d]: Could not create thread\n", __func__, __LINE__); - goto attr_err; - } - - LOC_LOGD("%s:%d]: Created thread with id: %d\n", - __func__, __LINE__, (int)id); - goto _err; - -attr_err: - pthread_attr_destroy(&tattr); -mutex_err: - pthread_mutex_destroy(&t->timer_mutex); -cond_err: - pthread_cond_destroy(&t->timer_cond); -t_err: - free(t); -_err: - LOC_LOGD("%s:%d]: Exit\n", __func__, __LINE__); - return t; -} - -void loc_timer_stop(void* handle) { - timer_data* t = (timer_data*)handle; - - if (NULL != t && (READY == t->state || WAITING == t->state) && - pthread_mutex_lock(&(t->timer_mutex)) == 0) { - if (READY == t->state || WAITING == t->state) { - pthread_cond_signal(&t->timer_cond); - t->state = ABORT; - } - pthread_mutex_unlock(&(t->timer_mutex)); - } -} diff --git a/utils/loc_timer.h b/utils/loc_timer.h index 0034d278..8836d1ea 100644 --- a/utils/loc_timer.h +++ b/utils/loc_timer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013,2015 The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -33,28 +33,36 @@ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ -#include -#include "log_util.h" +#include /* - Return values: - Success = 0 - Failure = Non zero + user_data: client context pointer, passthrough. Originally received + from calling client when loc_timer_start() is called. + result: 0 if timer successfully timed out; else timer failed. */ -typedef void(*loc_timer_callback)(void *user_data, int result); +typedef void (*loc_timer_callback)(void *user_data, int32_t result); /* - Returns the handle, which can be used to stop the timer + delay_msec: timeout value for the timer. + loc_timer_callback: callback function pointer, implemented by client. + user_data: client context pointer, passthrough. Will be + returned when loc_timer_callback() is called. + wakeOnExpire: true if to wake up CPU (if sleeping) upon timer + expiration and notify the client. + false if to wait until next time CPU wakes up (if + sleeping) and then notify the client. + Returns the handle, which can be used to stop the timer */ -void* loc_timer_start(unsigned int delay_msec, +void* loc_timer_start(uint64_t delay_msec, loc_timer_callback, - void* user_data); + void *user_data, + bool wake_on_expire=false); /* - handle becomes invalid upon the return of the callback + handle becomes invalid upon the return of the callback */ -void loc_timer_stop(void* handle); +void loc_timer_stop(void*& handle); #ifdef __cplusplus } From c9db5166b5fe498c22b222c674d19b8833fc5853 Mon Sep 17 00:00:00 2001 From: Kevin Tang Date: Fri, 10 Jul 2015 20:30:57 -0700 Subject: [PATCH 22/37] LocTimer repeated expiration Timer must be removed from epoll as soon as it expires, otherwise it continuously expire. Current timer removes from a different thread, this triggers repeated expire events until the maintain thread gets to remove it. Change-Id: Ie523bce5069416521d49bc0178d2cad2dd1f04da CRs-Fixed: 870568 --- utils/LocTimer.cpp | 103 +++++++++++++++++++++++++-------------------- 1 file changed, 57 insertions(+), 46 deletions(-) diff --git a/utils/LocTimer.cpp b/utils/LocTimer.cpp index 22098091..e1be1e8a 100644 --- a/utils/LocTimer.cpp +++ b/utils/LocTimer.cpp @@ -112,6 +112,8 @@ class LocTimerContainer : public LocHeap { static LocTimerPollTask* getPollTaskLocked(); // extend LocHeap and pop if the top outRanks input LocTimerDelegate* popIfOutRanks(LocTimerDelegate& timer); + // update the timer POSIX calls with updated soonest timer spec + void updateSoonestTime(LocTimerDelegate* priorTop); public: // factory method to control the creation of mSwTimers / mHwTimers @@ -270,74 +272,68 @@ int LocTimerContainer::getTimerFd() { return mDevFd; } +void LocTimerContainer::updateSoonestTime(LocTimerDelegate* priorTop) { + LocTimerDelegate* curTop = getSoonestTimer(); + + // check if top has changed + if (curTop != priorTop) { + struct itimerspec delay = {0}; + bool toSetTime = false; + // if tree is empty now, we remove poll and disarm timer + if (!curTop) { + mPollTask->removePoll(*this); + // setting the values to disarm timer + delay.it_value.tv_sec = 0; + delay.it_value.tv_nsec = 0; + toSetTime = true; + } else if (!priorTop || curTop->outRanks(*priorTop)) { + // do this first to avoid race condition, in case settime is called + // with too small an interval + mPollTask->addPoll(*this); + delay.it_value = curTop->getFutureTime(); + toSetTime = true; + } + if (toSetTime) { + timerfd_settime(getTimerFd(), TFD_TIMER_ABSTIME, &delay, NULL); + } + } +} + // all the heap management is done in the MsgTask context. inline void LocTimerContainer::add(LocTimerDelegate& timer) { struct MsgTimerPush : public LocMsg { LocTimerContainer* mTimerContainer; LocHeapNode* mTree; - LocTimerPollTask* mPollTask; LocTimerDelegate* mTimer; - inline MsgTimerPush(LocTimerContainer& container, LocTimerPollTask& pollTask, LocTimerDelegate& timer) : - LocMsg(), mTimerContainer(&container), mPollTask(&pollTask), mTimer(&timer) {} + inline MsgTimerPush(LocTimerContainer& container, LocTimerDelegate& timer) : + LocMsg(), mTimerContainer(&container), mTimer(&timer) {} inline virtual void proc() const { LocTimerDelegate* priorTop = mTimerContainer->getSoonestTimer(); mTimerContainer->push((LocRankable&)(*mTimer)); - - // if the tree top changed (new top is the new node), we need to update - // timerfd with the new timerout value. - if (priorTop != mTimerContainer->getSoonestTimer()) { - // if tree was empty before, we need to let poll task poll on this - // do this first to avoid race condition, in case settime is called - // with too small an interval - if (!priorTop) { - mPollTask->addPoll(*mTimerContainer); - } - struct itimerspec delay = {0}; - delay.it_value = mTimer->getFutureTime(); - timerfd_settime(mTimerContainer->getTimerFd(), TFD_TIMER_ABSTIME, &delay, NULL); - } + mTimerContainer->updateSoonestTime(priorTop); } }; - mMsgTask->sendMsg(new MsgTimerPush(*this, *mPollTask, timer)); + mMsgTask->sendMsg(new MsgTimerPush(*this, timer)); } // all the heap management is done in the MsgTask context. void LocTimerContainer::remove(LocTimerDelegate& timer) { struct MsgTimerRemove : public LocMsg { LocTimerContainer* mTimerContainer; - LocTimerPollTask* mPollTask; LocTimerDelegate* mTimer; - inline MsgTimerRemove(LocTimerContainer& container, LocTimerPollTask& pollTask, LocTimerDelegate& timer) : - LocMsg(), mTimerContainer(&container), mPollTask(&pollTask), mTimer(&timer) {} + inline MsgTimerRemove(LocTimerContainer& container, LocTimerDelegate& timer) : + LocMsg(), mTimerContainer(&container), mTimer(&timer) {} inline virtual void proc() const { LocTimerDelegate* priorTop = mTimerContainer->getSoonestTimer(); ((LocHeap*)mTimerContainer)->remove((LocRankable&)*mTimer); + mTimerContainer->updateSoonestTime(priorTop); delete mTimer; - LocTimerDelegate* curTop = mTimerContainer->getSoonestTimer(); - - // if the tree top changed (the removed the node was the tree top), we need - // to update the timerfd with the new timeout value from the new top. - if (priorTop != curTop) { - struct itimerspec delay = {0}; - // if tree is empty now, we need to remove poll from poll task - if (!curTop) { - mPollTask->removePoll(*mTimerContainer); - // setting the values to disarm timer - delay.it_value.tv_sec = 0; - delay.it_value.tv_nsec = 0; - } else { - delay.it_value = curTop->getFutureTime(); - } - // this will either update the timer with the new soonest timeout - // or disarm the timer, if the current tree top empty - timerfd_settime(mTimerContainer->getTimerFd(), TFD_TIMER_ABSTIME, &delay, NULL); - } } }; - mMsgTask->sendMsg(new MsgTimerRemove(*this, *mPollTask, timer)); + mMsgTask->sendMsg(new MsgTimerRemove(*this, timer)); } // all the heap management is done in the MsgTask context. @@ -355,22 +351,25 @@ void LocTimerContainer::expire() { LocTimerDelegate timerOfNow(now); // pop everything in the heap that outRanks now, i.e. has time older than now // and then call expire() on that timer. - for (LocTimerDelegate* timer = mTimerContainer->popIfOutRanks(timerOfNow); + for (LocTimerDelegate* timer = (LocTimerDelegate*)mTimerContainer->pop(); NULL != timer; timer = mTimerContainer->popIfOutRanks(timerOfNow)) { // the timer delegate obj will be deleted before the return of this call timer->expire(); } + mTimerContainer->updateSoonestTime(NULL); } }; + struct itimerspec delay = {0}; + timerfd_settime(getTimerFd(), TFD_TIMER_ABSTIME, &delay, NULL); + mPollTask->removePoll(*this); mMsgTask->sendMsg(new MsgTimerExpire(*this)); } LocTimerDelegate* LocTimerContainer::popIfOutRanks(LocTimerDelegate& timer) { LocTimerDelegate* poppedNode = NULL; - - if (mTree && peek()->outRanks((LocRankable&)(timer))) { + if (mTree && !timer.outRanks(*peek())) { poppedNode = (LocTimerDelegate*)(pop()); } @@ -415,10 +414,12 @@ void LocTimerPollTask::addPoll(LocTimerContainer& timerContainer) { memset(&ev, 0, sizeof(ev)); ev.events = EPOLLIN | EPOLLWAKEUP; + ev.data.fd = timerContainer.getTimerFd(); // it is important that we set this context pointer with the input // timer container this is how we know which container should handle // which expiration. ev.data.ptr = &timerContainer; + epoll_ctl(mFd, EPOLL_CTL_ADD, timerContainer.getTimerFd(), &ev); } @@ -431,17 +432,22 @@ void LocTimerPollTask::removePoll(LocTimerContainer& timerContainer) { // be repetitvely called, it must return true from the previous call. bool LocTimerPollTask::run() { struct epoll_event ev[2]; + // we have max 2 descriptors to poll from int fds = epoll_wait(mFd, ev, 2, -1); + // we pretty much want to continually poll until the fd is closed bool rerun = (fds > 0) || (errno == EINTR); + if (fds > 0) { // we may have 2 events for (int i = 0; i < fds; i++) { - // each fd will has a context pointer associated with the right timer container + // each fd has a context pointer associated with the right timer container LocTimerContainer* container = (LocTimerContainer*)(ev[i].data.ptr); if (container) { container->expire(); + } else { + epoll_ctl(mFd, EPOLL_CTL_DEL, ev[i].data.fd, NULL); } } } @@ -464,6 +470,8 @@ void LocTimerDelegate::destroy() { if (mContainer) { mContainer->remove(*this); mContainer = NULL; + } else { + delete this; } } @@ -534,7 +542,10 @@ class LocTimerWrapper : public LocTimer { public: inline LocTimerWrapper(loc_timer_callback cb, void* callerData) : mCb(cb), mCallerData(callerData) {} - inline virtual void timeOutCallback() { mCb(mCallerData, 0); } + inline virtual void timeOutCallback() { + mCb(mCallerData, 0); + delete this; + } }; void* loc_timer_start(uint64_t msec, loc_timer_callback cb_func, From 153ba77107f0be57cb7f29852fff58d7fc13c185 Mon Sep 17 00:00:00 2001 From: Kevin Tang Date: Mon, 20 Jul 2015 15:36:06 -0700 Subject: [PATCH 23/37] crash in LocTimer wrapper LocTimerWrapper implements loc_timer_start/stop calls for backward compatibility. There is a race condtiion where the wrapper object could be deleted by the client thread and expireation handling at rough the same time, which would have the memory freed twice. Now they are mutext protected. Change-Id: I25d7466db88a840a8a09e7a476cface48c91d22e --- utils/LocTimer.cpp | 26 +++++++++++++++++++++----- utils/loc_timer.h | 6 ++++-- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/utils/LocTimer.cpp b/utils/LocTimer.cpp index e1be1e8a..277a8135 100644 --- a/utils/LocTimer.cpp +++ b/utils/LocTimer.cpp @@ -539,22 +539,38 @@ bool LocTimer::stop() { class LocTimerWrapper : public LocTimer { loc_timer_callback mCb; void* mCallerData; + static pthread_mutex_t mMutex; + inline ~LocTimerWrapper() { mCb = NULL; } public: inline LocTimerWrapper(loc_timer_callback cb, void* callerData) : mCb(cb), mCallerData(callerData) {} + inline bool isAlive() { return mCb != NULL; } + void destroy() { + pthread_mutex_lock(&mMutex); + if (isAlive()) { + delete this; + } + pthread_mutex_unlock(&mMutex); + } inline virtual void timeOutCallback() { mCb(mCallerData, 0); - delete this; + destroy(); } }; +pthread_mutex_t LocTimerWrapper::mMutex = PTHREAD_MUTEX_INITIALIZER; + void* loc_timer_start(uint64_t msec, loc_timer_callback cb_func, void *caller_data, bool wake_on_expire) { - LocTimerWrapper* locTimerWrapper = new LocTimerWrapper(cb_func, caller_data); + LocTimerWrapper* locTimerWrapper = NULL; - if (locTimerWrapper) { - locTimerWrapper->start(msec, wake_on_expire); + if (cb_func) { + locTimerWrapper = new LocTimerWrapper(cb_func, caller_data); + + if (locTimerWrapper) { + locTimerWrapper->start(msec, wake_on_expire); + } } return locTimerWrapper; @@ -565,7 +581,7 @@ void loc_timer_stop(void*& handle) if (handle) { LocTimerWrapper* locTimerWrapper = (LocTimerWrapper*)(handle); locTimerWrapper->stop(); - delete locTimerWrapper; + locTimerWrapper->destroy(); handle = NULL; } } diff --git a/utils/loc_timer.h b/utils/loc_timer.h index 8836d1ea..2967858e 100644 --- a/utils/loc_timer.h +++ b/utils/loc_timer.h @@ -45,7 +45,8 @@ typedef void (*loc_timer_callback)(void *user_data, int32_t result); /* delay_msec: timeout value for the timer. - loc_timer_callback: callback function pointer, implemented by client. + cb_func: callback function pointer, implemented by client. + Can not be NULL. user_data: client context pointer, passthrough. Will be returned when loc_timer_callback() is called. wakeOnExpire: true if to wake up CPU (if sleeping) upon timer @@ -53,9 +54,10 @@ typedef void (*loc_timer_callback)(void *user_data, int32_t result); false if to wait until next time CPU wakes up (if sleeping) and then notify the client. Returns the handle, which can be used to stop the timer + NULL, if timer start fails (e.g. if cb_func is NULL). */ void* loc_timer_start(uint64_t delay_msec, - loc_timer_callback, + loc_timer_callback cb_func, void *user_data, bool wake_on_expire=false); From 62a30d2faa4ca2cd1050acbded30bbffd5bd0b19 Mon Sep 17 00:00:00 2001 From: Bhavna Sharma Date: Wed, 26 Aug 2015 11:26:46 -0700 Subject: [PATCH 24/37] Fix for timerfd_create on older kernel revisions BOOTTIME_ALARM and BOOTTIME were added to timerfd_create in kernel version 3.11 and 3.15 respectively. But for targets still on older kernel version we fallback on MONOTONIC. CRs-Fixed: 897805 Change-Id: I47d9780d69ce5ee8c183c84baa93ea3c1a00db57 --- utils/LocTimer.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/utils/LocTimer.cpp b/utils/LocTimer.cpp index 277a8135..524897bb 100644 --- a/utils/LocTimer.cpp +++ b/utils/LocTimer.cpp @@ -103,7 +103,7 @@ class LocTimerContainer : public LocHeap { // Poll task to provide epoll call and threading to poll. static LocTimerPollTask* mPollTask; // timer / alarm fd - const int mDevFd; + int mDevFd; // ctor LocTimerContainer(bool wakeOnExpire); // dtor @@ -210,6 +210,13 @@ LocTimerPollTask* LocTimerContainer::mPollTask = NULL; // HwTimer (alarm), when wakeOnExpire is false. LocTimerContainer::LocTimerContainer(bool wakeOnExpire) : mDevFd(timerfd_create(wakeOnExpire ? CLOCK_BOOTTIME_ALARM : CLOCK_BOOTTIME, 0)) { + + if ((-1 == mDevFd) && (errno == EINVAL)) { + LOC_LOGW("%s: timerfd_create failure, fallback to CLOCK_MONOTONIC - %s", + __FUNCTION__, strerror(errno)); + mDevFd = timerfd_create(CLOCK_MONOTONIC, 0); + } + if (-1 != mDevFd) { // ensure we have the necessary resources created LocTimerContainer::getPollTaskLocked(); From 91488d6fc5ddb23ec1886f02b7a8a21155718d65 Mon Sep 17 00:00:00 2001 From: Kevin Tang Date: Thu, 3 Sep 2015 18:08:08 -0700 Subject: [PATCH 25/37] fixing a crash vulnerability due to race condition LocTimer::stop() can be called from different threads, which must be protected. Currently there is a race condition between back to back stop()'s or expire() + stop() events. Change-Id: Iae80b78f049a32da87639f813c6f5126b4ccd072 CRs-Fixed: 904627 --- utils/LocTimer.cpp | 99 +++++++++++++++++++++++++++++++++++----------- utils/LocTimer.h | 11 +++++- 2 files changed, 85 insertions(+), 25 deletions(-) diff --git a/utils/LocTimer.cpp b/utils/LocTimer.cpp index 524897bb..53ca700d 100644 --- a/utils/LocTimer.cpp +++ b/utils/LocTimer.cpp @@ -48,6 +48,20 @@ using namespace loc_core; +// a shared lock until, place it here for now. +class LocUtilSharedLock { + uint32_t mRef; + pthread_mutex_t mMutex; + inline ~LocUtilSharedLock() { pthread_mutex_destroy(&mMutex); } +public: + inline LocUtilSharedLock() : mRef(1) { pthread_mutex_init(&mMutex, NULL); } + inline LocUtilSharedLock* share() { mRef++; return this; } + inline void drop() { if (0 == --mRef) delete this; } + inline void lock() { pthread_mutex_lock(&mMutex); } + inline void unlock() { pthread_mutex_unlock(&mMutex); } +}; + + /* There are implementations of 5 classes in this file: LocTimer, LocTimerDelegate, LocTimerContainer, LocTimerPollTask, LocTimerWrapper @@ -177,15 +191,16 @@ class LocTimerDelegate : public LocRankable { friend class LocTimerContainer; friend class LocTimer; LocTimer* mClient; + LocUtilSharedLock* mLock; struct timespec mFutureTime; LocTimerContainer* mContainer; // not a complete obj, just ctor for LocRankable comparisons inline LocTimerDelegate(struct timespec& delay) - : mClient(NULL), mFutureTime(delay), mContainer(NULL) {} - inline ~LocTimerDelegate() {} + : mClient(NULL), mLock(NULL), mFutureTime(delay), mContainer(NULL) {} + inline ~LocTimerDelegate() { if (mLock) { mLock->drop(); mLock = NULL; } } public: LocTimerDelegate(LocTimer& client, struct timespec& futureTime, bool wakeOnExpire); - void destroy(); + void destroyLocked(); // LocRankable virtual method virtual int ranks(LocRankable& rankable); void expire(); @@ -334,8 +349,9 @@ void LocTimerContainer::remove(LocTimerDelegate& timer) { LocMsg(), mTimerContainer(&container), mTimer(&timer) {} inline virtual void proc() const { LocTimerDelegate* priorTop = mTimerContainer->getSoonestTimer(); - ((LocHeap*)mTimerContainer)->remove((LocRankable&)*mTimer); - mTimerContainer->updateSoonestTime(priorTop); + if (NULL != ((LocHeap*)mTimerContainer)->remove((LocRankable&)*mTimer)) { + mTimerContainer->updateSoonestTime(priorTop); + } delete mTimer; } }; @@ -363,6 +379,7 @@ void LocTimerContainer::expire() { timer = mTimerContainer->popIfOutRanks(timerOfNow)) { // the timer delegate obj will be deleted before the return of this call timer->expire(); + delete timer; } mTimerContainer->updateSoonestTime(NULL); } @@ -467,19 +484,30 @@ bool LocTimerPollTask::run() { inline LocTimerDelegate::LocTimerDelegate(LocTimer& client, struct timespec& futureTime, bool wakeOnExpire) - : mClient(&client), mFutureTime(futureTime), mContainer(LocTimerContainer::get(wakeOnExpire)) { + : mClient(&client), + mLock(mClient->mLock->share()), + mFutureTime(futureTime), + mContainer(LocTimerContainer::get(wakeOnExpire)) { // adding the timer into the container mContainer->add(*this); } inline -void LocTimerDelegate::destroy() { +void LocTimerDelegate::destroyLocked() { + // client handle will likely be deleted soon after this + // method returns. Nulling this handle so that expire() + // won't call the callback on the dead handle any more. + mClient = NULL; + if (mContainer) { - mContainer->remove(*this); + LocTimerContainer* container = mContainer; mContainer = NULL; - } else { - delete this; - } + if (container) { + container->remove(*this); + } + } // else we do not do anything, as *this* will be deleted either + // after it expires or stop is first called (if case above), + // where container->remove() will have it deleted. } int LocTimerDelegate::ranks(LocRankable& rankable) { @@ -495,6 +523,7 @@ int LocTimerDelegate::ranks(LocRankable& rankable) { inline void LocTimerDelegate::expire() { + mLock->lock(); // keeping a copy of client pointer to be safe // when timeOutCallback() is called at the end of this // method, this obj is already deleted. @@ -502,14 +531,29 @@ void LocTimerDelegate::expire() { // this obj is already removed from mContainer. // NULL it here so that dtor won't try to call remove again mContainer = NULL; + mClient = NULL; + mLock->unlock(); // force a stop, which will force a delete of this obj - mClient->stop(); - // calling client callback with a pointer save on the stack - client->timeOutCallback(); + if (client && client->stop()) { + // calling client callback with a pointer save on the stack + // only if stop() returns true, i.e. it hasn't been stopped + // already. + client->timeOutCallback(); + } } /***************************LocTimer methods***************************/ +LocTimer::LocTimer() : mTimer(NULL), mLock(new LocUtilSharedLock()) { +} + +LocTimer::~LocTimer() { + stop(); + if (mLock) { + mLock->drop(); + mLock = NULL; + } +} bool LocTimer::start(unsigned int timeOutInMs, bool wakeOnExpire) { bool success = false; @@ -532,9 +576,14 @@ bool LocTimer::start(unsigned int timeOutInMs, bool wakeOnExpire) { bool LocTimer::stop() { bool success = false; if (mTimer) { - mTimer->destroy(); + mLock->lock(); + LocTimerDelegate* timer = mTimer; mTimer = NULL; - success = true; + if (timer) { + timer->destroyLocked(); + success = true; + } + mLock->unlock(); } return success; } @@ -546,21 +595,26 @@ bool LocTimer::stop() { class LocTimerWrapper : public LocTimer { loc_timer_callback mCb; void* mCallerData; + LocTimerWrapper* mMe; static pthread_mutex_t mMutex; - inline ~LocTimerWrapper() { mCb = NULL; } + inline ~LocTimerWrapper() { mCb = NULL; mMe = NULL; } public: inline LocTimerWrapper(loc_timer_callback cb, void* callerData) : - mCb(cb), mCallerData(callerData) {} - inline bool isAlive() { return mCb != NULL; } + mCb(cb), mCallerData(callerData), mMe(this) { + } void destroy() { pthread_mutex_lock(&mMutex); - if (isAlive()) { + if (NULL != mCb && this == mMe) { delete this; } pthread_mutex_unlock(&mMutex); } - inline virtual void timeOutCallback() { - mCb(mCallerData, 0); + virtual void timeOutCallback() { + loc_timer_callback cb = mCb; + void* callerData = mCallerData; + if (cb) { + cb(callerData, 0); + } destroy(); } }; @@ -587,7 +641,6 @@ void loc_timer_stop(void*& handle) { if (handle) { LocTimerWrapper* locTimerWrapper = (LocTimerWrapper*)(handle); - locTimerWrapper->stop(); locTimerWrapper->destroy(); handle = NULL; } diff --git a/utils/LocTimer.h b/utils/LocTimer.h index c5012927..9606fe53 100644 --- a/utils/LocTimer.h +++ b/utils/LocTimer.h @@ -35,15 +35,22 @@ // opaque class to provide service implementation. class LocTimerDelegate; +class LocUtilSharedLock; // LocTimer client must extend this class and implementthe callback. // start() / stop() methods are to arm / disarm timer. class LocTimer { LocTimerDelegate* mTimer; + LocUtilSharedLock* mLock; + // don't really want mLock to be manipulated by clients, yet LocTimer + // has to have a reference to the lock so that the delete of LocTimer + // and LocTimerDelegate can work together on their share resources. + friend class LocTimerDelegate; + public: - inline LocTimer() : mTimer(NULL) {} - inline virtual ~LocTimer() { stop(); } + LocTimer(); + virtual ~LocTimer(); // timeOutInMs: timeout delay in ms // wakeOnExpire: true if to wake up CPU (if sleeping) upon timer From f533181bd69fd32a8a49f4138efbe702f5cdc077 Mon Sep 17 00:00:00 2001 From: Kevin Tang Date: Tue, 15 Sep 2015 19:02:58 -0700 Subject: [PATCH 26/37] timer bug fix when a ticking timer is stopped, currently kernel doesn't get updated with the next immediate timer's interval. As a result, kernel timer will expire sooner (with the stopped timer's interval), and the next timer's client is notified for this expiration. Change-Id: I0d67d1418cb9bfe7f70ae71252901d4c6bb699b3 CRs-Fixed: 909776 --- utils/LocHeap.cpp | 4 ++-- utils/LocTimer.cpp | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/utils/LocHeap.cpp b/utils/LocHeap.cpp index 41268789..d667f14f 100644 --- a/utils/LocHeap.cpp +++ b/utils/LocHeap.cpp @@ -199,7 +199,7 @@ bool LocHeapNode::checkNodes() { int totalSize = mSize; if (mLeft) { // check the consistency of left subtree - if (!outRanks(*mLeft) || !mLeft->checkNodes()) { + if (mLeft->outRanks(*this) || !mLeft->checkNodes()) { return false; } // subtract the size of left subtree (with subtree head) @@ -208,7 +208,7 @@ bool LocHeapNode::checkNodes() { if (mRight) { // check the consistency of right subtree - if (!outRanks(*mRight) || !mRight->checkNodes()) { + if (mRight->outRanks(*this) || !mRight->checkNodes()) { return false; } // subtract the size of right subtree (with subtree head) diff --git a/utils/LocTimer.cpp b/utils/LocTimer.cpp index 53ca700d..0f698c54 100644 --- a/utils/LocTimer.cpp +++ b/utils/LocTimer.cpp @@ -349,8 +349,12 @@ void LocTimerContainer::remove(LocTimerDelegate& timer) { LocMsg(), mTimerContainer(&container), mTimer(&timer) {} inline virtual void proc() const { LocTimerDelegate* priorTop = mTimerContainer->getSoonestTimer(); - if (NULL != ((LocHeap*)mTimerContainer)->remove((LocRankable&)*mTimer)) { - mTimerContainer->updateSoonestTime(priorTop); + // update soonest timer only if mTimer is actually removed from mTimerContainer + // AND mTimer is not priorTop. + if (priorTop == ((LocHeap*)mTimerContainer)->remove((LocRankable&)*mTimer)) { + // if passing in NULL, we tell updateSoonestTime to update kernel with + // the current top timer interval. + mTimerContainer->updateSoonestTime(NULL); } delete mTimer; } From 2f74f91ac103afe7d92f594c6c57049e1829c773 Mon Sep 17 00:00:00 2001 From: Kevin Tang Date: Fri, 11 Sep 2015 19:40:25 -0700 Subject: [PATCH 27/37] Crash fix with MsgTask API change Removed tCreate and tAssociate from MsgTask. LocThread now can optionally take a tCreate method. Associator is replaced with *firstMsg* option to MsgTask, which is a more generic option, that can associate or do other set up job at the create of a MsgTask. The current MsgTask doesn't use tCreate, which exposes a slight time window for Location HAL when its MsgTask is NOT associated to DVM heap but a message delivery to DVM could be attempted during this time. Change-Id: Iafd5b91b693baacb9b7064463f8c44f74026f54c CRs-Fixed: 902350 --- core/LocDualContext.cpp | 76 ++++++---------------- core/LocDualContext.h | 26 ++++---- loc_api/libloc_api_50001/LocEngAdapter.cpp | 6 +- loc_api/libloc_api_50001/LocEngAdapter.h | 2 +- loc_api/libloc_api_50001/loc_eng.cpp | 3 +- utils/LocSharedLock.h | 58 +++++++++++++++++ utils/LocThread.cpp | 50 ++++++++------ utils/LocThread.h | 7 +- utils/LocTimer.cpp | 22 +------ utils/LocTimer.h | 4 +- utils/MsgTask.cpp | 48 +++----------- utils/MsgTask.h | 17 +---- 12 files changed, 151 insertions(+), 168 deletions(-) create mode 100644 utils/LocSharedLock.h diff --git a/core/LocDualContext.cpp b/core/LocDualContext.cpp index d68cb3bc..578421cd 100644 --- a/core/LocDualContext.cpp +++ b/core/LocDualContext.cpp @@ -63,34 +63,28 @@ const char* LocDualContext::mLBSLibName = "liblbs_core.so"; pthread_mutex_t LocDualContext::mGetLocContextMutex = PTHREAD_MUTEX_INITIALIZER; -const MsgTask* LocDualContext::getMsgTask(MsgTask::tCreate tCreator, - const char* name) +const MsgTask* LocDualContext::getMsgTask(LocThread::tCreate tCreator, + const char* name, bool joinable) { if (NULL == mMsgTask) { - mMsgTask = new MsgTask(tCreator, name); + mMsgTask = new MsgTask(tCreator, name, joinable); } return mMsgTask; } -const MsgTask* LocDualContext::getMsgTask(MsgTask::tAssociate tAssociate, - const char* name) -{ - if (NULL == mMsgTask) { - mMsgTask = new MsgTask(tAssociate, name); - } else if (tAssociate) { - mMsgTask->associate(tAssociate); - } - return mMsgTask; +inline +const MsgTask* LocDualContext::getMsgTask(const char* name, bool joinable) { + return getMsgTask((LocThread::tCreate)NULL, name, joinable); } -ContextBase* LocDualContext::getLocFgContext(MsgTask::tCreate tCreator, - const char* name) +ContextBase* LocDualContext::getLocFgContext(LocThread::tCreate tCreator, + LocMsg* firstMsg, const char* name, bool joinable) { pthread_mutex_lock(&LocDualContext::mGetLocContextMutex); LOC_LOGD("%s:%d]: querying ContextBase with tCreator", __func__, __LINE__); if (NULL == mFgContext) { LOC_LOGD("%s:%d]: creating msgTask with tCreator", __func__, __LINE__); - const MsgTask* msgTask = getMsgTask(tCreator, name); + const MsgTask* msgTask = getMsgTask(tCreator, name, joinable); mFgContext = new LocDualContext(msgTask, mFgExclMask); } @@ -100,37 +94,22 @@ ContextBase* LocDualContext::getLocFgContext(MsgTask::tCreate tCreator, injectFeatureConfig(mInjectContext); } pthread_mutex_unlock(&LocDualContext::mGetLocContextMutex); + + if (firstMsg) { + mFgContext->sendMsg(firstMsg); + } + return mFgContext; } -ContextBase* LocDualContext::getLocFgContext(MsgTask::tAssociate tAssociate, - const char* name) -{ - pthread_mutex_lock(&LocDualContext::mGetLocContextMutex); - LOC_LOGD("%s:%d]: querying ContextBase with tAssociate", __func__, __LINE__); - if (NULL == mFgContext) { - LOC_LOGD("%s:%d]: creating msgTask with tAssociate", __func__, __LINE__); - const MsgTask* msgTask = getMsgTask(tAssociate, name); - mFgContext = new LocDualContext(msgTask, - mFgExclMask); - } - if(NULL == mInjectContext) { - LOC_LOGD("%s:%d]: mInjectContext is FgContext", __func__, __LINE__); - mInjectContext = mFgContext; - injectFeatureConfig(mInjectContext); - } - pthread_mutex_unlock(&LocDualContext::mGetLocContextMutex); - return mFgContext; -} - -ContextBase* LocDualContext::getLocBgContext(MsgTask::tCreate tCreator, - const char* name) +ContextBase* LocDualContext::getLocBgContext(LocThread::tCreate tCreator, + LocMsg* firstMsg, const char* name, bool joinable) { pthread_mutex_lock(&LocDualContext::mGetLocContextMutex); LOC_LOGD("%s:%d]: querying ContextBase with tCreator", __func__, __LINE__); if (NULL == mBgContext) { LOC_LOGD("%s:%d]: creating msgTask with tCreator", __func__, __LINE__); - const MsgTask* msgTask = getMsgTask(tCreator, name); + const MsgTask* msgTask = getMsgTask(tCreator, name, joinable); mBgContext = new LocDualContext(msgTask, mBgExclMask); } @@ -140,26 +119,11 @@ ContextBase* LocDualContext::getLocBgContext(MsgTask::tCreate tCreator, injectFeatureConfig(mInjectContext); } pthread_mutex_unlock(&LocDualContext::mGetLocContextMutex); - return mBgContext; -} -ContextBase* LocDualContext::getLocBgContext(MsgTask::tAssociate tAssociate, - const char* name) -{ - pthread_mutex_lock(&LocDualContext::mGetLocContextMutex); - LOC_LOGD("%s:%d]: querying ContextBase with tAssociate", __func__, __LINE__); - if (NULL == mBgContext) { - LOC_LOGD("%s:%d]: creating msgTask with tAssociate", __func__, __LINE__); - const MsgTask* msgTask = getMsgTask(tAssociate, name); - mBgContext = new LocDualContext(msgTask, - mBgExclMask); + if (firstMsg) { + mBgContext->sendMsg(firstMsg); } - if(NULL == mInjectContext) { - LOC_LOGD("%s:%d]: mInjectContext is BgContext", __func__, __LINE__); - mInjectContext = mBgContext; - injectFeatureConfig(mInjectContext); - } - pthread_mutex_unlock(&LocDualContext::mGetLocContextMutex); + return mBgContext; } diff --git a/core/LocDualContext.h b/core/LocDualContext.h index 1e96ea56..ce77a1aa 100644 --- a/core/LocDualContext.h +++ b/core/LocDualContext.h @@ -41,10 +41,9 @@ class LocDualContext : public ContextBase { static ContextBase* mFgContext; static ContextBase* mBgContext; static ContextBase* mInjectContext; - static const MsgTask* getMsgTask(MsgTask::tCreate tCreator, - const char* name); - static const MsgTask* getMsgTask(MsgTask::tAssociate tAssociate, - const char* name); + static const MsgTask* getMsgTask(LocThread::tCreate tCreator, + const char* name, bool joinable = true); + static const MsgTask* getMsgTask(const char* name, bool joinable = true); static pthread_mutex_t mGetLocContextMutex; protected: @@ -58,14 +57,17 @@ public: static const LOC_API_ADAPTER_EVENT_MASK_T mBgExclMask; static const char* mLocationHalName; - static ContextBase* getLocFgContext(MsgTask::tCreate tCreator, - const char* name); - static ContextBase* getLocFgContext(MsgTask::tAssociate tAssociate, - const char* name); - static ContextBase* getLocBgContext(MsgTask::tCreate tCreator, - const char* name); - static ContextBase* getLocBgContext(MsgTask::tAssociate tAssociate, - const char* name); + static ContextBase* getLocFgContext(LocThread::tCreate tCreator, LocMsg* firstMsg, + const char* name, bool joinable = true); + inline static ContextBase* getLocFgContext(const char* name, bool joinable = true) { + return getLocFgContext(NULL, NULL, name, joinable); + } + static ContextBase* getLocBgContext(LocThread::tCreate tCreator, LocMsg* firstMsg, + const char* name, bool joinable = true); + inline static ContextBase* getLocBgContext(const char* name, bool joinable = true) { + return getLocBgContext(NULL, NULL, name, joinable); + } + static void injectFeatureConfig(ContextBase *context); }; diff --git a/loc_api/libloc_api_50001/LocEngAdapter.cpp b/loc_api/libloc_api_50001/LocEngAdapter.cpp index d1b8f8fc..a092fbe8 100644 --- a/loc_api/libloc_api_50001/LocEngAdapter.cpp +++ b/loc_api/libloc_api_50001/LocEngAdapter.cpp @@ -55,13 +55,15 @@ void LocInternalAdapter::getZppInt() { LocEngAdapter::LocEngAdapter(LOC_API_ADAPTER_EVENT_MASK_T mask, void* owner, ContextBase* context, - MsgTask::tCreate tCreator) : + LocThread::tCreate tCreator) : LocAdapterBase(mask, //Get the AFW context if VzW context has not already been intialized in //loc_ext context == NULL? LocDualContext::getLocFgContext(tCreator, - LocDualContext::mLocationHalName) + NULL, + LocDualContext::mLocationHalName, + false) :context), mOwner(owner), mInternalAdapter(new LocInternalAdapter(this)), mUlp(new UlpProxyBase()), mNavigating(false), diff --git a/loc_api/libloc_api_50001/LocEngAdapter.h b/loc_api/libloc_api_50001/LocEngAdapter.h index e1d8f098..5eff6f36 100644 --- a/loc_api/libloc_api_50001/LocEngAdapter.h +++ b/loc_api/libloc_api_50001/LocEngAdapter.h @@ -88,7 +88,7 @@ public: LocEngAdapter(LOC_API_ADAPTER_EVENT_MASK_T mask, void* owner, ContextBase* context, - MsgTask::tCreate tCreator); + LocThread::tCreate tCreator); virtual ~LocEngAdapter(); virtual void setUlpProxy(UlpProxyBase* ulp); diff --git a/loc_api/libloc_api_50001/loc_eng.cpp b/loc_api/libloc_api_50001/loc_eng.cpp index 917c2ae2..258db3e9 100644 --- a/loc_api/libloc_api_50001/loc_eng.cpp +++ b/loc_api/libloc_api_50001/loc_eng.cpp @@ -223,7 +223,6 @@ static void* noProc(void* data) return NULL; } - /********************************************************************* * definitions of the static messages used in the file *********************************************************************/ @@ -1768,7 +1767,7 @@ int loc_eng_init(loc_eng_data_s_type &loc_eng_data, LocCallbacks* callbacks, loc_eng_data.adapter = new LocEngAdapter(event, &loc_eng_data, context, - (MsgTask::tCreate)callbacks->create_thread_cb); + (LocThread::tCreate)callbacks->create_thread_cb); LOC_LOGD("loc_eng_init created client, id = %p\n", loc_eng_data.adapter); diff --git a/utils/LocSharedLock.h b/utils/LocSharedLock.h new file mode 100644 index 00000000..6b9e27f1 --- /dev/null +++ b/utils/LocSharedLock.h @@ -0,0 +1,58 @@ +/* Copyright (c) 2015, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation, nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ +#ifndef __LOC_SHARED_LOCK__ +#define __LOC_SHARED_LOCK__ + +#include +#include + +// This is a utility created for use cases such that there are more than +// one client who need to share the same lock, but it is not predictable +// which of these clients is to last to go away. This shared lock deletes +// itself when the last client calls its drop() method. To add a cient, +// this share lock's share() method has to be called, so that the obj +// can maintain an accurate client count. +class LocSharedLock { + uint32_t mRef; + pthread_mutex_t mMutex; + inline ~LocSharedLock() { pthread_mutex_destroy(&mMutex); } +public: + // first client to create this LockSharedLock + inline LocSharedLock() : mRef(1) { pthread_mutex_init(&mMutex, NULL); } + // following client(s) are to *share()* this lock created by the first client + inline LocSharedLock* share() { mRef++; return this; } + // whe a client no longer needs this shared lock, drop() shall be called. + inline void drop() { if (0 == --mRef) delete this; } + // locking the lock to enter critical section + inline void lock() { pthread_mutex_lock(&mMutex); } + // unlocking the lock to leave the critical section + inline void unlock() { pthread_mutex_unlock(&mMutex); } +}; + +#endif //__LOC_SHARED_LOCK__ diff --git a/utils/LocThread.cpp b/utils/LocThread.cpp index ec1e0719..19bf101a 100644 --- a/utils/LocThread.cpp +++ b/utils/LocThread.cpp @@ -37,12 +37,12 @@ class LocThreadDelegate { pthread_mutex_t mMutex; int mRefCount; ~LocThreadDelegate(); - LocThreadDelegate(const char* threadName, + LocThreadDelegate(LocThread::tCreate creator, const char* threadName, LocRunnable* runnable, bool joinable); void destroy(); public: - static LocThreadDelegate* create(const char* threadName, - LocRunnable* runnable, bool joinable); + static LocThreadDelegate* create(LocThread::tCreate creator, + const char* threadName, LocRunnable* runnable, bool joinable); void stop(); // bye() is for the parent thread to go away. if joinable, // parent must stop the spawned thread, join, and then @@ -62,19 +62,28 @@ public: // However, upon pthread_create failure, the data members // must be set to indicate failure, e.g. mRunnable, and // threashold approprietly for destroy(), e.g. mRefCount. -LocThreadDelegate::LocThreadDelegate(const char* threadName, - LocRunnable* runnable, bool joinable) : - mRunnable(runnable), mJoinable(joinable), +LocThreadDelegate::LocThreadDelegate(LocThread::tCreate creator, + const char* threadName, LocRunnable* runnable, bool joinable) : + mRunnable(runnable), mJoinable(joinable), mThandle(NULL), mMutex(PTHREAD_MUTEX_INITIALIZER), mRefCount(2) { + + // set up thread name, if nothing is passed in + if (!threadName) { + threadName = "LocThread"; + } + // create the thread here, then if successful // and a name is given, we set the thread name - if (!pthread_create(&mThandle, NULL, threadMain, this)) { + if (creator) { + mThandle = creator(threadName, threadMain, this); + } else if (pthread_create(&mThandle, NULL, threadMain, this)) { + // pthread_create() failed + mThandle = NULL; + } + + if (mThandle) { // set thread name char lname[16]; - const char* defaultName = "LocThread"; - if (!threadName) { - threadName = defaultName; - } int len = sizeof(lname) - 1; memcpy(lname, threadName, len); lname[len] = 0; @@ -99,11 +108,11 @@ LocThreadDelegate::~LocThreadDelegate() { } // factory method so that we could return NULL upon failure -LocThreadDelegate* LocThreadDelegate::create(const char* threadName, - LocRunnable* runnable, bool joinable) { +LocThreadDelegate* LocThreadDelegate::create(LocThread::tCreate creator, + const char* threadName, LocRunnable* runnable, bool joinable) { LocThreadDelegate* thread = NULL; if (runnable) { - thread = new LocThreadDelegate(threadName, runnable, joinable); + thread = new LocThreadDelegate(creator, threadName, runnable, joinable); if (thread && !thread->isRunning()) { thread->destroy(); thread = NULL; @@ -199,11 +208,14 @@ LocThread::~LocThread() { } } -bool LocThread::start(const char* threadName, LocRunnable* runnable, bool joinable) { - mThread = LocThreadDelegate::create(threadName, runnable, joinable); - - // true only if thread is created successfully - return (NULL != mThread); +bool LocThread::start(tCreate creator, const char* threadName, LocRunnable* runnable, bool joinable) { + bool success = false; + if (!mThread) { + mThread = LocThreadDelegate::create(creator, threadName, runnable, joinable); + // true only if thread is created successfully + success = (NULL != mThread); + } + return success; } void LocThread::stop() { diff --git a/utils/LocThread.h b/utils/LocThread.h index 490d3099..2a65d8fa 100644 --- a/utils/LocThread.h +++ b/utils/LocThread.h @@ -30,6 +30,7 @@ #define __LOC_THREAD__ #include +#include // abstract class to be implemented by client to provide a runnable class // which gets scheduled by LocThread @@ -64,6 +65,7 @@ public: inline LocThread() : mThread(NULL) {} virtual ~LocThread(); + typedef pthread_t (*tCreate)(const char* name, void* (*start)(void*), void* arg); // client starts thread with a runnable, which implements // the logics to fun in the created thread context. // The thread could be either joinable or detached. @@ -74,7 +76,10 @@ public: // returns true. Else it is client's responsibility // to delete the object // Returns 0 if success; false if failure. - bool start(const char* threadName, LocRunnable* runnable, bool joinable = true); + bool start(tCreate creator, const char* threadName, LocRunnable* runnable, bool joinable = true); + inline bool start(const char* threadName, LocRunnable* runnable, bool joinable = true) { + return start(NULL, threadName, runnable, joinable); + } // NOTE: if this is a joinable thread, this stop may block // for a while until the thread is joined. diff --git a/utils/LocTimer.cpp b/utils/LocTimer.cpp index 0f698c54..c992e7c2 100644 --- a/utils/LocTimer.cpp +++ b/utils/LocTimer.cpp @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #ifdef __HOST_UNIT_TEST__ @@ -46,22 +46,6 @@ #define CLOCK_BOOTTIME_ALARM CLOCK_MONOTONIC #endif -using namespace loc_core; - -// a shared lock until, place it here for now. -class LocUtilSharedLock { - uint32_t mRef; - pthread_mutex_t mMutex; - inline ~LocUtilSharedLock() { pthread_mutex_destroy(&mMutex); } -public: - inline LocUtilSharedLock() : mRef(1) { pthread_mutex_init(&mMutex, NULL); } - inline LocUtilSharedLock* share() { mRef++; return this; } - inline void drop() { if (0 == --mRef) delete this; } - inline void lock() { pthread_mutex_lock(&mMutex); } - inline void unlock() { pthread_mutex_unlock(&mMutex); } -}; - - /* There are implementations of 5 classes in this file: LocTimer, LocTimerDelegate, LocTimerContainer, LocTimerPollTask, LocTimerWrapper @@ -191,7 +175,7 @@ class LocTimerDelegate : public LocRankable { friend class LocTimerContainer; friend class LocTimer; LocTimer* mClient; - LocUtilSharedLock* mLock; + LocSharedLock* mLock; struct timespec mFutureTime; LocTimerContainer* mContainer; // not a complete obj, just ctor for LocRankable comparisons @@ -548,7 +532,7 @@ void LocTimerDelegate::expire() { /***************************LocTimer methods***************************/ -LocTimer::LocTimer() : mTimer(NULL), mLock(new LocUtilSharedLock()) { +LocTimer::LocTimer() : mTimer(NULL), mLock(new LocSharedLock()) { } LocTimer::~LocTimer() { diff --git a/utils/LocTimer.h b/utils/LocTimer.h index 9606fe53..c1468524 100644 --- a/utils/LocTimer.h +++ b/utils/LocTimer.h @@ -35,14 +35,14 @@ // opaque class to provide service implementation. class LocTimerDelegate; -class LocUtilSharedLock; +class LocSharedLock; // LocTimer client must extend this class and implementthe callback. // start() / stop() methods are to arm / disarm timer. class LocTimer { LocTimerDelegate* mTimer; - LocUtilSharedLock* mLock; + LocSharedLock* mLock; // don't really want mLock to be manipulated by clients, yet LocTimer // has to have a reference to the lock so that the delete of LocTimer // and LocTimerDelegate can work together on their share resources. diff --git a/utils/MsgTask.cpp b/utils/MsgTask.cpp index 8b645dd5..fdb11026 100644 --- a/utils/MsgTask.cpp +++ b/utils/MsgTask.cpp @@ -36,12 +36,19 @@ #include #include -namespace loc_core { - static void LocMsgDestroy(void* msg) { delete (LocMsg*)msg; } +MsgTask::MsgTask(LocThread::tCreate tCreator, + const char* threadName, bool joinable) : + mQ(msg_q_init2()), mThread(new LocThread()) { + if (!mThread->start(tCreator, threadName, this, joinable)) { + delete mThread; + mThread = NULL; + } +} + MsgTask::MsgTask(const char* threadName, bool joinable) : mQ(msg_q_init2()), mThread(new LocThread()) { if (!mThread->start(threadName, this, joinable)) { @@ -93,40 +100,3 @@ bool MsgTask::run() { return true; } - -// TODO: remove the below in the next patch -void MsgTask::associate(tAssociate tAssociator) const { - struct LocAssociateMsg : public LocMsg { - tAssociate mAssociator; - LocAssociateMsg(tAssociate associator) : - mAssociator(associator) {} - inline virtual void proc() const { - static bool sAssociated = false; - if (!sAssociated) { - sAssociated = true; - mAssociator(); - } - } - }; - sendMsg(new LocAssociateMsg(tAssociator)); -} - -MsgTask::MsgTask(tCreate tCreator, const char* threadName) : - mQ(msg_q_init2()), mThread(new LocThread()) { - if (!mThread->start(threadName, this, false)) { - delete mThread; - mThread = NULL; - } -} - -MsgTask::MsgTask(tAssociate tAssociator, const char* threadName) : - mQ(msg_q_init2()), mThread(new LocThread()) { - if (!mThread->start(threadName, this, false)) { - delete mThread; - mThread = NULL; - } else { - associate(tAssociator); - } -} - -} // namespace loc_core diff --git a/utils/MsgTask.h b/utils/MsgTask.h index c397ee10..9eb1f567 100644 --- a/utils/MsgTask.h +++ b/utils/MsgTask.h @@ -30,10 +30,6 @@ #define __MSG_TASK__ #include -// TODO: remove this include in the next patch -#include - -namespace loc_core { struct LocMsg { inline LocMsg() {} @@ -42,13 +38,14 @@ struct LocMsg { inline virtual void log() const {} }; -class MsgTask : public LocRunnable{ +class MsgTask : public LocRunnable { const void* mQ; LocThread* mThread; friend class LocThreadDelegate; protected: virtual ~MsgTask(); public: + MsgTask(LocThread::tCreate tCreator, const char* threadName = NULL, bool joinable = true); MsgTask(const char* threadName = NULL, bool joinable = true); // this obj will be deleted once thread is deleted void destroy(); @@ -65,16 +62,6 @@ public: // The method to be run after thread loop (conditionally repeatedly) // calls run() inline virtual void postrun() {} - - // TODO: remove the below in the next patch - typedef void* (*tStart)(void*); - typedef pthread_t (*tCreate)(const char* name, tStart start, void* arg); - typedef int (*tAssociate)(); - MsgTask(tCreate tCreator, const char* threadName); - MsgTask(tAssociate tAssociator, const char* threadName); - void associate(tAssociate tAssociator) const; }; -} // namespace loc_core - #endif //__MSG_TASK__ From 67d576b55aff644414806c4d25964515c0a604b2 Mon Sep 17 00:00:00 2001 From: Kevin Tang Date: Fri, 25 Sep 2015 15:57:45 -0700 Subject: [PATCH 28/37] another potential race condition LocTimer on timeout would currently delete timer delegate. This meddles into the management of LocTimer::stop() call, and the order of obj delete needs to be synchronized in a few different places as a result. This change lets the delete of the timer delegate obj fold into the stop() handling, which would be easier to synch. Change-Id: Ic3e0b3d183dceb9e6e2db4c47ec9d6e296b0c3f6 CRs-Fixed: 916590 --- utils/LocTimer.cpp | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/utils/LocTimer.cpp b/utils/LocTimer.cpp index c992e7c2..70904b2a 100644 --- a/utils/LocTimer.cpp +++ b/utils/LocTimer.cpp @@ -333,13 +333,15 @@ void LocTimerContainer::remove(LocTimerDelegate& timer) { LocMsg(), mTimerContainer(&container), mTimer(&timer) {} inline virtual void proc() const { LocTimerDelegate* priorTop = mTimerContainer->getSoonestTimer(); - // update soonest timer only if mTimer is actually removed from mTimerContainer - // AND mTimer is not priorTop. + + // update soonest timer only if mTimer is actually removed from + // mTimerContainer AND mTimer is not priorTop. if (priorTop == ((LocHeap*)mTimerContainer)->remove((LocRankable&)*mTimer)) { - // if passing in NULL, we tell updateSoonestTime to update kernel with - // the current top timer interval. + // if passing in NULL, we tell updateSoonestTime to update + // kernel with the current top timer interval. mTimerContainer->updateSoonestTime(NULL); } + // all timers are deleted here, and only here. delete mTimer; } }; @@ -367,7 +369,6 @@ void LocTimerContainer::expire() { timer = mTimerContainer->popIfOutRanks(timerOfNow)) { // the timer delegate obj will be deleted before the return of this call timer->expire(); - delete timer; } mTimerContainer->updateSoonestTime(NULL); } @@ -493,9 +494,10 @@ void LocTimerDelegate::destroyLocked() { if (container) { container->remove(*this); } - } // else we do not do anything, as *this* will be deleted either - // after it expires or stop is first called (if case above), - // where container->remove() will have it deleted. + } // else we do not do anything. No such *this* can be + // created and reached here with mContainer ever been + // a non NULL. So *this* must have reached the if clause + // once, and we want it reach there only once. } int LocTimerDelegate::ranks(LocRankable& rankable) { @@ -511,17 +513,11 @@ int LocTimerDelegate::ranks(LocRankable& rankable) { inline void LocTimerDelegate::expire() { - mLock->lock(); // keeping a copy of client pointer to be safe // when timeOutCallback() is called at the end of this - // method, this obj is already deleted. + // method, *this* obj may be already deleted. LocTimer* client = mClient; - // this obj is already removed from mContainer. - // NULL it here so that dtor won't try to call remove again - mContainer = NULL; - mClient = NULL; - mLock->unlock(); - // force a stop, which will force a delete of this obj + // force a stop, which will lead to delete of this obj if (client && client->stop()) { // calling client callback with a pointer save on the stack // only if stop() returns true, i.e. it hasn't been stopped @@ -545,6 +541,7 @@ LocTimer::~LocTimer() { bool LocTimer::start(unsigned int timeOutInMs, bool wakeOnExpire) { bool success = false; + mLock->lock(); if (!mTimer) { struct timespec futureTime; clock_gettime(CLOCK_BOOTTIME, &futureTime); @@ -558,21 +555,22 @@ bool LocTimer::start(unsigned int timeOutInMs, bool wakeOnExpire) { // if mTimer is non 0, success should be 0; or vice versa success = (NULL != mTimer); } + mLock->unlock(); return success; } bool LocTimer::stop() { bool success = false; + mLock->lock(); if (mTimer) { - mLock->lock(); LocTimerDelegate* timer = mTimer; mTimer = NULL; if (timer) { timer->destroyLocked(); success = true; } - mLock->unlock(); } + mLock->unlock(); return success; } From fd7b78112e4fef25c3d6c0a0c189baea4c5704c7 Mon Sep 17 00:00:00 2001 From: Vamana Murthi Date: Mon, 23 Nov 2015 19:46:50 +0530 Subject: [PATCH 29/37] gps: enable measurement/poly reports only when AP DR enabled GNSS Measurements and Polynomial reports need to be enabled only when AP DR (EXTERNAL_DR_ENABLED=1) is enabled in gps.conf Change-Id: I13437d997e96a6403923d49f62f1e7c2f70e9c04 CRs-Fixed: 937944 --- loc_api/libloc_api_50001/loc.cpp | 6 ++++-- loc_api/libloc_api_50001/loc_eng.cpp | 1 + loc_api/libloc_api_50001/loc_eng.h | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/loc_api/libloc_api_50001/loc.cpp b/loc_api/libloc_api_50001/loc.cpp index ed9ff9b9..50110bbc 100644 --- a/loc_api/libloc_api_50001/loc.cpp +++ b/loc_api/libloc_api_50001/loc.cpp @@ -294,8 +294,10 @@ static int loc_init(GpsCallbacks* callbacks) target = loc_get_target(); - /*For "auto" platform enable Measurement report and SV Polynomial report*/ - if(GNSS_AUTO == getTargetGnssType(target)) + /* If platform is "auto" and external dr enabled then enable + ** Measurement report and SV Polynomial report + */ + if((1 == gps_conf.EXTERNAL_DR_ENABLED) && (GNSS_AUTO == getTargetGnssType(target))) { event |= LOC_API_ADAPTER_BIT_GNSS_MEASUREMENT_REPORT | LOC_API_ADAPTER_BIT_GNSS_SV_POLYNOMIAL_REPORT; diff --git a/loc_api/libloc_api_50001/loc_eng.cpp b/loc_api/libloc_api_50001/loc_eng.cpp index 258db3e9..7114a9d7 100644 --- a/loc_api/libloc_api_50001/loc_eng.cpp +++ b/loc_api/libloc_api_50001/loc_eng.cpp @@ -111,6 +111,7 @@ static loc_param_s_type gps_conf_table[] = {"XTRA_SERVER_2", &gps_conf.XTRA_SERVER_2, NULL, 's'}, {"XTRA_SERVER_3", &gps_conf.XTRA_SERVER_3, NULL, 's'}, {"USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL", &gps_conf.USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL, NULL, 'n'}, + {"EXTERNAL_DR_ENABLED", &gps_conf.EXTERNAL_DR_ENABLED, NULL, 'n'}, }; static loc_param_s_type sap_conf_table[] = diff --git a/loc_api/libloc_api_50001/loc_eng.h b/loc_api/libloc_api_50001/loc_eng.h index a203e6bb..23f93762 100644 --- a/loc_api/libloc_api_50001/loc_eng.h +++ b/loc_api/libloc_api_50001/loc_eng.h @@ -160,6 +160,7 @@ typedef struct loc_gps_cfg_s uint32_t GPS_LOCK; uint32_t A_GLONASS_POS_PROTOCOL_SELECT; uint32_t AGPS_CERT_WRITABLE_MASK; + uint32_t EXTERNAL_DR_ENABLED; } loc_gps_cfg_s_type; /* NOTE: the implementaiton of the parser casts number From 29a9152e50e2c14aa2072faaf68b56b862fe2212 Mon Sep 17 00:00:00 2001 From: Dante Russo Date: Mon, 3 Aug 2015 18:50:42 -0700 Subject: [PATCH 30/37] NMEA generation change to prevent 2Hz reporting GPGGA/GPRMC/GPGSA can be reported two times per second in some cases where we lose all satellite signals. We should report these NMEA sentences only from position report to prevent this. CRs-fixed: 884484 Change-Id: I123d9f074ca725703c6e90397160b701033e22f0 --- loc_api/libloc_api_50001/loc_eng.cpp | 5 +-- loc_api/libloc_api_50001/loc_eng_nmea.cpp | 54 +++++++---------------- 2 files changed, 16 insertions(+), 43 deletions(-) diff --git a/loc_api/libloc_api_50001/loc_eng.cpp b/loc_api/libloc_api_50001/loc_eng.cpp index 7114a9d7..cd6cbf96 100644 --- a/loc_api/libloc_api_50001/loc_eng.cpp +++ b/loc_api/libloc_api_50001/loc_eng.cpp @@ -793,10 +793,7 @@ void LocEngReportPosition::proc() const { } if (locEng->generateNmea && - mLocation.position_source == ULP_LOCATION_IS_FROM_GNSS && - mTechMask & (LOC_POS_TECH_MASK_SATELLITE | - LOC_POS_TECH_MASK_SENSORS | - LOC_POS_TECH_MASK_HYBRID)) + locEng->adapter->isInSession()) { unsigned char generate_nmea = reported && (mStatus != LOC_SESS_FAILURE); diff --git a/loc_api/libloc_api_50001/loc_eng_nmea.cpp b/loc_api/libloc_api_50001/loc_eng_nmea.cpp index 7bc58bd0..126a97f0 100644 --- a/loc_api/libloc_api_50001/loc_eng_nmea.cpp +++ b/loc_api/libloc_api_50001/loc_eng_nmea.cpp @@ -790,48 +790,24 @@ void loc_eng_nmea_generate_sv(loc_eng_data_s_type *loc_eng_data_p, }//if - if (svStatus.gps_used_in_fix_mask == 0 && - svStatus.glo_used_in_fix_mask == 0 && - svStatus.bds_used_in_fix_mask == 0) - { // No sv used, so there will be no position report, so send - // blank NMEA sentences - strlcpy(sentence, "$GPGSA,A,1,,,,,,,,,,,,,,,", sizeof(sentence)); - length = loc_eng_nmea_put_checksum(sentence, sizeof(sentence)); - loc_eng_nmea_send(sentence, length, loc_eng_data_p); + // cache the used in fix mask, as it will be needed to send $GPGSA + // during the position report + loc_eng_data_p->sv_used_mask = svStatus.gps_used_in_fix_mask; - strlcpy(sentence, "$GPVTG,,T,,M,,N,,K,N", sizeof(sentence)); - length = loc_eng_nmea_put_checksum(sentence, sizeof(sentence)); - loc_eng_nmea_send(sentence, length, loc_eng_data_p); - - strlcpy(sentence, "$GPRMC,,V,,,,,,,,,,N", sizeof(sentence)); - length = loc_eng_nmea_put_checksum(sentence, sizeof(sentence)); - loc_eng_nmea_send(sentence, length, loc_eng_data_p); - - strlcpy(sentence, "$GPGGA,,,,,,0,,,,,,,,", sizeof(sentence)); - length = loc_eng_nmea_put_checksum(sentence, sizeof(sentence)); - loc_eng_nmea_send(sentence, length, loc_eng_data_p); + // For RPC, the DOP are sent during sv report, so cache them + // now to be sent during position report. + // For QMI, the DOP will be in position report. + if (locationExtended.flags & GPS_LOCATION_EXTENDED_HAS_DOP) + { + loc_eng_data_p->pdop = locationExtended.pdop; + loc_eng_data_p->hdop = locationExtended.hdop; + loc_eng_data_p->vdop = locationExtended.vdop; } else - { // cache the used in fix mask, as it will be needed to send $GPGSA - // during the position report - loc_eng_data_p->sv_used_mask = svStatus.gps_used_in_fix_mask; - - // For RPC, the DOP are sent during sv report, so cache them - // now to be sent during position report. - // For QMI, the DOP will be in position report. - if (locationExtended.flags & GPS_LOCATION_EXTENDED_HAS_DOP) - { - loc_eng_data_p->pdop = locationExtended.pdop; - loc_eng_data_p->hdop = locationExtended.hdop; - loc_eng_data_p->vdop = locationExtended.vdop; - } - else - { - loc_eng_data_p->pdop = 0; - loc_eng_data_p->hdop = 0; - loc_eng_data_p->vdop = 0; - } - + { + loc_eng_data_p->pdop = 0; + loc_eng_data_p->hdop = 0; + loc_eng_data_p->vdop = 0; } EXIT_LOG(%d, 0); From 05ee1cc69d7829384efd5b811f9ad6c1f5a369a4 Mon Sep 17 00:00:00 2001 From: "ethan.kim" Date: Fri, 26 Jun 2015 16:33:29 -0700 Subject: [PATCH 31/37] Set SUPL_ES to 0 in gps.conf Disabled checking for emergency to accept SUPL CRs-fixed: 860504 Change-Id: Iad1605242daf8fa1d6bcce3e69caff7811d9843a --- etc/gps.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/gps.conf b/etc/gps.conf index 9c9e5e92..0df940d2 100644 --- a/etc/gps.conf +++ b/etc/gps.conf @@ -44,7 +44,7 @@ INTERMEDIATE_POS=0 SUPL_VER=0x10000 # Emergency SUPL, 1=enable, 0=disable -SUPL_ES=1 +SUPL_ES=0 #Choose PDN for Emergency SUPL #1 - Use emergency PDN From f96e5dca060e07f9bf6d259c13dc432ef68487e6 Mon Sep 17 00:00:00 2001 From: Ashish Dhiman Date: Thu, 7 Jan 2016 12:13:08 +0530 Subject: [PATCH 32/37] gps: add SV polynomial parameter enhancedIOD parameter in QMI needs to be added to HLOS driver structures, and appropriate fix in structure members Change-Id: If89de03ff69fabb3d57a7b7dafe957eb73302794 --- core/gps_extended_c.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/gps_extended_c.h b/core/gps_extended_c.h index 04fab59b..a55df3e4 100644 --- a/core/gps_extended_c.h +++ b/core/gps_extended_c.h @@ -531,6 +531,7 @@ enum ulp_gnss_sv_poly_valid_flags{ ULP_GNSS_SV_POLY_ELEVATIONDOT, ULP_GNSS_SV_POLY_ELEVATIONUNC, ULP_GNSS_SV_POLY_VELO_COEFF, + ULP_GNSS_SV_POLY_ENHANCED_IOD, ULP_GNSS_SV_POLY_VALID_FLAGS @@ -553,6 +554,7 @@ enum ulp_gnss_sv_poly_valid_flags{ #define ULP_GNSS_SV_POLY_BIT_ELEVATIONDOT (1< Date: Wed, 10 Feb 2016 16:15:03 +0530 Subject: [PATCH 33/37] fix for compiler warnings Change-Id: I838bfa2c66e77381be483c65b2b3bd68008a25b1 CRs-Fixed: 974489 --- utils/LocThread.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/LocThread.cpp b/utils/LocThread.cpp index 19bf101a..5c340343 100644 --- a/utils/LocThread.cpp +++ b/utils/LocThread.cpp @@ -84,7 +84,8 @@ LocThreadDelegate::LocThreadDelegate(LocThread::tCreate creator, if (mThandle) { // set thread name char lname[16]; - int len = sizeof(lname) - 1; + int len = (sizeof(lname)>sizeof(threadName)) ? + (sizeof(threadName) -1):(sizeof(lname) - 1); memcpy(lname, threadName, len); lname[len] = 0; // set the thread name here From 02cad4d9819e07f5827a583ea5fdd2d4b5fa7070 Mon Sep 17 00:00:00 2001 From: Kevin Tang Date: Thu, 11 Feb 2016 14:50:58 -0800 Subject: [PATCH 34/37] make LocSharedLock::mRef ops atomic The current share() and drop() calls are not thread safe, which can cause memory heap correuption. This changes the read / write ops to be atomic. Change-Id: Ic241d4573bdf2e58c4e264e97bd41b56f882c791 CRs-Fixed: 975372 --- utils/LocSharedLock.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/utils/LocSharedLock.h b/utils/LocSharedLock.h index 6b9e27f1..7fe62376 100644 --- a/utils/LocSharedLock.h +++ b/utils/LocSharedLock.h @@ -30,6 +30,7 @@ #define __LOC_SHARED_LOCK__ #include +#include #include // This is a utility created for use cases such that there are more than @@ -39,16 +40,16 @@ // this share lock's share() method has to be called, so that the obj // can maintain an accurate client count. class LocSharedLock { - uint32_t mRef; + volatile int32_t mRef; pthread_mutex_t mMutex; inline ~LocSharedLock() { pthread_mutex_destroy(&mMutex); } public: // first client to create this LockSharedLock inline LocSharedLock() : mRef(1) { pthread_mutex_init(&mMutex, NULL); } // following client(s) are to *share()* this lock created by the first client - inline LocSharedLock* share() { mRef++; return this; } + inline LocSharedLock* share() { android_atomic_inc(&mRef); return this; } // whe a client no longer needs this shared lock, drop() shall be called. - inline void drop() { if (0 == --mRef) delete this; } + inline void drop() { if (1 == android_atomic_dec(&mRef)) delete this; } // locking the lock to enter critical section inline void lock() { pthread_mutex_lock(&mMutex); } // unlocking the lock to leave the critical section From e83eaa3a9a1dfb353a097541f5e8e9e0b68b5f4d Mon Sep 17 00:00:00 2001 From: Saurabh Srivastava Date: Fri, 4 Mar 2016 15:12:35 +0530 Subject: [PATCH 35/37] Adding a new NMEA sentence : $GNGSA. Currently only $GPGSA was being generated for GPS satellites. This change adds $GNGSA for GLONASS satellites as well. Change-Id: I7ab0e92c7ed4ce73be11909eefe0d570a1a0fc1e CRs-Fixed: 978745 --- loc_api/libloc_api_50001/loc_eng.h | 3 +- loc_api/libloc_api_50001/loc_eng_nmea.cpp | 112 +++++++++++++++++++++- 2 files changed, 110 insertions(+), 5 deletions(-) diff --git a/loc_api/libloc_api_50001/loc_eng.h b/loc_api/libloc_api_50001/loc_eng.h index 23f93762..46735c9e 100644 --- a/loc_api/libloc_api_50001/loc_eng.h +++ b/loc_api/libloc_api_50001/loc_eng.h @@ -119,7 +119,8 @@ typedef struct loc_eng_data_s // For nmea generation boolean generateNmea; - uint32_t sv_used_mask; + uint32_t gps_used_mask; + uint32_t glo_used_mask; float hdop; float pdop; float vdop; diff --git a/loc_api/libloc_api_50001/loc_eng_nmea.cpp b/loc_api/libloc_api_50001/loc_eng_nmea.cpp index 126a97f0..70085dc4 100644 --- a/loc_api/libloc_api_50001/loc_eng_nmea.cpp +++ b/loc_api/libloc_api_50001/loc_eng_nmea.cpp @@ -102,6 +102,12 @@ FUNCTION loc_eng_nmea_generate_pos DESCRIPTION Generate NMEA sentences generated based on position report + Currently below sentences are generated within this function: + - $GPGSA : GPS DOP and active SVs + - $GNGSA : GLONASS DOP and active SVs + - $GPVTG : Track made good and ground speed + - $GPRMC : Recommended minimum navigation information + - $GPGGA : Time, position and fix related data DEPENDENCIES NONE @@ -144,7 +150,7 @@ void loc_eng_nmea_generate_pos(loc_eng_data_s_type *loc_eng_data_p, uint32_t svUsedCount = 0; uint32_t svUsedList[32] = {0}; - uint32_t mask = loc_eng_data_p->sv_used_mask; + uint32_t mask = loc_eng_data_p->gps_used_mask; for (uint8_t i = 1; mask > 0 && svUsedCount < 32; i++) { if (mask & 1) @@ -152,7 +158,7 @@ void loc_eng_nmea_generate_pos(loc_eng_data_s_type *loc_eng_data_p, mask = mask >> 1; } // clear the cache so they can't be used again - loc_eng_data_p->sv_used_mask = 0; + loc_eng_data_p->gps_used_mask = 0; char fixType; if (svUsedCount == 0) @@ -210,6 +216,99 @@ void loc_eng_nmea_generate_pos(loc_eng_data_s_type *loc_eng_data_p, length = loc_eng_nmea_put_checksum(sentence, sizeof(sentence)); loc_eng_nmea_send(sentence, length, loc_eng_data_p); + // ------------------ + // ------$GNGSA------ + // ------------------ + uint32_t gloUsedCount = 0; + uint32_t gloUsedList[32] = {0}; + + // Reset locals for GNGSA sentence generation + pMarker = sentence; + lengthRemaining = sizeof(sentence); + mask = loc_eng_data_p->glo_used_mask; + fixType = '\0'; + + // Parse the glonass sv mask, and fetch glo sv ids + // Mask corresponds to the offset. + // GLONASS SV ids are from 65-96 + const int GLONASS_SV_ID_OFFSET = 64; + for (uint8_t i = 1; mask > 0 && gloUsedCount < 32; i++) + { + if (mask & 1) + gloUsedList[gloUsedCount++] = i + GLONASS_SV_ID_OFFSET; + mask = mask >> 1; + } + // clear the cache so they can't be used again + loc_eng_data_p->glo_used_mask = 0; + + if (gloUsedCount == 0) + fixType = '1'; // no fix + else if (gloUsedCount <= 3) + fixType = '2'; // 2D fix + else + fixType = '3'; // 3D fix + + // Start printing the sentence + // Format: $--GSA,a,x,xx,xx,xx,xx,xx,xx,xx,xx,xx,xx,xx,xx,p.p,h.h,v.v*cc + // GNGSA : for glonass SVs + // a : Mode : A : Automatic, allowed to automatically switch 2D/3D + // x : Fixtype : 1 (no fix), 2 (2D fix), 3 (3D fix) + // xx : 12 SV ID + // p.p : Position DOP (Dilution of Precision) + // h.h : Horizontal DOP + // v.v : Vertical DOP + // cc : Checksum value + length = snprintf(pMarker, lengthRemaining, "$GNGSA,A,%c,", fixType); + + if (length < 0 || length >= lengthRemaining) + { + LOC_LOGE("NMEA Error in string formatting"); + return; + } + pMarker += length; + lengthRemaining -= length; + + // Add first 12 GLONASS satellite IDs + for (uint8_t i = 0; i < 12; i++) + { + if (i < gloUsedCount) + length = snprintf(pMarker, lengthRemaining, "%02d,", gloUsedList[i]); + else + length = snprintf(pMarker, lengthRemaining, ","); + + if (length < 0 || length >= lengthRemaining) + { + LOC_LOGE("NMEA Error in string formatting"); + return; + } + pMarker += length; + lengthRemaining -= length; + } + + // Add the position/horizontal/vertical DOP values + if (locationExtended.flags & GPS_LOCATION_EXTENDED_HAS_DOP) + { // dop is in locationExtended, (QMI) + length = snprintf(pMarker, lengthRemaining, "%.1f,%.1f,%.1f", + locationExtended.pdop, + locationExtended.hdop, + locationExtended.vdop); + } + else if (loc_eng_data_p->pdop > 0 && loc_eng_data_p->hdop > 0 && loc_eng_data_p->vdop > 0) + { // dop was cached from sv report (RPC) + length = snprintf(pMarker, lengthRemaining, "%.1f,%.1f,%.1f", + loc_eng_data_p->pdop, + loc_eng_data_p->hdop, + loc_eng_data_p->vdop); + } + else + { // no dop + length = snprintf(pMarker, lengthRemaining, ",,"); + } + + /* Sentence is ready, add checksum and broadcast */ + length = loc_eng_nmea_put_checksum(sentence, sizeof(sentence)); + loc_eng_nmea_send(sentence, length, loc_eng_data_p); + // ------------------ // ------$GPVTG------ // ------------------ @@ -565,6 +664,10 @@ void loc_eng_nmea_generate_pos(loc_eng_data_s_type *loc_eng_data_p, length = loc_eng_nmea_put_checksum(sentence, sizeof(sentence)); loc_eng_nmea_send(sentence, length, loc_eng_data_p); + strlcpy(sentence, "$GNGSA,A,1,,,,,,,,,,,,,,,", sizeof(sentence)); + length = loc_eng_nmea_put_checksum(sentence, sizeof(sentence)); + loc_eng_nmea_send(sentence, length, loc_eng_data_p); + strlcpy(sentence, "$GPVTG,,T,,M,,N,,K,N", sizeof(sentence)); length = loc_eng_nmea_put_checksum(sentence, sizeof(sentence)); loc_eng_nmea_send(sentence, length, loc_eng_data_p); @@ -790,9 +893,10 @@ void loc_eng_nmea_generate_sv(loc_eng_data_s_type *loc_eng_data_p, }//if - // cache the used in fix mask, as it will be needed to send $GPGSA + // cache the used in fix mask, as it will be needed to send $GPGSA/$GNGSA // during the position report - loc_eng_data_p->sv_used_mask = svStatus.gps_used_in_fix_mask; + loc_eng_data_p->gps_used_mask = svStatus.gps_used_in_fix_mask; + loc_eng_data_p->glo_used_mask = svStatus.glo_used_in_fix_mask; // For RPC, the DOP are sent during sv report, so cache them // now to be sent during position report. From 14f0dc1b52a098191843210e34111ef4f3333dbd Mon Sep 17 00:00:00 2001 From: Madhanraj Chelladurai Date: Tue, 15 Mar 2016 09:39:05 +0530 Subject: [PATCH 36/37] gps: consider nsec while ranking the timer objects We need to consider nsec as well while ranking timer objects Change-Id: Ieaad5dfa80b26b90e998618b3cbe1e590fc00839 CRs-Fixed: 991345 --- utils/LocTimer.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/utils/LocTimer.cpp b/utils/LocTimer.cpp index 70904b2a..4de6b40b 100644 --- a/utils/LocTimer.cpp +++ b/utils/LocTimer.cpp @@ -505,8 +505,13 @@ int LocTimerDelegate::ranks(LocRankable& rankable) { LocTimerDelegate* timer = (LocTimerDelegate*)(&rankable); if (timer) { // larger time ranks lower!!! - // IOW, if input obj has bigger tv_sec, this obj outRanks higher + // IOW, if input obj has bigger tv_sec/tv_nsec, this obj outRanks higher rank = timer->mFutureTime.tv_sec - mFutureTime.tv_sec; + if(0 == rank) + { + //rank against tv_nsec for msec accuracy + rank = (int)(timer->mFutureTime.tv_nsec - mFutureTime.tv_nsec); + } } return rank; } From 4b345c82acab9f25da05cb9c85b91ff65b3f3a8d Mon Sep 17 00:00:00 2001 From: Madhanraj Chelladurai Date: Thu, 17 Mar 2016 11:58:51 +0530 Subject: [PATCH 37/37] gps: include support to check hardware type property automotive platform introduced a new android property called ro.hardware.type to detect automotive platform for the purpose of having automotive specific features. Added changes in loc_target to detect auto platform. Change-Id: Ib886b96b2e95dafc151bead041e5fc3d6740c468 CRs-Fixed: 992647 --- utils/loc_target.cpp | 20 +++++++++++++++++++- utils/loc_target.h | 4 ++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/utils/loc_target.cpp b/utils/loc_target.cpp index faaedf6c..9985b89c 100644 --- a/utils/loc_target.cpp +++ b/utils/loc_target.cpp @@ -174,6 +174,20 @@ void loc_get_platform_name(char *platform_name, int array_length) } } +/*The character array passed to this function should have length + of atleast PROPERTY_VALUE_MAX*/ +void loc_get_auto_platform_name(char *platform_name, int array_length) +{ + if(platform_name && (array_length >= PROPERTY_VALUE_MAX)) { + property_get("ro.hardware.type", platform_name, ""); + LOC_LOGD("%s:%d]: Autoplatform name: %s\n", __func__, __LINE__, platform_name); + } + else { + LOC_LOGE("%s:%d]: Null parameter or array length less than PROPERTY_VALUE_MAX\n", + __func__, __LINE__); + } +} + unsigned int loc_get_target(void) { if (gTarget != (unsigned int)-1) @@ -190,6 +204,7 @@ unsigned int loc_get_target(void) char rd_id[LINE_LEN]; char rd_mdm[LINE_LEN]; char baseband[LINE_LEN]; + char rd_auto_platform[LINE_LEN]; if (is_qca1530()) { gTarget = TARGET_QCA1530; @@ -208,7 +223,10 @@ unsigned int loc_get_target(void) } else { read_a_line(id_dep, rd_id, LINE_LEN); } - if( !memcmp(baseband, STR_AUTO, LENGTH(STR_AUTO)) ) + + /*check automotive platform*/ + loc_get_auto_platform_name(rd_auto_platform, sizeof(rd_auto_platform)); + if( !memcmp(rd_auto_platform, STR_AUTO, LENGTH(STR_AUTO)) ) { gTarget = TARGET_AUTO; goto detected; diff --git a/utils/loc_target.h b/utils/loc_target.h index 3bb3b5e2..b76ed884 100644 --- a/utils/loc_target.h +++ b/utils/loc_target.h @@ -52,6 +52,10 @@ void loc_get_target_baseband(char *baseband, int array_length); /*The character array passed to this function should have length of atleast PROPERTY_VALUE_MAX*/ void loc_get_platform_name(char *platform_name, int array_length); +/*The character array passed to this function should have length + of atleast PROPERTY_VALUE_MAX*/ +void loc_get_auto_platform_name(char *platform_name, int array_length); + /*Reads the property ro.lean to identify if this is a lean target Returns: 0 if not a lean and mean target