1ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
2ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo *
3ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo * Redistribution and use in source and binary forms, with or without
4ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo * modification, are permitted provided that the following conditions are
5ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo * met:
6ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo *     * Redistributions of source code must retain the above copyright
7ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo *       notice, this list of conditions and the following disclaimer.
8ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo *     * Redistributions in binary form must reproduce the above
9ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo *       copyright notice, this list of conditions and the following
10ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo *       disclaimer in the documentation and/or other materials provided
11ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo *       with the distribution.
12ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo *     * Neither the name of The Linux Foundation, nor the names of its
13ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo *       contributors may be used to endorse or promote products derived
14ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo *       from this software without specific prior written permission.
15ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo *
16ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo *
28ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo */
29ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo#define LOG_NDDEBUG 0
30ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo#define LOG_TAG "LocSvc_LocApiBase"
31ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
32ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo#include <dlfcn.h>
33ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo#include <LocApiBase.h>
34ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo#include <LocAdapterBase.h>
35ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo#include <log_util.h>
36ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
37ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russonamespace loc_core {
38ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
39ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo#define TO_ALL_LOCADAPTERS(call) TO_ALL_ADAPTERS(mLocAdapters, (call))
40ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo#define TO_1ST_HANDLING_LOCADAPTERS(call) TO_1ST_HANDLING_ADAPTER(mLocAdapters, (call))
41ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
42ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russoint hexcode(char *hexstring, int string_size,
43ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo            const char *data, int data_size)
44ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo{
45ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo   int i;
46ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo   for (i = 0; i < data_size; i++)
47ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo   {
48ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo      char ch = data[i];
49ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo      if (i*2 + 3 <= string_size)
50ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo      {
51ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo         snprintf(&hexstring[i*2], 3, "%02X", ch);
52ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo      }
53ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo      else {
54ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo         break;
55ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo      }
56ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo   }
57ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo   return i;
58ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo}
59ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
60ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russoint decodeAddress(char *addr_string, int string_size,
61ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                   const char *data, int data_size)
62ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo{
63ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    const char addr_prefix = 0x91;
64ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    int i, idxOutput = 0;
65ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
66ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    if (!data || !addr_string) { return 0; }
67ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
68ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    if (data[0] != addr_prefix)
69ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    {
70ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo        LOC_LOGW("decodeAddress: address prefix is not 0x%x but 0x%x", addr_prefix, data[0]);
71ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo        addr_string[0] = '\0';
72ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo        return 0; // prefix not correct
73ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    }
74ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
75ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    for (i = 1; i < data_size; i++)
76ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    {
77ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo        unsigned char ch = data[i], low = ch & 0x0F, hi = ch >> 4;
78ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo        if (low <= 9 && idxOutput < string_size - 1) { addr_string[idxOutput++] = low + '0'; }
79ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo        if (hi <= 9 && idxOutput < string_size - 1) { addr_string[idxOutput++] = hi + '0'; }
80ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    }
81ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
82ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    addr_string[idxOutput] = '\0'; // Terminates the string
83ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
84ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    return idxOutput;
85ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo}
86ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
87ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russostruct LocSsrMsg : public LocMsg {
88ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    LocApiBase* mLocApi;
89ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    inline LocSsrMsg(LocApiBase* locApi) :
90ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo        LocMsg(), mLocApi(locApi)
91ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    {
92ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo        locallog();
93ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    }
94ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    inline virtual void proc() const {
95ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo        mLocApi->close();
96ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo        mLocApi->open(mLocApi->getEvtMask());
97ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    }
98ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    inline void locallog() {
99ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo        LOC_LOGV("LocSsrMsg");
100ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    }
101ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    inline virtual void log() {
102ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo        locallog();
103ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    }
104ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo};
105ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
106ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante RussoLocApiBase::LocApiBase(const MsgTask* msgTask,
107ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                       LOC_API_ADAPTER_EVENT_MASK_T excludedMask) :
108ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    mExcludedMask(excludedMask), mMsgTask(msgTask), mMask(0)
109ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo{
110ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    memset(mLocAdapters, 0, sizeof(mLocAdapters));
111ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo}
112ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
113ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante RussoLOC_API_ADAPTER_EVENT_MASK_T LocApiBase::getEvtMask()
114ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo{
115ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    LOC_API_ADAPTER_EVENT_MASK_T mask = 0;
116ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
117ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    TO_ALL_LOCADAPTERS(mask |= mLocAdapters[i]->getEvtMask());
118ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
119ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    return mask & ~mExcludedMask;
120ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo}
121ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
122ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russobool LocApiBase::isInSession()
123ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo{
124ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    bool inSession = false;
125ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
126ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    TO_ALL_LOCADAPTERS(inSession = mLocAdapters[i]->isInSession());
127ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
128ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    return inSession;
129ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo}
130ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
131ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russovoid LocApiBase::addAdapter(LocAdapterBase* adapter)
132ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo{
133ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    for (int i = 0; i < MAX_ADAPTERS && mLocAdapters[i] != adapter; i++) {
134ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo        if (mLocAdapters[i] == NULL) {
135ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo            mLocAdapters[i] = adapter;
136ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo            open(mMask | (adapter->getEvtMask() & ~mExcludedMask));
137ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo            break;
138ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo        }
139ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    }
140ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo}
141ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
142ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russovoid LocApiBase::removeAdapter(LocAdapterBase* adapter)
143ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo{
144ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    for (int i = 0;
145ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo         i < MAX_ADAPTERS && NULL != mLocAdapters[i];
146ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo         i++) {
147ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo        if (mLocAdapters[i] == adapter) {
148ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo            mLocAdapters[i] = NULL;
149ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
150ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo            // shift the rest of the adapters up so that the pointers
151ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo            // in the array do not have holes.  This should be more
152ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo            // performant, because the array maintenance is much much
153ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo            // less frequent than event handlings, which need to linear
154ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo            // search all the adapters
155ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo            int j = i;
156ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo            while (++i < MAX_ADAPTERS && mLocAdapters[i] != NULL);
157ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
158ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo            // i would be MAX_ADAPTERS or point to a NULL
159ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo            i--;
160ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo            // i now should point to a none NULL adapter within valid
161ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo            // range although i could be equal to j, but it won't hurt.
162ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo            // No need to check it, as it gains nothing.
163ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo            mLocAdapters[j] = mLocAdapters[i];
164ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo            // this makes sure that we exit the for loop
165ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo            mLocAdapters[i] = NULL;
166ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
167ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo            // if we have an empty list of adapters
168ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo            if (0 == i) {
169ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                close();
170ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo            } else {
171ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                // else we need to remove the bit
172ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                open(getEvtMask() & ~mExcludedMask);
173ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo            }
174ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo        }
175ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    }
176ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo}
177ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
178ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russovoid LocApiBase::handleEngineUpEvent()
179ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo{
180ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    // This will take care of renegotiating the loc handle
181ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    mMsgTask->sendMsg(new LocSsrMsg(this));
182ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
183ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    // loop through adapters, and deliver to all adapters.
184ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    TO_ALL_LOCADAPTERS(mLocAdapters[i]->handleEngineUpEvent());
185ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo}
186ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
187ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russovoid LocApiBase::handleEngineDownEvent()
188ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo{
189ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    // loop through adapters, and deliver to all adapters.
190ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    TO_ALL_LOCADAPTERS(mLocAdapters[i]->handleEngineDownEvent());
191ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo}
192ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
193ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russovoid LocApiBase::reportPosition(UlpLocation &location,
194ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                                GpsLocationExtended &locationExtended,
195ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                                void* locationExt,
196ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                                enum loc_sess_status status,
197ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                                LocPosTechMask loc_technology_mask)
198ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo{
199ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    // loop through adapters, and deliver to all adapters.
200ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    TO_ALL_LOCADAPTERS(
201ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo        mLocAdapters[i]->reportPosition(location,
202ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                                        locationExtended,
203ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                                        locationExt,
204ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                                        status,
205ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                                        loc_technology_mask)
206ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    );
207ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo}
208ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
209ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russovoid LocApiBase::reportSv(GpsSvStatus &svStatus,
210ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                  GpsLocationExtended &locationExtended,
211ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                  void* svExt)
212ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo{
213ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    // loop through adapters, and deliver to all adapters.
214ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    TO_ALL_LOCADAPTERS(
215ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo        mLocAdapters[i]->reportSv(svStatus,
216ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                                     locationExtended,
217ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                                     svExt)
218ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    );
219ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo}
220ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
221ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russovoid LocApiBase::reportStatus(GpsStatusValue status)
222ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo{
223ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    // loop through adapters, and deliver to all adapters.
224ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    TO_ALL_LOCADAPTERS(mLocAdapters[i]->reportStatus(status));
225ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo}
226ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
227ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russovoid LocApiBase::reportNmea(const char* nmea, int length)
228ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo{
229ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    // loop through adapters, and deliver to all adapters.
230ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    TO_ALL_LOCADAPTERS(mLocAdapters[i]->reportNmea(nmea, length));
231ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo}
232ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
233ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russovoid LocApiBase::reportXtraServer(const char* url1, const char* url2,
234ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                                  const char* url3, const int maxlength)
235ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo{
236ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    // loop through adapters, and deliver to the first handling adapter.
237ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->reportXtraServer(url1, url2, url3, maxlength));
238ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
239ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo}
240ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
241ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russovoid LocApiBase::requestXtraData()
242ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo{
243ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    // loop through adapters, and deliver to the first handling adapter.
244ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->requestXtraData());
245ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo}
246ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
247ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russovoid LocApiBase::requestTime()
248ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo{
249ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    // loop through adapters, and deliver to the first handling adapter.
250ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->requestTime());
251ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo}
252ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
253ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russovoid LocApiBase::requestLocation()
254ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo{
255ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    // loop through adapters, and deliver to the first handling adapter.
256ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->requestLocation());
257ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo}
258ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
259ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russovoid LocApiBase::requestATL(int connHandle, AGpsType agps_type)
260ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo{
261ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    // loop through adapters, and deliver to the first handling adapter.
262ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->requestATL(connHandle, agps_type));
263ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo}
264ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
265ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russovoid LocApiBase::releaseATL(int connHandle)
266ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo{
267ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    // loop through adapters, and deliver to the first handling adapter.
268ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->releaseATL(connHandle));
269ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo}
270ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
271ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russovoid LocApiBase::requestSuplES(int connHandle)
272ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo{
273ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    // loop through adapters, and deliver to the first handling adapter.
274ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->requestSuplES(connHandle));
275ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo}
276ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
277ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russovoid LocApiBase::reportDataCallOpened()
278ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo{
279ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    // loop through adapters, and deliver to the first handling adapter.
280ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->reportDataCallOpened());
281ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo}
282ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
283ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russovoid LocApiBase::reportDataCallClosed()
284ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo{
285ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    // loop through adapters, and deliver to the first handling adapter.
286ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->reportDataCallClosed());
287ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo}
288ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
289ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russovoid LocApiBase::requestNiNotify(GpsNiNotification &notify, const void* data)
290ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo{
291ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    // loop through adapters, and deliver to the first handling adapter.
292ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->requestNiNotify(notify, data));
293ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo}
294ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
295ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russoenum loc_api_adapter_err LocApiBase::
296ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo   open(LOC_API_ADAPTER_EVENT_MASK_T mask)
297ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
298ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
299ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russoenum loc_api_adapter_err LocApiBase::
300ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    close()
301ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
302ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
303ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russoenum loc_api_adapter_err LocApiBase::
304ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    startFix(const LocPosMode& posMode)
305ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
306ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
307ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russoenum loc_api_adapter_err LocApiBase::
308ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    stopFix()
309ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
310ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
311ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russoenum loc_api_adapter_err LocApiBase::
312ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    deleteAidingData(GpsAidingData f)
313ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
314ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
315ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russoenum loc_api_adapter_err LocApiBase::
316ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    enableData(int enable)
317ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
318ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
319ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russoenum loc_api_adapter_err LocApiBase::
320ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    setAPN(char* apn, int len)
321ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
322ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
323ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russoenum loc_api_adapter_err LocApiBase::
324ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    injectPosition(double latitude, double longitude, float accuracy)
325ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
326ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
327ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russoenum loc_api_adapter_err LocApiBase::
328ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    setTime(GpsUtcTime time, int64_t timeReference, int uncertainty)
329ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
330ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
331ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russoenum loc_api_adapter_err LocApiBase::
332ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    setXtraData(char* data, int length)
333ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
334ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
335ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russoenum loc_api_adapter_err LocApiBase::
336ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    requestXtraServer()
337ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
338ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
339ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russoenum loc_api_adapter_err LocApiBase::
340ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo   atlOpenStatus(int handle, int is_succ, char* apn,
341ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                 AGpsBearerType bear, AGpsType agpsType)
342ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
343ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
344ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russoenum loc_api_adapter_err LocApiBase::
345ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    atlCloseStatus(int handle, int is_succ)
346ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
347ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
348ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russoenum loc_api_adapter_err LocApiBase::
349ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    setPositionMode(const LocPosMode& posMode)
350ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
351ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
352ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russoenum loc_api_adapter_err LocApiBase::
353ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    setServer(const char* url, int len)
354ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
355ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
356ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russoenum loc_api_adapter_err LocApiBase::
357ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    setServer(unsigned int ip, int port,
358ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo              LocServerType type)
359ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
360ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
361ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russoenum loc_api_adapter_err LocApiBase::
362ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    informNiResponse(GpsUserResponseType userResponse,
363ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                     const void* passThroughData)
364ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
365ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
366ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russoenum loc_api_adapter_err LocApiBase::
367ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    setSUPLVersion(uint32_t version)
368ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
369ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
370ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russoenum loc_api_adapter_err LocApiBase::
371ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    setLPPConfig(uint32_t profile)
372ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
373ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
374ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russoenum loc_api_adapter_err LocApiBase::
375ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    setSensorControlConfig(int sensorUsage)
376ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
377ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
378ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russoenum loc_api_adapter_err LocApiBase::
379ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    setSensorProperties(bool gyroBiasVarianceRandomWalk_valid,
380ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                        float gyroBiasVarianceRandomWalk,
381ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                        bool accelBiasVarianceRandomWalk_valid,
382ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                        float accelBiasVarianceRandomWalk,
383ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                        bool angleBiasVarianceRandomWalk_valid,
384ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                        float angleBiasVarianceRandomWalk,
385ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                        bool rateBiasVarianceRandomWalk_valid,
386ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                        float rateBiasVarianceRandomWalk,
387ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                        bool velocityBiasVarianceRandomWalk_valid,
388ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                        float velocityBiasVarianceRandomWalk)
389ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
390ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
391ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russoenum loc_api_adapter_err LocApiBase::
392ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    setSensorPerfControlConfig(int controlMode,
393ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                               int accelSamplesPerBatch,
394ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                               int accelBatchesPerSec,
395ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                               int gyroSamplesPerBatch,
396ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                               int gyroBatchesPerSec,
397ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                               int accelSamplesPerBatchHigh,
398ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                               int accelBatchesPerSecHigh,
399ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                               int gyroSamplesPerBatchHigh,
400ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                               int gyroBatchesPerSecHigh,
401ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo                               int algorithmConfig)
402ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
403ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
404ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russoenum loc_api_adapter_err LocApiBase::
405ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    setExtPowerConfig(int isBatteryCharging)
406ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
407ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
408ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russoenum loc_api_adapter_err LocApiBase::
409ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    setAGLONASSProtocol(unsigned long aGlonassProtocol)
410ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante RussoDEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
411ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
412ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russoint LocApiBase::
413ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    initDataServiceClient()
414ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante RussoDEFAULT_IMPL(-1)
415ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
416ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russoint LocApiBase::
417ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    openAndStartDataCall()
418ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante RussoDEFAULT_IMPL(-1)
419ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
420ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russovoid LocApiBase::
421ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    stopDataCall()
422ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante RussoDEFAULT_IMPL()
423ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
424ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russovoid LocApiBase::
425ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo    closeDataCall()
426ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante RussoDEFAULT_IMPL()
427ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
428ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo
429ec6e5d3a2597d37d5b1d98911cb06218cdf19bf1Dante Russo} // namespace loc_core
430