location/location_hal_daemon/LocationApiService.cpp
void LocationApiService::onGnssEnergyConsumedCb(uint64_t totalGnssEnergyConsumedSinceFirstBoot) {
    std::lock_guard<std::mutex> lock(mMutex);
    LOC_LOGd("--< onGnssEnergyConsumedCb");

    LocAPIGnssEnergyConsumedIndMsg msg(SERVICE_NAME, totalGnssEnergyConsumedSinceFirstBoot,
            &mPbufMsgConv);
    for (auto each : mClients) {
        // deliver the engergy info to registered client
        each.second->onGnssEnergyConsumedInfoAvailable(msg);
    }
}
/******************************************************************************
LocationApiService - on query callback from location engines
******************************************************************************/
on query callback from location engines
on query callback from location engines
void LocationApiService::onGnssEnergyConsumedCb(uint64_t totalGnssEnergyConsumedSinceFirstBoot) {
    std::lock_guard<std::mutex> lock(mMutex);
    LOC_LOGd("--< onGnssEnergyConsumedCb");
    LocAPIGnssEnergyConsumedIndMsg msg(SERVICE_NAME, totalGnssEnergyConsumedSinceFirstBoot,
            &mPbufMsgConv);
    for (auto each : mClients) {
        each.second->onGnssEnergyConsumedInfoAvailable(msg);
    }
}
void LocationApiService :: onGnssEnergyConsumedCb ( uint64_t totalGnssEnergyConsumedSinceFirstBoot ) { std :: lock_guard < std :: mutex > lock ( mMutex ) ; LOC_LOGd ( " " ) ; LocAPIGnssEnergyConsumedIndMsg msg ( SERVICE_NAME , totalGnssEnergyConsumedSinceFirstBoot , & mPbufMsgConv ) ; for ( auto each : mClients ) { each . second -> onGnssEnergyConsumedInfoAvailable ( msg ) ; } }
LocationApiService - on query callback from location engines
LocationApiService - on query callback from location engines
// deliver the engergy info to registered client