command_geocode_handler *handler = NULL;
if (func) {
/* need to create the handler when the function is NULL */
- pr.add(my_req_id);
- handler = new (std::nothrow) command_geocode_handler(plugin(),
- callback, user_data, my_req_id);
+ if (pr.add(my_req_id))
+ handler = new (std::nothrow) command_geocode_handler(plugin(),
+ callback, user_data, my_req_id);
if (handler) {
/* Run the plugin interface function */
error = func(address.c_str(), preference,
- command_geocode_handler::foreach_geocode_cb, handler,
- &handler->plg_req_id);
+ command_geocode_handler::foreach_geocode_cb,
+ handler, &handler->plg_req_id);
pr.update(my_req_id, handler);
error = MAPS_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
}
} else {
- /* Plugin Function is NULL: use default empty function */
- /*
- func = plugin::get_empty_interface().maps_plugin_geocode;
- */
+ /* Plugin Function is NULL */
MAPS_LOGE("MAPS_ERROR_NOT_SUPPORTED: Can't get any plugin");
error = MAPS_ERROR_NOT_SUPPORTED;
}
command_geocode_handler *handler = NULL;
if (func) {
/* No need to create the handler when the function is NULL */
- pr.add(my_req_id);
- handler = new (std::nothrow) command_geocode_handler(plugin(),
- callback, user_data, my_req_id);
+ if (pr.add(my_req_id))
+ handler = new (std::nothrow) command_geocode_handler(plugin(),
+ callback, user_data, my_req_id);
if (handler) {
/* Run the plugin interface function */
error = func(address.c_str(), bounds, preference,
- command_geocode_handler::foreach_geocode_cb,
- handler, &handler->plg_req_id);
+ command_geocode_handler::foreach_geocode_cb,
+ handler, &handler->plg_req_id);
pr.update(my_req_id, handler);
error = MAPS_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
}
} else {
- /* Plugin Function is NULL: use default empty function */
- /*
- func = plugin::get_empty_interface().
- maps_plugin_geocode_inside_area;
- */
+ /* Plugin Function is NULL */
MAPS_LOGE("MAPS_ERROR_NOT_SUPPORTED: Can't get any plugin");
error = MAPS_ERROR_NOT_SUPPORTED;
}
command_geocode_handler *handler = NULL;
if (func) {
/* No need to create the handler when the function is NULL */
- pr.add(my_req_id);
- handler = new (std::nothrow) command_geocode_handler(plugin(),
- callback, user_data, my_req_id);
+ if (pr.add(my_req_id))
+ handler = new (std::nothrow) command_geocode_handler(plugin(),
+ callback, user_data, my_req_id);
if (handler) {
/* Run the plugin interface function */
- error = func(address,
- preference, command_geocode_handler::foreach_geocode_cb,
- handler, &handler->plg_req_id);
+ error = func(address, preference,
+ command_geocode_handler::foreach_geocode_cb,
+ handler, &handler->plg_req_id);
pr.update(my_req_id, handler);
} else {
error = MAPS_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
}
} else {
- /* Plugin Function is NULL: use default empty function */
- /*
- func = plugin::get_empty_interface().
- maps_plugin_geocode_by_structured_address;
- */
+ /* Plugin Function is NULL */
MAPS_LOGE("MAPS_ERROR_NOT_SUPPORTED: Can't get any plugin");
error = MAPS_ERROR_NOT_SUPPORTED;
}
command_reverse_geocode_handler *handler = NULL;
if (func) {
/* No need to create the handler when the function is NULL */
- pr.add(my_req_id);
- handler = new (std::nothrow) command_reverse_geocode_handler(plugin(),
- callback, user_data, my_req_id);
+ if (pr.add(my_req_id))
+ handler = new (std::nothrow) command_reverse_geocode_handler(plugin(),
+ callback, user_data, my_req_id);
if (handler) {
/* Run the plugin interface function */
error = func(latitude, longitude, preference,
- command_reverse_geocode_handler::foreach_reverse_geocode_cb,
- handler, &handler->plg_req_id);
+ command_reverse_geocode_handler::foreach_reverse_geocode_cb,
+ handler, &handler->plg_req_id);
pr.update(my_req_id, handler);
error = MAPS_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
}
} else {
- /* Plugin Function is NULL: use default empty function */
- /*
- func = plugin::get_empty_interface().
- maps_plugin_reverse_geocode;
- */
+ /* Plugin Function is NULL */
MAPS_LOGE("MAPS_ERROR_NOT_SUPPORTED: Can't get any plugin");
error = MAPS_ERROR_NOT_SUPPORTED;
}
command_multi_reverse_geocode_handler *handler = NULL;
if (func) {
/* No need to create the handler when the function is NULL */
- pr.add(my_req_id);
- handler = new (std::nothrow) command_multi_reverse_geocode_handler(plugin(),
- callback, user_data, my_req_id);
+ if (pr.add(my_req_id))
+ handler = new (std::nothrow) command_multi_reverse_geocode_handler(plugin(),
+ callback, user_data, my_req_id);
if (handler) {
/* Run the plugin interface function */
error = func(maps_list, preference,
- command_multi_reverse_geocode_handler::foreach_multi_reverse_geocode_cb,
- handler, &handler->plg_req_id);
+ command_multi_reverse_geocode_handler::foreach_multi_reverse_geocode_cb,
+ handler, &handler->plg_req_id);
pr.update(my_req_id, handler);
error = MAPS_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
}
} else {
- /* Plugin Function is NULL: use default empty function */
- /*
- func = plugin::get_empty_interface().
- maps_plugin_multi_reverse_geocode;
- */
+ /* Plugin Function is NULL */
MAPS_LOGE("MAPS_ERROR_NOT_SUPPORTED: Can't get any plugin");
error = MAPS_ERROR_NOT_SUPPORTED;
}
command_search_place_handler *handler = NULL;
if (func) {
/* No need to create the handler when the function is NULL */
- pr.add(my_req_id);
- handler = new (std::nothrow) command_search_place_handler(plugin(),
- callback, user_data, my_req_id);
+ if (pr.add(my_req_id))
+ handler = new (std::nothrow) command_search_place_handler(plugin(),
+ callback, user_data, my_req_id);
+
if (handler) {
/* Run the plugin interface function */
error = func(position, distance, filter, preference,
- command_search_place_handler::foreach_place_cb, handler,
- &handler->plg_req_id);
+ command_search_place_handler::foreach_place_cb,
+ handler, &handler->plg_req_id);
pr.update(my_req_id, handler);
error = MAPS_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
}
} else {
- /* Plugin Function is NULL: use default empty function */
- /*
- func = plugin::get_empty_interface().maps_plugin_search_place;
- */
+ /* Plugin Function is NULL */
MAPS_LOGE("MAPS_ERROR_NOT_SUPPORTED: Can't get any plugin");
error = MAPS_ERROR_NOT_SUPPORTED;
}
command_search_place_handler *handler = NULL;
if (func) {
/* No need to create the handler when the function is NULL */
- pr.add(my_req_id);
- handler = new (std::nothrow) command_search_place_handler(plugin(),
- callback, user_data, my_req_id);
+ if (pr.add(my_req_id))
+ handler = new (std::nothrow) command_search_place_handler(plugin(),
+ callback, user_data, my_req_id);
+
if (handler) {
/* Run the plugin interface function */
error = func(boundary, filter,
- preference, command_search_place_handler::foreach_place_cb,
- handler, &handler->plg_req_id);
+ preference, command_search_place_handler::foreach_place_cb,
+ handler, &handler->plg_req_id);
pr.update(my_req_id, handler);
error = MAPS_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
}
} else {
- /* Plugin Function is NULL: use default empty function */
- /*
- func = plugin::get_empty_interface().
- maps_plugin_search_place_by_area;
- */
-
+ /* Plugin Function is NULL */
MAPS_LOGE("MAPS_ERROR_NOT_SUPPORTED: Can't get any plugin");
error = MAPS_ERROR_NOT_SUPPORTED;
}
command_search_place_handler *handler = NULL;
if (func) {
/* No need to create the handler when the function is NULL */
- pr.add(my_req_id);
- handler = new (std::nothrow) command_search_place_handler(plugin(),
- callback, user_data, my_req_id);
+ if (pr.add(my_req_id))
+ handler = new (std::nothrow) command_search_place_handler(plugin(),
+ callback, user_data, my_req_id);
+
if (handler) {
/* Run the plugin interface function */
error = func(address.c_str(), boundary, filter, preference,
- command_search_place_handler::foreach_place_cb, handler,
- &handler->plg_req_id);
+ command_search_place_handler::foreach_place_cb,
+ handler, &handler->plg_req_id);
pr.update(my_req_id, handler);
error = MAPS_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
}
} else {
- /* Plugin Function is NULL: use default empty function */
- /*
- func = plugin::get_empty_interface().
- maps_plugin_search_place_by_address;
- */
+ /* Plugin Function is NULL */
MAPS_LOGE("MAPS_ERROR_NOT_SUPPORTED: Can't get any plugin");
error = MAPS_ERROR_NOT_SUPPORTED;
}
command_search_place_list_handler *handler = NULL;
if (func) {
/* No need to create the handler when the function is NULL */
- pr.add(my_req_id);
- handler = new (std::nothrow) command_search_place_list_handler(plugin(),
- callback, user_data, my_req_id);
+ if (pr.add(my_req_id))
+ handler = new (std::nothrow) command_search_place_list_handler(plugin(),
+ callback, user_data, my_req_id);
+
if (handler) {
/* Run the plugin interface function */
error = func(boundary, filter, preference,
- command_search_place_list_handler::foreach_place_list_cb, handler,
- &handler->plg_req_id);
+ command_search_place_list_handler::foreach_place_list_cb,
+ handler, &handler->plg_req_id);
pr.update(my_req_id, handler);
error = MAPS_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
}
} else {
- /* Plugin Function is NULL: use default empty function */
- /*
- func = plugin::get_empty_interface().maps_plugin_search_place_list;
- */
+ /* Plugin Function is NULL */
MAPS_LOGE("MAPS_ERROR_NOT_SUPPORTED: Can't get any plugin");
error = MAPS_ERROR_NOT_SUPPORTED;
}
command_get_place_details_handler *handler = NULL;
if (func) {
/* No need to create the handler when the function is NULL */
- pr.add(my_req_id);
- handler = new (std::nothrow) command_get_place_details_handler(plugin(),
- callback, user_data, my_req_id);
+ if (pr.add(my_req_id))
+ handler = new (std::nothrow) command_get_place_details_handler(plugin(),
+ callback, user_data, my_req_id);
+
if (handler) {
/* Run the plugin interface function */
error = func(url.c_str(),
- command_get_place_details_handler::foreach_place_details_cb,
- handler, &handler->plg_req_id);
+ command_get_place_details_handler::foreach_place_details_cb,
+ handler, &handler->plg_req_id);
pr.update(my_req_id, handler);
error = MAPS_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
}
} else {
- /* Plugin Function is NULL: use default empty function */
- /*
- func = plugin::get_empty_interface().
- maps_plugin_get_place_details;
- */
+ /* Plugin Function is NULL */
MAPS_LOGE("MAPS_ERROR_NOT_SUPPORTED: Can't get any plugin");
error = MAPS_ERROR_NOT_SUPPORTED;
}
command_search_route_handler *handler = NULL;
if (func) {
/* No need to create the handler when the function is NULL */
- pr.add(my_req_id);
- handler = new (std::nothrow) command_search_route_handler(plugin(),
- callback, user_data, my_req_id);
+ if (pr.add(my_req_id))
+ handler = new (std::nothrow) command_search_route_handler(plugin(),
+ callback, user_data, my_req_id);
if (handler) {
/* Run the plugin interface function */
error = func(origin, destination, preference,
- command_search_route_handler::foreach_route_cb,
- handler, &handler->plg_req_id);
+ command_search_route_handler::foreach_route_cb,
+ handler, &handler->plg_req_id);
pr.update(my_req_id, handler);
error = MAPS_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
}
} else {
- /* Plugin Function is NULL: use default empty function */
- /*
- func = plugin::get_empty_interface().maps_plugin_search_route;
- */
+ /* Plugin Function is NULL */
MAPS_LOGE("MAPS_ERROR_NOT_SUPPORTED: Can't get any plugin");
error = MAPS_ERROR_NOT_SUPPORTED;
}
command_search_route_handler *handler = NULL;
if (func) {
/* No need to create the handler when the function is NULL */
- pr.add(my_req_id);
- handler = new (std::nothrow) command_search_route_handler(plugin(),
- callback, user_data, my_req_id);
+ if (pr.add(my_req_id))
+ handler = new (std::nothrow) command_search_route_handler(plugin(),
+ callback, user_data, my_req_id);
+
if (handler) {
/* Run the plugin interface function */
error = func(waypoint_list, waypoint_num, preference,
- command_search_route_handler::foreach_route_cb, handler,
- &handler->plg_req_id);
+ command_search_route_handler::foreach_route_cb, handler,
+ &handler->plg_req_id);
pr.update(my_req_id, handler);
error = MAPS_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
}
} else {
- /* Plugin Function is NULL: use default empty function */
- /*
- func = plugin::get_empty_interface().
- maps_plugin_search_route_waypoints;
- */
+ /* Plugin Function is NULL */
MAPS_LOGE("MAPS_ERROR_NOT_SUPPORTED: Can't get any plugin");
error = MAPS_ERROR_NOT_SUPPORTED;
}