~ubuntu-branches/ubuntu/precise/gnome-keyring/precise

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
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GckSlot</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="Gck Library Reference Manual">
<link rel="up" href="reference.html" title="PKCS#11 GObject Bindings">
<link rel="prev" href="gck-GckModule.html" title="GckModule">
<link rel="next" href="gck-GckSession.html" title="GckSession">
<meta name="generator" content="GTK-Doc V1.18.1 (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="gck-GckModule.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="reference.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">Gck Library Reference Manual</th>
<td><a accesskey="n" href="gck-GckSession.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gck-GckSlot.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#gck-GckSlot.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="gck-GckSlot"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gck-GckSlot.top_of_page"></a>GckSlot</span></h2>
<p>GckSlot — Represents a PKCS#11 slot that can contain a token.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gck-GckSlot.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">                    <a class="link" href="gck-GckSlot.html#GckMechanismInfo" title="GckMechanismInfo">GckMechanismInfo</a>;
<span class="returnvalue">void</span>                <a class="link" href="gck-GckSlot.html#gck-mechanism-info-free" title="gck_mechanism_info_free ()">gck_mechanism_info_free</a>             (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckMechanismInfo" title="GckMechanismInfo"><span class="type">GckMechanismInfo</span></a> *mech_info</code></em>);
typedef             <a class="link" href="gck-GckSlot.html#GckMechanisms" title="GckMechanisms">GckMechanisms</a>;
#define             <a class="link" href="gck-GckSlot.html#gck-mechanisms-length" title="gck_mechanisms_length()">gck_mechanisms_length</a>               (a)
#define             <a class="link" href="gck-GckSlot.html#gck-mechanisms-at" title="gck_mechanisms_at()">gck_mechanisms_at</a>                   (a,
                                                         i)
#define             <a class="link" href="gck-GckSlot.html#gck-mechanisms-free" title="gck_mechanisms_free()">gck_mechanisms_free</a>                 (a)
<span class="returnvalue">gboolean</span>            <a class="link" href="gck-GckSlot.html#gck-mechanisms-check" title="gck_mechanisms_check ()">gck_mechanisms_check</a>                (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckMechanisms" title="GckMechanisms"><span class="type">GckMechanisms</span></a> *mechanisms</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
struct              <a class="link" href="gck-GckSlot.html#GckSlot" title="struct GckSlot">GckSlot</a>;
<span class="returnvalue">gboolean</span>            <a class="link" href="gck-GckSlot.html#gck-slot-equal" title="gck_slot_equal ()">gck_slot_equal</a>                      (<em class="parameter"><code><span class="type">gconstpointer</span> slot1</code></em>,
                                                         <em class="parameter"><code><span class="type">gconstpointer</span> slot2</code></em>);
<span class="returnvalue">guint</span>               <a class="link" href="gck-GckSlot.html#gck-slot-hash" title="gck_slot_hash ()">gck_slot_hash</a>                       (<em class="parameter"><code><span class="type">gconstpointer</span> slot</code></em>);
<a class="link" href="gck-GckModule.html#GckModule" title="struct GckModule"><span class="returnvalue">GckModule</span></a> *         <a class="link" href="gck-GckSlot.html#gck-slot-get-module" title="gck_slot_get_module ()">gck_slot_get_module</a>                 (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckSlot" title="struct GckSlot"><span class="type">GckSlot</span></a> *self</code></em>);
<a class="link" href="pkcs11-links.html#CK-SLOT-ID:CAPS"><span class="returnvalue">CK_SLOT_ID</span></a>          <a class="link" href="gck-GckSlot.html#gck-slot-get-handle" title="gck_slot_get_handle ()">gck_slot_get_handle</a>                 (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckSlot" title="struct GckSlot"><span class="type">GckSlot</span></a> *self</code></em>);
<a class="link" href="gck-GckSlot.html#GckSlotInfo" title="GckSlotInfo"><span class="returnvalue">GckSlotInfo</span></a> *       <a class="link" href="gck-GckSlot.html#gck-slot-get-info" title="gck_slot_get_info ()">gck_slot_get_info</a>                   (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckSlot" title="struct GckSlot"><span class="type">GckSlot</span></a> *self</code></em>);
<a class="link" href="gck-GckSlot.html#GckTokenInfo" title="GckTokenInfo"><span class="returnvalue">GckTokenInfo</span></a> *      <a class="link" href="gck-GckSlot.html#gck-slot-get-token-info" title="gck_slot_get_token_info ()">gck_slot_get_token_info</a>             (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckSlot" title="struct GckSlot"><span class="type">GckSlot</span></a> *self</code></em>);
<a class="link" href="gck-GckSlot.html#GckMechanisms" title="GckMechanisms"><span class="returnvalue">GckMechanisms</span></a> *     <a class="link" href="gck-GckSlot.html#gck-slot-get-mechanisms" title="gck_slot_get_mechanisms ()">gck_slot_get_mechanisms</a>             (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckSlot" title="struct GckSlot"><span class="type">GckSlot</span></a> *self</code></em>);
<a class="link" href="gck-GckSlot.html#GckMechanismInfo" title="GckMechanismInfo"><span class="returnvalue">GckMechanismInfo</span></a> *  <a class="link" href="gck-GckSlot.html#gck-slot-get-mechanism-info" title="gck_slot_get_mechanism_info ()">gck_slot_get_mechanism_info</a>         (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckSlot" title="struct GckSlot"><span class="type">GckSlot</span></a> *self</code></em>,
                                                         <em class="parameter"><code><span class="type">gulong</span> mech_type</code></em>);
<span class="returnvalue">gboolean</span>            <a class="link" href="gck-GckSlot.html#gck-slot-has-flags" title="gck_slot_has_flags ()">gck_slot_has_flags</a>                  (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckSlot" title="struct GckSlot"><span class="type">GckSlot</span></a> *self</code></em>,
                                                         <em class="parameter"><code><span class="type">gulong</span> flags</code></em>);
<a class="link" href="gck-GckEnumerator.html#GckEnumerator" title="struct GckEnumerator"><span class="returnvalue">GckEnumerator</span></a> *     <a class="link" href="gck-GckSlot.html#gck-slots-enumerate-objects" title="gck_slots_enumerate_objects ()">gck_slots_enumerate_objects</a>         (<em class="parameter"><code><span class="type">GList</span> *slots</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gck-GckAttributes.html#GckAttributes" title="GckAttributes"><span class="type">GckAttributes</span></a> *attrs</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> session_options</code></em>);
<a class="link" href="gck-GckSession.html#GckSession" title="struct GckSession"><span class="returnvalue">GckSession</span></a> *        <a class="link" href="gck-GckSlot.html#gck-slot-open-session" title="gck_slot_open_session ()">gck_slot_open_session</a>               (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckSlot" title="struct GckSlot"><span class="type">GckSlot</span></a> *self</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> options</code></em>,
                                                         <em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
<a class="link" href="gck-GckSession.html#GckSession" title="struct GckSession"><span class="returnvalue">GckSession</span></a> *        <a class="link" href="gck-GckSlot.html#gck-slot-open-session-full" title="gck_slot_open_session_full ()">gck_slot_open_session_full</a>          (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckSlot" title="struct GckSlot"><span class="type">GckSlot</span></a> *self</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> options</code></em>,
                                                         <em class="parameter"><code><span class="type">gulong</span> pkcs11_flags</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> app_data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="pkcs11-links.html#CK-NOTIFY:CAPS"><span class="type">CK_NOTIFY</span></a> notify</code></em>,
                                                         <em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gck-GckSlot.html#gck-slot-open-session-full-async" title="gck_slot_open_session_full_async ()">gck_slot_open_session_full_async</a>    (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckSlot" title="struct GckSlot"><span class="type">GckSlot</span></a> *self</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> options</code></em>,
                                                         <em class="parameter"><code><span class="type">gulong</span> pkcs11_flags</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> app_data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="pkcs11-links.html#CK-NOTIFY:CAPS"><span class="type">CK_NOTIFY</span></a> notify</code></em>,
                                                         <em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
                                                         <em class="parameter"><code><span class="type">GAsyncReadyCallback</span> callback</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gck-GckSlot.html#gck-slot-open-session-async" title="gck_slot_open_session_async ()">gck_slot_open_session_async</a>         (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckSlot" title="struct GckSlot"><span class="type">GckSlot</span></a> *self</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> options</code></em>,
                                                         <em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
                                                         <em class="parameter"><code><span class="type">GAsyncReadyCallback</span> callback</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);
<a class="link" href="gck-GckSession.html#GckSession" title="struct GckSession"><span class="returnvalue">GckSession</span></a> *        <a class="link" href="gck-GckSlot.html#gck-slot-open-session-finish" title="gck_slot_open_session_finish ()">gck_slot_open_session_finish</a>        (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckSlot" title="struct GckSlot"><span class="type">GckSlot</span></a> *self</code></em>,
                                                         <em class="parameter"><code><span class="type">GAsyncResult</span> *result</code></em>,
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
<a class="link" href="gck-GckSlot.html#GckSlot" title="struct GckSlot"><span class="returnvalue">GckSlot</span></a> *           <a class="link" href="gck-GckSlot.html#gck-slot-from-handle" title="gck_slot_from_handle ()">gck_slot_from_handle</a>                (<em class="parameter"><code><a class="link" href="gck-GckModule.html#GckModule" title="struct GckModule"><span class="type">GckModule</span></a> *module</code></em>,
                                                         <em class="parameter"><code><a class="link" href="pkcs11-links.html#CK-SLOT-ID:CAPS"><span class="type">CK_SLOT_ID</span></a> slot_id</code></em>);
                    <a class="link" href="gck-GckSlot.html#GckSlotInfo" title="GckSlotInfo">GckSlotInfo</a>;
<span class="returnvalue">void</span>                <a class="link" href="gck-GckSlot.html#gck-slot-info-free" title="gck_slot_info_free ()">gck_slot_info_free</a>                  (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckSlotInfo" title="GckSlotInfo"><span class="type">GckSlotInfo</span></a> *slot_info</code></em>);
                    <a class="link" href="gck-GckSlot.html#GckTokenInfo" title="GckTokenInfo">GckTokenInfo</a>;
<span class="returnvalue">void</span>                <a class="link" href="gck-GckSlot.html#gck-token-info-free" title="gck_token_info_free ()">gck_token_info_free</a>                 (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckTokenInfo" title="GckTokenInfo"><span class="type">GckTokenInfo</span></a> *token_info</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="gck-GckSlot.description"></a><h2>Description</h2>
<p>
A PKCS11 slot can contain a token. As an example, a slot might be a card reader, and the token
the card. If the PKCS#11 module is not a hardware driver, often the slot and token are equivalent.
</p>
</div>
<div class="refsect1">
<a name="gck-GckSlot.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GckMechanismInfo"></a><h3>GckMechanismInfo</h3>
<pre class="programlisting">typedef struct {
	gulong min_key_size;
	gulong max_key_size;
	gulong flags;
} GckMechanismInfo;
</pre>
<p>
Represents information about a PKCS11 mechanism.
</p>
<p>
This is analogous to a CK_MECHANISM_INFO structure.
</p>
<p>
When you're done with this structure it should be released with
<a class="link" href="gck-GckSlot.html#gck-mechanism-info-free" title="gck_mechanism_info_free ()"><code class="function">gck_mechanism_info_free()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><span class="type">gulong</span> <em class="structfield"><code><a name="GckMechanismInfo.min-key-size"></a>min_key_size</code></em>;</span></p></td>
<td>The minimum key size that can be used with this mechanism.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">gulong</span> <em class="structfield"><code><a name="GckMechanismInfo.max-key-size"></a>max_key_size</code></em>;</span></p></td>
<td>The maximum key size that can be used with this mechanism.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">gulong</span> <em class="structfield"><code><a name="GckMechanismInfo.flags"></a>flags</code></em>;</span></p></td>
<td>Various PKCS11 flags that apply to this mechanism.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gck-mechanism-info-free"></a><h3>gck_mechanism_info_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gck_mechanism_info_free             (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckMechanismInfo" title="GckMechanismInfo"><span class="type">GckMechanismInfo</span></a> *mech_info</code></em>);</pre>
<p>
Free the GckMechanismInfo and associated resources.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>mech_info</code></em> :</span></p></td>
<td>The mechanism info to free, or NULL.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GckMechanisms"></a><h3>GckMechanisms</h3>
<pre class="programlisting">typedef GArray GckMechanisms;
</pre>
<p>
A set of GckMechanismInfo structures.
</p>
</div>
<hr>
<div class="refsect2">
<a name="gck-mechanisms-length"></a><h3>gck_mechanisms_length()</h3>
<pre class="programlisting">#define             gck_mechanisms_length(a)                ((a)-&gt;len)
</pre>
<p>
Get the number of GckMechanismInfo in the set.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
<td>A GckMechanisms set.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The number in the set.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gck-mechanisms-at"></a><h3>gck_mechanisms_at()</h3>
<pre class="programlisting">#define             gck_mechanisms_at(a, i)                 (g_array_index(a, CK_MECHANISM_TYPE, i))
</pre>
<p>
Get a specific GckMechanismInfo in a the set.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
<td>A GckMechanisms set.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>i</code></em> :</span></p></td>
<td>The index of a GckMechanismInfo.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The GckMechanismInfo.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gck-mechanisms-free"></a><h3>gck_mechanisms_free()</h3>
<pre class="programlisting">#define             gck_mechanisms_free(a)                  (g_array_free(a, TRUE))
</pre>
<p>
Free a GckMechanisms set.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
<td>A GckMechanism set.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gck-mechanisms-check"></a><h3>gck_mechanisms_check ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>            gck_mechanisms_check                (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckMechanisms" title="GckMechanisms"><span class="type">GckMechanisms</span></a> *mechanisms</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
Check whether all the mechanism types are in the list.
</p>
<p>
The arguments should be a list of CKM_XXX mechanism types. The last argument
should be GCK_INVALID.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>mechanisms</code></em> :</span></p></td>
<td>A list of mechanisms, perhaps retrieved from <a class="link" href="gck-GckSlot.html#gck-slot-get-mechanisms" title="gck_slot_get_mechanisms ()"><code class="function">gck_slot_get_mechanisms()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>A list of mechanism types followed by GCK_INVALID.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>Whether the mechanism is in the list or not.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GckSlot"></a><h3>struct GckSlot</h3>
<pre class="programlisting">struct GckSlot {
	GObject parent;
};
</pre>
<p>
Represents a PKCS11 slot.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="type">GObject</span> <em class="structfield"><code><a name="GckSlot.parent"></a>parent</code></em>;</span></p></td>
<td>derived from this.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gck-slot-equal"></a><h3>gck_slot_equal ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>            gck_slot_equal                      (<em class="parameter"><code><span class="type">gconstpointer</span> slot1</code></em>,
                                                         <em class="parameter"><code><span class="type">gconstpointer</span> slot2</code></em>);</pre>
<p>
Checks equality of two slots. Two GckSlot objects can point to the same
underlying PKCS#11 slot.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>slot1</code></em> :</span></p></td>
<td>A pointer to the first GckSlot</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>slot2</code></em> :</span></p></td>
<td>A pointer to the second GckSlot</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>TRUE if slot1 and slot2 are equal. FALSE if either is not a GckSlot.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gck-slot-hash"></a><h3>gck_slot_hash ()</h3>
<pre class="programlisting"><span class="returnvalue">guint</span>               gck_slot_hash                       (<em class="parameter"><code><span class="type">gconstpointer</span> slot</code></em>);</pre>
<p>
Create a hash value for the GckSlot.
</p>
<p>
This function is intended for easily hashing a GckSlot to add to
a GHashTable or similar data structure.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>slot</code></em> :</span></p></td>
<td>A pointer to a GckSlot</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>An integer that can be used as a hash value, or 0 if invalid.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gck-slot-get-module"></a><h3>gck_slot_get_module ()</h3>
<pre class="programlisting"><a class="link" href="gck-GckModule.html#GckModule" title="struct GckModule"><span class="returnvalue">GckModule</span></a> *         gck_slot_get_module                 (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckSlot" title="struct GckSlot"><span class="type">GckSlot</span></a> *self</code></em>);</pre>
<p>
Get the module that this slot is on.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>The slot to get the module for.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The module, you must unreference this after you're done with it.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gck-slot-get-handle"></a><h3>gck_slot_get_handle ()</h3>
<pre class="programlisting"><a class="link" href="pkcs11-links.html#CK-SLOT-ID:CAPS"><span class="returnvalue">CK_SLOT_ID</span></a>          gck_slot_get_handle                 (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckSlot" title="struct GckSlot"><span class="type">GckSlot</span></a> *self</code></em>);</pre>
<p>
Get the raw PKCS#11 handle of a slot.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>The slot to get the handle of.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The raw handle.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gck-slot-get-info"></a><h3>gck_slot_get_info ()</h3>
<pre class="programlisting"><a class="link" href="gck-GckSlot.html#GckSlotInfo" title="GckSlotInfo"><span class="returnvalue">GckSlotInfo</span></a> *       gck_slot_get_info                   (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckSlot" title="struct GckSlot"><span class="type">GckSlot</span></a> *self</code></em>);</pre>
<p>
Get the information for this slot.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>The slot to get info for.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The slot information. When done, use <a class="link" href="gck-GckSlot.html#gck-slot-info-free" title="gck_slot_info_free ()"><code class="function">gck_slot_info_free()</code></a>
to release it.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gck-slot-get-token-info"></a><h3>gck_slot_get_token_info ()</h3>
<pre class="programlisting"><a class="link" href="gck-GckSlot.html#GckTokenInfo" title="GckTokenInfo"><span class="returnvalue">GckTokenInfo</span></a> *      gck_slot_get_token_info             (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckSlot" title="struct GckSlot"><span class="type">GckSlot</span></a> *self</code></em>);</pre>
<p>
Get the token information for this slot.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>The slot to get info for.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The token information. When done, use <a class="link" href="gck-GckSlot.html#gck-token-info-free" title="gck_token_info_free ()"><code class="function">gck_token_info_free()</code></a>
to release it.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gck-slot-get-mechanisms"></a><h3>gck_slot_get_mechanisms ()</h3>
<pre class="programlisting"><a class="link" href="gck-GckSlot.html#GckMechanisms" title="GckMechanisms"><span class="returnvalue">GckMechanisms</span></a> *     gck_slot_get_mechanisms             (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckSlot" title="struct GckSlot"><span class="type">GckSlot</span></a> *self</code></em>);</pre>
<p>
Get the available mechanisms for this slot.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>The slot to get mechanisms for.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A list of the mechanisms for this slot. Use
<a class="link" href="gck-GckSlot.html#gck-mechanisms-free" title="gck_mechanisms_free()"><code class="function">gck_mechanisms_free()</code></a> when done with this.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gck-slot-get-mechanism-info"></a><h3>gck_slot_get_mechanism_info ()</h3>
<pre class="programlisting"><a class="link" href="gck-GckSlot.html#GckMechanismInfo" title="GckMechanismInfo"><span class="returnvalue">GckMechanismInfo</span></a> *  gck_slot_get_mechanism_info         (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckSlot" title="struct GckSlot"><span class="type">GckSlot</span></a> *self</code></em>,
                                                         <em class="parameter"><code><span class="type">gulong</span> mech_type</code></em>);</pre>
<p>
Get information for the specified mechanism.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>The slot to get mechanism info from.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mech_type</code></em> :</span></p></td>
<td>The mechanisms type to get info for.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The mechanism information, or NULL if failed. Use
<a class="link" href="gck-GckSlot.html#gck-mechanism-info-free" title="gck_mechanism_info_free ()"><code class="function">gck_mechanism_info_free()</code></a> when done with it.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gck-slot-has-flags"></a><h3>gck_slot_has_flags ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>            gck_slot_has_flags                  (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckSlot" title="struct GckSlot"><span class="type">GckSlot</span></a> *self</code></em>,
                                                         <em class="parameter"><code><span class="type">gulong</span> flags</code></em>);</pre>
<p>
Check if the PKCS11 slot has the given flags.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>The GckSlot object.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td>The flags to check.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>Whether one or more flags exist.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gck-slots-enumerate-objects"></a><h3>gck_slots_enumerate_objects ()</h3>
<pre class="programlisting"><a class="link" href="gck-GckEnumerator.html#GckEnumerator" title="struct GckEnumerator"><span class="returnvalue">GckEnumerator</span></a> *     gck_slots_enumerate_objects         (<em class="parameter"><code><span class="type">GList</span> *slots</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gck-GckAttributes.html#GckAttributes" title="GckAttributes"><span class="type">GckAttributes</span></a> *attrs</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> session_options</code></em>);</pre>
<p>
Setup an enumerator for listing matching objects on the slots.
</p>
<p>
This call will not block but will return an enumerator immediately.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>slots</code></em> :</span></p></td>
<td>a list of <a class="link" href="gck-GckSlot.html#GckSlot" title="struct GckSlot"><span class="type">GckSlot</span></a> to enumerate objects on.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>attrs</code></em> :</span></p></td>
<td>Attributes that the objects must have, or empty for all objects.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>session_options</code></em> :</span></p></td>
<td>Options for opening a session.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new enumerator</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gck-slot-open-session"></a><h3>gck_slot_open_session ()</h3>
<pre class="programlisting"><a class="link" href="gck-GckSession.html#GckSession" title="struct GckSession"><span class="returnvalue">GckSession</span></a> *        gck_slot_open_session               (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckSlot" title="struct GckSlot"><span class="type">GckSlot</span></a> *self</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> options</code></em>,
                                                         <em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>
Open a session on the slot. If the 'auto reuse' setting is set,
then this may be a recycled session with the same flags.
</p>
<p>
This call may block for an indefinite period.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>The slot ot open a session on.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
<td>The <a class="link" href="gck-GckSession.html#GckSessionOptions" title="enum GckSessionOptions"><span class="type">GckSessionOptions</span></a> to open a session with.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>An optional cancellation object, or <code class="literal">NULL</code>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>A location to return an error, or <code class="literal">NULL</code>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A new session or NULL if an error occurs.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gck-slot-open-session-full"></a><h3>gck_slot_open_session_full ()</h3>
<pre class="programlisting"><a class="link" href="gck-GckSession.html#GckSession" title="struct GckSession"><span class="returnvalue">GckSession</span></a> *        gck_slot_open_session_full          (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckSlot" title="struct GckSlot"><span class="type">GckSlot</span></a> *self</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> options</code></em>,
                                                         <em class="parameter"><code><span class="type">gulong</span> pkcs11_flags</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> app_data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="pkcs11-links.html#CK-NOTIFY:CAPS"><span class="type">CK_NOTIFY</span></a> notify</code></em>,
                                                         <em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>
Open a session on the slot. If the 'auto reuse' setting is set,
then this may be a recycled session with the same flags.
</p>
<p>
This call may block for an indefinite period.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>The slot to open a session on.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
<td>The options to open the new session with.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pkcs11_flags</code></em> :</span></p></td>
<td>Additional raw PKCS#11 flags.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>app_data</code></em> :</span></p></td>
<td>Application data for notification callback.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>notify</code></em> :</span></p></td>
<td>PKCS#11 notification callback.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>Optional cancellation object, or NULL.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>A location to return an error, or NULL.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A new session or NULL if an error occurs.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gck-slot-open-session-full-async"></a><h3>gck_slot_open_session_full_async ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gck_slot_open_session_full_async    (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckSlot" title="struct GckSlot"><span class="type">GckSlot</span></a> *self</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> options</code></em>,
                                                         <em class="parameter"><code><span class="type">gulong</span> pkcs11_flags</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> app_data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="pkcs11-links.html#CK-NOTIFY:CAPS"><span class="type">CK_NOTIFY</span></a> notify</code></em>,
                                                         <em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
                                                         <em class="parameter"><code><span class="type">GAsyncReadyCallback</span> callback</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
<p>
Open a session on the slot. If the 'auto reuse' setting is set,
then this may be a recycled session with the same flags.
</p>
<p>
This call will return immediately and complete asynchronously.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>The slot to open a session on.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
<td>Options to open the new session with.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pkcs11_flags</code></em> :</span></p></td>
<td>Additional raw PKCS#11 flags.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>app_data</code></em> :</span></p></td>
<td>Application data for notification callback.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>notify</code></em> :</span></p></td>
<td>PKCS#11 notification callback.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>Optional cancellation object, or NULL.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>Called when the operation completes.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>Data to pass to the callback.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gck-slot-open-session-async"></a><h3>gck_slot_open_session_async ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gck_slot_open_session_async         (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckSlot" title="struct GckSlot"><span class="type">GckSlot</span></a> *self</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> options</code></em>,
                                                         <em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
                                                         <em class="parameter"><code><span class="type">GAsyncReadyCallback</span> callback</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
<p>
Open a session on the slot. If the 'auto reuse' setting is set,
then this may be a recycled session with the same flags.
</p>
<p>
This call will return immediately and complete asynchronously.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>The slot to open a session on.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
<td>The options to open the new session with.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>Optional cancellation object, or NULL.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>Called when the operation completes.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>Data to pass to the callback.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gck-slot-open-session-finish"></a><h3>gck_slot_open_session_finish ()</h3>
<pre class="programlisting"><a class="link" href="gck-GckSession.html#GckSession" title="struct GckSession"><span class="returnvalue">GckSession</span></a> *        gck_slot_open_session_finish        (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckSlot" title="struct GckSlot"><span class="type">GckSlot</span></a> *self</code></em>,
                                                         <em class="parameter"><code><span class="type">GAsyncResult</span> *result</code></em>,
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>
Get the result of an open session operation. If the 'auto reuse' setting is set,
then this may be a recycled session with the same flags.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>The slot to open a session on.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
<td>The result passed to the callback.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>A location to return an error or NULL.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The new session or NULL if an error occurs.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gck-slot-from-handle"></a><h3>gck_slot_from_handle ()</h3>
<pre class="programlisting"><a class="link" href="gck-GckSlot.html#GckSlot" title="struct GckSlot"><span class="returnvalue">GckSlot</span></a> *           gck_slot_from_handle                (<em class="parameter"><code><a class="link" href="gck-GckModule.html#GckModule" title="struct GckModule"><span class="type">GckModule</span></a> *module</code></em>,
                                                         <em class="parameter"><code><a class="link" href="pkcs11-links.html#CK-SLOT-ID:CAPS"><span class="type">CK_SLOT_ID</span></a> slot_id</code></em>);</pre>
<p>
Create a new GckSlot object for a raw PKCS#11 handle.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>module</code></em> :</span></p></td>
<td>The module that this slot is on.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>slot_id</code></em> :</span></p></td>
<td>The raw PKCS#11 handle or slot id of this slot.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The new GckSlot object.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GckSlotInfo"></a><h3>GckSlotInfo</h3>
<pre class="programlisting">typedef struct {
	gchar *slot_description;
	gchar *manufacturer_id;
	gulong flags;
	guint8 hardware_version_major;
	guint8 hardware_version_minor;
	guint8 firmware_version_major;
	guint8 firmware_version_minor;
} GckSlotInfo;
</pre>
<p>
Represents information about a PKCS11 slot.
</p>
<p>
This is analogous to a CK_SLOT_INFO structure, but the
strings are far more usable.
</p>
<p>
When you're done with this structure it should be released with
<a class="link" href="gck-GckSlot.html#gck-slot-info-free" title="gck_slot_info_free ()"><code class="function">gck_slot_info_free()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><span class="type">gchar</span> *<em class="structfield"><code><a name="GckSlotInfo.slot-description"></a>slot_description</code></em>;</span></p></td>
<td>Description of the slot.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">gchar</span> *<em class="structfield"><code><a name="GckSlotInfo.manufacturer-id"></a>manufacturer_id</code></em>;</span></p></td>
<td>The manufacturer of this slot.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">gulong</span> <em class="structfield"><code><a name="GckSlotInfo.flags"></a>flags</code></em>;</span></p></td>
<td>Various PKCS11 flags that apply to this slot.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">guint8</span> <em class="structfield"><code><a name="GckSlotInfo.hardware-version-major"></a>hardware_version_major</code></em>;</span></p></td>
<td>The major version of the hardware.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">guint8</span> <em class="structfield"><code><a name="GckSlotInfo.hardware-version-minor"></a>hardware_version_minor</code></em>;</span></p></td>
<td>The minor version of the hardware.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">guint8</span> <em class="structfield"><code><a name="GckSlotInfo.firmware-version-major"></a>firmware_version_major</code></em>;</span></p></td>
<td>The major version of the firmware.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">guint8</span> <em class="structfield"><code><a name="GckSlotInfo.firmware-version-minor"></a>firmware_version_minor</code></em>;</span></p></td>
<td>The minor version of the firmware.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gck-slot-info-free"></a><h3>gck_slot_info_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gck_slot_info_free                  (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckSlotInfo" title="GckSlotInfo"><span class="type">GckSlotInfo</span></a> *slot_info</code></em>);</pre>
<p>
Free the GckSlotInfo and associated resources.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>slot_info</code></em> :</span></p></td>
<td>The slot info to free, or NULL.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GckTokenInfo"></a><h3>GckTokenInfo</h3>
<pre class="programlisting">typedef struct {
	gchar *label;
	gchar *manufacturer_id;
	gchar *model;
	gchar *serial_number;
	gulong flags;
	glong max_session_count;
	glong session_count;
	glong max_rw_session_count;
	glong rw_session_count;
	glong max_pin_len;
	glong min_pin_len;
	glong total_public_memory;
	glong free_public_memory;
	glong total_private_memory;
	glong free_private_memory;
	guint8 hardware_version_major;
	guint8 hardware_version_minor;
	guint8 firmware_version_major;
	guint8 firmware_version_minor;
	gint64 utc_time;
} GckTokenInfo;
</pre>
<p>
Represents information about a PKCS11 token.
</p>
<p>
This is analogous to a CK_TOKEN_INFO structure, but the
strings are far more usable.
</p>
<p>
When you're done with this structure it should be released with
<a class="link" href="gck-GckSlot.html#gck-token-info-free" title="gck_token_info_free ()"><code class="function">gck_token_info_free()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><span class="type">gchar</span> *<em class="structfield"><code><a name="GckTokenInfo.label"></a>label</code></em>;</span></p></td>
<td>The displayable token label.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">gchar</span> *<em class="structfield"><code><a name="GckTokenInfo.manufacturer-id"></a>manufacturer_id</code></em>;</span></p></td>
<td>The manufacturer of this slot.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">gchar</span> *<em class="structfield"><code><a name="GckTokenInfo.model"></a>model</code></em>;</span></p></td>
<td>The token model number as a string.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">gchar</span> *<em class="structfield"><code><a name="GckTokenInfo.serial-number"></a>serial_number</code></em>;</span></p></td>
<td>The token serial number as a string.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">gulong</span> <em class="structfield"><code><a name="GckTokenInfo.flags"></a>flags</code></em>;</span></p></td>
<td>Various PKCS11 flags that apply to this token.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">glong</span> <em class="structfield"><code><a name="GckTokenInfo.max-session-count"></a>max_session_count</code></em>;</span></p></td>
<td>The maximum number of sessions allowed on this token.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">glong</span> <em class="structfield"><code><a name="GckTokenInfo.session-count"></a>session_count</code></em>;</span></p></td>
<td>The number of sessions open on this token.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">glong</span> <em class="structfield"><code><a name="GckTokenInfo.max-rw-session-count"></a>max_rw_session_count</code></em>;</span></p></td>
<td>The maximum number of read/write sessions allowed on this token.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">glong</span> <em class="structfield"><code><a name="GckTokenInfo.rw-session-count"></a>rw_session_count</code></em>;</span></p></td>
<td>The number of sessions open on this token.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">glong</span> <em class="structfield"><code><a name="GckTokenInfo.max-pin-len"></a>max_pin_len</code></em>;</span></p></td>
<td>The maximum length of a PIN for locking this token.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">glong</span> <em class="structfield"><code><a name="GckTokenInfo.min-pin-len"></a>min_pin_len</code></em>;</span></p></td>
<td>The minimum length of a PIN for locking this token.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">glong</span> <em class="structfield"><code><a name="GckTokenInfo.total-public-memory"></a>total_public_memory</code></em>;</span></p></td>
<td>The total amount of memory on this token for storing public objects.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">glong</span> <em class="structfield"><code><a name="GckTokenInfo.free-public-memory"></a>free_public_memory</code></em>;</span></p></td>
<td>The available amount of memory on this token for storing public objects.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">glong</span> <em class="structfield"><code><a name="GckTokenInfo.total-private-memory"></a>total_private_memory</code></em>;</span></p></td>
<td>The total amount of memory on this token for storing private objects.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">glong</span> <em class="structfield"><code><a name="GckTokenInfo.free-private-memory"></a>free_private_memory</code></em>;</span></p></td>
<td>The available amount of memory on this token for storing private objects.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">guint8</span> <em class="structfield"><code><a name="GckTokenInfo.hardware-version-major"></a>hardware_version_major</code></em>;</span></p></td>
<td>The major version of the hardware.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">guint8</span> <em class="structfield"><code><a name="GckTokenInfo.hardware-version-minor"></a>hardware_version_minor</code></em>;</span></p></td>
<td>The minor version of the hardware.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">guint8</span> <em class="structfield"><code><a name="GckTokenInfo.firmware-version-major"></a>firmware_version_major</code></em>;</span></p></td>
<td>The major version of the firmware.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">guint8</span> <em class="structfield"><code><a name="GckTokenInfo.firmware-version-minor"></a>firmware_version_minor</code></em>;</span></p></td>
<td>The minor version of the firmware.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">gint64</span> <em class="structfield"><code><a name="GckTokenInfo.utc-time"></a>utc_time</code></em>;</span></p></td>
<td>If the token has a hardware clock, this is set to the number of seconds since the epoch.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gck-token-info-free"></a><h3>gck_token_info_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gck_token_info_free                 (<em class="parameter"><code><a class="link" href="gck-GckSlot.html#GckTokenInfo" title="GckTokenInfo"><span class="type">GckTokenInfo</span></a> *token_info</code></em>);</pre>
<p>
Free the GckTokenInfo and associated resources.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>token_info</code></em> :</span></p></td>
<td>The token info to free, or NULL.</td>
</tr></tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18.1</div>
</body>
</html>