4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>GP11Attributes</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
6
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7
7
<link rel="home" href="index.html" title="GP11 Reference Manual">
8
8
<link rel="up" href="ch01.html" title="PKCS#11 GObject Bindings">
9
9
<link rel="prev" href="gp11-gp11-attribute.html" title="GP11Attribute">
44
44
<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a>* <a class="link" href="gp11-gp11-attributes.html#gp11-attributes-new" title="gp11_attributes_new ()">gp11_attributes_new</a> (void);
45
45
<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a>* <a class="link" href="gp11-gp11-attributes.html#gp11-attributes-new-empty" title="gp11_attributes_new_empty ()">gp11_attributes_new_empty</a> (<a
46
46
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"
47
>gulong</a> attr_type);
47
>gulong</a> attr_type,
48
49
<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a>* <a class="link" href="gp11-gp11-attributes.html#gp11-attributes-newv" title="gp11_attributes_newv ()">gp11_attributes_newv</a> (<a
49
50
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"
50
>gulong</a> attr_type);
51
>gulong</a> attr_type,
51
53
<a class="link" href="gp11-gp11-attribute.html#GP11Attribute" title="GP11Attribute">GP11Attribute</a>* <a class="link" href="gp11-gp11-attributes.html#gp11-attributes-at" title="gp11_attributes_at ()">gp11_attributes_at</a> (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
53
55
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
55
void <a class="link" href="gp11-gp11-attributes.html#gp11-attributes-add" title="gp11_attributes_add ()">gp11_attributes_add</a> (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
57
<a class="link" href="gp11-gp11-attribute.html#GP11Attribute" title="GP11Attribute">GP11Attribute</a>* <a class="link" href="gp11-gp11-attributes.html#gp11-attributes-add" title="gp11_attributes_add ()">gp11_attributes_add</a> (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
56
58
<a class="link" href="gp11-gp11-attribute.html#GP11Attribute" title="GP11Attribute">GP11Attribute</a> *attr);
57
void <a class="link" href="gp11-gp11-attributes.html#gp11-attributes-add-data" title="gp11_attributes_add_data ()">gp11_attributes_add_data</a> (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
59
<a class="link" href="gp11-gp11-attribute.html#GP11Attribute" title="GP11Attribute">GP11Attribute</a>* <a class="link" href="gp11-gp11-attributes.html#gp11-attributes-add-data" title="gp11_attributes_add_data ()">gp11_attributes_add_data</a> (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
59
61
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"
60
62
>gulong</a> attr_type,
65
67
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"
66
68
>gsize</a> length);
67
void <a class="link" href="gp11-gp11-attributes.html#gp11-attributes-add-invalid" title="gp11_attributes_add_invalid ()">gp11_attributes_add_invalid</a> (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
69
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"
70
>gulong</a> attr_type);
71
void <a class="link" href="gp11-gp11-attributes.html#gp11-attributes-add-empty" title="gp11_attributes_add_empty ()">gp11_attributes_add_empty</a> (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
73
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"
74
>gulong</a> attr_type);
75
void <a class="link" href="gp11-gp11-attributes.html#gp11-attributes-add-boolean" title="gp11_attributes_add_boolean ()">gp11_attributes_add_boolean</a> (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
69
<a class="link" href="gp11-gp11-attribute.html#GP11Attribute" title="GP11Attribute">GP11Attribute</a>* <a class="link" href="gp11-gp11-attributes.html#gp11-attributes-add-invalid" title="gp11_attributes_add_invalid ()">gp11_attributes_add_invalid</a> (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
71
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"
72
>gulong</a> attr_type);
73
<a class="link" href="gp11-gp11-attribute.html#GP11Attribute" title="GP11Attribute">GP11Attribute</a>* <a class="link" href="gp11-gp11-attributes.html#gp11-attributes-add-empty" title="gp11_attributes_add_empty ()">gp11_attributes_add_empty</a> (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
75
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"
76
>gulong</a> attr_type);
77
<a class="link" href="gp11-gp11-attribute.html#GP11Attribute" title="GP11Attribute">GP11Attribute</a>* <a class="link" href="gp11-gp11-attributes.html#gp11-attributes-add-boolean" title="gp11_attributes_add_boolean ()">gp11_attributes_add_boolean</a> (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
77
79
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"
78
80
>gulong</a> attr_type,
80
82
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
81
83
>gboolean</a> value);
82
void <a class="link" href="gp11-gp11-attributes.html#gp11-attributes-add-string" title="gp11_attributes_add_string ()">gp11_attributes_add_string</a> (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
84
<a class="link" href="gp11-gp11-attribute.html#GP11Attribute" title="GP11Attribute">GP11Attribute</a>* <a class="link" href="gp11-gp11-attributes.html#gp11-attributes-add-string" title="gp11_attributes_add_string ()">gp11_attributes_add_string</a> (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
84
86
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"
85
87
>gulong</a> attr_type,
87
89
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
89
void <a class="link" href="gp11-gp11-attributes.html#gp11-attributes-add-date" title="gp11_attributes_add_date ()">gp11_attributes_add_date</a> (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
91
<a class="link" href="gp11-gp11-attribute.html#GP11Attribute" title="GP11Attribute">GP11Attribute</a>* <a class="link" href="gp11-gp11-attributes.html#gp11-attributes-add-date" title="gp11_attributes_add_date ()">gp11_attributes_add_date</a> (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
91
93
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"
92
94
>gulong</a> attr_type,
94
96
href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GDate"
96
void <a class="link" href="gp11-gp11-attributes.html#gp11-attributes-add-ulong" title="gp11_attributes_add_ulong ()">gp11_attributes_add_ulong</a> (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
98
<a class="link" href="gp11-gp11-attribute.html#GP11Attribute" title="GP11Attribute">GP11Attribute</a>* <a class="link" href="gp11-gp11-attributes.html#gp11-attributes-add-ulong" title="gp11_attributes_add_ulong ()">gp11_attributes_add_ulong</a> (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
98
100
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"
99
101
>gulong</a> attr_type,
210
212
<a name="gp11-attributes-new-empty"></a><h3>gp11_attributes_new_empty ()</h3>
211
213
<pre class="programlisting"><a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a>* gp11_attributes_new_empty (<a
212
214
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"
213
>gulong</a> attr_type);</pre>
215
>gulong</a> attr_type,
215
218
Creates an GP11Attributes array with empty attributes. The arguments
216
should be values of attribute types, terminated with -1.</p>
219
should be values of attribute types, terminated with GP11_INVALID.</p>
219
222
<div class="variablelist"><table border="0">
231
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
232
<td> The arguments should be values of attribute types, terminated with GP11_INVALID.
228
236
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
229
237
<td> The new attributes array. When done with the array
230
238
release it with <a class="link" href="gp11-gp11-attributes.html#gp11-attributes-unref" title="gp11_attributes_unref ()"><code class="function">gp11_attributes_unref()</code></a>.
238
246
<a name="gp11-attributes-newv"></a><h3>gp11_attributes_newv ()</h3>
239
247
<pre class="programlisting"><a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a>* gp11_attributes_newv (<a
240
248
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"
241
>gulong</a> attr_type);</pre>
243
Create a new GP11Attributes array.
246
The arguments must be triples of: attribute type, data type, value
249
>gulong</a> attr_type,
252
Create a new GP11Attributes array, containing a list of attributes.
279
285
<td><p><span class="term"><em class="parameter"><code>attr_type</code></em> :</span></p></td>
286
<td> The first attribute type.
290
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
291
<td> The arguments must be triples of: attribute type, data type, value
329
340
<div class="refsect2" title="gp11_attributes_add ()">
330
341
<a name="gp11-attributes-add"></a><h3>gp11_attributes_add ()</h3>
331
<pre class="programlisting">void gp11_attributes_add (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
342
<pre class="programlisting"><a class="link" href="gp11-gp11-attribute.html#GP11Attribute" title="GP11Attribute">GP11Attribute</a>* gp11_attributes_add (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
332
343
<a class="link" href="gp11-gp11-attribute.html#GP11Attribute" title="GP11Attribute">GP11Attribute</a> *attr);</pre>
334
345
Add the specified attribute to the array.
350
361
<td> The attribute to add.
365
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
366
<td> The attribute that was added.
357
373
<div class="refsect2" title="gp11_attributes_add_data ()">
358
374
<a name="gp11-attributes-add-data"></a><h3>gp11_attributes_add_data ()</h3>
359
<pre class="programlisting">void gp11_attributes_add_data (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
375
<pre class="programlisting"><a class="link" href="gp11-gp11-attribute.html#GP11Attribute" title="GP11Attribute">GP11Attribute</a>* gp11_attributes_add_data (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
361
377
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"
362
378
>gulong</a> attr_type,
396
412
<td> The length of the attribute value.
416
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
417
<td> The attribute that was added.
403
424
<div class="refsect2" title="gp11_attributes_add_invalid ()">
404
425
<a name="gp11-attributes-add-invalid"></a><h3>gp11_attributes_add_invalid ()</h3>
405
<pre class="programlisting">void gp11_attributes_add_invalid (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
426
<pre class="programlisting"><a class="link" href="gp11-gp11-attribute.html#GP11Attribute" title="GP11Attribute">GP11Attribute</a>* gp11_attributes_add_invalid (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
407
428
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"
408
429
>gulong</a> attr_type);</pre>
423
444
<td> The type of attribute to add.
448
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
449
<td> The attribute that was added.
430
456
<div class="refsect2" title="gp11_attributes_add_empty ()">
431
457
<a name="gp11-attributes-add-empty"></a><h3>gp11_attributes_add_empty ()</h3>
432
<pre class="programlisting">void gp11_attributes_add_empty (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
458
<pre class="programlisting"><a class="link" href="gp11-gp11-attribute.html#GP11Attribute" title="GP11Attribute">GP11Attribute</a>* gp11_attributes_add_empty (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
434
460
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"
435
461
>gulong</a> attr_type);</pre>
450
476
<td> The type of attribute to add.
480
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
481
<td> The attribute that was added.
457
488
<div class="refsect2" title="gp11_attributes_add_boolean ()">
458
489
<a name="gp11-attributes-add-boolean"></a><h3>gp11_attributes_add_boolean ()</h3>
459
<pre class="programlisting">void gp11_attributes_add_boolean (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
490
<pre class="programlisting"><a class="link" href="gp11-gp11-attribute.html#GP11Attribute" title="GP11Attribute">GP11Attribute</a>* gp11_attributes_add_boolean (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
461
492
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"
462
493
>gulong</a> attr_type,
488
519
<td> The boolean value to add.
523
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
524
<td> The attribute that was added.
495
531
<div class="refsect2" title="gp11_attributes_add_string ()">
496
532
<a name="gp11-attributes-add-string"></a><h3>gp11_attributes_add_string ()</h3>
497
<pre class="programlisting">void gp11_attributes_add_string (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
533
<pre class="programlisting"><a class="link" href="gp11-gp11-attribute.html#GP11Attribute" title="GP11Attribute">GP11Attribute</a>* gp11_attributes_add_string (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
499
535
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"
500
536
>gulong</a> attr_type,
502
538
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
503
>gchar</a> *string);</pre>
539
>gchar</a> *value);</pre>
505
541
Add an attribute with the specified type and value to the array.
525
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
561
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
562
<td> The null terminated string value to add.
566
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
567
<td> The attribute that was added.
533
574
<div class="refsect2" title="gp11_attributes_add_date ()">
534
575
<a name="gp11-attributes-add-date"></a><h3>gp11_attributes_add_date ()</h3>
535
<pre class="programlisting">void gp11_attributes_add_date (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
576
<pre class="programlisting"><a class="link" href="gp11-gp11-attribute.html#GP11Attribute" title="GP11Attribute">GP11Attribute</a>* gp11_attributes_add_date (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
537
578
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"
538
579
>gulong</a> attr_type,
540
581
href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GDate"
541
>GDate</a> *date);</pre>
582
>GDate</a> *value);</pre>
543
584
Add an attribute with the specified type and value to the array.
563
<td><p><span class="term"><em class="parameter"><code>date</code></em> :</span></p></td>
604
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
605
<td> The GDate value to add.
609
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
610
<td> The attribute that was added.
571
617
<div class="refsect2" title="gp11_attributes_add_ulong ()">
572
618
<a name="gp11-attributes-add-ulong"></a><h3>gp11_attributes_add_ulong ()</h3>
573
<pre class="programlisting">void gp11_attributes_add_ulong (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
619
<pre class="programlisting"><a class="link" href="gp11-gp11-attribute.html#GP11Attribute" title="GP11Attribute">GP11Attribute</a>* gp11_attributes_add_ulong (<a class="link" href="gp11-gp11-attributes.html#GP11Attributes" title="GP11Attributes">GP11Attributes</a> *attrs,
575
621
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"
576
622
>gulong</a> attr_type,