This file is indexed.

/usr/share/doc/libglib2.0-doc/gio/gio-GDBusError.html is in libglib2.0-doc 2.32.1-0ubuntu2.

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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GDBusError</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GIO Reference Manual">
<link rel="up" href="gdbus-lowlevel.html" title="Lowlevel D-Bus Support">
<link rel="prev" href="gio-D-Bus-Introspection-Data.html" title="D-Bus Introspection Data">
<link rel="next" href="GDBusMessage.html" title="GDBusMessage">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gio-D-Bus-Introspection-Data.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="gdbus-lowlevel.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GIO Reference Manual</th>
<td><a accesskey="n" href="GDBusMessage.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gio-GDBusError.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#gio-GDBusError.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="gio-GDBusError"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gio-GDBusError.top_of_page"></a>GDBusError</span></h2>
<p>GDBusError — Mapping D-Bus errors to and from GError</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gio-GDBusError.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gio/gio.h&gt;

enum                <a class="link" href="gio-GDBusError.html#GDBusError" title="enum GDBusError">GDBusError</a>;
#define             <a class="link" href="gio-GDBusError.html#G-DBUS-ERROR:CAPS" title="G_DBUS_ERROR">G_DBUS_ERROR</a>
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gio-GDBusError.html#g-dbus-error-is-remote-error" title="g_dbus_error_is_remote_error ()">g_dbus_error_is_remote_error</a>        (<em class="parameter"><code>const <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>);
<a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="gio-GDBusError.html#g-dbus-error-get-remote-error" title="g_dbus_error_get_remote_error ()">g_dbus_error_get_remote_error</a>       (<em class="parameter"><code>const <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gio-GDBusError.html#g-dbus-error-strip-remote-error" title="g_dbus_error_strip_remote_error ()">g_dbus_error_strip_remote_error</a>     (<em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>);
                    <a class="link" href="gio-GDBusError.html#GDBusErrorEntry" title="GDBusErrorEntry">GDBusErrorEntry</a>;
<span class="returnvalue">void</span>                <a class="link" href="gio-GDBusError.html#g-dbus-error-register-error-domain" title="g_dbus_error_register_error_domain ()">g_dbus_error_register_error_domain</a>  (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *error_domain_quark_name</code></em>,
                                                         <em class="parameter"><code>volatile <a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *quark_volatile</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gio-GDBusError.html#GDBusErrorEntry" title="GDBusErrorEntry"><span class="type">GDBusErrorEntry</span></a> *entries</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> num_entries</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gio-GDBusError.html#g-dbus-error-register-error" title="g_dbus_error_register_error ()">g_dbus_error_register_error</a>         (<em class="parameter"><code><a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> error_domain</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> error_code</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dbus_error_name</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gio-GDBusError.html#g-dbus-error-unregister-error" title="g_dbus_error_unregister_error ()">g_dbus_error_unregister_error</a>       (<em class="parameter"><code><a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> error_domain</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> error_code</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dbus_error_name</code></em>);
<a href="../glib/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a> *            <a class="link" href="gio-GDBusError.html#g-dbus-error-new-for-dbus-error" title="g_dbus_error_new_for_dbus_error ()">g_dbus_error_new_for_dbus_error</a>     (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dbus_error_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dbus_error_message</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gio-GDBusError.html#g-dbus-error-set-dbus-error" title="g_dbus_error_set_dbus_error ()">g_dbus_error_set_dbus_error</a>         (<em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dbus_error_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dbus_error_message</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *format</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gio-GDBusError.html#g-dbus-error-set-dbus-error-valist" title="g_dbus_error_set_dbus_error_valist ()">g_dbus_error_set_dbus_error_valist</a>  (<em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dbus_error_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dbus_error_message</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *format</code></em>,
                                                         <em class="parameter"><code><span class="type">va_list</span> var_args</code></em>);
<a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="gio-GDBusError.html#g-dbus-error-encode-gerror" title="g_dbus_error_encode_gerror ()">g_dbus_error_encode_gerror</a>          (<em class="parameter"><code>const <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="gio-GDBusError.description"></a><h2>Description</h2>
<p>
All facilities that return errors from remote methods (such as
<a class="link" href="GDBusConnection.html#g-dbus-connection-call-sync" title="g_dbus_connection_call_sync ()"><code class="function">g_dbus_connection_call_sync()</code></a>) use <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> to represent both D-Bus
errors (e.g. errors returned from the other peer) and locally
in-process generated errors.
</p>
<p>
To check if a returned <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> is an error from a remote peer, use
<a class="link" href="gio-GDBusError.html#g-dbus-error-is-remote-error" title="g_dbus_error_is_remote_error ()"><code class="function">g_dbus_error_is_remote_error()</code></a>. To get the actual D-Bus error name,
use <a class="link" href="gio-GDBusError.html#g-dbus-error-get-remote-error" title="g_dbus_error_get_remote_error ()"><code class="function">g_dbus_error_get_remote_error()</code></a>. Before presenting an error,
always use <a class="link" href="gio-GDBusError.html#g-dbus-error-strip-remote-error" title="g_dbus_error_strip_remote_error ()"><code class="function">g_dbus_error_strip_remote_error()</code></a>.
</p>
<p>
In addition, facilities used to return errors to a remote peer also
use <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>. See <a class="link" href="GDBusMethodInvocation.html#g-dbus-method-invocation-return-error" title="g_dbus_method_invocation_return_error ()"><code class="function">g_dbus_method_invocation_return_error()</code></a> for
discussion about how the D-Bus error name is set.
</p>
<p>
Applications can associate a <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> error domain with a set of D-Bus errors in order to
automatically map from D-Bus errors to <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> and back. This
is typically done in the function returning the <a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> for the
error domain:
</p>
<div class="example">
<a name="error-registration"></a><p class="title"><b>Example 1. Error Registration</b></p>
<div class="example-contents"><pre class="programlisting">
/* foo-bar-error.h: */

#define FOO_BAR_ERROR (foo_bar_error_quark ())
GQuark foo_bar_error_quark (void);

typedef enum
{
  FOO_BAR_ERROR_FAILED,
  FOO_BAR_ERROR_ANOTHER_ERROR,
  FOO_BAR_ERROR_SOME_THIRD_ERROR,
} FooBarError;

/* foo-bar-error.c: */

static const GDBusErrorEntry foo_bar_error_entries[] =
{
  {FOO_BAR_ERROR_FAILED,           "org.project.Foo.Bar.Error.Failed"},
  {FOO_BAR_ERROR_ANOTHER_ERROR,    "org.project.Foo.Bar.Error.AnotherError"},
  {FOO_BAR_ERROR_SOME_THIRD_ERROR, "org.project.Foo.Bar.Error.SomeThirdError"},
};

GQuark
foo_bar_error_quark (void)
{
  static volatile gsize quark_volatile = 0;
  g_dbus_error_register_error_domain ("foo-bar-error-quark",
                                      &amp;quark_volatile,
                                      foo_bar_error_entries,
                                      G_N_ELEMENTS (foo_bar_error_entries));
  G_STATIC_ASSERT (G_N_ELEMENTS (foo_bar_error_entries) - 1 == FOO_BAR_ERROR_SOME_THIRD_ERROR);
  return (GQuark) quark_volatile;
}
</pre></div>
</div>
<p><br class="example-break">
With this setup, a D-Bus peer can transparently pass e.g. <code class="literal">FOO_BAR_ERROR_ANOTHER_ERROR</code> and
other peers will see the D-Bus error name <code class="literal">org.project.Foo.Bar.Error.AnotherError</code>.
If the other peer is using GDBus, the peer will see also <code class="literal">FOO_BAR_ERROR_ANOTHER_ERROR</code> instead
of <a class="link" href="gio-GIOError.html#G-IO-ERROR-DBUS-ERROR:CAPS"><code class="literal">G_IO_ERROR_DBUS_ERROR</code></a>. Note that GDBus clients can still recover
<code class="literal">org.project.Foo.Bar.Error.AnotherError</code> using <a class="link" href="gio-GDBusError.html#g-dbus-error-get-remote-error" title="g_dbus_error_get_remote_error ()"><code class="function">g_dbus_error_get_remote_error()</code></a>.
</p>
<p>
Note that errors in the <a class="link" href="gio-GDBusError.html#G-DBUS-ERROR:CAPS" title="G_DBUS_ERROR"><code class="literal">G_DBUS_ERROR</code></a> error domain is intended only
for returning errors from a remote message bus process. Errors
generated locally in-process by e.g. <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> is from the
<a class="link" href="gio-GIOError.html#G-IO-ERROR:CAPS" title="G_IO_ERROR"><code class="literal">G_IO_ERROR</code></a> domain.
</p>
</div>
<div class="refsect1">
<a name="gio-GDBusError.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GDBusError"></a><h3>enum GDBusError</h3>
<pre class="programlisting">typedef enum {
  /* Well-known errors in the org.freedesktop.DBus.Error namespace */
  G_DBUS_ERROR_FAILED,                           /* org.freedesktop.DBus.Error.Failed */
  G_DBUS_ERROR_NO_MEMORY,                        /* org.freedesktop.DBus.Error.NoMemory */
  G_DBUS_ERROR_SERVICE_UNKNOWN,                  /* org.freedesktop.DBus.Error.ServiceUnknown */
  G_DBUS_ERROR_NAME_HAS_NO_OWNER,                /* org.freedesktop.DBus.Error.NameHasNoOwner */
  G_DBUS_ERROR_NO_REPLY,                         /* org.freedesktop.DBus.Error.NoReply */
  G_DBUS_ERROR_IO_ERROR,                         /* org.freedesktop.DBus.Error.IOError */
  G_DBUS_ERROR_BAD_ADDRESS,                      /* org.freedesktop.DBus.Error.BadAddress */
  G_DBUS_ERROR_NOT_SUPPORTED,                    /* org.freedesktop.DBus.Error.NotSupported */
  G_DBUS_ERROR_LIMITS_EXCEEDED,                  /* org.freedesktop.DBus.Error.LimitsExceeded */
  G_DBUS_ERROR_ACCESS_DENIED,                    /* org.freedesktop.DBus.Error.AccessDenied */
  G_DBUS_ERROR_AUTH_FAILED,                      /* org.freedesktop.DBus.Error.AuthFailed */
  G_DBUS_ERROR_NO_SERVER,                        /* org.freedesktop.DBus.Error.NoServer */
  G_DBUS_ERROR_TIMEOUT,                          /* org.freedesktop.DBus.Error.Timeout */
  G_DBUS_ERROR_NO_NETWORK,                       /* org.freedesktop.DBus.Error.NoNetwork */
  G_DBUS_ERROR_ADDRESS_IN_USE,                   /* org.freedesktop.DBus.Error.AddressInUse */
  G_DBUS_ERROR_DISCONNECTED,                     /* org.freedesktop.DBus.Error.Disconnected */
  G_DBUS_ERROR_INVALID_ARGS,                     /* org.freedesktop.DBus.Error.InvalidArgs */
  G_DBUS_ERROR_FILE_NOT_FOUND,                   /* org.freedesktop.DBus.Error.FileNotFound */
  G_DBUS_ERROR_FILE_EXISTS,                      /* org.freedesktop.DBus.Error.FileExists */
  G_DBUS_ERROR_UNKNOWN_METHOD,                   /* org.freedesktop.DBus.Error.UnknownMethod */
  G_DBUS_ERROR_TIMED_OUT,                        /* org.freedesktop.DBus.Error.TimedOut */
  G_DBUS_ERROR_MATCH_RULE_NOT_FOUND,             /* org.freedesktop.DBus.Error.MatchRuleNotFound */
  G_DBUS_ERROR_MATCH_RULE_INVALID,               /* org.freedesktop.DBus.Error.MatchRuleInvalid */
  G_DBUS_ERROR_SPAWN_EXEC_FAILED,                /* org.freedesktop.DBus.Error.Spawn.ExecFailed */
  G_DBUS_ERROR_SPAWN_FORK_FAILED,                /* org.freedesktop.DBus.Error.Spawn.ForkFailed */
  G_DBUS_ERROR_SPAWN_CHILD_EXITED,               /* org.freedesktop.DBus.Error.Spawn.ChildExited */
  G_DBUS_ERROR_SPAWN_CHILD_SIGNALED,             /* org.freedesktop.DBus.Error.Spawn.ChildSignaled */
  G_DBUS_ERROR_SPAWN_FAILED,                     /* org.freedesktop.DBus.Error.Spawn.Failed */
  G_DBUS_ERROR_SPAWN_SETUP_FAILED,               /* org.freedesktop.DBus.Error.Spawn.FailedToSetup */
  G_DBUS_ERROR_SPAWN_CONFIG_INVALID,             /* org.freedesktop.DBus.Error.Spawn.ConfigInvalid */
  G_DBUS_ERROR_SPAWN_SERVICE_INVALID,            /* org.freedesktop.DBus.Error.Spawn.ServiceNotValid */
  G_DBUS_ERROR_SPAWN_SERVICE_NOT_FOUND,          /* org.freedesktop.DBus.Error.Spawn.ServiceNotFound */
  G_DBUS_ERROR_SPAWN_PERMISSIONS_INVALID,        /* org.freedesktop.DBus.Error.Spawn.PermissionsInvalid */
  G_DBUS_ERROR_SPAWN_FILE_INVALID,               /* org.freedesktop.DBus.Error.Spawn.FileInvalid */
  G_DBUS_ERROR_SPAWN_NO_MEMORY,                  /* org.freedesktop.DBus.Error.Spawn.NoMemory */
  G_DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN,          /* org.freedesktop.DBus.Error.UnixProcessIdUnknown */
  G_DBUS_ERROR_INVALID_SIGNATURE,                /* org.freedesktop.DBus.Error.InvalidSignature */
  G_DBUS_ERROR_INVALID_FILE_CONTENT,             /* org.freedesktop.DBus.Error.InvalidFileContent */
  G_DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN, /* org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown */
  G_DBUS_ERROR_ADT_AUDIT_DATA_UNKNOWN,           /* org.freedesktop.DBus.Error.AdtAuditDataUnknown */
  G_DBUS_ERROR_OBJECT_PATH_IN_USE                /* org.freedesktop.DBus.Error.ObjectPathInUse */
} GDBusError;
</pre>
<p>
Error codes for the <a class="link" href="gio-GDBusError.html#G-DBUS-ERROR:CAPS" title="G_DBUS_ERROR"><code class="literal">G_DBUS_ERROR</code></a> error domain.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="G-DBUS-ERROR-FAILED:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_FAILED</code></span></p></td>
<td>A generic error; "something went wrong" - see the error message for
more.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-NO-MEMORY:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_NO_MEMORY</code></span></p></td>
<td>There was not enough memory to complete an operation.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-SERVICE-UNKNOWN:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_SERVICE_UNKNOWN</code></span></p></td>
<td>The bus doesn't know how to launch a service to supply the bus name
you wanted.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-NAME-HAS-NO-OWNER:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_NAME_HAS_NO_OWNER</code></span></p></td>
<td>The bus name you referenced doesn't exist (i.e. no application owns
it).
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-NO-REPLY:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_NO_REPLY</code></span></p></td>
<td>No reply to a message expecting one, usually means a timeout occurred.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-IO-ERROR:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_IO_ERROR</code></span></p></td>
<td>Something went wrong reading or writing to a socket, for example.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-BAD-ADDRESS:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_BAD_ADDRESS</code></span></p></td>
<td>A D-Bus bus address was malformed.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-NOT-SUPPORTED:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_NOT_SUPPORTED</code></span></p></td>
<td>Requested operation isn't supported (like ENOSYS on UNIX).
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-LIMITS-EXCEEDED:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_LIMITS_EXCEEDED</code></span></p></td>
<td>Some limited resource is exhausted.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-ACCESS-DENIED:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_ACCESS_DENIED</code></span></p></td>
<td>Security restrictions don't allow doing what you're trying to do.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-AUTH-FAILED:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_AUTH_FAILED</code></span></p></td>
<td>Authentication didn't work.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-NO-SERVER:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_NO_SERVER</code></span></p></td>
<td>Unable to connect to server (probably caused by ECONNREFUSED on a
socket).
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-TIMEOUT:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_TIMEOUT</code></span></p></td>
<td>Certain timeout errors, possibly ETIMEDOUT on a socket.  Note that
<a class="link" href="gio-GDBusError.html#G-DBUS-ERROR-NO-REPLY:CAPS"><code class="literal">G_DBUS_ERROR_NO_REPLY</code></a> is used for message reply timeouts. Warning:
this is confusingly-named given that <a class="link" href="gio-GDBusError.html#G-DBUS-ERROR-TIMED-OUT:CAPS"><code class="literal">G_DBUS_ERROR_TIMED_OUT</code></a> also
exists. We can't fix it for compatibility reasons so just be
careful.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-NO-NETWORK:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_NO_NETWORK</code></span></p></td>
<td>No network access (probably ENETUNREACH on a socket).
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-ADDRESS-IN-USE:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_ADDRESS_IN_USE</code></span></p></td>
<td>Can't bind a socket since its address is in use (i.e. EADDRINUSE).
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-DISCONNECTED:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_DISCONNECTED</code></span></p></td>
<td>The connection is disconnected and you're trying to use it.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-INVALID-ARGS:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_INVALID_ARGS</code></span></p></td>
<td>Invalid arguments passed to a method call.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-FILE-NOT-FOUND:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_FILE_NOT_FOUND</code></span></p></td>
<td>Missing file.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-FILE-EXISTS:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_FILE_EXISTS</code></span></p></td>
<td>Existing file and the operation you're using does not silently overwrite.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-UNKNOWN-METHOD:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_UNKNOWN_METHOD</code></span></p></td>
<td>Method name you invoked isn't known by the object you invoked it on.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-TIMED-OUT:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_TIMED_OUT</code></span></p></td>
<td>Certain timeout errors, e.g. while starting a service. Warning: this is
confusingly-named given that <a class="link" href="gio-GDBusError.html#G-DBUS-ERROR-TIMEOUT:CAPS"><code class="literal">G_DBUS_ERROR_TIMEOUT</code></a> also exists. We
can't fix it for compatibility reasons so just be careful.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-MATCH-RULE-NOT-FOUND:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_MATCH_RULE_NOT_FOUND</code></span></p></td>
<td>Tried to remove or modify a match rule that didn't exist.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-MATCH-RULE-INVALID:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_MATCH_RULE_INVALID</code></span></p></td>
<td>The match rule isn't syntactically valid.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-SPAWN-EXEC-FAILED:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_SPAWN_EXEC_FAILED</code></span></p></td>
<td>While starting a new process, the <code class="function">exec()</code> call failed.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-SPAWN-FORK-FAILED:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_SPAWN_FORK_FAILED</code></span></p></td>
<td>While starting a new process, the <code class="function">fork()</code> call failed.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-SPAWN-CHILD-EXITED:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_SPAWN_CHILD_EXITED</code></span></p></td>
<td>While starting a new process, the child exited with a status code.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-SPAWN-CHILD-SIGNALED:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_SPAWN_CHILD_SIGNALED</code></span></p></td>
<td>While starting a new process, the child exited on a signal.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-SPAWN-FAILED:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_SPAWN_FAILED</code></span></p></td>
<td>While starting a new process, something went wrong.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-SPAWN-SETUP-FAILED:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_SPAWN_SETUP_FAILED</code></span></p></td>
<td>We failed to setup the environment correctly.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-SPAWN-CONFIG-INVALID:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_SPAWN_CONFIG_INVALID</code></span></p></td>
<td>We failed to setup the config parser correctly.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-SPAWN-SERVICE-INVALID:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_SPAWN_SERVICE_INVALID</code></span></p></td>
<td>Bus name was not valid.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-SPAWN-SERVICE-NOT-FOUND:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_SPAWN_SERVICE_NOT_FOUND</code></span></p></td>
<td>Service file not found in system-services directory.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-SPAWN-PERMISSIONS-INVALID:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_SPAWN_PERMISSIONS_INVALID</code></span></p></td>
<td>Permissions are incorrect on the setuid helper.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-SPAWN-FILE-INVALID:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_SPAWN_FILE_INVALID</code></span></p></td>
<td>Service file invalid (Name, User or Exec missing).
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-SPAWN-NO-MEMORY:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_SPAWN_NO_MEMORY</code></span></p></td>
<td>Tried to get a UNIX process ID and it wasn't available.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-UNIX-PROCESS-ID-UNKNOWN:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN</code></span></p></td>
<td>Tried to get a UNIX process ID and it wasn't available.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-INVALID-SIGNATURE:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_INVALID_SIGNATURE</code></span></p></td>
<td>A type signature is not valid.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-INVALID-FILE-CONTENT:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_INVALID_FILE_CONTENT</code></span></p></td>
<td>A file contains invalid syntax or is otherwise broken.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-SELINUX-SECURITY-CONTEXT-UNKNOWN:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN</code></span></p></td>
<td>Asked for SELinux security context and it wasn't available.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-ADT-AUDIT-DATA-UNKNOWN:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_ADT_AUDIT_DATA_UNKNOWN</code></span></p></td>
<td>Asked for ADT audit data and it wasn't available.
</td>
</tr>
<tr>
<td><p><a name="G-DBUS-ERROR-OBJECT-PATH-IN-USE:CAPS"></a><span class="term"><code class="literal">G_DBUS_ERROR_OBJECT_PATH_IN_USE</code></span></p></td>
<td>There's already an object with the requested object path.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="G-DBUS-ERROR:CAPS"></a><h3>G_DBUS_ERROR</h3>
<pre class="programlisting">#define G_DBUS_ERROR g_dbus_error_quark()
</pre>
<p>
Error domain for errors generated by a remote message bus. Errors
in this domain will be from the <a class="link" href="gio-GDBusError.html#GDBusError" title="enum GDBusError"><span class="type">GDBusError</span></a> enumeration.  See
<a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for more information on error domains.
</p>
<p>
Note that errors in this error domain is intended only for
returning errors from a remote message bus process. Errors
generated locally in-process by e.g. <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> is from the
<a class="link" href="gio-GIOError.html#G-IO-ERROR:CAPS" title="G_IO_ERROR"><code class="literal">G_IO_ERROR</code></a> domain.
</p>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-error-is-remote-error"></a><h3>g_dbus_error_is_remote_error ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_dbus_error_is_remote_error        (<em class="parameter"><code>const <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>);</pre>
<p>
Checks if <em class="parameter"><code>error</code></em> represents an error received via D-Bus from a remote peer. If so,
use <a class="link" href="gio-GDBusError.html#g-dbus-error-get-remote-error" title="g_dbus_error_get_remote_error ()"><code class="function">g_dbus_error_get_remote_error()</code></a> to get the name of the error.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>A <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>error</code></em> represents an error from a remote peer,
<a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-error-get-remote-error"></a><h3>g_dbus_error_get_remote_error ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             g_dbus_error_get_remote_error       (<em class="parameter"><code>const <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>);</pre>
<p>
Gets the D-Bus error name used for <em class="parameter"><code>error</code></em>, if any.
</p>
<p>
This function is guaranteed to return a D-Bus error name for all
<a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>s returned from functions handling remote method
calls (e.g. <a class="link" href="GDBusConnection.html#g-dbus-connection-call-finish" title="g_dbus_connection_call_finish ()"><code class="function">g_dbus_connection_call_finish()</code></a>) unless
<a class="link" href="gio-GDBusError.html#g-dbus-error-strip-remote-error" title="g_dbus_error_strip_remote_error ()"><code class="function">g_dbus_error_strip_remote_error()</code></a> has been used on <em class="parameter"><code>error</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>A <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>An allocated string or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the D-Bus error name could not be found. Free with <a href="../glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-error-strip-remote-error"></a><h3>g_dbus_error_strip_remote_error ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_dbus_error_strip_remote_error     (<em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>);</pre>
<p>
Looks for extra information in the error message used to recover
the D-Bus error name and strips it if found. If stripped, the
message field in <em class="parameter"><code>error</code></em> will correspond exactly to what was
received on the wire.
</p>
<p>
This is typically used when presenting errors to the end user.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>A <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if information was stripped, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="GDBusErrorEntry"></a><h3>GDBusErrorEntry</h3>
<pre class="programlisting">typedef struct {
  gint         error_code;
  const gchar *dbus_error_name;
} GDBusErrorEntry;
</pre>
<p>
Struct used in <a class="link" href="gio-GDBusError.html#g-dbus-error-register-error-domain" title="g_dbus_error_register_error_domain ()"><code class="function">g_dbus_error_register_error_domain()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="GDBusErrorEntry.error-code"></a>error_code</code></em>;</span></p></td>
<td>An error code.</td>
</tr>
<tr>
<td><p><span class="term">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GDBusErrorEntry.dbus-error-name"></a>dbus_error_name</code></em>;</span></p></td>
<td>The D-Bus error name to associate with <em class="parameter"><code>error_code</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-error-register-error-domain"></a><h3>g_dbus_error_register_error_domain ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_dbus_error_register_error_domain  (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *error_domain_quark_name</code></em>,
                                                         <em class="parameter"><code>volatile <a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *quark_volatile</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gio-GDBusError.html#GDBusErrorEntry" title="GDBusErrorEntry"><span class="type">GDBusErrorEntry</span></a> *entries</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> num_entries</code></em>);</pre>
<p>
Helper function for associating a <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> error domain with D-Bus error names.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>error_domain_quark_name</code></em> :</span></p></td>
<td>The error domain name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>quark_volatile</code></em> :</span></p></td>
<td>A pointer where to store the <a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>entries</code></em> :</span></p></td>
<td>A pointer to <em class="parameter"><code>num_entries</code></em> <a class="link" href="gio-GDBusError.html#GDBusErrorEntry" title="GDBusErrorEntry"><span class="type">GDBusErrorEntry</span></a> struct items.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>num_entries</code></em> :</span></p></td>
<td>Number of items to register.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-error-register-error"></a><h3>g_dbus_error_register_error ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_dbus_error_register_error         (<em class="parameter"><code><a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> error_domain</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> error_code</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dbus_error_name</code></em>);</pre>
<p>
Creates an association to map between <em class="parameter"><code>dbus_error_name</code></em> and
<a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>s specified by <em class="parameter"><code>error_domain</code></em> and <em class="parameter"><code>error_code</code></em>.
</p>
<p>
This is typically done in the routine that returns the <a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> for
an error domain.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>error_domain</code></em> :</span></p></td>
<td>A <a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> for a error domain.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error_code</code></em> :</span></p></td>
<td>An error code.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dbus_error_name</code></em> :</span></p></td>
<td>A D-Bus error name.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the association was created, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if it already
exists.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-error-unregister-error"></a><h3>g_dbus_error_unregister_error ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_dbus_error_unregister_error       (<em class="parameter"><code><a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> error_domain</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> error_code</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dbus_error_name</code></em>);</pre>
<p>
Destroys an association previously set up with <a class="link" href="gio-GDBusError.html#g-dbus-error-register-error" title="g_dbus_error_register_error ()"><code class="function">g_dbus_error_register_error()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>error_domain</code></em> :</span></p></td>
<td>A <a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> for a error domain.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error_code</code></em> :</span></p></td>
<td>An error code.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dbus_error_name</code></em> :</span></p></td>
<td>A D-Bus error name.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the association was destroyed, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if it wasn't found.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-error-new-for-dbus-error"></a><h3>g_dbus_error_new_for_dbus_error ()</h3>
<pre class="programlisting"><a href="../glib/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a> *            g_dbus_error_new_for_dbus_error     (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dbus_error_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dbus_error_message</code></em>);</pre>
<p>
Creates a <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> based on the contents of <em class="parameter"><code>dbus_error_name</code></em> and
<em class="parameter"><code>dbus_error_message</code></em>.
</p>
<p>
Errors registered with <a class="link" href="gio-GDBusError.html#g-dbus-error-register-error" title="g_dbus_error_register_error ()"><code class="function">g_dbus_error_register_error()</code></a> will be looked
up using <em class="parameter"><code>dbus_error_name</code></em> and if a match is found, the error domain
and code is used. Applications can use <a class="link" href="gio-GDBusError.html#g-dbus-error-get-remote-error" title="g_dbus_error_get_remote_error ()"><code class="function">g_dbus_error_get_remote_error()</code></a>
to recover <em class="parameter"><code>dbus_error_name</code></em>.
</p>
<p>
If a match against a registered error is not found and the D-Bus
error name is in a form as returned by <a class="link" href="gio-GDBusError.html#g-dbus-error-encode-gerror" title="g_dbus_error_encode_gerror ()"><code class="function">g_dbus_error_encode_gerror()</code></a>
the error domain and code encoded in the name is used to
create the <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>. Also, <em class="parameter"><code>dbus_error_name</code></em> is added to the error message
such that it can be recovered with <a class="link" href="gio-GDBusError.html#g-dbus-error-get-remote-error" title="g_dbus_error_get_remote_error ()"><code class="function">g_dbus_error_get_remote_error()</code></a>.
</p>
<p>
Otherwise, a <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> with the error code <a class="link" href="gio-GIOError.html#G-IO-ERROR-DBUS-ERROR:CAPS"><code class="literal">G_IO_ERROR_DBUS_ERROR</code></a>
in the <a class="link" href="gio-GIOError.html#G-IO-ERROR:CAPS" title="G_IO_ERROR"><span class="type">G_IO_ERROR</span></a> error domain is returned. Also, <em class="parameter"><code>dbus_error_name</code></em> is
added to the error message such that it can be recovered with
<a class="link" href="gio-GDBusError.html#g-dbus-error-get-remote-error" title="g_dbus_error_get_remote_error ()"><code class="function">g_dbus_error_get_remote_error()</code></a>.
</p>
<p>
In all three cases, <em class="parameter"><code>dbus_error_name</code></em> can always be recovered from the
returned <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> using the <a class="link" href="gio-GDBusError.html#g-dbus-error-get-remote-error" title="g_dbus_error_get_remote_error ()"><code class="function">g_dbus_error_get_remote_error()</code></a> function
(unless <a class="link" href="gio-GDBusError.html#g-dbus-error-strip-remote-error" title="g_dbus_error_strip_remote_error ()"><code class="function">g_dbus_error_strip_remote_error()</code></a> hasn't been used on the returned error).
</p>
<p>
This function is typically only used in object mappings to prepare
<a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> instances for applications. Regular applications should not use
it.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>dbus_error_name</code></em> :</span></p></td>
<td>D-Bus error name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dbus_error_message</code></em> :</span></p></td>
<td>D-Bus error message.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>An allocated <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>. Free with <a href="../glib/glib-Error-Reporting.html#g-error-free"><code class="function">g_error_free()</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-error-set-dbus-error"></a><h3>g_dbus_error_set_dbus_error ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_dbus_error_set_dbus_error         (<em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dbus_error_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dbus_error_message</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *format</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
Does nothing if <em class="parameter"><code>error</code></em> is <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. Otherwise sets *<em class="parameter"><code>error</code></em> to
a new <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> created with <a class="link" href="gio-GDBusError.html#g-dbus-error-new-for-dbus-error" title="g_dbus_error_new_for_dbus_error ()"><code class="function">g_dbus_error_new_for_dbus_error()</code></a>
with <em class="parameter"><code>dbus_error_message</code></em> prepend with <em class="parameter"><code>format</code></em> (unless <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>A pointer to a <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dbus_error_name</code></em> :</span></p></td>
<td>D-Bus error name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dbus_error_message</code></em> :</span></p></td>
<td>D-Bus error message.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
<td>
<code class="function">printf()</code>-style format to prepend to <em class="parameter"><code>dbus_error_message</code></em> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>Arguments for <em class="parameter"><code>format</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-error-set-dbus-error-valist"></a><h3>g_dbus_error_set_dbus_error_valist ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_dbus_error_set_dbus_error_valist  (<em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dbus_error_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dbus_error_message</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *format</code></em>,
                                                         <em class="parameter"><code><span class="type">va_list</span> var_args</code></em>);</pre>
<p>
Like <a class="link" href="gio-GDBusError.html#g-dbus-error-set-dbus-error" title="g_dbus_error_set_dbus_error ()"><code class="function">g_dbus_error_set_dbus_error()</code></a> but intended for language bindings.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>A pointer to a <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dbus_error_name</code></em> :</span></p></td>
<td>D-Bus error name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dbus_error_message</code></em> :</span></p></td>
<td>D-Bus error message.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
<td>
<code class="function">printf()</code>-style format to prepend to <em class="parameter"><code>dbus_error_message</code></em> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>var_args</code></em> :</span></p></td>
<td>Arguments for <em class="parameter"><code>format</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-error-encode-gerror"></a><h3>g_dbus_error_encode_gerror ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             g_dbus_error_encode_gerror          (<em class="parameter"><code>const <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>);</pre>
<p>
Creates a D-Bus error name to use for <em class="parameter"><code>error</code></em>. If <em class="parameter"><code>error</code></em> matches
a registered error (cf. <a class="link" href="gio-GDBusError.html#g-dbus-error-register-error" title="g_dbus_error_register_error ()"><code class="function">g_dbus_error_register_error()</code></a>), the corresponding
D-Bus error name will be returned.
</p>
<p>
Otherwise the a name of the form
<code class="literal">org.gtk.GDBus.UnmappedGError.Quark._ESCAPED_QUARK_NAME.Code_ERROR_CODE</code>
will be used. This allows other GDBus applications to map the error
on the wire back to a <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> using <a class="link" href="gio-GDBusError.html#g-dbus-error-new-for-dbus-error" title="g_dbus_error_new_for_dbus_error ()"><code class="function">g_dbus_error_new_for_dbus_error()</code></a>.
</p>
<p>
This function is typically only used in object mappings to put a
<a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> on the wire. Regular applications should not use it.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>A <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A D-Bus error name (never <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>). Free with <a href="../glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>