This file is indexed.

/usr/share/gtk-doc/html/libsecret-1/libsecret-SecretSchema.html is in libsecret-1-dev 0.16-0ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SecretSchema</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="Libsecret Library Reference Manual">
<link rel="up" href="simple.html" title="Part I. Simple API">
<link rel="prev" href="libsecret-Password-storage.html" title="Password storage">
<link rel="next" href="examples.html" title="Part II. Examples">
<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="libsecret-Password-storage.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="simple.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Libsecret Library Reference Manual</th>
<td><a accesskey="n" href="examples.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#libsecret-SecretSchema.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#libsecret-SecretSchema.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="libsecret-SecretSchema"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libsecret-SecretSchema.top_of_page"></a>SecretSchema</span></h2>
<p>SecretSchema — Schema for defining which attributes are on items</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="libsecret-SecretSchema.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;libsecret/secret.h&gt;

extern const SecretSchema *  <a class="link" href="libsecret-SecretSchema.html#SECRET-SCHEMA-NOTE:CAPS" title="SECRET_SCHEMA_NOTE">SECRET_SCHEMA_NOTE</a>;
extern const SecretSchema *  <a class="link" href="libsecret-SecretSchema.html#SECRET-SCHEMA-COMPAT-NETWORK:CAPS" title="SECRET_SCHEMA_COMPAT_NETWORK">SECRET_SCHEMA_COMPAT_NETWORK</a>;
                    <a class="link" href="libsecret-SecretSchema.html#SecretSchema" title="SecretSchema">SecretSchema</a>;
enum                <a class="link" href="libsecret-SecretSchema.html#SecretSchemaFlags" title="enum SecretSchemaFlags">SecretSchemaFlags</a>;
                    <a class="link" href="libsecret-SecretSchema.html#SecretSchemaAttribute" title="SecretSchemaAttribute">SecretSchemaAttribute</a>;
enum                <a class="link" href="libsecret-SecretSchema.html#SecretSchemaAttributeType" title="enum SecretSchemaAttributeType">SecretSchemaAttributeType</a>;
<a class="link" href="libsecret-SecretSchema.html#SecretSchema" title="SecretSchema"><span class="returnvalue">SecretSchema</span></a> *      <a class="link" href="libsecret-SecretSchema.html#secret-schema-new" title="secret_schema_new ()">secret_schema_new</a>                   (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libsecret-SecretSchema.html#SecretSchemaFlags" title="enum SecretSchemaFlags"><span class="type">SecretSchemaFlags</span></a> flags</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
<a class="link" href="libsecret-SecretSchema.html#SecretSchema" title="SecretSchema"><span class="returnvalue">SecretSchema</span></a> *      <a class="link" href="libsecret-SecretSchema.html#secret-schema-newv" title="secret_schema_newv ()">secret_schema_newv</a>                  (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libsecret-SecretSchema.html#SecretSchemaFlags" title="enum SecretSchemaFlags"><span class="type">SecretSchemaFlags</span></a> flags</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> *attribute_names_and_types</code></em>);
<a class="link" href="libsecret-SecretSchema.html#SecretSchema" title="SecretSchema"><span class="returnvalue">SecretSchema</span></a> *      <a class="link" href="libsecret-SecretSchema.html#secret-schema-ref" title="secret_schema_ref ()">secret_schema_ref</a>                   (<em class="parameter"><code><a class="link" href="libsecret-SecretSchema.html#SecretSchema" title="SecretSchema"><span class="type">SecretSchema</span></a> *schema</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libsecret-SecretSchema.html#secret-schema-unref" title="secret_schema_unref ()">secret_schema_unref</a>                 (<em class="parameter"><code><a class="link" href="libsecret-SecretSchema.html#SecretSchema" title="SecretSchema"><span class="type">SecretSchema</span></a> *schema</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="libsecret-SecretSchema.description"></a><h2>Description</h2>
<p>
Each password is associated with a set of attributes. Attribute values can
be either strings, integers or booleans.
</p>
<p>
The names and types of allowed attributes for a given password are defined
with a schema.
</p>
<p>
Additional schemas can be defined via the <a class="link" href="libsecret-SecretSchema.html#SecretSchema" title="SecretSchema"><code class="literal">SecretSchema</code></a> structure like this:
</p>
<p>
</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="comment">/* in a header: */</span>

<span class="keyword">const</span><span class="normal"> <a href="libsecret-SecretSchema.html#SecretSchema">SecretSchema</a> </span><span class="symbol">*</span><span class="normal"> </span><span class="function">example_get_schema</span><span class="normal"> </span><span class="symbol">(</span><span class="type">void</span><span class="symbol">)</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Miscellaneous-Macros.html#G-GNUC-CONST:CAPS">G_GNUC_CONST</a></span><span class="symbol">;</span>

<span class="preproc">#define</span><span class="normal"> </span><span class="usertype">EXAMPLE_SCHEMA</span><span class="normal">  </span><span class="function">example_get_schema</span><span class="normal"> </span><span class="symbol">()</span>


<span class="comment">/* in a .c file: */</span>

<span class="keyword">const</span><span class="normal"> <a href="libsecret-SecretSchema.html#SecretSchema">SecretSchema</a> </span><span class="symbol">*</span>
<span class="function">example_get_schema</span><span class="normal"> </span><span class="symbol">(</span><span class="type">void</span><span class="symbol">)</span>
<span class="cbracket">{</span>
<span class="normal">    </span><span class="keyword">static</span><span class="normal"> </span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">SecretSchema</span><span class="normal"> the_schema </span><span class="symbol">=</span><span class="normal"> </span><span class="cbracket">{</span>
<span class="normal">        </span><span class="string">"org.example.Password"</span><span class="symbol">,</span><span class="normal"> <a href="libsecret-SecretSchema.html#SECRET-SCHEMA-NONE:CAPS">SECRET_SCHEMA_NONE</a></span><span class="symbol">,</span>
<span class="normal">        </span><span class="cbracket">{</span>
<span class="normal">            </span><span class="cbracket">{</span><span class="normal">  </span><span class="string">"number"</span><span class="symbol">,</span><span class="normal"> <a href="libsecret-SecretSchema.html#SECRET-SCHEMA-ATTRIBUTE-INTEGER:CAPS">SECRET_SCHEMA_ATTRIBUTE_INTEGER</a> </span><span class="cbracket">}</span><span class="symbol">,</span>
<span class="normal">            </span><span class="cbracket">{</span><span class="normal">  </span><span class="string">"string"</span><span class="symbol">,</span><span class="normal"> <a href="libsecret-SecretSchema.html#SECRET-SCHEMA-ATTRIBUTE-STRING:CAPS">SECRET_SCHEMA_ATTRIBUTE_STRING</a> </span><span class="cbracket">}</span><span class="symbol">,</span>
<span class="normal">            </span><span class="cbracket">{</span><span class="normal">  </span><span class="string">"even"</span><span class="symbol">,</span><span class="normal"> <a href="libsecret-SecretSchema.html#SECRET-SCHEMA-ATTRIBUTE-BOOLEAN:CAPS">SECRET_SCHEMA_ATTRIBUTE_BOOLEAN</a> </span><span class="cbracket">}</span><span class="symbol">,</span>
<span class="normal">            </span><span class="cbracket">{</span><span class="normal">  <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="normal"> </span><span class="cbracket">}</span><span class="symbol">,</span>
<span class="normal">        </span><span class="cbracket">}</span>
<span class="normal">    </span><span class="cbracket">}</span><span class="symbol">;</span>
<span class="normal">    </span><span class="keyword">return</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">the_schema</span><span class="symbol">;</span>
<span class="cbracket">}</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p>
</p>
</div>
<div class="refsect1">
<a name="libsecret-SecretSchema.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="SECRET-SCHEMA-NOTE:CAPS"></a><h3>SECRET_SCHEMA_NOTE</h3>
<pre class="programlisting">extern const SecretSchema *  SECRET_SCHEMA_NOTE;
</pre>
<p>
A predefined schema for personal passwords stored by the user in the
password manager. This schema has no attributes, and the items are not
meant to be used automatically by applications.
</p>
<p>
When used to search for items using this schema, it will only match
items that have the same schema. Items stored via libgnome-keyring with the
<code class="literal">GNOME_KEYRING_ITEM_NOTE</code> item type will match.
</p>
</div>
<hr>
<div class="refsect2">
<a name="SECRET-SCHEMA-COMPAT-NETWORK:CAPS"></a><h3>SECRET_SCHEMA_COMPAT_NETWORK</h3>
<pre class="programlisting">extern const SecretSchema *  SECRET_SCHEMA_COMPAT_NETWORK;
</pre>
<p>
A predefined schema that is compatible with items stored via the
libgnome-keyring 'network password' functions. This is meant to be used by
applications migrating from libgnome-keyring which stored their secrets as
'network passwords'. It is not recommended that new code use this schema.
</p>
<p>
When used to search for items using this schema, it will only match
items that have the same schema. Items stored via libgnome-keyring with the
<code class="literal">GNOME_KEYRING_ITEM_NETWORK_PASSWORD</code> item type will match.
</p>
<p>
The following attributes exist in the schema:
</p>
<div class="variablelist">
<p class="title"><b>Attributes:</b></p>
<table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="literal">user</code>:</span></p></td>
<td><p>The user name (string).</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="literal">domain</code>:</span></p></td>
<td><p>The login domain or realm (string).</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="literal">object</code>:</span></p></td>
<td><p>The object or path (string).</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="literal">protocol</code>:</span></p></td>
<td><p>The protocol (a string like 'http').</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="literal">port</code>:</span></p></td>
<td><p>The network port (integer).</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="literal">server</code>:</span></p></td>
<td><p>The hostname or server (string).</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="literal">authtype</code>:</span></p></td>
<td><p>The authentication type (string).</p></td>
</tr>
</tbody>
</table>
</div>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="SecretSchema"></a><h3>SecretSchema</h3>
<pre class="programlisting">typedef struct {
	const gchar *name;
	SecretSchemaFlags flags;
	SecretSchemaAttribute attributes[32];
} SecretSchema;
</pre>
<p>
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.
</p>
<p>
Each schema has a name like "org.gnome.keyring.NetworkPassword", and defines
a set of attributes, and types (string, integer, boolean) for those attributes.
</p>
<p>
Attributes are stored as strings in the Secret Service, and the attribute
types simply define standard ways to store integer and boolean values as strings.
Attributes are represented in libsecret via a <a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> with string keys and
values. Even for values that defined as an integer or boolean in the schema,
the attribute values in the <a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> are strings. Boolean values are stored
as the strings 'true' and 'false'. Integer values are stored in decimal, with
a preceeding negative sign for negative integers.
</p>
<p>
Schemas are handled entirely on the client side by this library. The name of the
schema is automatically stored as an attribute on the item.
</p>
<p>
Normally when looking up passwords only those with matching schema names are
returned. If the schema <em class="parameter"><code>flags</code></em> contain the <a class="link" href="libsecret-SecretSchema.html#SECRET-SCHEMA-DONT-MATCH-NAME:CAPS"><code class="literal">SECRET_SCHEMA_DONT_MATCH_NAME</code></a> 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.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="SecretSchema.name"></a>name</code></em>;</span></p></td>
<td>the dotted name of the schema</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="libsecret-SecretSchema.html#SecretSchemaFlags" title="enum SecretSchemaFlags"><span class="type">SecretSchemaFlags</span></a> <em class="structfield"><code><a name="SecretSchema.flags"></a>flags</code></em>;</span></p></td>
<td>flags for the schema</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="libsecret-SecretSchema.html#SecretSchemaAttribute" title="SecretSchemaAttribute"><span class="type">SecretSchemaAttribute</span></a> <em class="structfield"><code><a name="SecretSchema.attributes"></a>attributes</code></em>[32];</span></p></td>
<td>the attribute names and types of those attributes</td>
</tr>
</tbody>
</table></div>
<p class="stability">Stability Level: Stable</p>
</div>
<hr>
<div class="refsect2">
<a name="SecretSchemaFlags"></a><h3>enum SecretSchemaFlags</h3>
<pre class="programlisting">typedef enum {
	SECRET_SCHEMA_NONE = 0,
	SECRET_SCHEMA_DONT_MATCH_NAME = 1 &lt;&lt; 1
} SecretSchemaFlags;
</pre>
<p>
Flags for a <a class="link" href="libsecret-SecretSchema.html#SecretSchema" title="SecretSchema"><span class="type">SecretSchema</span></a> definition.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><a name="SECRET-SCHEMA-NONE:CAPS"></a><span class="term"><code class="literal">SECRET_SCHEMA_NONE</code></span></p></td>
<td>no flags for the schema
</td>
</tr>
<tr>
<td><p><a name="SECRET-SCHEMA-DONT-MATCH-NAME:CAPS"></a><span class="term"><code class="literal">SECRET_SCHEMA_DONT_MATCH_NAME</code></span></p></td>
<td>don't match the schema name when looking up or
                                removing passwords
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="SecretSchemaAttribute"></a><h3>SecretSchemaAttribute</h3>
<pre class="programlisting">typedef struct {
	const gchar* name;
	SecretSchemaAttributeType type;
} SecretSchemaAttribute;
</pre>
<p>
An attribute in a <a class="link" href="libsecret-SecretSchema.html#SecretSchema" title="SecretSchema"><span class="type">SecretSchema</span></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="SecretSchemaAttribute.name"></a>name</code></em>;</span></p></td>
<td>name of the attribute</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="libsecret-SecretSchema.html#SecretSchemaAttributeType" title="enum SecretSchemaAttributeType"><span class="type">SecretSchemaAttributeType</span></a> <em class="structfield"><code><a name="SecretSchemaAttribute.type"></a>type</code></em>;</span></p></td>
<td>the type of the attribute</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="SecretSchemaAttributeType"></a><h3>enum SecretSchemaAttributeType</h3>
<pre class="programlisting">typedef enum {
	SECRET_SCHEMA_ATTRIBUTE_STRING = 0,
	SECRET_SCHEMA_ATTRIBUTE_INTEGER = 1,
	SECRET_SCHEMA_ATTRIBUTE_BOOLEAN = 2,
} SecretSchemaAttributeType;
</pre>
<p>
The type of an attribute in a <a class="link" href="libsecret-SecretSchema.html#SecretSchema" title="SecretSchema"><span class="type">SecretSchema</span></a>. Attributes are stored as strings
in the Secret Service, and the attribute types simply define standard ways
to store integer and boolean values as strings.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><a name="SECRET-SCHEMA-ATTRIBUTE-STRING:CAPS"></a><span class="term"><code class="literal">SECRET_SCHEMA_ATTRIBUTE_STRING</code></span></p></td>
<td>a utf-8 string attribute
</td>
</tr>
<tr>
<td><p><a name="SECRET-SCHEMA-ATTRIBUTE-INTEGER:CAPS"></a><span class="term"><code class="literal">SECRET_SCHEMA_ATTRIBUTE_INTEGER</code></span></p></td>
<td>an integer attribute, stored as a decimal
</td>
</tr>
<tr>
<td><p><a name="SECRET-SCHEMA-ATTRIBUTE-BOOLEAN:CAPS"></a><span class="term"><code class="literal">SECRET_SCHEMA_ATTRIBUTE_BOOLEAN</code></span></p></td>
<td>a boolean attribute, stored as 'true' or 'false'
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="secret-schema-new"></a><h3>secret_schema_new ()</h3>
<pre class="programlisting"><a class="link" href="libsecret-SecretSchema.html#SecretSchema" title="SecretSchema"><span class="returnvalue">SecretSchema</span></a> *      secret_schema_new                   (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libsecret-SecretSchema.html#SecretSchemaFlags" title="enum SecretSchemaFlags"><span class="type">SecretSchemaFlags</span></a> flags</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
Using this function is not normally necessary from C code.
</p>
<p>
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.
</p>
<p>
Each schema has an <em class="parameter"><code>name</code></em> like "org.gnome.keyring.NetworkPassword", and
defines a set of attributes names, and types (string, integer, boolean) for
those attributes.
</p>
<p>
The variable argument list should contain pairs of a) The attribute name as
a null-terminated string, followed by b) integers from the
<a class="link" href="libsecret-SecretSchema.html#SecretSchemaAttributeType" title="enum SecretSchemaAttributeType"><span class="type">SecretSchemaAttributeType</span></a> enumeration, representing the attribute type for
each attribute name. The list of attribtues should be terminated with a <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</p>
<p>
Normally when looking up passwords only those with matching schema names are
returned. If the schema <em class="parameter"><code>flags</code></em> contain the <a class="link" href="libsecret-SecretSchema.html#SECRET-SCHEMA-DONT-MATCH-NAME:CAPS"><code class="literal">SECRET_SCHEMA_DONT_MATCH_NAME</code></a> 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.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>the dotted name of the schema</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td>the flags for the schema</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>the attribute names and types, terminated with <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the new schema, which should be unreferenced with
<a class="link" href="libsecret-SecretSchema.html#secret-schema-unref" title="secret_schema_unref ()"><code class="function">secret_schema_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="secret-schema-newv"></a><h3>secret_schema_newv ()</h3>
<pre class="programlisting"><a class="link" href="libsecret-SecretSchema.html#SecretSchema" title="SecretSchema"><span class="returnvalue">SecretSchema</span></a> *      secret_schema_newv                  (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libsecret-SecretSchema.html#SecretSchemaFlags" title="enum SecretSchemaFlags"><span class="type">SecretSchemaFlags</span></a> flags</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> *attribute_names_and_types</code></em>);</pre>
<p>
Using this function is not normally necessary from C code. This is useful
for constructing <a class="link" href="libsecret-SecretSchema.html#SecretSchema" title="SecretSchema"><span class="type">SecretSchema</span></a> structures in bindings.
</p>
<p>
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.
</p>
<p>
Each schema has an <em class="parameter"><code>name</code></em> like "org.gnome.keyring.NetworkPassword", and
defines a set of attributes names, and types (string, integer, boolean) for
those attributes.
</p>
<p>
Each key in the <em class="parameter"><code>attributes</code></em> table should be a attribute name strings, and
the values in the table should be integers from the <a class="link" href="libsecret-SecretSchema.html#SecretSchemaAttributeType" title="enum SecretSchemaAttributeType"><span class="type">SecretSchemaAttributeType</span></a>
enumeration, representing the attribute type for each attribute name.
</p>
<p>
Normally when looking up passwords only those with matching schema names are
returned. If the schema <em class="parameter"><code>flags</code></em> contain the <a class="link" href="libsecret-SecretSchema.html#SECRET-SCHEMA-DONT-MATCH-NAME:CAPS"><code class="literal">SECRET_SCHEMA_DONT_MATCH_NAME</code></a> 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.
</p>
<p>
Rename to: secret_schema_new
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>the dotted name of the schema</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td>the flags for the schema</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>attribute_names_and_types</code></em> :</span></p></td>
<td>the attribute names and types of those attributes. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8 Secret.SchemaAttributeType]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the new schema, which should be unreferenced with
<a class="link" href="libsecret-SecretSchema.html#secret-schema-unref" title="secret_schema_unref ()"><code class="function">secret_schema_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="secret-schema-ref"></a><h3>secret_schema_ref ()</h3>
<pre class="programlisting"><a class="link" href="libsecret-SecretSchema.html#SecretSchema" title="SecretSchema"><span class="returnvalue">SecretSchema</span></a> *      secret_schema_ref                   (<em class="parameter"><code><a class="link" href="libsecret-SecretSchema.html#SecretSchema" title="SecretSchema"><span class="type">SecretSchema</span></a> *schema</code></em>);</pre>
<p>
Adds a reference to the <a class="link" href="libsecret-SecretSchema.html#SecretSchema" title="SecretSchema"><span class="type">SecretSchema</span></a>.
</p>
<p>
It is not normally necessary to call this function from C code, and is
mainly present for the sake of bindings. If the <em class="parameter"><code>schema</code></em> was statically
allocated, then this function will copy the schema.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>schema</code></em> :</span></p></td>
<td>the schema to reference</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the referenced schema, which should be later
unreferenced with <a class="link" href="libsecret-SecretSchema.html#secret-schema-unref" title="secret_schema_unref ()"><code class="function">secret_schema_unref()</code></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="secret-schema-unref"></a><h3>secret_schema_unref ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                secret_schema_unref                 (<em class="parameter"><code><a class="link" href="libsecret-SecretSchema.html#SecretSchema" title="SecretSchema"><span class="type">SecretSchema</span></a> *schema</code></em>);</pre>
<p>
Releases a reference to the <a class="link" href="libsecret-SecretSchema.html#SecretSchema" title="SecretSchema"><span class="type">SecretSchema</span></a>. If the last reference is
released then the schema will be freed.
</p>
<p>
It is not normally necessary to call this function from C code, and is
mainly present for the sake of bindings. It is an error to call this for
a <em class="parameter"><code>schema</code></em> that was statically allocated.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>schema</code></em> :</span></p></td>
<td>the schema to reference</td>
</tr></tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.19</div>
</body>
</html>