GWeather.Location.next_child

### Method

# GWeather Locationnext_child

#### Declaration [src]

    GWeatherLocation*
    gweather_location_next_child (
      GWeatherLocation* loc,
      GWeatherLocation* child
    )

#### Description [src]

Allows iterating all children of a location.

Pass `NULL` to get the first child, and any child to get the next one.

Note that the reference to `child` is taken, meaning iterating all children is as simple as:

      g_autoptr (GWeatherLocation) child = NULL;
      while ((child = gweather_location_next_child (location, child)))
        {
           // Do something with child
        }

#### Parameters

`child`

  Type: `GWeatherLocation`

  The next child.

  The argument can be `NULL`.
  The instance takes ownership of the data, and is responsible for freeing it.

#### Return value

Type: `GWeatherLocation`

The next child, if one exists.

The caller of the method takes ownership of the data, and is responsible for freeing it.
The return value can be `NULL`.