Malcontent.SessionLimits.deserialize
Description: Reference for Malcontent.SessionLimits.deserialize

### Function

# Malcontent SessionLimitsdeserialize

since: 0.7.0

#### Declaration [src]

    MctSessionLimits*
    mct_session_limits_deserialize (
      GVariant* variant,
      uid_t user_id,
      GError** error
    )

#### Description [src]

Deserialize a set of session limits previously serialized with `mct_session_limits_serialize()`.

This function guarantees to be able to deserialize any serialized form from this version or older versions of libmalcontent.

If deserialization fails, `MCT_MANAGER_ERROR_INVALID_DATA` will be returned.

Available since: 0.7.0

#### Parameters

`variant`

  Type: `GVariant`

  A serialized session limits variant.

  The data is owned by the caller of the function.

`user_id`

  Type: `uid_t`

  The ID of the user the session limits relate to.

`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: `MctSessionLimits`

Deserialized session limits.

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