int main(int argc, char *argv[]) { const GpsInterface *interface; interface = gps_get_hardware_interface(); interface->init(&callbacks); interface->start(); sleep(60); interface->stop(); return 0; }
/* HAL Methods */ const GpsInterface* gps__get_gps_interface(struct gps_device_t* dev) { LOGV("get_interface was called"); originalGpsInterface = gps_get_hardware_interface(); newGpsInterface.size = sizeof(GpsInterface); newGpsInterface.init = init_wrapper; newGpsInterface.start = start_wrapper; newGpsInterface.stop = stop_wrapper; newGpsInterface.cleanup = originalGpsInterface->cleanup; newGpsInterface.inject_time = originalGpsInterface->inject_time; newGpsInterface.inject_location = originalGpsInterface->inject_location; newGpsInterface.delete_aiding_data = originalGpsInterface->delete_aiding_data; newGpsInterface.set_position_mode = set_position_mode_wrapper; newGpsInterface.get_extension = wrapper_get_extension; return &newGpsInterface; }
const GpsInterface* gps__get_gps_interface(struct gps_device_t* dev) { D("gps_get_hardware_interface"); return gps_get_hardware_interface(); }