/usr/share/gtk-doc/html/libfm/FmJob.html is in libfm-doc 1.2.5-1.
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 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>FmJob: Libfm Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="Libfm Reference Manual">
<link rel="up" href="libfm-jobs.html" title="Libfm Jobs.">
<link rel="prev" href="FmFileOpsJob.html" title="FmFileOpsJob">
<link rel="next" href="libfm-FmSimpleJob.html" title="FmSimpleJob">
<meta name="generator" content="GTK-Doc V1.25 (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="#FmJob.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
<a href="#FmJob.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_signals"> <span class="dim">|</span>
<a href="#FmJob.signals" class="shortcut">Signals</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="libfm-jobs.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="FmFileOpsJob.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libfm-FmSimpleJob.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="FmJob"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="FmJob.top_of_page"></a>FmJob</span></h2>
<p>FmJob — Base class of all kinds of asynchronous jobs.</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="FmJob.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 href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="FmJob.html#FmJobCallMainThreadFunc" title="FmJobCallMainThreadFunc ()">*FmJobCallMainThreadFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
</td>
<td class="function_name">
<a class="link" href="FmJob.html#fm-job-ask" title="fm_job_ask ()">fm_job_ask</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
</td>
<td class="function_name">
<a class="link" href="FmJob.html#fm-job-ask-valist" title="fm_job_ask_valist ()">fm_job_ask_valist</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
</td>
<td class="function_name">
<a class="link" href="FmJob.html#fm-job-askv" title="fm_job_askv ()">fm_job_askv</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
</td>
<td class="function_name">
<a class="link" href="FmJob.html#fm-job-call-main-thread" title="fm_job_call_main_thread ()">fm_job_call_main_thread</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="FmJob.html#fm-job-cancel" title="fm_job_cancel ()">fm_job_cancel</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="FmJob.html#FmJobErrorAction" title="enum FmJobErrorAction"><span class="returnvalue">FmJobErrorAction</span></a>
</td>
<td class="function_name">
<a class="link" href="FmJob.html#fm-job-emit-error" title="fm_job_emit_error ()">fm_job_emit_error</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="FmJob.html#fm-job-finish" title="fm_job_finish ()">fm_job_finish</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/gio/GCancellable.html#GCancellable-struct"><span class="returnvalue">GCancellable</span></a> *
</td>
<td class="function_name">
<a class="link" href="FmJob.html#fm-job-get-cancellable" title="fm_job_get_cancellable ()">fm_job_get_cancellable</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="FmJob.html#fm-job-init-cancellable" title="fm_job_init_cancellable ()">fm_job_init_cancellable</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="FmJob.html#fm-job-is-cancelled" title="fm_job_is_cancelled ()">fm_job_is_cancelled</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="FmJob.html#fm-job-is-running" title="fm_job_is_running ()">fm_job_is_running</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="FmJob.html#fm-job-pause" title="fm_job_pause ()">fm_job_pause</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="FmJob.html#fm-job-resume" title="fm_job_resume ()">fm_job_resume</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="FmJob.html#fm-job-run-async" title="fm_job_run_async ()">fm_job_run_async</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="FmJob.html#fm-job-run-sync" title="fm_job_run_sync ()">fm_job_run_sync</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="FmJob.html#fm-job-run-sync-with-mainloop" title="fm_job_run_sync_with_mainloop ()">fm_job_run_sync_with_mainloop</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="FmJob.html#fm-job-set-cancellable" title="fm_job_set_cancellable ()">fm_job_set_cancellable</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="FmJob.signals"></a><h2>Signals</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="signals_return">
<col width="300px" class="signals_name">
<col width="200px" class="signals_flags">
</colgroup>
<tbody>
<tr>
<td class="signal_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a></td>
<td class="signal_name"><a class="link" href="FmJob.html#FmJob-ask" title="The “ask” signal">ask</a></td>
<td class="signal_flags"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
</tr>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="FmJob.html#FmJob-cancelled" title="The “cancelled” signal">cancelled</a></td>
<td class="signal_flags"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS">Run First</a></td>
</tr>
<tr>
<td class="signal_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a></td>
<td class="signal_name"><a class="link" href="FmJob.html#FmJob-error" title="The “error” signal">error</a></td>
<td class="signal_flags"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
</tr>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="FmJob.html#FmJob-finished" title="The “finished” signal">finished</a></td>
<td class="signal_flags"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS">Run First</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="FmJob.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">struct</td>
<td class="function_name"><a class="link" href="FmJob.html#FmJob-struct" title="struct FmJob">FmJob</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="FmJob.html#FmJobClass" title="struct FmJobClass">FmJobClass</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="FmJob.html#FmJobErrorAction" title="enum FmJobErrorAction">FmJobErrorAction</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="FmJob.html#FmJobErrorSeverity" title="enum FmJobErrorSeverity">FmJobErrorSeverity</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="FmJob.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
<span class="lineart">╰──</span> FmJob
<span class="lineart">├──</span> <a class="link" href="FmDeepCountJob.html" title="FmDeepCountJob">FmDeepCountJob</a>
<span class="lineart">├──</span> <a class="link" href="FmDirListJob.html" title="FmDirListJob">FmDirListJob</a>
<span class="lineart">├──</span> <a class="link" href="FmFileInfoJob.html" title="FmFileInfoJob">FmFileInfoJob</a>
<span class="lineart">╰──</span> <a class="link" href="FmFileOpsJob.html" title="FmFileOpsJob">FmFileOpsJob</a>
</pre>
</div>
<div class="refsect1">
<a name="FmJob.description"></a><h2>Description</h2>
<p><em class="parameter"><code>include</code></em>
: libfm/fm.h</p>
<p>The <a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> can be used to create asynchronous jobs performing some
time-consuming tasks in another worker thread.
To run a <a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> in another thread you simply call
<a class="link" href="FmJob.html#fm-job-run-async" title="fm_job_run_async ()"><code class="function">fm_job_run_async()</code></a>, and then the task will be done in another
worker thread. Later, when the job is finished, <a class="link" href="FmJob.html#FmJob-finished" title="The “finished” signal"><span class="type">“finished”</span></a> signal is
emitted. When the job is still running, it's possible to cancel it
from main thread by calling <a class="link" href="FmJob.html#fm-job-cancel" title="fm_job_cancel ()"><code class="function">fm_job_cancel()</code></a>. Then, <a class="link" href="FmJob.html#FmJob-cancelled" title="The “cancelled” signal"><span class="type">“cancelled”</span></a> signal
will be emitted before emitting <a class="link" href="FmJob.html#FmJob-finished" title="The “finished” signal"><span class="type">“finished”</span></a> signal. You can also run
the job in blocking fashion instead of running it asynchronously by
calling <a class="link" href="FmJob.html#fm-job-run-sync" title="fm_job_run_sync ()"><code class="function">fm_job_run_sync()</code></a>.</p>
</div>
<div class="refsect1">
<a name="FmJob.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="FmJobCallMainThreadFunc"></a><h3>FmJobCallMainThreadFunc ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
<span class="c_punctuation">(</span>*FmJobCallMainThreadFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> *job</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="fm-job-ask"></a><h3>fm_job_ask ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
fm_job_ask (<em class="parameter"><code><a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> *job</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *question</code></em>,
<em class="parameter"><code>...</code></em>);</pre>
<p>Asks the user for some interactions. The user will have a list of
available options and should make a choice.</p>
<p>This APIs is private to <a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> and should only be used in the
implementation of classes derived from <a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a>.</p>
<p>This function should be called from working thread only.</p>
<div class="refsect3">
<a name="fm-job-ask.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>job</p></td>
<td class="parameter_description"><p>the job that calls main thread</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>question</p></td>
<td class="parameter_description"><p>the text to ask the user</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>list of choices to give the user</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="fm-job-ask.returns"></a><h4>Returns</h4>
<p> user's choice.</p>
</div>
<p class="since">Since: 0.1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="fm-job-ask-valist"></a><h3>fm_job_ask_valist ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
fm_job_ask_valist (<em class="parameter"><code><a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> *job</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *question</code></em>,
<em class="parameter"><code><span class="type">va_list</span> options</code></em>);</pre>
<p>Asks the user for some interactions. The user will have a list of
available options and should make a choice.</p>
<p>This APIs is private to <a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> and should only be used in the
implementation of classes derived from <a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a>.</p>
<p>This function should be called from working thread only.</p>
<div class="refsect3">
<a name="fm-job-ask-valist.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>job</p></td>
<td class="parameter_description"><p>the job that calls main thread</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>question</p></td>
<td class="parameter_description"><p>the text to ask the user</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>options</p></td>
<td class="parameter_description"><p>list of choices to give the user</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="fm-job-ask-valist.returns"></a><h4>Returns</h4>
<p> user's choice.</p>
</div>
<p class="since">Since: 0.1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="fm-job-askv"></a><h3>fm_job_askv ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
fm_job_askv (<em class="parameter"><code><a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> *job</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *question</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> * const *options</code></em>);</pre>
<p>Asks the user for some interactions. The user will have a list of
available options and should make a choice.</p>
<p>This APIs is private to <a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> and should only be used in the
implementation of classes derived from <a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a>.</p>
<p>This function should be called from working thread only.</p>
<div class="refsect3">
<a name="fm-job-askv.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>job</p></td>
<td class="parameter_description"><p>the job that calls main thread</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>question</p></td>
<td class="parameter_description"><p>the text to ask the user</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>options</p></td>
<td class="parameter_description"><p>list of choices to give the user</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="fm-job-askv.returns"></a><h4>Returns</h4>
<p> user's choice.</p>
</div>
<p class="since">Since: 0.1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="fm-job-call-main-thread"></a><h3>fm_job_call_main_thread ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
fm_job_call_main_thread (<em class="parameter"><code><a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> *job</code></em>,
<em class="parameter"><code><a class="link" href="FmJob.html#FmJobCallMainThreadFunc" title="FmJobCallMainThreadFunc ()"><span class="type">FmJobCallMainThreadFunc</span></a> func</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>Stops calling thread, waits main thread for idle, passes <em class="parameter"><code>user_data</code></em>
to callback <em class="parameter"><code>func</code></em>
in main thread, gathers result of callback, and
returns it to caller.</p>
<p>This APIs is private to <a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> and should only be used in the
implementation of classes derived from <a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a>.</p>
<p>This function should be called from working thread only.</p>
<div class="refsect3">
<a name="fm-job-call-main-thread.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>job</p></td>
<td class="parameter_description"><p>the job that calls main thread</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>func</p></td>
<td class="parameter_description"><p>callback to run from main thread</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data for the callback</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="fm-job-call-main-thread.returns"></a><h4>Returns</h4>
<p> return value from running <em class="parameter"><code>func</code></em>
.</p>
</div>
<p class="since">Since: 0.1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="fm-job-cancel"></a><h3>fm_job_cancel ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
fm_job_cancel (<em class="parameter"><code><a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> *job</code></em>);</pre>
<p>Cancels the <em class="parameter"><code>job</code></em>
.</p>
<div class="refsect3">
<a name="fm-job-cancel.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>job</p></td>
<td class="parameter_description"><p>a job to cancel</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: 0.1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="fm-job-emit-error"></a><h3>fm_job_emit_error ()</h3>
<pre class="programlisting"><a class="link" href="FmJob.html#FmJobErrorAction" title="enum FmJobErrorAction"><span class="returnvalue">FmJobErrorAction</span></a>
fm_job_emit_error (<em class="parameter"><code><a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> *job</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *err</code></em>,
<em class="parameter"><code><a class="link" href="FmJob.html#FmJobErrorSeverity" title="enum FmJobErrorSeverity"><span class="type">FmJobErrorSeverity</span></a> severity</code></em>);</pre>
<p>Emits an <a class="link" href="FmJob.html#FmJob-error" title="The “error” signal"><span class="type">“error”</span></a> signal in the main thread to notify it when an
error occurs.
The return value of this function is the return value returned by
the connected signal handlers.
If <em class="parameter"><code>severity</code></em>
is FM_JOB_ERROR_CRITICAL, the returned value is ignored and
<a class="link" href="FmJob.html#fm-job-cancel" title="fm_job_cancel ()"><code class="function">fm_job_cancel()</code></a> is called to abort the job. Otherwise, the signal
handler of this error can return FM_JOB_RETRY to ask for retrying the
failed operation, return FM_JOB_CONTINUE to ignore the error and
continue the remaining job, or return FM_JOB_ABORT to abort the job.
If FM_JOB_ABORT is returned by the signal handler, <a class="link" href="FmJob.html#fm-job-cancel" title="fm_job_cancel ()"><code class="function">fm_job_cancel()</code></a>
will be called in <a class="link" href="FmJob.html#fm-job-emit-error" title="fm_job_emit_error ()"><code class="function">fm_job_emit_error()</code></a>.</p>
<p>This APIs is private to <a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> and should only be used in the
implementation of classes derived from <a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a>.</p>
<p>This function should be called from working thread only.</p>
<div class="refsect3">
<a name="fm-job-emit-error.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>job</p></td>
<td class="parameter_description"><p>a job that emitted the signal</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>err</p></td>
<td class="parameter_description"><p>an error descriptor</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>severity</p></td>
<td class="parameter_description"><p>severity of the error</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="fm-job-emit-error.returns"></a><h4>Returns</h4>
<p> action that should be performed on that error.</p>
</div>
<p class="since">Since: 0.1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="fm-job-finish"></a><h3>fm_job_finish ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
fm_job_finish (<em class="parameter"><code><a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> *job</code></em>);</pre>
<p>Schedules the finishing of job. Once this function is called the
<em class="parameter"><code>job</code></em>
becomes invalid for the caller and should be not used anymore.</p>
<p>This APIs is private to <a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> and should only be used in the
implementation of classes derived from <a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a>.</p>
<p>This function should be called from working thread only.</p>
<div class="refsect3">
<a name="fm-job-finish.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>job</p></td>
<td class="parameter_description"><p>the job that was finished</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: 0.1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="fm-job-get-cancellable"></a><h3>fm_job_get_cancellable ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gio/GCancellable.html#GCancellable-struct"><span class="returnvalue">GCancellable</span></a> *
fm_job_get_cancellable (<em class="parameter"><code><a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> *job</code></em>);</pre>
<p>Get an existing <a href="/usr/share/gtk-doc/html/gio/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> object from <em class="parameter"><code>job</code></em>
for use with gio in
another job by calling <a class="link" href="FmJob.html#fm-job-set-cancellable" title="fm_job_set_cancellable ()"><code class="function">fm_job_set_cancellable()</code></a>.
This can be used when you wish to share a cancellable object
among different jobs.</p>
<p>This APIs is private to <a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> and should only be used in the
implementation of classes derived from <a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a>.</p>
<div class="refsect3">
<a name="fm-job-get-cancellable.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>job</p></td>
<td class="parameter_description"><p>the job to inspect</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="fm-job-get-cancellable.returns"></a><h4>Returns</h4>
<p> a <a href="/usr/share/gtk-doc/html/gio/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> object if it was initialized for <em class="parameter"><code>job</code></em>
.</p>
</div>
<p class="since">Since: 0.1.9</p>
</div>
<hr>
<div class="refsect2">
<a name="fm-job-init-cancellable"></a><h3>fm_job_init_cancellable ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
fm_job_init_cancellable (<em class="parameter"><code><a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> *job</code></em>);</pre>
<p>Used by derived classes to implement <code class="function">FmJobClass:<GTKDOCLINK HREF="run"><code class="function">run()</code></code></GTKDOCLINK> using gio inside.
This API tries to initialize a <a href="/usr/share/gtk-doc/html/gio/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> object for use with gio and
should only be called once in the constructor of derived classes which
require the use of <a href="/usr/share/gtk-doc/html/gio/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a>.</p>
<p>This APIs is private to <a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> and should only be used in the
implementation of classes derived from <a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a>.</p>
<div class="refsect3">
<a name="fm-job-init-cancellable.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>job</p></td>
<td class="parameter_description"><p>the job to init</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: 0.1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="fm-job-is-cancelled"></a><h3>fm_job_is_cancelled ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
fm_job_is_cancelled (<em class="parameter"><code><a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> *job</code></em>);</pre>
<p>Checks if the job is already cancelled.</p>
<div class="refsect3">
<a name="fm-job-is-cancelled.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>job</p></td>
<td class="parameter_description"><p>the job to inspect</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="fm-job-is-cancelled.returns"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the job is already cancelled.</p>
</div>
<p class="since">Since: 0.1.9</p>
</div>
<hr>
<div class="refsect2">
<a name="fm-job-is-running"></a><h3>fm_job_is_running ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
fm_job_is_running (<em class="parameter"><code><a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> *job</code></em>);</pre>
<p>Checks if the job is still running.</p>
<div class="refsect3">
<a name="fm-job-is-running.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>job</p></td>
<td class="parameter_description"><p>the job to inspect</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="fm-job-is-running.returns"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the job is still running.</p>
</div>
<p class="since">Since: 0.1.9</p>
</div>
<hr>
<div class="refsect2">
<a name="fm-job-pause"></a><h3>fm_job_pause ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
fm_job_pause (<em class="parameter"><code><a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> *job</code></em>);</pre>
<p>Locks execution of job until next call to <a class="link" href="FmJob.html#fm-job-resume" title="fm_job_resume ()"><code class="function">fm_job_resume()</code></a>. This call
may be used from thread different from the thread where the job runs
in. This call may be done again (but have no extra effect) from the
same thread. Any other usage may lead to deadlock.</p>
<div class="refsect3">
<a name="fm-job-pause.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>job</p></td>
<td class="parameter_description"><p>a job to apply</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="fm-job-pause.returns"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if job cannot be locked.</p>
</div>
<p class="since">Since: 1.2.0</p>
</div>
<hr>
<div class="refsect2">
<a name="fm-job-resume"></a><h3>fm_job_resume ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
fm_job_resume (<em class="parameter"><code><a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> *job</code></em>);</pre>
<p>Unlocks execution of <em class="parameter"><code>job</code></em>
that was made by previous call to
<a class="link" href="FmJob.html#fm-job-pause" title="fm_job_pause ()"><code class="function">fm_job_pause()</code></a>. This call may be used only from the same thread
where previous <a class="link" href="FmJob.html#fm-job-pause" title="fm_job_pause ()"><code class="function">fm_job_pause()</code></a> was made. Any other usage may lead to
deadlock.</p>
<div class="refsect3">
<a name="fm-job-resume.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>job</p></td>
<td class="parameter_description"><p>a job to apply</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: 1.2.0</p>
</div>
<hr>
<div class="refsect2">
<a name="fm-job-run-async"></a><h3>fm_job_run_async ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
fm_job_run_async (<em class="parameter"><code><a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> *job</code></em>);</pre>
<p>Starts the <em class="parameter"><code>job</code></em>
asyncronously creating new thread. If job starts
successfully then the <a class="link" href="FmJob.html#FmJob-finished" title="The “finished” signal"><span class="type">“finished”</span></a> signal will be emitted when
<em class="parameter"><code>job</code></em>
is either succeeded or was cancelled. If <em class="parameter"><code>job</code></em>
could not be
started then <a class="link" href="FmJob.html#FmJob-cancelled" title="The “cancelled” signal"><span class="type">“cancelled”</span></a> signal is emitted before return from
this function.</p>
<div class="refsect3">
<a name="fm-job-run-async.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>job</p></td>
<td class="parameter_description"><p>a job to run</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="fm-job-run-async.returns"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if job started successfully.</p>
</div>
<p class="since">Since: 0.1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="fm-job-run-sync"></a><h3>fm_job_run_sync ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
fm_job_run_sync (<em class="parameter"><code><a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> *job</code></em>);</pre>
<p>Runs the <em class="parameter"><code>job</code></em>
in current thread in a blocking fashion. The job will
emit either <a class="link" href="FmJob.html#FmJob-cancelled" title="The “cancelled” signal"><span class="type">“cancelled”</span></a> signal if job was cancelled
or <a class="link" href="FmJob.html#FmJob-finished" title="The “finished” signal"><span class="type">“finished”</span></a> signal if it finished successfully.</p>
<div class="refsect3">
<a name="fm-job-run-sync.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>job</p></td>
<td class="parameter_description"><p>a job to run</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="fm-job-run-sync.returns"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>job</code></em>
ran successfully.</p>
</div>
<p class="since">Since: 0.1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="fm-job-run-sync-with-mainloop"></a><h3>fm_job_run_sync_with_mainloop ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
fm_job_run_sync_with_mainloop (<em class="parameter"><code><a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> *job</code></em>);</pre>
<p>Runs the <em class="parameter"><code>job</code></em>
in current thread in a blocking fashion and an additional
mainloop being created to prevent blocking of user interface. If <em class="parameter"><code>job</code></em>
started successfully then <a class="link" href="FmJob.html#FmJob-finished" title="The “finished” signal"><span class="type">“finished”</span></a> signal is emitted when <em class="parameter"><code>job</code></em>
is either succeeded or was cancelled.
Note: using this API from within GTK main loop will lead to deadlock
therefore if it is a GTK application then caller should unlock GDK
threads before calling this API and lock them back after return from
it. This statement is valid for any GTK application that uses locks.</p>
<div class="refsect3">
<a name="fm-job-run-sync-with-mainloop.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>job</p></td>
<td class="parameter_description"><p>a job to run</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="fm-job-run-sync-with-mainloop.returns"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if job started successfully.</p>
</div>
<p class="since">Since: 0.1.1</p>
</div>
<hr>
<div class="refsect2">
<a name="fm-job-set-cancellable"></a><h3>fm_job_set_cancellable ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
fm_job_set_cancellable (<em class="parameter"><code><a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> *job</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gio/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>);</pre>
<p>Lets the job to use an existing <em class="parameter"><code>cancellable</code></em>
object.
This can be used when you wish to share a cancellable object
among different jobs.
This should only be called before the <em class="parameter"><code>job</code></em>
is launched.</p>
<p>This APIs is private to <a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> and should only be used in the
implementation of classes derived from <a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a>.</p>
<div class="refsect3">
<a name="fm-job-set-cancellable.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>job</p></td>
<td class="parameter_description"><p>the job to set</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<td class="parameter_description"><p> a shared cancellable object. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 0.1.0</p>
</div>
</div>
<div class="refsect1">
<a name="FmJob.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="FmJob-struct"></a><h3>struct FmJob</h3>
<pre class="programlisting">struct FmJob;</pre>
</div>
<hr>
<div class="refsect2">
<a name="FmJobClass"></a><h3>struct FmJobClass</h3>
<pre class="programlisting">struct FmJobClass {
GObjectClass parent_class;
/* the class closures for signals */
void (*finished)(FmJob* job);
guint (*error)(FmJob* job, GError* err, guint severity);
/* guint above are: FmJobErrorAction and FmJobErrorSeverity */
void (*cancelled)(FmJob* job);
gint (*ask)(FmJob* job, const gchar* question, gchar* const *options);
/* routines used by methods */
gboolean (*run_async)(FmJob* job); /* for fm_job_run_async() */
gboolean (*run)(FmJob* job); /* for any fm_job_run_*() */
void (*cancel)(FmJob* job); /* for fm_job_cancel() */
};
</pre>
<div class="refsect3">
<a name="FmJobClass.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="FmJobClass.finished"></a>finished</code></em> ()</p></td>
<td class="struct_member_description"><p>the class closure for the <a class="link" href="FmJob.html#FmJob-finished" title="The “finished” signal"><span class="type">“finished”</span></a> signal.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="FmJobClass.error"></a>error</code></em> ()</p></td>
<td class="struct_member_description"><p>the class closure for the <a class="link" href="FmJob.html#FmJob-error" title="The “error” signal"><span class="type">“error”</span></a> signal.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="FmJobClass.cancelled"></a>cancelled</code></em> ()</p></td>
<td class="struct_member_description"><p>the class closure for the <a class="link" href="FmJob.html#FmJob-cancelled" title="The “cancelled” signal"><span class="type">“cancelled”</span></a> signal.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="FmJobClass.ask"></a>ask</code></em> ()</p></td>
<td class="struct_member_description"><p>the class closure for the <a class="link" href="FmJob.html#FmJob-ask" title="The “ask” signal"><span class="type">“ask”</span></a> signal.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="FmJobClass.run-async"></a>run_async</code></em> ()</p></td>
<td class="struct_member_description"><p>the <em class="parameter"><code>run_async</code></em>
function called to create a thread for the
job execution. Returns <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if thread was created successfully.
The most probably should be not overridden by any derived class.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="FmJobClass.run"></a>run</code></em> ()</p></td>
<td class="struct_member_description"><p>the <em class="parameter"><code>run</code></em>
function is called to perform actual job actions. Returns
value that will be returned from call <a class="link" href="FmJob.html#fm-job-run-sync" title="fm_job_run_sync ()"><code class="function">fm_job_run_sync()</code></a>. Should be
set by any class derived from <a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a>.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="FmJobClass.cancel"></a>cancel</code></em> ()</p></td>
<td class="struct_member_description"><p>the <em class="parameter"><code>cancel</code></em>
function is called when the job is cancelled.
It can perform some class-specific operations then.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="FmJobErrorAction"></a><h3>enum FmJobErrorAction</h3>
<p>The action that should be performed after error happened.
Usually chosen by user.</p>
<div class="refsect3">
<a name="FmJobErrorAction.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="FM-JOB-CONTINUE:CAPS"></a>FM_JOB_CONTINUE</p></td>
<td class="enum_member_description">
<p>ignore the error and continue remaining work</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="FM-JOB-RETRY:CAPS"></a>FM_JOB_RETRY</p></td>
<td class="enum_member_description">
<p>retry the previously failed operation. (not every kind of job support this)</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="FM-JOB-ABORT:CAPS"></a>FM_JOB_ABORT</p></td>
<td class="enum_member_description">
<p>abort the whole job</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="FmJobErrorSeverity"></a><h3>enum FmJobErrorSeverity</h3>
<div class="refsect3">
<a name="FmJobErrorSeverity.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="FM-JOB-ERROR-WARNING:CAPS"></a>FM_JOB_ERROR_WARNING</p></td>
<td class="enum_member_description">
<p>not an error, just a warning</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="FM-JOB-ERROR-MILD:CAPS"></a>FM_JOB_ERROR_MILD</p></td>
<td class="enum_member_description">
<p>no big deal, can be ignored most of the time</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="FM-JOB-ERROR-MODERATE:CAPS"></a>FM_JOB_ERROR_MODERATE</p></td>
<td class="enum_member_description">
<p>moderate errors</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="FM-JOB-ERROR-SEVERE:CAPS"></a>FM_JOB_ERROR_SEVERE</p></td>
<td class="enum_member_description">
<p>severe errors, whether to abort operation depends on error handlers</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="FM-JOB-ERROR-CRITICAL:CAPS"></a>FM_JOB_ERROR_CRITICAL</p></td>
<td class="enum_member_description">
<p>critical errors, the operation is aborted</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="FmJob.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="FmJob-ask"></a><h3>The <code class="literal">“ask”</code> signal</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
user_function (<a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> *job,
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> question,
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> options,
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre>
<p>The <a class="link" href="FmJob.html#FmJob-ask" title="The “ask” signal"><span class="type">“ask”</span></a> signal is emitted when the job asks for some
user interactions. The user then will have a list of available
<em class="parameter"><code>options</code></em>
. If there is more than one handler connected to the
signal then only one of them will receive it.</p>
<div class="refsect3">
<a name="FmJob-ask.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>job</p></td>
<td class="parameter_description"><p>a job that emitted the signal</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>question</p></td>
<td class="parameter_description"><p>(const gchar *) a question to ask user</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>options</p></td>
<td class="parameter_description"><p>(gchar* const *) list of choices to ask user</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="FmJob-ask.returns"></a><h4>Returns</h4>
<p> user's choice.</p>
</div>
<p>Flags: <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
<p class="since">Since: 0.1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="FmJob-cancelled"></a><h3>The <code class="literal">“cancelled”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> *job,
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre>
<p>The <a class="link" href="FmJob.html#FmJob-cancelled" title="The “cancelled” signal"><span class="type">“cancelled”</span></a> signal is emitted when the job is cancelled
or aborted due to critical errors.</p>
<div class="refsect3">
<a name="FmJob-cancelled.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>job</p></td>
<td class="parameter_description"><p>a job that emitted the signal</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p>Flags: <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS">Run First</a></p>
<p class="since">Since: 0.1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="FmJob-error"></a><h3>The <code class="literal">“error”</code> signal</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
user_function (<a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> *job,
<a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error,
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> severity,
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre>
<p>The <a class="link" href="FmJob.html#FmJob-error" title="The “error” signal"><span class="type">“error”</span></a> signal is emitted when errors happen. A case if
more than one handler is connected to this signal is ambiguous.</p>
<div class="refsect3">
<a name="FmJob-error.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>job</p></td>
<td class="parameter_description"><p>a job that emitted the signal</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>an error descriptor</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>severity</p></td>
<td class="parameter_description"><p><a class="link" href="FmJob.html#FmJobErrorSeverity" title="enum FmJobErrorSeverity"><span class="type">FmJobErrorSeverity</span></a> of the error</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="FmJob-error.returns"></a><h4>Returns</h4>
<p> <a class="link" href="FmJob.html#FmJobErrorAction" title="enum FmJobErrorAction"><span class="type">FmJobErrorAction</span></a> that should be performed on that error.</p>
</div>
<p>Flags: <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
<p class="since">Since: 0.1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="FmJob-finished"></a><h3>The <code class="literal">“finished”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="FmJob.html" title="FmJob"><span class="type">FmJob</span></a> *job,
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre>
<p>The <a class="link" href="FmJob.html#FmJob-finished" title="The “finished” signal"><span class="type">“finished”</span></a> signal is emitted after the job is finished.
The signal is never emitted if the fm_job_run_XXX function
returned <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, in that case the <a class="link" href="FmJob.html#FmJob-cancelled" title="The “cancelled” signal"><span class="type">“cancelled”</span></a> signal will be
emitted instead.</p>
<div class="refsect3">
<a name="FmJob-finished.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>job</p></td>
<td class="parameter_description"><p>a job that emitted the signal</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p>Flags: <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS">Run First</a></p>
<p class="since">Since: 0.1.0</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>
|