Soup.HSTSEnforcerDB.new
Description: Reference for Soup.HSTSEnforcerDB.new

### Constructor

# Soup HSTSEnforcerDBnew

#### Declaration [src]

    SoupHSTSEnforcer*
    soup_hsts_enforcer_db_new (
      const char* filename
    )

#### Description [src]

Creates a `SoupHSTSEnforcerDB`.

`filename` will be read in during the initialization of a `SoupHSTSEnforcerDB`, in order to create an initial set of HSTS policies. If the file doesn’t exist, a new database will be created and initialized. Changes to the policies during the lifetime of a `SoupHSTSEnforcerDB` will be written to `filename` when `SoupHSTSEnforcer::changed` is emitted.

#### Parameters

`filename`

  Type: `const char*`

  The filename of the database to read/write from.

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

#### Return value

Type: `SoupHSTSEnforcer`

The new `SoupHSTSEnforcer`.

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