File: udisks2-UDisksModule.html

package info (click to toggle)
udisks2 2.10.1-12.1%2Bdeb13u1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 24,708 kB
  • sloc: ansic: 48,127; python: 7,874; sh: 5,089; xml: 1,462; makefile: 1,235; sed: 85
file content (990 lines) | stat: -rw-r--r-- 76,785 bytes parent folder | download | duplicates (3)
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>UDisksModule: UDisks Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="UDisks Reference Manual">
<link rel="up" href="ref-daemon-core.html" title="Core">
<link rel="prev" href="udisks2-UDisksModuleManager.html" title="UDisksModuleManager">
<link rel="next" href="ref-daemon-monitoring.html" title="State and Configuration">
<meta name="generator" content="GTK-Doc V1.33.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="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="#udisks2-UDisksModule.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="ref-daemon-core.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="udisks2-UDisksModuleManager.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="ref-daemon-monitoring.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="udisks2-UDisksModule"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="udisks2-UDisksModule.top_of_page"></a>UDisksModule</span></h2>
<p>UDisksModule — Daemon module</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="udisks2-UDisksModule.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="udisks2-UDisksModule.html#UDisksModuleIDFunc" title="UDisksModuleIDFunc ()">*UDisksModuleIDFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="udisks2-UDisksModule.html#UDisksModule" title="struct UDisksModule"><span class="returnvalue">UDisksModule</span></a> *
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="udisks2-UDisksModule.html#UDisksModuleNewFunc" title="UDisksModuleNewFunc ()">*UDisksModuleNewFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="udisks2-UDisksModule.html#udisks-module-get-name" title="udisks_module_get_name ()">udisks_module_get_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/gio/unstable/GDBusInterfaceSkeleton.html#GDBusInterfaceSkeleton-struct"><span class="returnvalue">GDBusInterfaceSkeleton</span></a> *
</td>
<td class="function_name">
<a class="link" href="udisks2-UDisksModule.html#udisks-module-new-manager" title="udisks_module_new_manager ()">udisks_module_new_manager</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/gio/unstable/GDBusObjectSkeleton.html#GDBusObjectSkeleton-struct"><span class="returnvalue">GDBusObjectSkeleton</span></a> **
</td>
<td class="function_name">
<a class="link" href="udisks2-UDisksModule.html#udisks-module-new-object" title="udisks_module_new_object ()">udisks_module_new_object</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#GType"><span class="returnvalue">GType</span></a> *
</td>
<td class="function_name">
<a class="link" href="udisks2-UDisksModule.html#udisks-module-get-block-object-interface-types" title="udisks_module_get_block_object_interface_types ()">udisks_module_get_block_object_interface_types</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#GType"><span class="returnvalue">GType</span></a> *
</td>
<td class="function_name">
<a class="link" href="udisks2-UDisksModule.html#udisks-module-get-drive-object-interface-types" title="udisks_module_get_drive_object_interface_types ()">udisks_module_get_drive_object_interface_types</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/gio/unstable/GDBusInterfaceSkeleton.html#GDBusInterfaceSkeleton-struct"><span class="returnvalue">GDBusInterfaceSkeleton</span></a> *
</td>
<td class="function_name">
<a class="link" href="udisks2-UDisksModule.html#udisks-module-new-block-object-interface" title="udisks_module_new_block_object_interface ()">udisks_module_new_block_object_interface</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/gio/unstable/GDBusInterfaceSkeleton.html#GDBusInterfaceSkeleton-struct"><span class="returnvalue">GDBusInterfaceSkeleton</span></a> *
</td>
<td class="function_name">
<a class="link" href="udisks2-UDisksModule.html#udisks-module-new-drive-object-interface" title="udisks_module_new_drive_object_interface ()">udisks_module_new_drive_object_interface</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="udisks2-UDisksModule.html#udisks-module-track-parent" title="udisks_module_track_parent ()">udisks_module_track_parent</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="UDisksDaemon.html" title="UDisksDaemon"><span class="returnvalue">UDisksDaemon</span></a> *
</td>
<td class="function_name">
<a class="link" href="udisks2-UDisksModule.html#udisks-module-get-daemon" title="udisks_module_get_daemon ()">udisks_module_get_daemon</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="udisks2-UDisksModule.html#udisks-module-object-process-uevent" title="udisks_module_object_process_uevent ()">udisks_module_object_process_uevent</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="udisks2-UDisksModule.html#udisks-module-object-housekeeping" title="udisks_module_object_housekeeping ()">udisks_module_object_housekeeping</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="udisks2-UDisksModule.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="udisks2-UDisksModule.html#UDisksModule" title="struct UDisksModule">UDisksModule</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="udisks2-UDisksModule.html#UDisksModuleClass" title="struct UDisksModuleClass">UDisksModuleClass</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="udisks2-UDisksModule.html#UDisksModuleObject" title="UDisksModuleObject">UDisksModuleObject</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="udisks2-UDisksModule.html#UDisksModuleObjectIface" title="struct UDisksModuleObjectIface">UDisksModuleObjectIface</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="udisks2-UDisksModule.description"></a><h2>Description</h2>
<div class="refsect3">
<a name="udisks-module-design"></a><h4>UDisks module design</h4>
<p><a class="link" href="udisks2-UDisksModule.html#UDisksModule" title="struct UDisksModule"><span class="type">UDisksModule</span></a> is a stateful object that represents a daemon module. It is supposed
to hold arbitrary runtime data and perform proper initialization and cleanup within
its constructor and destructor. Once initialized by <a class="link" href="udisks2-UDisksModuleManager.html#UDisksModuleManager" title="UDisksModuleManager"><span class="type">UDisksModuleManager</span></a> the instance
is usually kept around until the daemon exits. Although proper module unloading
is not currently implemented the object destructor may be actually called in some
cases.</p>
<p>Derived <a class="link" href="udisks2-UDisksModule.html#UDisksModule" title="struct UDisksModule"><span class="type">UDisksModule</span></a> object is supposed to implement failable initialization
and return proper error that the <a class="link" href="udisks2-UDisksModuleManager.html#UDisksModuleManager" title="UDisksModuleManager"><span class="type">UDisksModuleManager</span></a> would propagate further
up the stack. Modules are free to use failable initialization for checking runtime
dependencies such as additional config files and fail if misconfigured.</p>
</div>
<div class="refsect3">
<a name="udisks-module-naming"></a><h4>UDisks module naming conventions</h4>
<p>Every module must implement and export two symbols that are used as entry points: <a class="link" href="udisks2-UDisksModule.html#UDisksModuleIDFunc" title="UDisksModuleIDFunc ()"><code class="function">udisks_module_id()</code></a>
and <a class="link" href="udisks2-UDisksModule.html#UDisksModuleNewFunc" title="UDisksModuleNewFunc ()"><code class="function">udisks_module_ID_new()</code></a>
where <code class="literal">ID</code> is a string returned by <a class="link" href="udisks2-UDisksModule.html#UDisksModuleIDFunc" title="UDisksModuleIDFunc ()"><code class="function">udisks_module_id()</code></a>.
This identification string is subsequently used at several places - primarily
serves as an unique and user readable module identifier (e.g. <code class="literal">lvm2</code>)
passed in as an argument to the <a class="link" href="gdbus-org.freedesktop.UDisks2.Manager.html#gdbus-method-org-freedesktop-UDisks2-Manager.EnableModule" title="The EnableModule() method">org.freedesktop.UDisks2.Manager.EnableModule()</a>
method call.</p>
<p>Physically modules are essentially regular shared objects (<code class="literal">.so</code>)
that are loaded from <code class="filename">$(libdir)/udisks2/modules</code> directory
(typically <code class="filename">/usr/lib/udisks2/modules</code>). No extra service or
config files are needed, however a specific file naming of <code class="filename">libudisks2_<span class="emphasis"><em>ID</em></span>.so</code>
is required.</p>
</div>
<div class="refsect3">
<a name="udisks-modular-api"></a><h4>Module API</h4>
<p>Other than the two entry points described in last paragraph the rest of the daemon
to module interaction is done via <a class="link" href="udisks2-UDisksModule.html#UDisksModule" title="struct UDisksModule"><span class="type">UDisksModule</span></a> class methods over an instance
created by the <a class="link" href="udisks2-UDisksModule.html#UDisksModuleNewFunc" title="UDisksModuleNewFunc ()"><code class="function">udisks_module_ID_new()</code></a>
constructor. Please see particular <a class="link" href="udisks2-UDisksModule.html#UDisksModule" title="struct UDisksModule"><span class="type">UDisksModule</span></a> methods for detailed description
of each way of extending the daemon functionality. Most methods are pretty
straightforward with the exception of extra drive and block object interfaces.</p>
<p>It's important to provide <a class="link" href="udisks2-UDisksModule.html#udisks-module-get-block-object-interface-types" title="udisks_module_get_block_object_interface_types ()"><code class="function">udisks_module_get_block_object_interface_types()</code></a> and
<a class="link" href="udisks2-UDisksModule.html#udisks-module-new-block-object-interface" title="udisks_module_new_block_object_interface ()"><code class="function">udisks_module_new_block_object_interface()</code></a> methods (or <code class="literal">drive</code>
respectively) always in pairs as the <a class="link" href="UDisksLinuxBlockObject.html" title="UDisksLinuxBlockObject"><span class="type">UDisksLinuxBlockObject</span></a> and <a class="link" href="UDisksLinuxDriveObject.html" title="UDisksLinuxDriveObject"><span class="type">UDisksLinuxDriveObject</span></a>
machinery needs to register available interface skeleton types first and subsequently
create target interfaces for each specified type and route uevents onto. There
can be only one extra interface of a given type on a single <a class="link" href="UDisksLinuxBlockObject.html" title="UDisksLinuxBlockObject"><span class="type">UDisksLinuxBlockObject</span></a>
or <a class="link" href="UDisksLinuxDriveObject.html" title="UDisksLinuxDriveObject"><span class="type">UDisksLinuxDriveObject</span></a> object.</p>
<p>In case of an existing interface for a particular type uevents are routed through
the <a class="link" href="udisks2-UDisksModule.html#udisks-module-object-process-uevent" title="udisks_module_object_process_uevent ()"><code class="function">udisks_module_object_process_uevent()</code></a> method of a <a class="link" href="udisks2-UDisksModule.html#UDisksModuleObject" title="UDisksModuleObject"><span class="type">UDisksModuleObject</span></a> interface
that the newly created <a href="https://developer.gnome.org/gio/unstable/GDBusInterfaceSkeleton.html#GDBusInterfaceSkeleton-struct"><span class="type">GDBusInterfaceSkeleton</span></a> interface has to implement. This
call is supposed to process updated information and indicate via the return <em class="parameter"><code>keep</code></em>

argument whether the particular interface is valid or should be removed from
the object.</p>
<p>In case no <a href="https://developer.gnome.org/gio/unstable/GDBusInterfaceSkeleton.html#GDBusInterfaceSkeleton-struct"><span class="type">GDBusInterfaceSkeleton</span></a> interface of a given type is attached on the
particular object, <a class="link" href="udisks2-UDisksModule.html#udisks-module-new-block-object-interface" title="udisks_module_new_block_object_interface ()"><code class="function">udisks_module_new_block_object_interface()</code></a> or
<a class="link" href="udisks2-UDisksModule.html#udisks-module-new-drive-object-interface" title="udisks_module_new_drive_object_interface ()"><code class="function">udisks_module_new_drive_object_interface()</code></a> methods respectively are called
in attempt to create new one. These methods are supposed to check whether the
interface type is applicable for the current object and return <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not.</p>
<p>Exposing independent module objects on the master UDisks object manager as another
way of daemon extensibility works in a similar way - please see <a class="link" href="udisks2-UDisksModule.html#udisks-module-new-object" title="udisks_module_new_object ()"><code class="function">udisks_module_new_object()</code></a>
for detailed description.</p>
</div>
</div>
<div class="refsect1">
<a name="udisks2-UDisksModule.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="UDisksModuleIDFunc"></a><h3>UDisksModuleIDFunc ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
<span class="c_punctuation">(</span>*UDisksModuleIDFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Function prototype that is called by <a class="link" href="udisks2-UDisksModuleManager.html#UDisksModuleManager" title="UDisksModuleManager"><span class="type">UDisksModuleManager</span></a> to get
unique module identifier. No initialization is supposed to be done
at this point.</p>
<div class="refsect3">
<a name="UDisksModuleIDFunc.returns"></a><h4>Returns</h4>
<p>The module ID string. Free with <a href="https://developer.gnome.org/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>. </p>
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.0</p>
</div>
<hr>
<div class="refsect2">
<a name="UDisksModuleNewFunc"></a><h3>UDisksModuleNewFunc ()</h3>
<pre class="programlisting"><a class="link" href="udisks2-UDisksModule.html#UDisksModule" title="struct UDisksModule"><span class="returnvalue">UDisksModule</span></a> *
<span class="c_punctuation">(</span>*UDisksModuleNewFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="UDisksDaemon.html" title="UDisksDaemon"><span class="type">UDisksDaemon</span></a> *daemon</code></em>,
                        <em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                        <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Function prototype that creates a new <a class="link" href="udisks2-UDisksModule.html#UDisksModule" title="struct UDisksModule"><span class="type">UDisksModule</span></a> instance. Module
initialization is done at this point. This is a failable method call
that properly reports module initialization failure.</p>
<div class="refsect3">
<a name="UDisksModuleNewFunc.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>daemon</p></td>
<td class="parameter_description"><p>A <a class="link" href="UDisksDaemon.html" title="UDisksDaemon"><span class="type">UDisksDaemon</span></a> instance.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<td class="parameter_description"><p>A <a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> or <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"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>Return location for error or <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="UDisksModuleNewFunc.returns"></a><h4>Returns</h4>
<p>A <a class="link" href="udisks2-UDisksModule.html#UDisksModule" title="struct UDisksModule"><span class="type">UDisksModule</span></a> object or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>error</code></em>
is set.
Free with <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.9</p>
</div>
<hr>
<div class="refsect2">
<a name="udisks-module-get-name"></a><h3>udisks_module_get_name ()</h3>
<pre class="programlisting">const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
udisks_module_get_name (<em class="parameter"><code><a class="link" href="udisks2-UDisksModule.html#UDisksModule" title="struct UDisksModule"><span class="type">UDisksModule</span></a> *module</code></em>);</pre>
<p>Gets the name of the <em class="parameter"><code>module</code></em>
.</p>
<div class="refsect3">
<a name="udisks-module-get-name.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>module</p></td>
<td class="parameter_description"><p>A <a class="link" href="udisks2-UDisksModule.html#UDisksModule" title="struct UDisksModule"><span class="type">UDisksModule</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="udisks-module-get-name.returns"></a><h4>Returns</h4>
<p>A module name string. Do not free, the string is owned by <em class="parameter"><code>module</code></em>
. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.9.0</p>
</div>
<hr>
<div class="refsect2">
<a name="udisks-module-new-manager"></a><h3>udisks_module_new_manager ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/gio/unstable/GDBusInterfaceSkeleton.html#GDBusInterfaceSkeleton-struct"><span class="returnvalue">GDBusInterfaceSkeleton</span></a> *
udisks_module_new_manager (<em class="parameter"><code><a class="link" href="udisks2-UDisksModule.html#UDisksModule" title="struct UDisksModule"><span class="type">UDisksModule</span></a> *module</code></em>);</pre>
<p>Creates a new <a href="https://developer.gnome.org/gio/unstable/GDBusInterfaceSkeleton.html#GDBusInterfaceSkeleton-struct"><span class="type">GDBusInterfaceSkeleton</span></a> instance carrying an additional D-Bus interface
to be exported on the <a class="link" href="UDisksManager.html" title="UDisksManager"><span class="type">UDisksManager</span></a> object (at the <code class="filename">/org/freedesktop/UDisks2/Manager</code>
path). It is a fairly simple stateless object not related to any device and serves
the purpose of performing general tasks or creating new resources. Only a single
manager interface can be provided by each module.</p>
<div class="refsect3">
<a name="udisks-module-new-manager.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>module</p></td>
<td class="parameter_description"><p>A <a class="link" href="udisks2-UDisksModule.html#UDisksModule" title="struct UDisksModule"><span class="type">UDisksModule</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="udisks-module-new-manager.returns"></a><h4>Returns</h4>
<p>A new <a href="https://developer.gnome.org/gio/unstable/GDBusInterfaceSkeleton.html#GDBusInterfaceSkeleton-struct"><span class="type">GDBusInterfaceSkeleton</span></a>. Free with <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.9.0</p>
</div>
<hr>
<div class="refsect2">
<a name="udisks-module-new-object"></a><h3>udisks_module_new_object ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/gio/unstable/GDBusObjectSkeleton.html#GDBusObjectSkeleton-struct"><span class="returnvalue">GDBusObjectSkeleton</span></a> **
udisks_module_new_object (<em class="parameter"><code><a class="link" href="udisks2-UDisksModule.html#UDisksModule" title="struct UDisksModule"><span class="type">UDisksModule</span></a> *module</code></em>,
                          <em class="parameter"><code><a class="link" href="UDisksLinuxDevice.html" title="UDisksLinuxDevice"><span class="type">UDisksLinuxDevice</span></a> *device</code></em>);</pre>
<p>Creates one or more <a href="https://developer.gnome.org/gio/unstable/GDBusObjectSkeleton.html#GDBusObjectSkeleton-struct"><span class="type">GDBusObjectSkeleton</span></a> objects that implement the <a class="link" href="udisks2-UDisksModule.html#UDisksModuleObject" title="UDisksModuleObject"><span class="type">UDisksModuleObject</span></a>
interface. Multiple objects may be returned by this method call, e.g. in case
more than one object type is needed in order to represent a particular feature.</p>
<p>Objects are exported by <a class="link" href="UDisksLinuxProvider.html" title="UDisksLinuxProvider"><span class="type">UDisksLinuxProvider</span></a> on the master object manager under
the <code class="filename">/org/freedesktop/UDisks2</code> path just like regular block
and drive objects. This allows to create brand new object types fully handled
by modules and providing custom interfaces. Objects in this scope are meant to be
of virtual kind and are pretty flexible in this regard - not necessarily bound
to any specific block device or drive. Perhaps even representing a group of resources.
For illustration this kind of object may represent a RAID array comprised of several
block devices, devices of the same kind such as loop devices or any higher level
representation of something else.</p>
<p>Note that it's not currently possible to share module objects across multiple
modules with the intention to attach extra interfaces on a foreign module object.
In such case each module needs to export its own unique object, no matter if
they share or represent similar kind of resource.</p>
<p>This method may be called quite often, for nearly any uevent received. It's done
this way for broad flexibility and to give module objects a chance to claim any
device needed.</p>
<p>Module objects are supposed to maintain internal list of claimed devices and track
their validity, i.e. indicate removal only after all tracked devices are gone.
Every module object may claim one or more devices. <a class="link" href="UDisksLinuxProvider.html" title="UDisksLinuxProvider"><span class="type">UDisksLinuxProvider</span></a> essentially
provides uevent routing and guarantees that existing objects are asked first to
consider a claim of the <em class="parameter"><code>device</code></em>
 before new object is attempted to be created.
This works always in the scope of a particular module, i.e. existing module objects
and their claims are always considered separately for each module.</p>
<p>The uevent routing works as follows:</p>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<p>Existing module objects are asked first to process the uevent for a particular
 <em class="parameter"><code>device</code></em>
 via the <a class="link" href="udisks2-UDisksModule.html#udisks-module-object-process-uevent" title="udisks_module_object_process_uevent ()"><code class="function">udisks_module_object_process_uevent()</code></a> method on the
 <a class="link" href="udisks2-UDisksModule.html#UDisksModuleObject" title="UDisksModuleObject"><span class="type">UDisksModuleObject</span></a> interface. The method return value and the <em class="parameter"><code>keep</code></em>
 argument
 control the claim:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>method return value of <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> means the object doesn't currently hold
 the claim of the <em class="parameter"><code>device</code></em>
 and is not interested of making new one. The
 return value of <em class="parameter"><code>keep</code></em>
 is ignored in this case.</p></li>
<li class="listitem"><p>method return value of <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> and the <em class="parameter"><code>keep</code></em>
 return value of <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> indicates
 the object is not valid anymore and should be unexported from the object
 manager.</p></li>
<li class="listitem"><p>method return value of <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> and the <em class="parameter"><code>keep</code></em>
 return value of <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> indicates
 the object has processed the updated information and remains valid.</p></li>
</ul></div>
</li>
<li class="listitem"><p>In case the <em class="parameter"><code>device</code></em>
 has not been claimed by any existing module object, meaning
 all the <a class="link" href="udisks2-UDisksModule.html#udisks-module-object-process-uevent" title="udisks_module_object_process_uevent ()"><code class="function">udisks_module_object_process_uevent()</code></a> method calls from previous step
 returned <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, only then a new object is attempted to be created via this
 <a class="link" href="udisks2-UDisksModule.html#udisks-module-new-object" title="udisks_module_new_object ()"><code class="function">udisks_module_new_object()</code></a> method call. If there was a claim release in
 the previous step, no attempt to create new object is made to prevent creating
 bogus objects for recently released devices.</p></li>
</ol></div>
<div class="refsect3">
<a name="udisks-module-new-object.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>module</p></td>
<td class="parameter_description"><p>A <a class="link" href="udisks2-UDisksModule.html#UDisksModule" title="struct UDisksModule"><span class="type">UDisksModule</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>A <a class="link" href="UDisksLinuxDevice.html" title="UDisksLinuxDevice"><span class="type">UDisksLinuxDevice</span></a> device object.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="udisks-module-new-object.returns"></a><h4>Returns</h4>
<p>NULL-terminated array of new <a href="https://developer.gnome.org/gio/unstable/GDBusObjectSkeleton.html#GDBusObjectSkeleton-struct"><span class="type">GDBusObjectSkeleton</span></a> objects or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> when
the module is not interested in the <em class="parameter"><code>device</code></em>
. </p>
<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GDBusObjectSkeleton][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.9.0</p>
</div>
<hr>
<div class="refsect2">
<a name="udisks-module-get-block-object-interface-types"></a><h3>udisks_module_get_block_object_interface_types ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#GType"><span class="returnvalue">GType</span></a> *
udisks_module_get_block_object_interface_types
                               (<em class="parameter"><code><a class="link" href="udisks2-UDisksModule.html#UDisksModule" title="struct UDisksModule"><span class="type">UDisksModule</span></a> *module</code></em>);</pre>
<p>Gets an array of interface skeleton <a href="https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> types the module provides as additional
interfaces for the <a class="link" href="UDisksLinuxBlockObject.html" title="UDisksLinuxBlockObject"><span class="type">UDisksLinuxBlockObject</span></a>. This list is subsequently used by
<a class="link" href="UDisksLinuxBlockObject.html" title="UDisksLinuxBlockObject"><span class="type">UDisksLinuxBlockObject</span></a> to track available interfaces and to create new ones via
<a class="link" href="udisks2-UDisksModule.html#udisks-module-new-block-object-interface" title="udisks_module_new_block_object_interface ()"><code class="function">udisks_module_new_block_object_interface()</code></a>.</p>
<div class="refsect3">
<a name="udisks-module-get-block-object-interface-types.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>module</p></td>
<td class="parameter_description"><p>A <a class="link" href="udisks2-UDisksModule.html#UDisksModule" title="struct UDisksModule"><span class="type">UDisksModule</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="udisks-module-get-block-object-interface-types.returns"></a><h4>Returns</h4>
<p>A NULL-terminated array of <a href="https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> types or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> when the module doesn't
handle block object interfaces. Do not free, the data belongs to the module. </p>
<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GType][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.9.0</p>
</div>
<hr>
<div class="refsect2">
<a name="udisks-module-get-drive-object-interface-types"></a><h3>udisks_module_get_drive_object_interface_types ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#GType"><span class="returnvalue">GType</span></a> *
udisks_module_get_drive_object_interface_types
                               (<em class="parameter"><code><a class="link" href="udisks2-UDisksModule.html#UDisksModule" title="struct UDisksModule"><span class="type">UDisksModule</span></a> *module</code></em>);</pre>
<p>Gets an array of interface skeleton <a href="https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> types the module provides as additional
interfaces for the <a class="link" href="UDisksLinuxDriveObject.html" title="UDisksLinuxDriveObject"><span class="type">UDisksLinuxDriveObject</span></a>. This list is subsequently used by
<a class="link" href="UDisksLinuxDriveObject.html" title="UDisksLinuxDriveObject"><span class="type">UDisksLinuxDriveObject</span></a> to track available interfaces and to create new ones via
<a class="link" href="udisks2-UDisksModule.html#udisks-module-new-drive-object-interface" title="udisks_module_new_drive_object_interface ()"><code class="function">udisks_module_new_drive_object_interface()</code></a>.</p>
<div class="refsect3">
<a name="udisks-module-get-drive-object-interface-types.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>module</p></td>
<td class="parameter_description"><p>A <a class="link" href="udisks2-UDisksModule.html#UDisksModule" title="struct UDisksModule"><span class="type">UDisksModule</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="udisks-module-get-drive-object-interface-types.returns"></a><h4>Returns</h4>
<p>A NULL-terminated array of <a href="https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> types or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> when the module doesn't
handle drive object interfaces. Do not free, the data belongs to the module. </p>
<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GType][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.9.0</p>
</div>
<hr>
<div class="refsect2">
<a name="udisks-module-new-block-object-interface"></a><h3>udisks_module_new_block_object_interface ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/gio/unstable/GDBusInterfaceSkeleton.html#GDBusInterfaceSkeleton-struct"><span class="returnvalue">GDBusInterfaceSkeleton</span></a> *
udisks_module_new_block_object_interface
                               (<em class="parameter"><code><a class="link" href="udisks2-UDisksModule.html#UDisksModule" title="struct UDisksModule"><span class="type">UDisksModule</span></a> *module</code></em>,
                                <em class="parameter"><code><a class="link" href="UDisksLinuxBlockObject.html" title="UDisksLinuxBlockObject"><span class="type">UDisksLinuxBlockObject</span></a> *object</code></em>,
                                <em class="parameter"><code><a href="https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> interface_type</code></em>);</pre>
<p>Tries to create a new <a href="https://developer.gnome.org/gio/unstable/GDBusInterfaceSkeleton.html#GDBusInterfaceSkeleton-struct"><span class="type">GDBusInterfaceSkeleton</span></a> instance of type <em class="parameter"><code>interface_type</code></em>

that is supposed to be attached on the block <em class="parameter"><code>object</code></em>
. This method call is also
supposed to check whether the desired <em class="parameter"><code>interface_type</code></em>
 is applicable for
the current <em class="parameter"><code>object</code></em>
 and return <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if it's not. The returned instance must
implement the <a class="link" href="udisks2-UDisksModule.html#UDisksModuleObject" title="UDisksModuleObject"><span class="type">UDisksModuleObject</span></a> interface with the <a class="link" href="udisks2-UDisksModule.html#udisks-module-object-process-uevent" title="udisks_module_object_process_uevent ()"><code class="function">udisks_module_object_process_uevent()</code></a>
method that is used to process uevents and controls whether the interface should
be removed or not.</p>
<div class="note">Note that it is important not to take reference to <em class="parameter"><code>object</code></em> to avoid circular
references. The returned <a href="https://developer.gnome.org/gio/unstable/GDBusInterfaceSkeleton.html#GDBusInterfaceSkeleton-struct"><span class="type">GDBusInterfaceSkeleton</span></a> will be exported on the <em class="parameter"><code>object</code></em>
and unexported when no longer valid (typically as a result of a <span class="emphasis"><em>remove</em></span>
uevent). The returned object is responsible to perform cleanup in its destructor
as it's not generally guaranteed the <span class="emphasis"><em>remove</em></span> uevent will be
sent prior to that.</div>
<div class="refsect3">
<a name="udisks-module-new-block-object-interface.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>module</p></td>
<td class="parameter_description"><p>A <a class="link" href="udisks2-UDisksModule.html#UDisksModule" title="struct UDisksModule"><span class="type">UDisksModule</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>object</p></td>
<td class="parameter_description"><p>A <a class="link" href="UDisksLinuxBlockObject.html" title="UDisksLinuxBlockObject"><span class="type">UDisksLinuxBlockObject</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>interface_type</p></td>
<td class="parameter_description"><p>A <a href="https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> of the desired new interface skeleton.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="udisks-module-new-block-object-interface.returns"></a><h4>Returns</h4>
<p>A new <a href="https://developer.gnome.org/gio/unstable/GDBusInterfaceSkeleton.html#GDBusInterfaceSkeleton-struct"><span class="type">GDBusInterfaceSkeleton</span></a> instance or
<a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> when not applicable for the <em class="parameter"><code>object</code></em>
. Free with <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.9.0</p>
</div>
<hr>
<div class="refsect2">
<a name="udisks-module-new-drive-object-interface"></a><h3>udisks_module_new_drive_object_interface ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/gio/unstable/GDBusInterfaceSkeleton.html#GDBusInterfaceSkeleton-struct"><span class="returnvalue">GDBusInterfaceSkeleton</span></a> *
udisks_module_new_drive_object_interface
                               (<em class="parameter"><code><a class="link" href="udisks2-UDisksModule.html#UDisksModule" title="struct UDisksModule"><span class="type">UDisksModule</span></a> *module</code></em>,
                                <em class="parameter"><code><a class="link" href="UDisksLinuxDriveObject.html" title="UDisksLinuxDriveObject"><span class="type">UDisksLinuxDriveObject</span></a> *object</code></em>,
                                <em class="parameter"><code><a href="https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> interface_type</code></em>);</pre>
<p>Tries to create a new <a href="https://developer.gnome.org/gio/unstable/GDBusInterfaceSkeleton.html#GDBusInterfaceSkeleton-struct"><span class="type">GDBusInterfaceSkeleton</span></a> instance of type <em class="parameter"><code>interface_type</code></em>

that is supposed to be attached on the drive <em class="parameter"><code>object</code></em>
. This method call is also
supposed to check whether the desired <em class="parameter"><code>interface_type</code></em>
 is applicable for
the current <em class="parameter"><code>object</code></em>
 and return <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if it's not. The returned instance must
implement the <a class="link" href="udisks2-UDisksModule.html#UDisksModuleObject" title="UDisksModuleObject"><span class="type">UDisksModuleObject</span></a> interface with the <a class="link" href="udisks2-UDisksModule.html#udisks-module-object-process-uevent" title="udisks_module_object_process_uevent ()"><code class="function">udisks_module_object_process_uevent()</code></a>
method that is used to process uevents and controls whether the interface should
be removed or not.</p>
<div class="note">Note that it is important not to take reference to <em class="parameter"><code>object</code></em> to avoid circular
references. The returned <a href="https://developer.gnome.org/gio/unstable/GDBusInterfaceSkeleton.html#GDBusInterfaceSkeleton-struct"><span class="type">GDBusInterfaceSkeleton</span></a> will be exported on the <em class="parameter"><code>object</code></em>
and unexported when no longer valid (typically as a result of a <span class="emphasis"><em>remove</em></span>
uevent). The returned object is responsible to perform cleanup in its destructor
as it's not generally guaranteed the <span class="emphasis"><em>remove</em></span> uevent will be
sent prior to that.</div>
<div class="refsect3">
<a name="udisks-module-new-drive-object-interface.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>module</p></td>
<td class="parameter_description"><p>A <a class="link" href="udisks2-UDisksModule.html#UDisksModule" title="struct UDisksModule"><span class="type">UDisksModule</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>object</p></td>
<td class="parameter_description"><p>A <a class="link" href="UDisksLinuxDriveObject.html" title="UDisksLinuxDriveObject"><span class="type">UDisksLinuxDriveObject</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>interface_type</p></td>
<td class="parameter_description"><p>A <a href="https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> of the desired new interface skeleton.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="udisks-module-new-drive-object-interface.returns"></a><h4>Returns</h4>
<p>A new <a href="https://developer.gnome.org/gio/unstable/GDBusInterfaceSkeleton.html#GDBusInterfaceSkeleton-struct"><span class="type">GDBusInterfaceSkeleton</span></a> instance or
<a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> when not applicable for the <em class="parameter"><code>object</code></em>
. Free with <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.9.0</p>
</div>
<hr>
<div class="refsect2">
<a name="udisks-module-track-parent"></a><h3>udisks_module_track_parent ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
udisks_module_track_parent (<em class="parameter"><code><a class="link" href="udisks2-UDisksModule.html#UDisksModule" title="struct UDisksModule"><span class="type">UDisksModule</span></a> *module</code></em>,
                            <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *path</code></em>,
                            <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **uuid</code></em>);</pre>
<p>Finds a parent block device and returns its object path and UUID.
If the return value is <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the value of <em class="parameter"><code>uuid</code></em>
 has not been changed.
Related to <a class="link" href="UDisksDaemon.html#udisks-daemon-get-parent-for-tracking" title="udisks_daemon_get_parent_for_tracking ()"><code class="function">udisks_daemon_get_parent_for_tracking()</code></a>.</p>
<div class="refsect3">
<a name="udisks-module-track-parent.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>module</p></td>
<td class="parameter_description"><p>A <a class="link" href="udisks2-UDisksModule.html#UDisksModule" title="struct UDisksModule"><span class="type">UDisksModule</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>path</p></td>
<td class="parameter_description"><p>object path of a child to find parent of</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>uuid</p></td>
<td class="parameter_description"><p>a pointer to return parent UUID string</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="udisks-module-track-parent.returns"></a><h4>Returns</h4>
<p>object path of the parent device. Free with <a href="https://developer.gnome.org/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>. </p>
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.9.0</p>
</div>
<hr>
<div class="refsect2">
<a name="udisks-module-get-daemon"></a><h3>udisks_module_get_daemon ()</h3>
<pre class="programlisting"><a class="link" href="UDisksDaemon.html" title="UDisksDaemon"><span class="returnvalue">UDisksDaemon</span></a> *
udisks_module_get_daemon (<em class="parameter"><code><a class="link" href="udisks2-UDisksModule.html#UDisksModule" title="struct UDisksModule"><span class="type">UDisksModule</span></a> *module</code></em>);</pre>
<p>Gets the daemon used by <em class="parameter"><code>module</code></em>
.</p>
<div class="refsect3">
<a name="udisks-module-get-daemon.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>module</p></td>
<td class="parameter_description"><p>A <a class="link" href="udisks2-UDisksModule.html#UDisksModule" title="struct UDisksModule"><span class="type">UDisksModule</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="udisks-module-get-daemon.returns"></a><h4>Returns</h4>
<p>A <a class="link" href="UDisksDaemon.html" title="UDisksDaemon"><span class="type">UDisksDaemon</span></a>. Do not free, the object is owned by <em class="parameter"><code>module</code></em>
. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.9.0</p>
</div>
<hr>
<div class="refsect2">
<a name="udisks-module-object-process-uevent"></a><h3>udisks_module_object_process_uevent ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
udisks_module_object_process_uevent (<em class="parameter"><code><a class="link" href="udisks2-UDisksModule.html#UDisksModuleObject" title="UDisksModuleObject"><span class="type">UDisksModuleObject</span></a> *object</code></em>,
                                     <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action</code></em>,
                                     <em class="parameter"><code><a class="link" href="UDisksLinuxDevice.html" title="UDisksLinuxDevice"><span class="type">UDisksLinuxDevice</span></a> *device</code></em>,
                                     <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *keep</code></em>);</pre>
<p>A <a class="link" href="udisks2-UDisksModule.html#UDisksModuleObject" title="UDisksModuleObject"><span class="type">UDisksModuleObject</span></a> method that is called by <a class="link" href="UDisksLinuxBlockObject.html" title="UDisksLinuxBlockObject"><span class="type">UDisksLinuxBlockObject</span></a>,
<a class="link" href="UDisksLinuxDriveObject.html" title="UDisksLinuxDriveObject"><span class="type">UDisksLinuxDriveObject</span></a> and <a class="link" href="UDisksLinuxProvider.html" title="UDisksLinuxProvider"><span class="type">UDisksLinuxProvider</span></a> to process a uevent on exported
module objects and interfaces and control their validity.</p>
<p>Upon receiving a uevent the object implementing the <a class="link" href="udisks2-UDisksModule.html#UDisksModuleObject" title="UDisksModuleObject"><span class="type">UDisksModuleObject</span></a> interface
is responsible for processing updated information and indicate whether the <em class="parameter"><code>object</code></em>

is still valid or not.</p>
<p>This function may be called quite often and since uevent processing is currently
serialized by <a class="link" href="UDisksLinuxProvider.html" title="UDisksLinuxProvider"><span class="type">UDisksLinuxProvider</span></a> this method call should minimize its processing
time as much as possible.</p>
<p>See related <a class="link" href="udisks2-UDisksModule.html#udisks-module-new-object" title="udisks_module_new_object ()"><code class="function">udisks_module_new_object()</code></a>, <a class="link" href="udisks2-UDisksModule.html#udisks-module-new-block-object-interface" title="udisks_module_new_block_object_interface ()"><code class="function">udisks_module_new_block_object_interface()</code></a>
and <a class="link" href="udisks2-UDisksModule.html#udisks-module-new-drive-object-interface" title="udisks_module_new_drive_object_interface ()"><code class="function">udisks_module_new_drive_object_interface()</code></a> methods for information how uevent
routing is done and what effect the return values have.</p>
<p>Set <em class="parameter"><code>keep</code></em>
 to <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the object or interface should be unexported and removed,
<a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the object or interface should be kept around. The return value of <em class="parameter"><code>keep</code></em>

is ignored when the return value from this method is <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>. These return values
should align with the uevent <em class="parameter"><code>action</code></em>
, i.e. a <em class="parameter"><code>keep</code></em>
 return value of <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is
expected for a <code class="literal">remove</code> <em class="parameter"><code>action</code></em>
. Note that the <code class="literal">remove</code>
uevent is not always sent to block objects and the daemon may opt for direct
object destruction (for which the <em class="parameter"><code>object</code></em>
 should be prepared to perform proper
cleanup within its destructor).</p>
<div class="refsect3">
<a name="udisks-module-object-process-uevent.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>object</p></td>
<td class="parameter_description"><p>A <a class="link" href="udisks2-UDisksModule.html#UDisksModuleObject" title="UDisksModuleObject"><span class="type">UDisksModuleObject</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>action</p></td>
<td class="parameter_description"><p>uevent action, common values are <code class="literal">add</code>, <code class="literal">change</code> and <code class="literal">remove</code> or <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>
<tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>A <a class="link" href="UDisksLinuxDevice.html" title="UDisksLinuxDevice"><span class="type">UDisksLinuxDevice</span></a> device object or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the device hasn't changed.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>keep</p></td>
<td class="parameter_description"><p>A return value whether to keep the object around or not.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="udisks-module-object-process-uevent.returns"></a><h4>Returns</h4>
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> in case the uevent was processed, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> when the <em class="parameter"><code>device</code></em>
is
not applicable for the object or interface.</p>
</div>
<p class="since">Since: 2.0</p>
</div>
<hr>
<div class="refsect2">
<a name="udisks-module-object-housekeeping"></a><h3>udisks_module_object_housekeeping ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
udisks_module_object_housekeeping (<em class="parameter"><code><a class="link" href="udisks2-UDisksModule.html#UDisksModuleObject" title="UDisksModuleObject"><span class="type">UDisksModuleObject</span></a> *object</code></em>,
                                   <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> secs_since_last</code></em>,
                                   <em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                   <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>A <a class="link" href="udisks2-UDisksModule.html#UDisksModuleObject" title="UDisksModuleObject"><span class="type">UDisksModuleObject</span></a> method that is called periodically (every ten minutes or so)
by <a class="link" href="UDisksLinuxProvider.html" title="UDisksLinuxProvider"><span class="type">UDisksLinuxProvider</span></a> to perform module housekeeping tasks such as refreshing
<code class="literal">ATA SMART</code> data.</p>
<p>The method runs in a dedicated thread and is allowed to perform
blocking I/O.</p>
<p>Long-running tasks should periodically check <em class="parameter"><code>cancellable</code></em>
 to see if
they have been cancelled.</p>
<div class="refsect3">
<a name="udisks-module-object-housekeeping.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>object</p></td>
<td class="parameter_description"><p>A <a class="link" href="udisks2-UDisksModule.html#UDisksModuleObject" title="UDisksModuleObject"><span class="type">UDisksModuleObject</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>secs_since_last</p></td>
<td class="parameter_description"><p>Number of seconds since the last housekeeping or 0 if the first housekeeping ever.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<td class="parameter_description"><p>A <a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><code class="literal">GCancellable</code></a> or <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>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>Return location for error or <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="udisks-module-object-housekeeping.returns"></a><h4>Returns</h4>
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the operation succeeded, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if <em class="parameter"><code>error</code></em>
is set.</p>
</div>
<p class="since">Since: 2.0</p>
</div>
</div>
<div class="refsect1">
<a name="udisks2-UDisksModule.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="UDisksModule"></a><h3>struct UDisksModule</h3>
<pre class="programlisting">struct UDisksModule {
};
</pre>
<p>The <a class="link" href="udisks2-UDisksModule.html#UDisksModule" title="struct UDisksModule"><span class="type">UDisksModule</span></a> structure contains only private data and
should only be accessed using the provided API.</p>
</div>
<hr>
<div class="refsect2">
<a name="UDisksModuleClass"></a><h3>struct UDisksModuleClass</h3>
<pre class="programlisting">struct UDisksModuleClass {
  GObjectClass parent_class;

  GDBusInterfaceSkeleton  * (*new_manager)                      (UDisksModule           *module);
  GDBusObjectSkeleton    ** (*new_object)                       (UDisksModule           *module,
                                                                 UDisksLinuxDevice      *device);
  gchar                   * (*track_parent)                     (UDisksModule           *module,
                                                                 const gchar            *path,
                                                                 gchar                 **uuid);
  GType                   * (*get_block_object_interface_types) (UDisksModule           *module);
  GType                   * (*get_drive_object_interface_types) (UDisksModule           *module);
  GDBusInterfaceSkeleton  * (*new_block_object_interface)       (UDisksModule           *module,
                                                                 UDisksLinuxBlockObject *object,
                                                                 GType                   interface_type);
  GDBusInterfaceSkeleton  * (*new_drive_object_interface)       (UDisksModule           *module,
                                                                 UDisksLinuxDriveObject *object,
                                                                 GType                   interface_type);
};
</pre>
<p>Class structure for <a class="link" href="udisks2-UDisksModule.html#UDisksModule" title="struct UDisksModule"><span class="type">UDisksModule</span></a>.</p>
<div class="refsect3">
<a name="UDisksModuleClass.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" 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><em class="structfield"><code><a name="UDisksModuleClass.new-manager"></a>new_manager</code></em> ()</p></td>
<td class="struct_member_description"><p>Virtual function for <a class="link" href="udisks2-UDisksModule.html#udisks-module-new-manager" title="udisks_module_new_manager ()"><code class="function">udisks_module_new_manager()</code></a>. The default implementation returns <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="UDisksModuleClass.new-object"></a>new_object</code></em> ()</p></td>
<td class="struct_member_description"><p>Virtual function for <a class="link" href="udisks2-UDisksModule.html#udisks-module-new-object" title="udisks_module_new_object ()"><code class="function">udisks_module_new_object()</code></a>. The default implementation returns <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="UDisksModuleClass.track-parent"></a>track_parent</code></em> ()</p></td>
<td class="struct_member_description"><p>Virtual function for <a class="link" href="udisks2-UDisksModule.html#udisks-module-track-parent" title="udisks_module_track_parent ()"><code class="function">udisks_module_track_parent()</code></a>. The default implementation returns <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="UDisksModuleClass.get-block-object-interface-types"></a>get_block_object_interface_types</code></em> ()</p></td>
<td class="struct_member_description"><p>Virtual function for <a class="link" href="udisks2-UDisksModule.html#udisks-module-get-block-object-interface-types" title="udisks_module_get_block_object_interface_types ()"><code class="function">udisks_module_get_block_object_interface_types()</code></a>. The default implementation returns <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="UDisksModuleClass.get-drive-object-interface-types"></a>get_drive_object_interface_types</code></em> ()</p></td>
<td class="struct_member_description"><p>Virtual function for <a class="link" href="udisks2-UDisksModule.html#udisks-module-get-drive-object-interface-types" title="udisks_module_get_drive_object_interface_types ()"><code class="function">udisks_module_get_drive_object_interface_types()</code></a>. The default implementation returns <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="UDisksModuleClass.new-block-object-interface"></a>new_block_object_interface</code></em> ()</p></td>
<td class="struct_member_description"><p>Virtual function for <a class="link" href="udisks2-UDisksModule.html#udisks-module-new-block-object-interface" title="udisks_module_new_block_object_interface ()"><code class="function">udisks_module_new_block_object_interface()</code></a>. The default implementation returns <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="UDisksModuleClass.new-drive-object-interface"></a>new_drive_object_interface</code></em> ()</p></td>
<td class="struct_member_description"><p>Virtual function for <a class="link" href="udisks2-UDisksModule.html#udisks-module-new-drive-object-interface" title="udisks_module_new_drive_object_interface ()"><code class="function">udisks_module_new_drive_object_interface()</code></a>. The default implementation returns <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="UDisksModuleObject"></a><h3>UDisksModuleObject</h3>
<pre class="programlisting">typedef struct _UDisksModuleObject UDisksModuleObject;</pre>
<p>The <a class="link" href="udisks2-UDisksModule.html#UDisksModuleObject" title="UDisksModuleObject"><span class="type">UDisksModuleObject</span></a> structure contains only private data and
should only be accessed using the provided API.</p>
</div>
<hr>
<div class="refsect2">
<a name="UDisksModuleObjectIface"></a><h3>struct UDisksModuleObjectIface</h3>
<pre class="programlisting">struct UDisksModuleObjectIface {
  GTypeInterface parent_iface;

  gboolean (*process_uevent) (UDisksModuleObject  *object,
                              const gchar         *action,
                              UDisksLinuxDevice   *device,
                              gboolean            *keep);

  gboolean (*housekeeping) (UDisksModuleObject  *object,
                            guint                secs_since_last,
                            GCancellable        *cancellable,
                            GError             **error);
};
</pre>
<p>Object interface structure for <a class="link" href="udisks2-UDisksModule.html#UDisksModuleObject" title="UDisksModuleObject"><span class="type">UDisksModuleObject</span></a>.</p>
<div class="refsect3">
<a name="UDisksModuleObjectIface.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" 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><a href="https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> <em class="structfield"><code><a name="UDisksModuleObjectIface.parent-iface"></a>parent_iface</code></em>;</p></td>
<td class="struct_member_description"><p>The parent interface.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="UDisksModuleObjectIface.process-uevent"></a>process_uevent</code></em> ()</p></td>
<td class="struct_member_description"><p>Virtual function for <a class="link" href="udisks2-UDisksModule.html#udisks-module-object-process-uevent" title="udisks_module_object_process_uevent ()"><code class="function">udisks_module_object_process_uevent()</code></a>.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="UDisksModuleObjectIface.housekeeping"></a>housekeeping</code></em> ()</p></td>
<td class="struct_member_description"><p>Virtual function for <a class="link" href="udisks2-UDisksModule.html#udisks-module-object-housekeeping" title="udisks_module_object_housekeeping ()"><code class="function">udisks_module_object_housekeeping()</code></a>.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>