Camel.Folder.dup_headers_sync

### Method

# Camel Folderdup_headers_sync

since: 3.58

#### Declaration [src]

    gboolean
    camel_folder_dup_headers_sync (
      CamelFolder* folder,
      const gchar* uid,
      CamelNameValueArray** out_headers,
      GCancellable* cancellable,
      GError** error
    )

#### Description [src]

Reads headers of a message with the `uid` and returns it in the `out_headers`. Free the headers with camel_name_value_array_free(), when no longer needed.

This is an optional method, which is meant to be used by the providers which can read the headers from the server when not available locally. The default implementation tries to read the headers from a loaded message info and a locally cached message when its file name is known. It returns a G_IO_ERROR_NOT_FOUND error when failed.

Available since: 3.58

#### Parameters

`uid`

  Type: `const gchar*`

  A message UID.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`out_headers`

  Type: `CamelNameValueArray`

  Return location to set read `CamelNameValueArray` to.

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

`cancellable`

  Type: `GCancellable`

  Optional `GCancellable` object, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`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 method 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`

Whether the headers had been found and the `out_headers` populated.