EDataServer.webdav_discover_sources_finish
Description: Reference for EDataServer.webdav_discover_sources_finish

### Function

# EDataServerwebdav_discover_sources_finish

since: 3.18

#### Declaration [src]

    gboolean
    e_webdav_discover_sources_finish (
      ESource* source,
      GAsyncResult* result,
      gchar** out_certificate_pem,
      GTlsCertificateFlags* out_certificate_errors,
      GSList** out_discovered_sources,
      GSList** out_calendar_user_addresses,
      GError** error
    )

#### Description [src]

Finishes the operation started with e_webdav_discover_sources(). If an error occurred, the function will set `error` and return `FALSE`. The function can return success and no discovered sources, the same as it can return failure, but still set some output arguments, like the certificate related output arguments with G_TLS_ERROR_BAD_CERTIFICATE error.

The return value of `out_certificate_pem` should be freed with `g_free()` when no longer needed.

The return value of `out_discovered_sources` should be freed with `e_webdav_discover_free_discovered_sources()` when no longer needed.

The return value of `out_calendar_user_addresses` should be freed with g_slist_free_full (calendar_user_addresses, g_free); when no longer needed.

Available since: 3.18

#### Parameters

`source`

  Type: `ESource`

  An `ESource` on which the operation was started.

  The data is owned by the caller of the function.

`result`

  Type: `GAsyncResult`

  A `GAsyncResult`.

  The data is owned by the caller of the function.

`out_certificate_pem`

  Type: `gchar**`

  Optional return location for a server SSL certificate in PEM format, when the operation failed with an SSL error.

  The argument will be set by the function.
  The argument can be `NULL`.
  The caller of the function takes ownership of the returned data, and is responsible for freeing it.
  The value is a NUL terminated UTF-8 string.

`out_certificate_errors`

  Type: `GTlsCertificateFlags`

  Optional `GTlsCertificateFlags`, with certificate error flags when the operation failed with SSL error.

  The argument will be set by the function.
  The argument can be `NULL`.
  The caller of the function takes ownership of the returned data, and is responsible for freeing it.

`out_discovered_sources`

  Type: A list of `EWebDAVDiscoveredSource*`

  A `GSList` of all discovered sources.

  The argument will be set by the function.
  The argument can be `NULL`.
  The caller of the function takes ownership of the returned data, and is responsible for freeing it.

`out_calendar_user_addresses`

  Type: A list of `utf8`

  A `GSList` of all discovered mail addresses for calendar sources.

  The argument will be set by the function.
  The argument can be `NULL`.
  The caller of the function takes ownership of the returned data, and is responsible for freeing it.
  Each element is a NUL terminated UTF-8 string.

`error`

  Type: `GError **`

  The return location for a recoverable error.

  The argument can be `NULL`.
  If the return location is not `NULL`, then you must initialize it to a `NULL` `GError*`.
  The argument will be left initialized to `NULL` by the function if there are no errors.
  In case of error, the argument will be set to a newly allocated `GError`; the caller will take ownership of the data, and be responsible for freeing it.

#### Return value

Type: `gboolean`

`TRUE` on success, `FALSE` on failure.