This file is indexed.

/usr/share/gtk-doc/html/libsecret-1/libsecret-SecretSchema.html is in libsecret-1-dev 0.18.4-1ubuntu2.

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
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
<!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: Libsecret Library Reference Manual</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.24 (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="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#libsecret-SecretSchema.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="simple.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="libsecret-Password-storage.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="examples.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></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 class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libsecret-SecretSchema.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="libsecret-SecretSchema.html#SecretSchema" title="SecretSchema"><span class="returnvalue">SecretSchema</span></a> *
</td>
<td class="function_name">
<a class="link" href="libsecret-SecretSchema.html#secret-schema-new" title="secret_schema_new ()">secret_schema_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libsecret-SecretSchema.html#SecretSchema" title="SecretSchema"><span class="returnvalue">SecretSchema</span></a> *
</td>
<td class="function_name">
<a class="link" href="libsecret-SecretSchema.html#secret-schema-newv" title="secret_schema_newv ()">secret_schema_newv</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libsecret-SecretSchema.html#SecretSchema" title="SecretSchema"><span class="returnvalue">SecretSchema</span></a> *
</td>
<td class="function_name">
<a class="link" href="libsecret-SecretSchema.html#secret-schema-ref" title="secret_schema_ref ()">secret_schema_ref</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libsecret-SecretSchema.html#secret-schema-unref" title="secret_schema_unref ()">secret_schema_unref</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libsecret-SecretSchema.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="variable_type">extern const SecretSchema *  </td>
<td class="function_name"><a class="link" href="libsecret-SecretSchema.html#SECRET-SCHEMA-NOTE:CAPS" title="SECRET_SCHEMA_NOTE">SECRET_SCHEMA_NOTE</a></td>
</tr>
<tr>
<td class="variable_type">extern const SecretSchema *  </td>
<td class="function_name"><a class="link" href="libsecret-SecretSchema.html#SECRET-SCHEMA-COMPAT-NETWORK:CAPS" title="SECRET_SCHEMA_COMPAT_NETWORK">SECRET_SCHEMA_COMPAT_NETWORK</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="libsecret-SecretSchema.html#SecretSchema" title="SecretSchema">SecretSchema</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="libsecret-SecretSchema.html#SecretSchemaFlags" title="enum SecretSchemaFlags">SecretSchemaFlags</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="libsecret-SecretSchema.html#SecretSchemaAttribute" title="SecretSchemaAttribute">SecretSchemaAttribute</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="libsecret-SecretSchema.html#SecretSchemaAttributeType" title="enum SecretSchemaAttributeType">SecretSchemaAttributeType</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libsecret-SecretSchema.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;libsecret/secret.h&gt;
</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>
<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="https://developer.gnome.org/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="https://developer.gnome.org/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>

</div>
<div class="refsect1">
<a name="libsecret-SecretSchema.functions_details"></a><h2>Functions</h2>
<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="https://developer.gnome.org/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="https://developer.gnome.org/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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.2.3.7.2.10"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>the dotted name of the schema</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>the flags for the schema</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>the attribute names and types, terminated with <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.3.7.2.11"></a><h4>Returns</h4>
<p> 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. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</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="https://developer.gnome.org/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="https://developer.gnome.org/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><span class="annotation">[<acronym title="Rename the original symbol's name to SYMBOL."><span class="acronym">rename-to</span></acronym> secret_schema_new]</span></p>
<div class="refsect3">
<a name="id-1.2.3.7.3.10"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>the dotted name of the schema</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>the flags for the schema</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>attribute_names_and_types</p></td>
<td class="parameter_description"><p> the attribute names and types of those attributes. </p></td>
<td class="parameter_annotations"><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>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.3.7.3.11"></a><h4>Returns</h4>
<p> 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. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</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="refsect3">
<a name="id-1.2.3.7.4.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>schema</p></td>
<td class="parameter_description"><p>the schema to reference</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.3.7.4.7"></a><h4>Returns</h4>
<p> 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>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</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="refsect3">
<a name="id-1.2.3.7.5.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>schema</p></td>
<td class="parameter_description"><p>the schema to reference</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="libsecret-SecretSchema.other_details"></a><h2>Types and Values</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>
</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="https://developer.gnome.org/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="https://developer.gnome.org/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="refsect3">
<a name="id-1.2.3.8.4.9"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p>const <a href="https://developer.gnome.org/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>;</p></td>
<td class="struct_member_description"><p>the dotted name of the schema</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><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>;</p></td>
<td class="struct_member_description"><p>flags for the schema</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><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];</p></td>
<td class="struct_member_description"><p>the attribute names and types of those attributes</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="stability">Stability Level: <acronym title="The intention of a Stable interface is to enable arbitrary third parties to
develop applications to these interfaces, release them, and have confidence that
they will run on all minor releases of the product (after the one in which the
interface was introduced, and within the same major release). Even at a major
release, incompatible changes are expected to be rare, and to have strong
justifications.
"><span class="acronym">Stable</span></acronym></p>
</div>
<hr>
<div class="refsect2">
<a name="SecretSchemaFlags"></a><h3>enum SecretSchemaFlags</h3>
<p>Flags for a <a class="link" href="libsecret-SecretSchema.html#SecretSchema" title="SecretSchema"><span class="type">SecretSchema</span></a> definition.</p>
<div class="refsect3">
<a name="id-1.2.3.8.5.4"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="SECRET-SCHEMA-NONE:CAPS"></a>SECRET_SCHEMA_NONE</p></td>
<td class="enum_member_description">
<p>no flags for the schema</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="SECRET-SCHEMA-DONT-MATCH-NAME:CAPS"></a>SECRET_SCHEMA_DONT_MATCH_NAME</p></td>
<td class="enum_member_description">
<p>don't match the schema name when looking up or
                                removing passwords</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</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="refsect3">
<a name="id-1.2.3.8.6.5"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p>const <a href="https://developer.gnome.org/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>;</p></td>
<td class="struct_member_description"><p>name of the attribute</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><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>;</p></td>
<td class="struct_member_description"><p>the type of the attribute</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="SecretSchemaAttributeType"></a><h3>enum SecretSchemaAttributeType</h3>
<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="refsect3">
<a name="id-1.2.3.8.7.4"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="SECRET-SCHEMA-ATTRIBUTE-STRING:CAPS"></a>SECRET_SCHEMA_ATTRIBUTE_STRING</p></td>
<td class="enum_member_description">
<p>a utf-8 string attribute</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="SECRET-SCHEMA-ATTRIBUTE-INTEGER:CAPS"></a>SECRET_SCHEMA_ATTRIBUTE_INTEGER</p></td>
<td class="enum_member_description">
<p>an integer attribute, stored as a decimal</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="SECRET-SCHEMA-ATTRIBUTE-BOOLEAN:CAPS"></a>SECRET_SCHEMA_ATTRIBUTE_BOOLEAN</p></td>
<td class="enum_member_description">
<p>a boolean attribute, stored as 'true' or 'false'</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.24</div>
</body>
</html>