Properly refer to the fact that multiple passwords may be removed.
[platform/upstream/libsecret.git] / libsecret / secret-schemas.c
1 /* libsecret - GLib wrapper for Secret Service
2  *
3  * Copyright 2012 Stef Walter
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Lesser General Public License as published
7  * by the Free Software Foundation; either version 2.1 of the licence or (at
8  * your option) any later version.
9  *
10  * See the included COPYING file for more information.
11  *
12  * Author: Stef Walter <stefw@gnome.org>
13  */
14
15 #include "config.h"
16
17 #include "secret-schema.h"
18
19 /**
20  * SECRET_SCHEMA_NOTE:
21  *
22  * A predefined schema for personal passwords stored by the user in the
23  * password manager. This schema has no attributes, and the items are not
24  * meant to be used automatically by applications.
25  */
26
27 static const SecretSchema note_schema = {
28         "org.gnome.keyring.Note",
29         SECRET_SCHEMA_DONT_MATCH_NAME,
30         {
31                 {  "NULL", 0 },
32         }
33 };
34
35 const SecretSchema *  SECRET_SCHEMA_NOTE = &note_schema;
36
37 /**
38  * SECRET_SCHEMA_COMPAT_NETWORK:
39  *
40  * A predefined schema that is compatible with items stored via the
41  * libgnome-keyring 'network password' functions. This is meant to be used by
42  * applications migrating from libgnome-keyring which stored their secrets as
43  * 'network passwords'. It is not recommended that new code use this schema.
44  *
45  * The following attributes exist in the schema:
46  * <variablelist><title>Attributes:</title>
47  *     <varlistentry><term><literal>user</literal>:</term>
48  *         <listitem><para>The user name (string).</para></listitem></varlistentry>
49  *     <varlistentry><term><literal>domain</literal>:</term>
50  *         <listitem><para>The login domain or realm (string).</para></listitem></varlistentry>
51  *     <varlistentry><term><literal>object</literal>:</term>
52  *         <listitem><para>The object or path (string).</para></listitem></varlistentry>
53  *     <varlistentry><term><literal>protocol</literal>:</term>
54  *         <listitem><para>The protocol (a string like 'http').</para></listitem></varlistentry>
55  *     <varlistentry><term><literal>port</literal>:</term>
56  *         <listitem><para>The network port (integer).</para></listitem></varlistentry>
57  *     <varlistentry><term><literal>server</literal>:</term>
58  *         <listitem><para>The hostname or server (string).</para></listitem></varlistentry>
59  *     <varlistentry><term><literal>authtype</literal>:</term>
60  *         <listitem><para>The authentication type (string).</para></listitem></varlistentry>
61  * </variablelist>
62  */
63
64 static const SecretSchema network_schema = {
65         "org.gnome.keyring.NetworkPassword",
66         SECRET_SCHEMA_DONT_MATCH_NAME,
67         {
68                 {  "user", SECRET_SCHEMA_ATTRIBUTE_STRING },
69                 {  "domain", SECRET_SCHEMA_ATTRIBUTE_STRING },
70                 {  "object", SECRET_SCHEMA_ATTRIBUTE_STRING },
71                 {  "protocol", SECRET_SCHEMA_ATTRIBUTE_STRING },
72                 {  "port", SECRET_SCHEMA_ATTRIBUTE_INTEGER },
73                 {  "server", SECRET_SCHEMA_ATTRIBUTE_STRING },
74                 {  "authtype", SECRET_SCHEMA_ATTRIBUTE_STRING },
75                 {  "NULL", 0 },
76         }
77 };
78
79 const SecretSchema *  SECRET_SCHEMA_COMPAT_NETWORK = &network_schema;