147ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. 2e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo * 3e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo * Redistribution and use in source and binary forms, with or without 4e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo * modification, are permitted provided that the following conditions are 5e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo * met: 6e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo * * Redistributions of source code must retain the above copyright 7e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo * notice, this list of conditions and the following disclaimer. 8e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo * * Redistributions in binary form must reproduce the above 9e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo * copyright notice, this list of conditions and the following 10e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo * disclaimer in the documentation and/or other materials provided 11e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo * with the distribution. 12e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo * * Neither the name of The Linux Foundation, nor the names of its 13e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo * contributors may be used to endorse or promote products derived 14e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo * from this software without specific prior written permission. 15e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo * 16e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo * 28e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo */ 29e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo#define LOG_NDDEBUG 0 30e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo#define LOG_TAG "LocSvc_LocApiBase" 31e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 32e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo#include <dlfcn.h> 33e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo#include <LocApiBase.h> 34e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo#include <LocAdapterBase.h> 35e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo#include <log_util.h> 3647ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo#include <LocDualContext.h> 37e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 38e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russonamespace loc_core { 39e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 40e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo#define TO_ALL_LOCADAPTERS(call) TO_ALL_ADAPTERS(mLocAdapters, (call)) 41e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo#define TO_1ST_HANDLING_LOCADAPTERS(call) TO_1ST_HANDLING_ADAPTER(mLocAdapters, (call)) 42e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 43e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russoint hexcode(char *hexstring, int string_size, 44e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo const char *data, int data_size) 45e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo{ 46e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo int i; 47e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo for (i = 0; i < data_size; i++) 48e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo { 49e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo char ch = data[i]; 50e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo if (i*2 + 3 <= string_size) 51e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo { 52e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo snprintf(&hexstring[i*2], 3, "%02X", ch); 53e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo } 54e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo else { 55e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo break; 56e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo } 57e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo } 58e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo return i; 59e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo} 60e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 61e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russoint decodeAddress(char *addr_string, int string_size, 62e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo const char *data, int data_size) 63e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo{ 64e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo const char addr_prefix = 0x91; 65e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo int i, idxOutput = 0; 66e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 67e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo if (!data || !addr_string) { return 0; } 68e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 69e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo if (data[0] != addr_prefix) 70e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo { 71e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo LOC_LOGW("decodeAddress: address prefix is not 0x%x but 0x%x", addr_prefix, data[0]); 72e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo addr_string[0] = '\0'; 73e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo return 0; // prefix not correct 74e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo } 75e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 76e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo for (i = 1; i < data_size; i++) 77e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo { 78e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo unsigned char ch = data[i], low = ch & 0x0F, hi = ch >> 4; 79e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo if (low <= 9 && idxOutput < string_size - 1) { addr_string[idxOutput++] = low + '0'; } 80e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo if (hi <= 9 && idxOutput < string_size - 1) { addr_string[idxOutput++] = hi + '0'; } 81e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo } 82e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 83e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo addr_string[idxOutput] = '\0'; // Terminates the string 84e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 85e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo return idxOutput; 86e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo} 87e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 88e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russostruct LocSsrMsg : public LocMsg { 89e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo LocApiBase* mLocApi; 90e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo inline LocSsrMsg(LocApiBase* locApi) : 91e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo LocMsg(), mLocApi(locApi) 92e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo { 93e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo locallog(); 94e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo } 95e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo inline virtual void proc() const { 96e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo mLocApi->close(); 97e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo mLocApi->open(mLocApi->getEvtMask()); 98e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo } 99e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo inline void locallog() { 100e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo LOC_LOGV("LocSsrMsg"); 101e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo } 102e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo inline virtual void log() { 103e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo locallog(); 104e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo } 105e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo}; 106e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 10747ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russostruct LocOpenMsg : public LocMsg { 10847ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo LocApiBase* mLocApi; 10947ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo LOC_API_ADAPTER_EVENT_MASK_T mMask; 11047ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo inline LocOpenMsg(LocApiBase* locApi, 11147ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo LOC_API_ADAPTER_EVENT_MASK_T mask) : 11247ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo LocMsg(), mLocApi(locApi), mMask(mask) 11347ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo { 11447ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo locallog(); 11547ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo } 11647ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo inline virtual void proc() const { 11747ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo mLocApi->open(mMask); 11847ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo } 11947ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo inline void locallog() { 12047ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo LOC_LOGV("%s:%d]: LocOpen Mask: %x\n", 12147ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo __func__, __LINE__, mMask); 12247ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo } 12347ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo inline virtual void log() { 12447ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo locallog(); 12547ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo } 12647ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo}; 12747ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo 128e14a6c846df2ce4bb1847e4250991f7c52fd793dDante RussoLocApiBase::LocApiBase(const MsgTask* msgTask, 12947ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo LOC_API_ADAPTER_EVENT_MASK_T excludedMask, 13047ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo ContextBase* context) : 131bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo mExcludedMask(excludedMask), mMsgTask(msgTask), 132bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo mMask(0), mSupportedMsg(0), mContext(context) 133e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo{ 134e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo memset(mLocAdapters, 0, sizeof(mLocAdapters)); 135e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo} 136e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 137e14a6c846df2ce4bb1847e4250991f7c52fd793dDante RussoLOC_API_ADAPTER_EVENT_MASK_T LocApiBase::getEvtMask() 138e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo{ 139e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo LOC_API_ADAPTER_EVENT_MASK_T mask = 0; 140e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 141e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo TO_ALL_LOCADAPTERS(mask |= mLocAdapters[i]->getEvtMask()); 142e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 143e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo return mask & ~mExcludedMask; 144e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo} 145e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 146e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russobool LocApiBase::isInSession() 147e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo{ 148e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo bool inSession = false; 149e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 15047ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo for (int i = 0; 15147ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo !inSession && i < MAX_ADAPTERS && NULL != mLocAdapters[i]; 15247ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo i++) { 15347ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo inSession = mLocAdapters[i]->isInSession(); 15447ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo } 155e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 156e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo return inSession; 157e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo} 158e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 159e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russovoid LocApiBase::addAdapter(LocAdapterBase* adapter) 160e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo{ 161e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo for (int i = 0; i < MAX_ADAPTERS && mLocAdapters[i] != adapter; i++) { 162e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo if (mLocAdapters[i] == NULL) { 163e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo mLocAdapters[i] = adapter; 16447ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo mMsgTask->sendMsg(new LocOpenMsg(this, 16547ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo (adapter->getEvtMask()))); 166e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo break; 167e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo } 168e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo } 169e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo} 170e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 171e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russovoid LocApiBase::removeAdapter(LocAdapterBase* adapter) 172e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo{ 173e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo for (int i = 0; 174e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo i < MAX_ADAPTERS && NULL != mLocAdapters[i]; 175e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo i++) { 176e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo if (mLocAdapters[i] == adapter) { 177e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo mLocAdapters[i] = NULL; 178e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 179e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo // shift the rest of the adapters up so that the pointers 180e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo // in the array do not have holes. This should be more 181e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo // performant, because the array maintenance is much much 182e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo // less frequent than event handlings, which need to linear 183e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo // search all the adapters 184e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo int j = i; 185e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo while (++i < MAX_ADAPTERS && mLocAdapters[i] != NULL); 186e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 187e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo // i would be MAX_ADAPTERS or point to a NULL 188e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo i--; 189e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo // i now should point to a none NULL adapter within valid 190e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo // range although i could be equal to j, but it won't hurt. 191e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo // No need to check it, as it gains nothing. 192e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo mLocAdapters[j] = mLocAdapters[i]; 193e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo // this makes sure that we exit the for loop 194e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo mLocAdapters[i] = NULL; 195e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 196e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo // if we have an empty list of adapters 197e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo if (0 == i) { 198e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo close(); 199e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo } else { 200e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo // else we need to remove the bit 20147ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo mMsgTask->sendMsg(new LocOpenMsg(this, getEvtMask())); 202e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo } 203e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo } 204e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo } 205e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo} 206e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 207bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russovoid LocApiBase::updateEvtMask() 208bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo{ 209bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo mMsgTask->sendMsg(new LocOpenMsg(this, getEvtMask())); 210bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo} 211bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo 212e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russovoid LocApiBase::handleEngineUpEvent() 213e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo{ 214e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo // This will take care of renegotiating the loc handle 215e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo mMsgTask->sendMsg(new LocSsrMsg(this)); 216e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 21747ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo LocDualContext::injectFeatureConfig(mContext); 21847ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo 219e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo // loop through adapters, and deliver to all adapters. 220e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo TO_ALL_LOCADAPTERS(mLocAdapters[i]->handleEngineUpEvent()); 221e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo} 222e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 223e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russovoid LocApiBase::handleEngineDownEvent() 224e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo{ 225e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo // loop through adapters, and deliver to all adapters. 226e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo TO_ALL_LOCADAPTERS(mLocAdapters[i]->handleEngineDownEvent()); 227e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo} 228e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 229e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russovoid LocApiBase::reportPosition(UlpLocation &location, 230e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo GpsLocationExtended &locationExtended, 231e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo void* locationExt, 232e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo enum loc_sess_status status, 233e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo LocPosTechMask loc_technology_mask) 234e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo{ 235bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo // print the location info before delivering 236bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo LOC_LOGV("flags: %d\n source: %d\n latitude: %f\n longitude: %f\n " 237bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo "altitude: %f\n speed: %f\n bearing: %f\n accuracy: %f\n " 238bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo "timestamp: %lld\n rawDataSize: %d\n rawData: %p\n " 239bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo "Session status: %d\n Technology mask: %u", 240bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo location.gpsLocation.flags, location.position_source, 241bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo location.gpsLocation.latitude, location.gpsLocation.longitude, 242bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo location.gpsLocation.altitude, location.gpsLocation.speed, 243bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo location.gpsLocation.bearing, location.gpsLocation.accuracy, 244bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo location.gpsLocation.timestamp, location.rawDataSize, 245bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo location.rawData, status, loc_technology_mask); 246e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo // loop through adapters, and deliver to all adapters. 247e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo TO_ALL_LOCADAPTERS( 248e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo mLocAdapters[i]->reportPosition(location, 249e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo locationExtended, 250e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo locationExt, 251e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo status, 252e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo loc_technology_mask) 253e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo ); 254e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo} 255e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 256e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russovoid LocApiBase::reportSv(GpsSvStatus &svStatus, 257e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo GpsLocationExtended &locationExtended, 258e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo void* svExt) 259e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo{ 260bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo // print the SV info before delivering 261bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo LOC_LOGV("num sv: %d\n ephemeris mask: %dxn almanac mask: %x\n used" 262bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo " in fix mask: %x\n sv: prn snr elevation azimuth", 263bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo svStatus.num_svs, svStatus.ephemeris_mask, 264bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo svStatus.almanac_mask, svStatus.used_in_fix_mask); 265bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo for (int i = 0; i < svStatus.num_svs && i < GPS_MAX_SVS; i++) { 266bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo LOC_LOGV(" %d: %d %f %f %f", 267bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo i, 268bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo svStatus.sv_list[i].prn, 269bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo svStatus.sv_list[i].snr, 270bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo svStatus.sv_list[i].elevation, 271bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo svStatus.sv_list[i].azimuth); 272bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo } 273e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo // loop through adapters, and deliver to all adapters. 274e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo TO_ALL_LOCADAPTERS( 275e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo mLocAdapters[i]->reportSv(svStatus, 276e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo locationExtended, 277e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo svExt) 278e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo ); 279e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo} 280e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 281e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russovoid LocApiBase::reportStatus(GpsStatusValue status) 282e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo{ 283e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo // loop through adapters, and deliver to all adapters. 284e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo TO_ALL_LOCADAPTERS(mLocAdapters[i]->reportStatus(status)); 285e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo} 286e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 287e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russovoid LocApiBase::reportNmea(const char* nmea, int length) 288e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo{ 289e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo // loop through adapters, and deliver to all adapters. 290e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo TO_ALL_LOCADAPTERS(mLocAdapters[i]->reportNmea(nmea, length)); 291e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo} 292e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 293e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russovoid LocApiBase::reportXtraServer(const char* url1, const char* url2, 294e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo const char* url3, const int maxlength) 295e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo{ 296e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo // loop through adapters, and deliver to the first handling adapter. 297e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->reportXtraServer(url1, url2, url3, maxlength)); 298e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 299e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo} 300e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 301e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russovoid LocApiBase::requestXtraData() 302e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo{ 303e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo // loop through adapters, and deliver to the first handling adapter. 304e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->requestXtraData()); 305e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo} 306e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 307e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russovoid LocApiBase::requestTime() 308e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo{ 309e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo // loop through adapters, and deliver to the first handling adapter. 310e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->requestTime()); 311e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo} 312e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 313e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russovoid LocApiBase::requestLocation() 314e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo{ 315e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo // loop through adapters, and deliver to the first handling adapter. 316e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->requestLocation()); 317e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo} 318e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 319e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russovoid LocApiBase::requestATL(int connHandle, AGpsType agps_type) 320e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo{ 321e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo // loop through adapters, and deliver to the first handling adapter. 322e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->requestATL(connHandle, agps_type)); 323e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo} 324e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 325e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russovoid LocApiBase::releaseATL(int connHandle) 326e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo{ 327e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo // loop through adapters, and deliver to the first handling adapter. 328e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->releaseATL(connHandle)); 329e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo} 330e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 331e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russovoid LocApiBase::requestSuplES(int connHandle) 332e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo{ 333e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo // loop through adapters, and deliver to the first handling adapter. 334e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->requestSuplES(connHandle)); 335e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo} 336e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 337e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russovoid LocApiBase::reportDataCallOpened() 338e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo{ 339e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo // loop through adapters, and deliver to the first handling adapter. 340e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->reportDataCallOpened()); 341e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo} 342e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 343e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russovoid LocApiBase::reportDataCallClosed() 344e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo{ 345e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo // loop through adapters, and deliver to the first handling adapter. 346e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->reportDataCallClosed()); 347e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo} 348e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 349e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russovoid LocApiBase::requestNiNotify(GpsNiNotification ¬ify, const void* data) 350e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo{ 351e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo // loop through adapters, and deliver to the first handling adapter. 352e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->requestNiNotify(notify, data)); 353e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo} 354e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 355bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russovoid LocApiBase::saveSupportedMsgList(uint64_t supportedMsgList) 356bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo{ 357bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo mSupportedMsg = supportedMsgList; 358bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo} 359bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo 36047ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russovoid* LocApiBase :: getSibling() 36147ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo DEFAULT_IMPL(NULL) 36247ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo 36347ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante RussoLocApiProxyBase* LocApiBase :: getLocApiProxy() 36447ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo DEFAULT_IMPL(NULL) 36547ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo 3668aac9d301fc5aa83071492803f4335b73f2604e3Vineeta Srivastavavoid LocApiBase::reportGpsMeasurementData(GpsData &gpsMeasurementData) 3678aac9d301fc5aa83071492803f4335b73f2604e3Vineeta Srivastava{ 3688aac9d301fc5aa83071492803f4335b73f2604e3Vineeta Srivastava // loop through adapters, and deliver to all adapters. 3698aac9d301fc5aa83071492803f4335b73f2604e3Vineeta Srivastava TO_ALL_LOCADAPTERS(mLocAdapters[i]->reportGpsMeasurementData(gpsMeasurementData)); 3708aac9d301fc5aa83071492803f4335b73f2604e3Vineeta Srivastava} 3718aac9d301fc5aa83071492803f4335b73f2604e3Vineeta Srivastava 372e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russoenum loc_api_adapter_err LocApiBase:: 373e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo open(LOC_API_ADAPTER_EVENT_MASK_T mask) 374e14a6c846df2ce4bb1847e4250991f7c52fd793dDante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS) 375e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 376e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russoenum loc_api_adapter_err LocApiBase:: 377e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo close() 378e14a6c846df2ce4bb1847e4250991f7c52fd793dDante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS) 379e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 380e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russoenum loc_api_adapter_err LocApiBase:: 381e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo startFix(const LocPosMode& posMode) 382e14a6c846df2ce4bb1847e4250991f7c52fd793dDante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS) 383e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 384e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russoenum loc_api_adapter_err LocApiBase:: 385e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo stopFix() 386e14a6c846df2ce4bb1847e4250991f7c52fd793dDante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS) 387e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 388e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russoenum loc_api_adapter_err LocApiBase:: 389e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo deleteAidingData(GpsAidingData f) 390e14a6c846df2ce4bb1847e4250991f7c52fd793dDante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS) 391e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 392e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russoenum loc_api_adapter_err LocApiBase:: 393e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo enableData(int enable) 394e14a6c846df2ce4bb1847e4250991f7c52fd793dDante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS) 395e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 396e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russoenum loc_api_adapter_err LocApiBase:: 397e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo setAPN(char* apn, int len) 398e14a6c846df2ce4bb1847e4250991f7c52fd793dDante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS) 399e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 400e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russoenum loc_api_adapter_err LocApiBase:: 401e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo injectPosition(double latitude, double longitude, float accuracy) 402e14a6c846df2ce4bb1847e4250991f7c52fd793dDante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS) 403e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 404e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russoenum loc_api_adapter_err LocApiBase:: 405e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo setTime(GpsUtcTime time, int64_t timeReference, int uncertainty) 406e14a6c846df2ce4bb1847e4250991f7c52fd793dDante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS) 407e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 408e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russoenum loc_api_adapter_err LocApiBase:: 409e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo setXtraData(char* data, int length) 410e14a6c846df2ce4bb1847e4250991f7c52fd793dDante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS) 411e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 412e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russoenum loc_api_adapter_err LocApiBase:: 413e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo requestXtraServer() 414e14a6c846df2ce4bb1847e4250991f7c52fd793dDante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS) 415e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 416e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russoenum loc_api_adapter_err LocApiBase:: 417e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo atlOpenStatus(int handle, int is_succ, char* apn, 418e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo AGpsBearerType bear, AGpsType agpsType) 419e14a6c846df2ce4bb1847e4250991f7c52fd793dDante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS) 420e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 421e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russoenum loc_api_adapter_err LocApiBase:: 422e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo atlCloseStatus(int handle, int is_succ) 423e14a6c846df2ce4bb1847e4250991f7c52fd793dDante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS) 424e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 425e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russoenum loc_api_adapter_err LocApiBase:: 426e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo setPositionMode(const LocPosMode& posMode) 427e14a6c846df2ce4bb1847e4250991f7c52fd793dDante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS) 428e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 429e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russoenum loc_api_adapter_err LocApiBase:: 430e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo setServer(const char* url, int len) 431e14a6c846df2ce4bb1847e4250991f7c52fd793dDante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS) 432e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 433e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russoenum loc_api_adapter_err LocApiBase:: 434e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo setServer(unsigned int ip, int port, 435e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo LocServerType type) 436e14a6c846df2ce4bb1847e4250991f7c52fd793dDante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS) 437e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 438e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russoenum loc_api_adapter_err LocApiBase:: 439e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo informNiResponse(GpsUserResponseType userResponse, 440e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo const void* passThroughData) 441e14a6c846df2ce4bb1847e4250991f7c52fd793dDante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS) 442e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 443e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russoenum loc_api_adapter_err LocApiBase:: 444e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo setSUPLVersion(uint32_t version) 445e14a6c846df2ce4bb1847e4250991f7c52fd793dDante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS) 446e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 447e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russoenum loc_api_adapter_err LocApiBase:: 448e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo setLPPConfig(uint32_t profile) 449e14a6c846df2ce4bb1847e4250991f7c52fd793dDante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS) 450e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 451e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russoenum loc_api_adapter_err LocApiBase:: 45247ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo setSensorControlConfig(int sensorUsage, 45347ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo int sensorProvider) 454e14a6c846df2ce4bb1847e4250991f7c52fd793dDante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS) 455e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 456e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russoenum loc_api_adapter_err LocApiBase:: 457e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo setSensorProperties(bool gyroBiasVarianceRandomWalk_valid, 458e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo float gyroBiasVarianceRandomWalk, 459e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo bool accelBiasVarianceRandomWalk_valid, 460e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo float accelBiasVarianceRandomWalk, 461e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo bool angleBiasVarianceRandomWalk_valid, 462e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo float angleBiasVarianceRandomWalk, 463e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo bool rateBiasVarianceRandomWalk_valid, 464e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo float rateBiasVarianceRandomWalk, 465e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo bool velocityBiasVarianceRandomWalk_valid, 466e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo float velocityBiasVarianceRandomWalk) 467e14a6c846df2ce4bb1847e4250991f7c52fd793dDante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS) 468e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 469e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russoenum loc_api_adapter_err LocApiBase:: 470e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo setSensorPerfControlConfig(int controlMode, 471e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo int accelSamplesPerBatch, 472e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo int accelBatchesPerSec, 473e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo int gyroSamplesPerBatch, 474e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo int gyroBatchesPerSec, 475e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo int accelSamplesPerBatchHigh, 476e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo int accelBatchesPerSecHigh, 477e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo int gyroSamplesPerBatchHigh, 478e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo int gyroBatchesPerSecHigh, 479e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo int algorithmConfig) 480e14a6c846df2ce4bb1847e4250991f7c52fd793dDante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS) 481e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 482e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russoenum loc_api_adapter_err LocApiBase:: 483e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo setExtPowerConfig(int isBatteryCharging) 484e14a6c846df2ce4bb1847e4250991f7c52fd793dDante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS) 485e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 486e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russoenum loc_api_adapter_err LocApiBase:: 487e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo setAGLONASSProtocol(unsigned long aGlonassProtocol) 488e14a6c846df2ce4bb1847e4250991f7c52fd793dDante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS) 489e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 49047ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russoenum loc_api_adapter_err LocApiBase:: 49147ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo getWwanZppFix(GpsLocation & zppLoc) 49247ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS) 49347ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo 49447ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russoenum loc_api_adapter_err LocApiBase:: 49547ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo getBestAvailableZppFix(GpsLocation & zppLoc) 49647ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS) 49747ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo 49847ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russoenum loc_api_adapter_err LocApiBase:: 49947ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo getBestAvailableZppFix(GpsLocation & zppLoc, LocPosTechMask & tech_mask) 50047ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS) 50147ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo 502e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russoint LocApiBase:: 503e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo initDataServiceClient() 504e14a6c846df2ce4bb1847e4250991f7c52fd793dDante RussoDEFAULT_IMPL(-1) 505e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 506e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russoint LocApiBase:: 507e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo openAndStartDataCall() 508e14a6c846df2ce4bb1847e4250991f7c52fd793dDante RussoDEFAULT_IMPL(-1) 509e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 510e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russovoid LocApiBase:: 511e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo stopDataCall() 512e14a6c846df2ce4bb1847e4250991f7c52fd793dDante RussoDEFAULT_IMPL() 513e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 514e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russovoid LocApiBase:: 515e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo closeDataCall() 516e14a6c846df2ce4bb1847e4250991f7c52fd793dDante RussoDEFAULT_IMPL() 517e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 51847ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russoint LocApiBase:: 5198aa503a872e8c8cf241061f6ffed4e9fba125ffeKevin Tang setGpsLock(LOC_GPS_LOCK_MASK lock) 52047ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante RussoDEFAULT_IMPL(-1) 521e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo 5221d4940024c54e7d1e63f73edd5054a18a7a01b63Dante Russovoid LocApiBase:: 5231d4940024c54e7d1e63f73edd5054a18a7a01b63Dante Russo installAGpsCert(const DerEncodedCertificate* pData, 5241d4940024c54e7d1e63f73edd5054a18a7a01b63Dante Russo size_t length, 5251d4940024c54e7d1e63f73edd5054a18a7a01b63Dante Russo uint32_t slotBitMask) 5261d4940024c54e7d1e63f73edd5054a18a7a01b63Dante RussoDEFAULT_IMPL() 5271d4940024c54e7d1e63f73edd5054a18a7a01b63Dante Russo 52847ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russoint LocApiBase:: 52947ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo getGpsLock() 53047ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante RussoDEFAULT_IMPL(-1) 5318aac9d301fc5aa83071492803f4335b73f2604e3Vineeta Srivastava 532bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russoenum loc_api_adapter_err LocApiBase:: 533bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo setXtraVersionCheck(enum xtra_version_check check) 534bfff6343845ad9ff062c5fd97bb3b9be1053340eDante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS) 535bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo 5368aac9d301fc5aa83071492803f4335b73f2604e3Vineeta Srivastavaint LocApiBase:: 5378aac9d301fc5aa83071492803f4335b73f2604e3Vineeta Srivastava updateRegistrationMask(LOC_API_ADAPTER_EVENT_MASK_T event, 5388aac9d301fc5aa83071492803f4335b73f2604e3Vineeta Srivastava loc_registration_mask_status isEnabled) 5398aac9d301fc5aa83071492803f4335b73f2604e3Vineeta SrivastavaDEFAULT_IMPL(-1) 5408aac9d301fc5aa83071492803f4335b73f2604e3Vineeta Srivastava 5418aac9d301fc5aa83071492803f4335b73f2604e3Vineeta Srivastavabool LocApiBase:: 5428aac9d301fc5aa83071492803f4335b73f2604e3Vineeta Srivastava gnssConstellationConfig() 5438aac9d301fc5aa83071492803f4335b73f2604e3Vineeta SrivastavaDEFAULT_IMPL(false) 5448aac9d301fc5aa83071492803f4335b73f2604e3Vineeta Srivastava 545e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo} // namespace loc_core 546