### Function

# Secret Schema newv

#### Declaration [src]

    SecretSchema*
    secret_schema_newv (
      const gchar* name,
      SecretSchemaFlags flags,
      GHashTable* attribute_names_and_types
    )

#### Description [src]

Using this function is not normally necessary from C code. This is useful for constructing `SecretSchema` structures in bindings.

A schema represents a set of attributes that are stored with an item. These schemas are used for interoperability between various services storing the same types of items.

Each schema has an `name` like `org.gnome.keyring.NetworkPassword`, and defines a set of attributes names, and types (string, integer, boolean) for those attributes.

Each key in the `attributes` table should be a attribute name strings, and the values in the table should be integers from the `SecretSchemaAttributeType` enumeration, representing the attribute type for each attribute name.

Normally when looking up passwords only those with matching schema names are returned. If the schema `flags` contain the `SECRET_SCHEMA_DONT_MATCH_NAME` flag, then lookups will not check that the schema name matches that on the item, only the schema’s attributes are matched. This is useful when you are looking up items that are not stored by the libsecret library. Other libraries such as libgnome-keyring don’t store the schema name.

This function is renamed to `()` in language bindings.

#### Parameters

`name`

  Type: `const gchar*`

  The dotted name of the schema.

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

`flags`

  Type: `SecretSchemaFlags`

  The flags for the schema.

`attribute_names_and_types`

  Type: `GHashTable`

  The attribute names and types of those attributes.

  The data is owned by the caller of the function.

#### Return value

Type: `SecretSchema`

The new schema, which should be unreferenced with `secret_schema_unref()` when done.

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