/usr/share/gtk-doc/html/udisks2/UDisksState.html is in udisks2-doc 2.7.6-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 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 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>UDisksState: UDisks Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="UDisks Reference Manual">
<link rel="up" href="ref-daemon-core.html" title="Core">
<link rel="prev" href="UDisksProvider.html" title="UDisksProvider">
<link rel="next" href="udisks2-ATA-commands.html" title="ATA commands">
<meta name="generator" content="GTK-Doc V1.27 (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="#UDisksState.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
<a href="#UDisksState.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties"> <span class="dim">|</span>
<a href="#UDisksState.properties" class="shortcut">Properties</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="UDisksProvider.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="udisks2-ATA-commands.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="UDisksState"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="UDisksState.top_of_page"></a>UDisksState</span></h2>
<p>UDisksState — Object used for recording state and cleaning up</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="UDisksState.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="UDisksState.html" title="UDisksState"><span class="returnvalue">UDisksState</span></a> *
</td>
<td class="function_name">
<a class="link" href="UDisksState.html#udisks-state-new" title="udisks_state_new ()">udisks_state_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="UDisksState.html#udisks-state-start-cleanup" title="udisks_state_start_cleanup ()">udisks_state_start_cleanup</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="UDisksState.html#udisks-state-stop-cleanup" title="udisks_state_stop_cleanup ()">udisks_state_stop_cleanup</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="UDisksState.html#udisks-state-check" title="udisks_state_check ()">udisks_state_check</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="UDisksState.html#udisks-state-get-daemon" title="udisks_state_get_daemon ()">udisks_state_get_daemon</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="UDisksState.html#udisks-state-add-mounted-fs" title="udisks_state_add_mounted_fs ()">udisks_state_add_mounted_fs</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="UDisksState.html#udisks-state-find-mounted-fs" title="udisks_state_find_mounted_fs ()">udisks_state_find_mounted_fs</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="UDisksState.html#udisks-state-add-unlocked-luks" title="udisks_state_add_unlocked_luks ()">udisks_state_add_unlocked_luks</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">dev_t</span>
</td>
<td class="function_name">
<a class="link" href="UDisksState.html#udisks-state-find-unlocked-luks" title="udisks_state_find_unlocked_luks ()">udisks_state_find_unlocked_luks</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="UDisksState.html#udisks-state-add-loop" title="udisks_state_add_loop ()">udisks_state_add_loop</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="UDisksState.html#udisks-state-has-loop" title="udisks_state_has_loop ()">udisks_state_has_loop</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="UDisksState.html#udisks-state-add-mdraid" title="udisks_state_add_mdraid ()">udisks_state_add_mdraid</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="UDisksState.html#udisks-state-has-mdraid" title="udisks_state_has_mdraid ()">udisks_state_has_mdraid</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="UDisksState.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody><tr>
<td class="property_type">
<a class="link" href="UDisksDaemon.html" title="UDisksDaemon"><span class="type">UDisksDaemon</span></a> *</td>
<td class="property_name"><a class="link" href="UDisksState.html#UDisksState--daemon" title="The “daemon” property">daemon</a></td>
<td class="property_flags">Read / Write / Construct Only</td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="UDisksState.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody><tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="UDisksState.html#UDisksState-struct" title="UDisksState">UDisksState</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="UDisksState.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> <a href="../gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
<span class="lineart">╰──</span> UDisksState
</pre>
</div>
<div class="refsect1">
<a name="UDisksState.description"></a><h2>Description</h2>
<p>This type is used for recording actions done by users and cleaning
up when devices set up via the udisks interfaces are removed while
still in use - for example, a USB stick being yanked.</p>
<p>The following files are used:</p>
<div class="table">
<a name="id-1.5.2.6.7.4"></a><p class="title"><b>Table 3. Persistent information and state</b></p>
<div class="table-contents"><table class="table" summary="Persistent information and state" border="1">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th align="left">File</th>
<th align="left">Usage</th>
</tr></thead>
<tbody>
<tr>
<td align="left"><code class="filename">/run/udisks2/mounted-fs</code></td>
<td align="left">
A serialized 'a{sa{sv}}' <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> mapping from the
mount point (e.g. <code class="filename">/media/EOS_DIGITAL</code>) into a set of details.
Known details include
<code class="literal">block-device</code>
(of type <a href="../glib/glib-GVariantType.html#G-VARIANT-TYPE-UINT64:CAPS">'t'</a>) that is the <span class="type">dev_t</span>
for the mounted device,
<code class="literal">mounted-by-uid</code>
(of type <a href="../glib/glib-GVariantType.html#G-VARIANT-TYPE-UINT32:CAPS">'u'</a>) that is the <span class="type">uid_t</span>
of the user who mounted the device, and
<code class="literal">fstab-mount</code>
(of type <a href="../glib/glib-GVariantType.html#G-VARIANT-TYPE-BOOLEAN:CAPS">'b'</a>) that is <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>
if the device was mounted via an entry in /etc/fstab.
</td>
</tr>
<tr>
<td align="left"><code class="filename">/run/udisks2/unlocked-luks</code></td>
<td align="left">
A serialized 'a{ta{sv}}' <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> mapping from the
<span class="type">dev_t</span> of the clear-text device (e.g. <code class="filename">/dev/dm-0</code>) into a set of details.
Known details include
<code class="literal">crypto-device</code>
(of type <a href="../glib/glib-GVariantType.html#G-VARIANT-TYPE-UINT64:CAPS">'t'</a>) that is the <span class="type">dev_t</span>
for the crypto-text device,
<code class="literal">dm-uuid</code>
(of type <a href="../glib/glib-GVariantType.html#G-VARIANT-TYPE-ARRAY:CAPS">'ay'</a>) that is the device mapper UUID
for the clear-text device and
<code class="literal">unlocked-by-uid</code>
(of type <a href="../glib/glib-GVariantType.html#G-VARIANT-TYPE-UINT32:CAPS">'u'</a>) that is the <span class="type">uid_t</span>
of the user who unlocked the device.
</td>
</tr>
<tr>
<td align="left"><code class="filename">/run/udisks2/loop</code></td>
<td align="left">
A serialized 'a{sa{sv}}' <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> mapping from the
loop device name (e.g. <code class="filename">/dev/loop0</code>) into a set of details.
Known details include
<code class="literal">backing-file</code>
(of type <a href="../glib/glib-GVariantType.html#G-VARIANT-TYPE-ARRAY:CAPS">'ay'</a>) for the name of the backing file and
<code class="literal">backing-file-device</code>
(of type <a href="../glib/glib-GVariantType.html#G-VARIANT-TYPE-UINT64:CAPS">'t'</a>) for the <span class="type">dev_t</span>
for of the device holding the backing file (or 0 if unknown) and
<code class="literal">setup-by-uid</code>
(of type <a href="../glib/glib-GVariantType.html#G-VARIANT-TYPE-UINT32:CAPS">'u'</a>) that is the <span class="type">uid_t</span>
of the user who set up the loop device.
</td>
</tr>
<tr>
<td align="left"><code class="filename">/run/udisks2/mdraid</code></td>
<td align="left">
A serialized 'a{ta{sv}}' <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> mapping from the
<span class="type">dev_t</span> of the raid device (e.g. <code class="filename">/dev/md127</code>) into a set of details.
Known details include
<code class="literal">started-by-uid</code>
(of type <a href="../glib/glib-GVariantType.html#G-VARIANT-TYPE-UINT32:CAPS">'u'</a>) that is the <span class="type">uid_t</span>
of the user who started the array.
</td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><p>Cleaning up is implemented by running a thread (to ensure that
actions are serialized) that checks all data in the files mentioned
above and cleans up the entry in question by e.g. unmounting a
filesystem, removing a mount point or tearing down a device-mapper
device when needed. The clean-up thread itself needs to be manually
kicked using e.g. <a class="link" href="UDisksState.html#udisks-state-check" title="udisks_state_check ()"><code class="function">udisks_state_check()</code></a> from suitable places in
the <a class="link" href="UDisksDaemon.html" title="UDisksDaemon"><span class="type">UDisksDaemon</span></a> and <a class="link" href="UDisksProvider.html" title="UDisksProvider"><span class="type">UDisksProvider</span></a> implementations.</p>
<p>Since cleaning up is only necessary when a device has been removed
without having been properly stopped or shut down, the fact that it
was cleaned up is logged to ensure that the information is brought
to the attention of the system administrator.</p>
</div>
<div class="refsect1">
<a name="UDisksState.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="udisks-state-new"></a><h3>udisks_state_new ()</h3>
<pre class="programlisting"><a class="link" href="UDisksState.html" title="UDisksState"><span class="returnvalue">UDisksState</span></a> *
udisks_state_new (<em class="parameter"><code><a class="link" href="UDisksDaemon.html" title="UDisksDaemon"><span class="type">UDisksDaemon</span></a> *daemon</code></em>);</pre>
<p>Creates a new <a class="link" href="UDisksState.html" title="UDisksState"><span class="type">UDisksState</span></a> object.</p>
<div class="refsect3">
<a name="udisks-state-new.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>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="udisks-state-new.returns"></a><h4>Returns</h4>
<p> A <a class="link" href="UDisksState.html" title="UDisksState"><span class="type">UDisksState</span></a> that should be freed with <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udisks-state-start-cleanup"></a><h3>udisks_state_start_cleanup ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
udisks_state_start_cleanup (<em class="parameter"><code><a class="link" href="UDisksState.html" title="UDisksState"><span class="type">UDisksState</span></a> *state</code></em>);</pre>
<p>Starts the clean-up thread.</p>
<p>The clean-up thread will hold a reference to <em class="parameter"><code>state</code></em>
for as long as
it's running - use <a class="link" href="UDisksState.html#udisks-state-stop-cleanup" title="udisks_state_stop_cleanup ()"><code class="function">udisks_state_stop_cleanup()</code></a> to stop it.</p>
<div class="refsect3">
<a name="udisks-state-start-cleanup.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>state</p></td>
<td class="parameter_description"><p>A <a class="link" href="UDisksState.html" title="UDisksState"><span class="type">UDisksState</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udisks-state-stop-cleanup"></a><h3>udisks_state_stop_cleanup ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
udisks_state_stop_cleanup (<em class="parameter"><code><a class="link" href="UDisksState.html" title="UDisksState"><span class="type">UDisksState</span></a> *state</code></em>);</pre>
<p>Stops the clean-up thread. Blocks the calling thread until it has stopped.</p>
<div class="refsect3">
<a name="udisks-state-stop-cleanup.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>state</p></td>
<td class="parameter_description"><p>A <a class="link" href="UDisksState.html" title="UDisksState"><span class="type">UDisksState</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udisks-state-check"></a><h3>udisks_state_check ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
udisks_state_check (<em class="parameter"><code><a class="link" href="UDisksState.html" title="UDisksState"><span class="type">UDisksState</span></a> *state</code></em>);</pre>
<p>Causes the clean-up thread for <em class="parameter"><code>state</code></em>
to check if anything should be cleaned up.</p>
<p>This can be called from any thread and will not block the calling thread.</p>
<div class="refsect3">
<a name="udisks-state-check.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>state</p></td>
<td class="parameter_description"><p>A <a class="link" href="UDisksState.html" title="UDisksState"><span class="type">UDisksState</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udisks-state-get-daemon"></a><h3>udisks_state_get_daemon ()</h3>
<pre class="programlisting"><a class="link" href="UDisksDaemon.html" title="UDisksDaemon"><span class="returnvalue">UDisksDaemon</span></a> *
udisks_state_get_daemon (<em class="parameter"><code><a class="link" href="UDisksState.html" title="UDisksState"><span class="type">UDisksState</span></a> *state</code></em>);</pre>
<p>Gets the daemon used by <em class="parameter"><code>state</code></em>
.</p>
<div class="refsect3">
<a name="udisks-state-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>state</p></td>
<td class="parameter_description"><p>A <a class="link" href="UDisksState.html" title="UDisksState"><span class="type">UDisksState</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="udisks-state-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>state</code></em>
.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udisks-state-add-mounted-fs"></a><h3>udisks_state_add_mounted_fs ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
udisks_state_add_mounted_fs (<em class="parameter"><code><a class="link" href="UDisksState.html" title="UDisksState"><span class="type">UDisksState</span></a> *state</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *mount_point</code></em>,
<em class="parameter"><code><span class="type">dev_t</span> block_device</code></em>,
<em class="parameter"><code><span class="type">uid_t</span> uid</code></em>,
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> fstab_mount</code></em>);</pre>
<p>Adds a new entry to the
<code class="filename">/run/udisks2/mounted-fs</code> file.</p>
<div class="refsect3">
<a name="udisks-state-add-mounted-fs.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>state</p></td>
<td class="parameter_description"><p>A <a class="link" href="UDisksState.html" title="UDisksState"><span class="type">UDisksState</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>block_device</p></td>
<td class="parameter_description"><p>The block device.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mount_point</p></td>
<td class="parameter_description"><p>The mount point.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>uid</p></td>
<td class="parameter_description"><p>The user id of the process requesting the device to be mounted.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>fstab_mount</p></td>
<td class="parameter_description"><p><a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the device was mounted via /etc/fstab.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udisks-state-find-mounted-fs"></a><h3>udisks_state_find_mounted_fs ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
udisks_state_find_mounted_fs (<em class="parameter"><code><a class="link" href="UDisksState.html" title="UDisksState"><span class="type">UDisksState</span></a> *state</code></em>,
<em class="parameter"><code><span class="type">dev_t</span> block_device</code></em>,
<em class="parameter"><code><span class="type">uid_t</span> *out_uid</code></em>,
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *out_fstab_mount</code></em>);</pre>
<p>Gets the mount point for <em class="parameter"><code>block_device</code></em>
, if it exists in the
<code class="filename">/run/udisks2/mounted-fs</code> file.</p>
<div class="refsect3">
<a name="udisks-state-find-mounted-fs.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>state</p></td>
<td class="parameter_description"><p>A <a class="link" href="UDisksState.html" title="UDisksState"><span class="type">UDisksState</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>block_device</p></td>
<td class="parameter_description"><p>The block device.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>out_uid</p></td>
<td class="parameter_description"><p>Return location for the user id who mounted the device or <a href="../glib/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>out_fstab_mount</p></td>
<td class="parameter_description"><p>Return location for whether the device was a fstab mount or <a href="../glib/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-state-find-mounted-fs.returns"></a><h4>Returns</h4>
<p> The mount point for <em class="parameter"><code>block_device</code></em>
or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not found.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udisks-state-add-unlocked-luks"></a><h3>udisks_state_add_unlocked_luks ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
udisks_state_add_unlocked_luks (<em class="parameter"><code><a class="link" href="UDisksState.html" title="UDisksState"><span class="type">UDisksState</span></a> *state</code></em>,
<em class="parameter"><code><span class="type">dev_t</span> cleartext_device</code></em>,
<em class="parameter"><code><span class="type">dev_t</span> crypto_device</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dm_uuid</code></em>,
<em class="parameter"><code><span class="type">uid_t</span> uid</code></em>);</pre>
<p>Adds a new entry to the
<code class="filename">/run/udisks2/unlocked-luks</code> file.</p>
<div class="refsect3">
<a name="udisks-state-add-unlocked-luks.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>state</p></td>
<td class="parameter_description"><p>A <a class="link" href="UDisksState.html" title="UDisksState"><span class="type">UDisksState</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cleartext_device</p></td>
<td class="parameter_description"><p>The clear-text device.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>crypto_device</p></td>
<td class="parameter_description"><p>The crypto device.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dm_uuid</p></td>
<td class="parameter_description"><p>The UUID of the unlocked dm device.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>uid</p></td>
<td class="parameter_description"><p>The user id of the process requesting the device to be unlocked.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udisks-state-find-unlocked-luks"></a><h3>udisks_state_find_unlocked_luks ()</h3>
<pre class="programlisting"><span class="returnvalue">dev_t</span>
udisks_state_find_unlocked_luks (<em class="parameter"><code><a class="link" href="UDisksState.html" title="UDisksState"><span class="type">UDisksState</span></a> *state</code></em>,
<em class="parameter"><code><span class="type">dev_t</span> crypto_device</code></em>,
<em class="parameter"><code><span class="type">uid_t</span> *out_uid</code></em>);</pre>
<p>Gets the clear-text device for <em class="parameter"><code>crypto_device</code></em>
, if it exists in the
<code class="filename">/run/udisks2/unlocked-luks</code> file.</p>
<div class="refsect3">
<a name="udisks-state-find-unlocked-luks.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>state</p></td>
<td class="parameter_description"><p>A <a class="link" href="UDisksState.html" title="UDisksState"><span class="type">UDisksState</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>crypto_device</p></td>
<td class="parameter_description"><p>The block device.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>out_uid</p></td>
<td class="parameter_description"><p>Return location for the user id who mounted the device or <a href="../glib/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-state-find-unlocked-luks.returns"></a><h4>Returns</h4>
<p> The cleartext device for <em class="parameter"><code>crypto_device</code></em>
or 0 if not found.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udisks-state-add-loop"></a><h3>udisks_state_add_loop ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
udisks_state_add_loop (<em class="parameter"><code><a class="link" href="UDisksState.html" title="UDisksState"><span class="type">UDisksState</span></a> *state</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *device_file</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *backing_file</code></em>,
<em class="parameter"><code><span class="type">dev_t</span> backing_file_device</code></em>,
<em class="parameter"><code><span class="type">uid_t</span> uid</code></em>);</pre>
<p>Adds a new entry to the <code class="filename">/run/udisks2/loop</code>
file.</p>
<div class="refsect3">
<a name="udisks-state-add-loop.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>state</p></td>
<td class="parameter_description"><p>A <a class="link" href="UDisksState.html" title="UDisksState"><span class="type">UDisksState</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>device_file</p></td>
<td class="parameter_description"><p>The loop device file.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>backing_file</p></td>
<td class="parameter_description"><p>The backing file.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>backing_file_device</p></td>
<td class="parameter_description"><p>The <span class="type">dev_t</span> of the backing file or 0 if unknown.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>uid</p></td>
<td class="parameter_description"><p>The user id of the process requesting the loop device.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udisks-state-has-loop"></a><h3>udisks_state_has_loop ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
udisks_state_has_loop (<em class="parameter"><code><a class="link" href="UDisksState.html" title="UDisksState"><span class="type">UDisksState</span></a> *state</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *device_file</code></em>,
<em class="parameter"><code><span class="type">uid_t</span> *out_uid</code></em>);</pre>
<p>Checks if <em class="parameter"><code>device_file</code></em>
is set up via udisks.</p>
<div class="refsect3">
<a name="udisks-state-has-loop.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>state</p></td>
<td class="parameter_description"><p>A <a class="link" href="UDisksState.html" title="UDisksState"><span class="type">UDisksState</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>device_file</p></td>
<td class="parameter_description"><p>A loop device file.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>out_uid</p></td>
<td class="parameter_description"><p>Return location for the user id who setup the loop device or <a href="../glib/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="../glib/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-state-has-loop.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if set up via udisks, otherwise <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> or if <em class="parameter"><code>error</code></em>
is set.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udisks-state-add-mdraid"></a><h3>udisks_state_add_mdraid ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
udisks_state_add_mdraid (<em class="parameter"><code><a class="link" href="UDisksState.html" title="UDisksState"><span class="type">UDisksState</span></a> *state</code></em>,
<em class="parameter"><code><span class="type">dev_t</span> raid_device</code></em>,
<em class="parameter"><code><span class="type">uid_t</span> uid</code></em>);</pre>
<p>Adds a new entry to the <code class="filename">/run/udisks2/mdraid</code>
file.</p>
<div class="refsect3">
<a name="udisks-state-add-mdraid.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>state</p></td>
<td class="parameter_description"><p>A <a class="link" href="UDisksState.html" title="UDisksState"><span class="type">UDisksState</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>raid_device</p></td>
<td class="parameter_description"><p>The <span class="type">dev_t</span> for the RAID device.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>uid</p></td>
<td class="parameter_description"><p>The user id of the process requesting the loop device.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="udisks-state-has-mdraid"></a><h3>udisks_state_has_mdraid ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
udisks_state_has_mdraid (<em class="parameter"><code><a class="link" href="UDisksState.html" title="UDisksState"><span class="type">UDisksState</span></a> *state</code></em>,
<em class="parameter"><code><span class="type">dev_t</span> raid_device</code></em>,
<em class="parameter"><code><span class="type">uid_t</span> *out_uid</code></em>);</pre>
<p>Checks if <em class="parameter"><code>raid_device</code></em>
is set up via udisks.</p>
<div class="refsect3">
<a name="udisks-state-has-mdraid.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>state</p></td>
<td class="parameter_description"><p>A <a class="link" href="UDisksState.html" title="UDisksState"><span class="type">UDisksState</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>raid_device</p></td>
<td class="parameter_description"><p>A <span class="type">dev_t</span> for the RAID device.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>out_uid</p></td>
<td class="parameter_description"><p>Return location for the user id who setup the loop device or <a href="../glib/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="../glib/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-state-has-mdraid.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if set up via udisks, otherwise <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> or if <em class="parameter"><code>error</code></em>
is set.</p>
</div>
</div>
</div>
<div class="refsect1">
<a name="UDisksState.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="UDisksState-struct"></a><h3>UDisksState</h3>
<pre class="programlisting">typedef struct _UDisksState UDisksState;</pre>
<p>The <a class="link" href="UDisksState.html" title="UDisksState"><span class="type">UDisksState</span></a> structure contains only private data and should
only be accessed using the provided API.</p>
</div>
</div>
<div class="refsect1">
<a name="UDisksState.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="UDisksState--daemon"></a><h3>The <code class="literal">“daemon”</code> property</h3>
<pre class="programlisting"> “daemon” <a class="link" href="UDisksDaemon.html" title="UDisksDaemon"><span class="type">UDisksDaemon</span></a> *</pre>
<p>The <a class="link" href="UDisksDaemon.html" title="UDisksDaemon"><span class="type">UDisksDaemon</span></a> object.</p>
<p>Flags: Read / Write / Construct Only</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.27</div>
</body>
</html>
|