* gaflight_location_new: * @uri: An URI to specify location. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: (nullable): The newly created location, %NULL on error. * * Since: 5.0.0 */
| 249 | * Since: 5.0.0 |
| 250 | */ |
| 251 | GAFlightLocation * |
| 252 | gaflight_location_new(const gchar *uri, GError **error) |
| 253 | { |
| 254 | auto location = GAFLIGHT_LOCATION(g_object_new(GAFLIGHT_TYPE_LOCATION, NULL)); |
| 255 | auto flight_location = gaflight_location_get_raw(location); |
| 256 | if (garrow::check(error, |
| 257 | arrow::flight::Location::Parse(uri).Value(flight_location), |
| 258 | "[flight-location][new]")) { |
| 259 | return location; |
| 260 | } else { |
| 261 | g_object_unref(location); |
| 262 | return NULL; |
| 263 | } |
| 264 | } |
| 265 | |
| 266 | /** |
| 267 | * gaflight_location_to_string: |
no test coverage detected