return MAPS_ERROR_NOT_SUPPORTED;
if (!place || !callback)
return MAPS_ERROR_INVALID_PARAMETER;
+ if (!((maps_place_s *) place)->properties)
+ return MAPS_ERROR_NOT_FOUND;
return maps_item_hashtable_foreach(((maps_place_s *) place)->properties,
callback, user_data);
}
return MAPS_ERROR_INVALID_PARAMETER;
if (!__is_supported(place, MAPS_PLACE_CATEGORIES))
return MAPS_ERROR_NOT_SUPPORTED;
+ if (!((maps_place_s *) place)->categories)
+ return MAPS_ERROR_NOT_FOUND;
return maps_item_list_foreach(((maps_place_s *) place)->categories,
maps_place_category_clone, callback, user_data);
}
return MAPS_ERROR_INVALID_PARAMETER;
if (!__is_supported(place, MAPS_PLACE_ATTRIBUTES))
return MAPS_ERROR_NOT_SUPPORTED;
+ if (!((maps_place_s *) place)->attribute)
+ return MAPS_ERROR_NOT_FOUND;
return maps_item_list_foreach(((maps_place_s *) place)->attribute,
maps_place_attribute_clone, callback, user_data);
}
return MAPS_ERROR_INVALID_PARAMETER;
if (!__is_supported(place, MAPS_PLACE_CONTACTS))
return MAPS_ERROR_NOT_SUPPORTED;
+ if (!((maps_place_s *) place)->contacts)
+ return MAPS_ERROR_NOT_FOUND;
return maps_item_list_foreach(((maps_place_s *) place)->contacts,
maps_place_contact_clone, callback, user_data);
}
return MAPS_ERROR_INVALID_PARAMETER;
if (!__is_supported(place, MAPS_PLACE_EDITORIALS))
return MAPS_ERROR_NOT_SUPPORTED;
+ if (!((maps_place_s *) place)->editorials)
+ return MAPS_ERROR_NOT_FOUND;
return maps_item_list_foreach(((maps_place_s *) place)->editorials,
maps_place_editorial_clone, callback, user_data);
}
return MAPS_ERROR_INVALID_PARAMETER;
if (!__is_supported(place, MAPS_PLACE_IMAGE))
return MAPS_ERROR_NOT_SUPPORTED;
+ if (!((maps_place_s *) place)->images)
+ return MAPS_ERROR_NOT_FOUND;
return maps_item_list_foreach(((maps_place_s *) place)->images,
maps_place_image_clone, callback, user_data);
}
return MAPS_ERROR_INVALID_PARAMETER;
if (!__is_supported(place, MAPS_PLACE_REVIEWS))
return MAPS_ERROR_NOT_SUPPORTED;
+ if (!((maps_place_s *) place)->reviews)
+ return MAPS_ERROR_NOT_FOUND;
return maps_item_list_foreach(((maps_place_s *) place)->reviews,
maps_place_review_clone, callback, user_data);
}
return MAPS_ERROR_NOT_SUPPORTED;
if (!filter)
return MAPS_ERROR_INVALID_PARAMETER;
- return maps_item_hashtable_get_string(((maps_place_filter_s *) filter)->
- table, key, value);
+ return maps_item_hashtable_get_string(((maps_place_filter_s *) filter)->table,
+ key, value);
}
EXPORT_API int maps_place_filter_foreach_property(const maps_place_filter_h filter,
return MAPS_ERROR_NOT_SUPPORTED;
if (!filter || !callback)
return MAPS_ERROR_INVALID_PARAMETER;
- return maps_item_hashtable_foreach(((maps_place_filter_s *) filter)->
- table, callback, user_data);
+ if (!((maps_place_filter_s *) filter)->table)
+ return MAPS_ERROR_NOT_FOUND;
+ return maps_item_hashtable_foreach(((maps_place_filter_s *) filter)->table,
+ callback, user_data);
}
EXPORT_API int maps_place_filter_get_keyword(const maps_place_filter_h filter,
return MAPS_ERROR_NOT_SUPPORTED;
if (!filter || !keyword)
return MAPS_ERROR_INVALID_PARAMETER;
- return maps_item_hashtable_get_string(((maps_place_filter_s *) filter)->
- table, "MAPS_PLACE_FILTER_KEYWORD", keyword);
+ return maps_item_hashtable_get_string(((maps_place_filter_s *) filter)->table,
+ "MAPS_PLACE_FILTER_KEYWORD", keyword);
}
EXPORT_API int maps_place_filter_get_place_name(const maps_place_filter_h filter,
return MAPS_ERROR_NOT_SUPPORTED;
if (!filter || !place_name)
return MAPS_ERROR_INVALID_PARAMETER;
- return maps_item_hashtable_get_string(((maps_place_filter_s *) filter)->
- table, "MAPS_PLACE_FILTER_PLACE_NAME", place_name);
+ return maps_item_hashtable_get_string(((maps_place_filter_s *) filter)->table,
+ "MAPS_PLACE_FILTER_PLACE_NAME", place_name);
}
EXPORT_API int maps_place_filter_get_category(const maps_place_filter_h filter,
return MAPS_ERROR_NOT_SUPPORTED;
if (!filter || !place_address)
return MAPS_ERROR_INVALID_PARAMETER;
- return maps_item_hashtable_get_string(((maps_place_filter_s *) filter)->
- table, "MAPS_PLACE_FILTER_PLACE_ADDRESS", place_address);
+ return maps_item_hashtable_get_string(((maps_place_filter_s *) filter)->table,
+ "MAPS_PLACE_FILTER_PLACE_ADDRESS", place_address);
}
/*----------------------------------------------------------------------------*/
return MAPS_ERROR_NOT_SUPPORTED;
if (!filter)
return MAPS_ERROR_INVALID_PARAMETER;
- return maps_item_hashtable_set_string(((maps_place_filter_s *) filter)->
- table, key, value);
+ return maps_item_hashtable_set_string(((maps_place_filter_s *) filter)->table,
+ key, value);
}
EXPORT_API int maps_place_filter_set_keyword(maps_place_filter_h filter,
return MAPS_ERROR_NOT_SUPPORTED;
if (!filter || !keyword)
return MAPS_ERROR_INVALID_PARAMETER;
- return maps_item_hashtable_set_string(((maps_place_filter_s *) filter)->
- table, "MAPS_PLACE_FILTER_KEYWORD", keyword);
+ return maps_item_hashtable_set_string(((maps_place_filter_s *) filter)->table,
+ "MAPS_PLACE_FILTER_KEYWORD", keyword);
}
EXPORT_API int maps_place_filter_set_place_name(maps_place_filter_h filter,
return MAPS_ERROR_NOT_SUPPORTED;
if (!filter || !place_name)
return MAPS_ERROR_INVALID_PARAMETER;
- return maps_item_hashtable_set_string(((maps_place_filter_s *) filter)->
- table, "MAPS_PLACE_FILTER_PLACE_NAME", place_name);
+ return maps_item_hashtable_set_string(((maps_place_filter_s *) filter)->table,
+ "MAPS_PLACE_FILTER_PLACE_NAME", place_name);
}
EXPORT_API int maps_place_filter_set_category(maps_place_filter_h filter,
return MAPS_ERROR_NOT_SUPPORTED;
if (!filter || !place_address)
return MAPS_ERROR_INVALID_PARAMETER;
- return maps_item_hashtable_set_string(((maps_place_filter_s *) filter)->
- table, "MAPS_PLACE_FILTER_PLACE_ADDRESS", place_address);
+ return maps_item_hashtable_set_string(((maps_place_filter_s *) filter)->table,
+ "MAPS_PLACE_FILTER_PLACE_ADDRESS", place_address);
}
return MAPS_ERROR_NOT_SUPPORTED;
if (!callback)
return MAPS_ERROR_INVALID_PARAMETER;
+ if (!((maps_route_s *) route)->path)
+ return MAPS_ERROR_NOT_FOUND;
return maps_item_list_foreach(((maps_route_s *) route)->path,
maps_coordinates_clone, callback, user_data);
return MAPS_ERROR_NOT_SUPPORTED;
if (!callback)
return MAPS_ERROR_INVALID_PARAMETER;
+ if (!((maps_route_s *) route)->segments)
+ return MAPS_ERROR_NOT_FOUND;
return maps_item_list_foreach(((maps_route_s *) route)->segments,
maps_route_segment_clone, callback, user_data);
return MAPS_ERROR_NOT_SUPPORTED;
if (!route || !callback)
return MAPS_ERROR_INVALID_PARAMETER;
+ if (!((maps_route_s *) route)->properties)
+ return MAPS_ERROR_NOT_FOUND;
return maps_item_hashtable_foreach(((maps_route_s *) route)->properties,
callback, user_data);
}
return MAPS_ERROR_NOT_SUPPORTED;
if (!callback)
return MAPS_ERROR_INVALID_PARAMETER;
+ if (!((maps_route_segment_s *) segment)->path)
+ return MAPS_ERROR_NOT_FOUND;
return maps_item_list_foreach(((maps_route_segment_s *) segment)->path,
maps_coordinates_clone, callback, user_data);
return MAPS_ERROR_NOT_SUPPORTED;
if (!callback)
return MAPS_ERROR_INVALID_PARAMETER;
+ if (!((maps_route_segment_s *) segment)->maneuvers)
+ return MAPS_ERROR_NOT_FOUND;
- return maps_item_list_foreach(((maps_route_segment_s *) segment)->
- maneuvers, maps_route_maneuver_clone, callback, user_data);
+ return maps_item_list_foreach(((maps_route_segment_s *) segment)->maneuvers,
+ maps_route_maneuver_clone, callback, user_data);
}
int _maps_route_segment_is_data_supported(const maps_route_segment_h segment,
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_s *v = (maps_view_s *)view;
+ if (!v->view_objects)
+ return MAPS_ERROR_NOT_FOUND;
return maps_item_list_foreach(v->view_objects, NULL, _maps_view_object_overlay_cb, v->clipper);
}
if (!view || !callback)
return MAPS_ERROR_INVALID_PARAMETER;
maps_view_s *v = (maps_view_s *)view;
+ if (!v->view_objects)
+ return MAPS_ERROR_NOT_FOUND;
return maps_item_list_foreach(v->view_objects, NULL, callback, user_data);
}
maps_view_polyline_data_s *p = __get_polyline_data(polyline);
if (!p)
return MAPS_ERROR_INVALID_PARAMETER;
+ if (!p->points)
+ return MAPS_ERROR_NOT_FOUND;
/* Iterate over polyline trajectory */
return maps_coordinates_list_foreach(p->points, callback, user_data);
maps_view_polygon_data_s *p = __get_polygon_data(polygon);
if (!p)
return MAPS_ERROR_INVALID_PARAMETER;
+ if (!p->points)
+ return MAPS_ERROR_NOT_FOUND;
/* Iterate over polygon border */
return maps_coordinates_list_foreach(p->points, callback, user_data);