### Function

# EDataServer WebDAVResource new

since: 3.26

#### Declaration [src]

    EWebDAVResource*
    e_webdav_resource_new (
      EWebDAVResourceKind kind,
      guint32 supports,
      const gchar* href,
      const gchar* etag,
      const gchar* display_name,
      const gchar* content_type,
      gsize content_length,
      glong creation_date,
      glong last_modified,
      const gchar* description,
      const gchar* color,
      guint order
    )

#### Description [src]

Some values of the resource are not always valid, depending on the `kind`, but also whether server stores such values and whether it had been asked for them to be fetched.

The `etag` for `E_WEBDAV_RESOURCE_KIND_COLLECTION` can be a change tag instead.

Available since: 3.26

#### Parameters

`kind`

  Type: `EWebDAVResourceKind`

  An `EWebDAVResourceKind` of the resource.

`supports`

  Type: `guint32`

  Bit-or of `EWebDAVResourceSupports` values.

`href`

  Type: `const gchar*`

  Href of the resource.

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

`etag`

  Type: `const gchar*`

  Optional ETag of the resource, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`display_name`

  Type: `const gchar*`

  Optional display name of the resource, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`content_type`

  Type: `const gchar*`

  Optional Content-Type of the resource, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`content_length`

  Type: `gsize`

  Optional Content-Length of the resource, or 0.

`creation_date`

  Type: `glong`

  Optional date of creation of the resource, or 0.

`last_modified`

  Type: `glong`

  Optional last modified time of the resource, or 0.

`description`

  Type: `const gchar*`

  Optional description of the resource, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`color`

  Type: `const gchar*`

  Optional color of the resource, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`order`

  Type: `guint`

  Sort order of the resource, or (guint) -1.

#### Return value

Type: `EWebDAVResource`

A newly created `EWebDAVResource`, prefilled with given values. Free it with e_webdav_resource_free(), when no longer needed.

The caller of the function takes ownership of the data, and is responsible for freeing it.