Schema.newv


Description:

[ CCode ( cname = "secret_schema_newv" , has_construct_function = false ) ]
public Schema.newv (string name, SchemaFlags flags, HashTable<string,SchemaAttributeType> attribute_names_and_types)

Using this function is not normally necessary from C code.

This is useful for constructing Schema 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 [enumSchemaAttributeType] 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 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.

Parameters:

name

the dotted name of the schema

flags

the flags for the schema

attribute_names_and_types

the attribute names and types of those attributes

Returns:

the new schema, which should be unreferenced with [methodSchema.unref] when done




2022 vala-language.org