location/loc_api/loc_api_v02/loc_api_v02_client.cpp
bool locClientGetSizeByEventIndId(uint32_t eventIndId, size_t *pEventIndSize)
{
  size_t idx = 0, eventIndTableSize = 0;

  // Validate input arguments
  if(pEventIndSize == NULL)
  {
    LOC_LOGE("%s:%d]: size argument NULL !", __func__, __LINE__);
    return false;
  }

  // look in the event table
  eventIndTableSize =
    (sizeof(locClientEventIndTable)/sizeof(locClientEventIndTableStructT));

  for(idx=0; idx<eventIndTableSize; idx++ )
  {
    if(eventIndId == locClientEventIndTable[idx].eventId)
    {
      // found
      *pEventIndSize = locClientEventIndTable[idx].eventSize;

      LOC_LOGV("%s:%d]: event ind Id %d size = %d\n", __func__, __LINE__,
                    eventIndId, (uint32_t)*pEventIndSize);
      return true;
    }
  }
  // not found
  return false;
}
/** locClientGetSizeByEventIndId
 *  @brief Gets the size of the event indication structure, from
 *         a specified id
 *  @param [in]  eventIndId
 *  @param [out] pEventIndSize
 *  @return true if event ID was found; else false
*/
locClientGetSizeByEventIndId
@brief Gets the size of the event indication structure, from
a specified id
@param [in]  eventIndId
@param [out] pEventIndSize
@return true if event ID was found; else false
locClientGetSizeByEventIndId @brief Gets the size of the event indication structure from a specified id @param [ in ] eventIndId @param [ out ] pEventIndSize @return true if event ID was found ; else false
bool locClientGetSizeByEventIndId(uint32_t eventIndId, size_t *pEventIndSize)
{
  size_t idx = 0, eventIndTableSize = 0;
  if(pEventIndSize == NULL)
  {
    LOC_LOGE("%s:%d]: size argument NULL !", __func__, __LINE__);
    return false;
  }
  eventIndTableSize =
    (sizeof(locClientEventIndTable)/sizeof(locClientEventIndTableStructT));
  for(idx=0; idx<eventIndTableSize; idx++ )
  {
    if(eventIndId == locClientEventIndTable[idx].eventId)
    {
      *pEventIndSize = locClientEventIndTable[idx].eventSize;
      LOC_LOGV("%s:%d]: event ind Id %d size = %d\n", __func__, __LINE__,
                    eventIndId, (uint32_t)*pEventIndSize);
      return true;
    }
  }
  return false;
}
bool locClientGetSizeByEventIndId ( uint32_t eventIndId , size_t * pEventIndSize ) { size_t idx = 0 , eventIndTableSize = 0 ; if ( pEventIndSize == NULL ) { LOC_LOGE ( " " , __func__ , __LINE__ ) ; return false ; } eventIndTableSize = ( sizeof ( locClientEventIndTable ) / sizeof ( locClientEventIndTableStructT ) ) ; for ( idx = 0 ; idx < eventIndTableSize ; idx ++ ) { if ( eventIndId == locClientEventIndTable [ idx ] . eventId ) { * pEventIndSize = locClientEventIndTable [ idx ] . eventSize ; LOC_LOGV ( " \n " , __func__ , __LINE__ , eventIndId , ( uint32_t ) * pEventIndSize ) ; return true ; } } return false ; }
locClientGetSizeByEventIndId
  @brief Gets the size of the event indication structure, from
         a specified id
  @param [in]  eventIndId
  @param [out] pEventIndSize
  @return true if event ID was found; else false
locClientGetSizeByEventIndId @brief Gets the size of the event indication structure from a specified id @param [ in ] eventIndId @param [ out ] pEventIndSize @return true if event ID was found ; else false
// Validate input arguments // look in the event table // found // not found