summaryrefslogtreecommitdiff
path: root/doc/gconf/tmpl/gconf.sgml
blob: d936dbeca16961fb2a69c67fa6c99895a6441323 (plain)
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
<!-- ##### SECTION Title ##### -->
GConf Core Interfaces

<!-- ##### SECTION Short_Description ##### -->

Basic functions to initialize GConf and get/set values

<!-- ##### SECTION Long_Description ##### -->
<para>
These functions initialize GConf, and communicate with the
<application>gconfd</application> server via a
#GConfEngine object. You can install a notification
request on the server, get values, set values, list directories, and associate
schema names with keys.
</para>

<para>
Most of this interface is replicated in the #GObject wrapper
(#GConfClient object); an alternative to the value-setting functions
is the #GConfChangeSet interface.
</para>

<!-- ##### SECTION See_Also ##### -->
<para>

</para>

<!-- ##### SECTION Stability_Level ##### -->


<!-- ##### SECTION Image ##### -->


<!-- ##### FUNCTION gconf_init ##### -->
<para>
Initializes the GConf library. Creates a connection to a CORBA ORB, and
initializes OAF (the object activation framework) if it isn't already
initialized.
</para>

@argc: 
@argv: 
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
@Returns: <symbol>TRUE</symbol> on success, <symbol>FALSE</symbol> otherwise.


<!-- ##### FUNCTION gconf_preinit ##### -->
<para>

</para>

@app: 
@mod_info: 


<!-- ##### FUNCTION gconf_postinit ##### -->
<para>

</para>

@app: 
@mod_info: 


<!-- ##### FUNCTION gconf_is_initialized ##### -->
<para>
Asks whether the library has been initialized.
</para>

@void: 
@Returns: <symbol>TRUE</symbol> if the library has been initialized.


<!-- ##### USER_FUNCTION GConfNotifyFunc ##### -->
<para>
A callback function invoked when a key's value changes. The @cnxn_id parameter
will be the connection ID returned from gconf_engine_notify_add(). @key will be the
full path of the changed key, @value will be the new value if the key is set.
If the key is unset, @value will be the default value if one exists, or
<symbol>NULL</symbol> otherwise. @is_default indicates whether a value is a
default setting or a user setting. If @value is <symbol>NULL</symbol>,
@is_default will be <symbol>TRUE</symbol>. @user_data is the data passed to
gconf_engine_notify_add().
</para>

@conf: the #GConfEngine passed to gconf_engine_notify_add().
@cnxn_id: the ID returned from gconf_engine_notify_add().
@entry: 
@user_data: the user data passed to gconf_engine_notify_add().
<!-- # Unused Parameters # -->
@key: the full path of the changed key.
@value: the new value, or <symbol>NULL</symbol> if the key was unset.
@is_default: if <symbol>TRUE</symbol>, the key is unset but this is the default value for it.


<!-- ##### FUNCTION gconf_engine_notify_add ##### -->
<para>
Registers a notification request with the <application>gconfd</application>
server.  The server will notify the client when any key at or below
@namespace_section is set or unset. Try to watch the smallest possible part of
the namespace; otherwise you will slow down the server and your application with
unnecessary notifications. Note that you should prefer gconf_client_notify_add()
if you're using the #GObject wrapper library, because
gconf_client_notify_add() does not require a client-server conversation for
every callback. gconf_engine_notify_add() requests a different server notification for
every callback. The function returns an ID you can use to remove the
notification request; 0 is an invalid ID, and is returned if an error occurs.
</para>

@conf: a #GConfEngine to monitor for changes.
@namespace_section: the directory or key to watch; you will be notified of changes at or below this point.
@func: the callback to invoke when a notification is received from the server.
@user_data: the data to pass to the callback.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
@Returns: an ID for the notification request, or 0 on error.


<!-- ##### FUNCTION gconf_engine_notify_remove ##### -->
<para>
Removes a notification request.
</para>

@conf: the #GConfEngine you were monitoring for changes.
@cnxn: The ID returned by gconf_engine_notify_add().


<!-- ##### FUNCTION gconf_engine_get ##### -->
<para>
Returns the #GConfValue stored at @key, or <symbol>NULL</symbol> if no value is
set. You must call gconf_value_free() to free the returned value. If you know
the expected type of the value, you probably want to use the type-specific
convenience wrappers (gconf_engine_get_int(), etc.)  because they will do the
type-checking for you and return the appropriate type. Automatically returns the
default value for a key, if the key is unset and a default exists.
</para>

@conf: a #GConfEngine to get the value from.
@key: the key to get.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
@Returns: newly-allocated #GConfValue, or <symbol>NULL</symbol> if unset and no default exists.


<!-- ##### FUNCTION gconf_engine_get_without_default ##### -->
<para>
Identical to gconf_engine_get (), except that it will return <symbol>NULL</symbol> in
place of the default value if the key is unset. Note that gconf_engine_get () can also
return <symbol>NULL</symbol> if no default exists or an error occurs.
</para>

@conf: a #GConfEngine to get the value from.
@key: the key to get.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
@Returns: newly-allocated #GConfValue, or <symbol>NULL</symbol> if unset.


<!-- ##### FUNCTION gconf_engine_get_entry ##### -->
<para>
Obtain the full #GConfEntry for a value.
</para>

@conf: a #GConfEngine.
@key: the key to get.
@locale: preferred locale (as in the locale-related environment variables).
@use_schema_default: a #gboolean value indicating whether the default value associated with schema
should be used.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
@Returns: a #GConfEntry.


<!-- ##### FUNCTION gconf_engine_get_with_locale ##### -->
<para>
Requests the value appropriate for a particular locale. Right now,
only values of type %GCONF_VALUE_SCHEMA are localized; the locale is
meaningless for other value types. Also, gconf_engine_get () automatically
requests the value in the user's current locale. So this function is
only useful if you want a schema for some locale other than the user's
current locale. Except for the additional argument, this function is
identical to gconf_engine_get () in all respects.
</para>

@conf: a #GConfEngine to get the value from.
@key: the key to get.
@locale: preferred locale (as in the locale-related environment variables).
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
@Returns: newly-allocated #GConfValue, or <symbol>NULL</symbol> if unset.


<!-- ##### FUNCTION gconf_engine_get_default_from_schema ##### -->
<para>
Returns the default value stored in the key's schema, if the key has a schema
associated and the schema exists and the schema contains a default value.  Note
that gconf_engine_get (), gconf_engine_get_string(), and so on already return the default value
if no other value is found, so normally you do not need this function. This
function is just for convenience; you could also get the #GConfMetaInfo for the
key, read the schema name from there, then look up the schema by name and
extract the default value.
</para>

@conf: a #GConfEngine to get the value from.
@key: the key to get the default value for.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
@Returns: newly-allocated #GConfValue, or <symbol>NULL</symbol> if unset.


<!-- ##### FUNCTION gconf_engine_set ##### -->
<para>
Sets the value of @key to @value. Does not modify the passed-in
#GConfValue, you must free it yourself. You may prefer a type-specific
convenience wrapper, such as gconf_engine_set_int().
</para>

<para>
 An error of note is %GCONF_OVERRIDDEN, indicating that the system
administrator has "forced" a value for this key. If no writable
configuration sources exist, it is not an error, but GConf will just
forget all your values; this allows users to have a configuration-free
setup without a constant barrage of error messages.
</para>

@conf: a #GConfEngine to set the value in.
@key: the key to set.
@value: the new value of @key.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
@Returns: <symbol>TRUE</symbol> on success, <symbol>FALSE</symbol> on error.


<!-- ##### FUNCTION gconf_engine_unset ##### -->
<para>
Unsets the value of @key; if @key is already unset, has no effect.  An
error of note is %GCONF_OVERRIDDEN, indicating that the system
administrator has "forced" a value for this key.
</para>

@conf: a #GConfEngine to affect.
@key: the key to unset.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
@Returns: <symbol>TRUE</symbol> on success, <symbol>FALSE</symbol> on error.


<!-- ##### FUNCTION gconf_engine_associate_schema ##### -->
<para>
Directs GConf to find the schema for @key at location
@schema_key. That is, the value stored at @schema_key should have type
#GCONF_VALUE_SCHEMA, and be descriptive of @key. Normally you don't
call this function from C code; you can ship a special file with your
application and ask <application>gconftool</application> to install
schema associations into the database during "make install."
</para>

@conf: a #GConfEngine to affect.
@key: the key to associate the schema with.
@schema_key: the key where the schema will be stored.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
@Returns: <symbol>TRUE</symbol> on success, <symbol>FALSE</symbol> on error.


<!-- ##### FUNCTION gconf_engine_all_entries ##### -->
<para>
Lists the key-value pairs in @dir. Does not list subdirectories; for
that use gconf_engine_all_dirs(). The returned list contains #GConfEntry
objects. A #GConfEntry contains an <emphasis>absolute</emphasis> key
and a value. The list is not recursive, it contains only the immediate
children of @dir.  To free the returned list, gconf_entry_free()
each list element, then g_slist_free() the list itself.
</para>

@conf: a #GConfEngine.
@dir: Directory to list.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
@Returns: List of #GConfEntry.


<!-- ##### FUNCTION gconf_engine_all_dirs ##### -->
<para>
Lists the subdirectories in @dir. The returned list contains allocated
strings. Each string is the absolute path of a subdirectory. You should g_free() each string in the list, then g_slist_free() the list itself.
</para>

@conf: a #GConfEngine.
@dir: Directory to get subdirectories from.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
@Returns: List of allocated subdirectory names.


<!-- ##### FUNCTION gconf_engine_suggest_sync ##### -->
<para>
Suggests to <application>gconfd</application> that you've just finished
a block of changes, and it would be an optimal time to sync to
permanent storage. This is only a suggestion; and
<application>gconfd</application> will eventually sync even if you
don't call gconf_engine_suggest_sync(). This function is just a "hint"
provided to <application>gconfd</application> to maximize efficiency
and minimize data loss.
</para>

@conf: the #GConfEngine to suggest syncing to.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.


<!-- ##### FUNCTION gconf_engine_dir_exists ##### -->
<para>
Queries whether the directory @dir exists in the GConf
database. Returns <symbol>TRUE</symbol> or <symbol>FALSE</symbol>.
</para>

@conf: a #GConfEngine.
@dir: Directory to check for.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
@Returns: <symbol>TRUE</symbol> or <symbol>FALSE</symbol>.


<!-- ##### FUNCTION gconf_engine_remove_dir ##### -->
<para>
This function first checks the validity of the gconf key. In case of a local #GConfEngine it removes
the directory from the source backend calling gconf_sources_remove_dir (). Otherwise it obtains the
configuration database using gconf_engine_get_database () and removes the directory from the database
calling ConfigDatabase_remove_dir ().
</para>

@conf: a #GConfEngine.
@dir: the name of the directory to be removed.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.


<!-- ##### FUNCTION gconf_engine_key_is_writable ##### -->
<para>
Checks whether the key is writable.
</para>

@conf: a #GConfEngine.
@key: the value to be changed.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
@Returns: <symbol>TRUE</symbol> if the key is writable, <symbol>FALSE</symbol> if the key is read only.


<!-- ##### FUNCTION gconf_valid_key ##### -->
<para>
Asks whether a key is syntactically correct, that is, it ensures that
the key consists of slash-separated strings and contains only legal
characters. Normally you shouldn't need to call this function; the
GConf functions all check this for you and return an error if the key
is invalid. However, it may be useful to validate input to an entry
field or the like. If you pass a non-<symbol>NULL</symbol> address as
the @why_invalid argument, an allocated string is returned explaining
why the key is invalid, if it is. If the key is valid the @why_invalid
argument is unused.
</para>

@key: key to check.
@why_invalid: return location for an explanation of the problem, if any. g_free() the returned string.
@Returns: <symbol>TRUE</symbol> if the key is valid, or <symbol>FALSE</symbol> if not.


<!-- ##### FUNCTION gconf_key_is_below ##### -->
<para>
Asks whether the key @below would be found below the key @above, were
they both to exist in the database. For example, <symbol>/foo</symbol>
is always found below <symbol>/</symbol> and above
<symbol>/foo/bar</symbol>. This probably isn't useful but GConf uses
it internally so here it is if you need it.
</para>

@above: the key on the "left hand side" of the predicate.
@below: the key on the "right hand side."
@Returns: <symbol>TRUE</symbol> or <symbol>FALSE</symbol>.


<!-- ##### FUNCTION gconf_concat_dir_and_key ##### -->
<para>
Concatenates the dir and key passed removing the unnecessary '/' characters
and returns the new string.
</para>

@dir: the directory.
@key: the key.
@Returns: the newly concatenated string.


<!-- ##### FUNCTION gconf_unique_key ##### -->
<para>
Generates a new and unique key using serial number, process id, current time and a 
random number generated.
</para>

@void: 
@Returns: a newly created key, a #gchar value.


<!-- ##### FUNCTION gconf_escape_key ##### -->
<para>

</para>

@arbitrary_text: 
@len: 
@Returns: 


<!-- ##### FUNCTION gconf_unescape_key ##### -->
<para>

</para>

@escaped_key: 
@len: 
@Returns: 


<!-- ##### FUNCTION gconf_engine_get_float ##### -->
<para>
Requests the floating point number (%GCONF_VALUE_FLOAT) stored at
@key. Automatically performs type-checking, so if a non-float is
stored at @key, an error is returned. On error, or if @key is unset, 
0.0 is returned.
</para>

@conf: a #GConfEngine.
@key: key you want the value of.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
@Returns: the value of @key, or 0.0 if no value is obtained.


<!-- ##### FUNCTION gconf_engine_get_int ##### -->
<para>
Requests the integer (%GCONF_VALUE_INT) stored at
@key. Automatically performs type-checking, so if a non-integer is
stored at @key, an error is returned. On error, or if @key is unset, 
0 is returned.
</para>

@conf: a #GConfEngine.
@key: key you want the value of.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
@Returns: the value of @key, or 0 if no value is obtained.


<!-- ##### FUNCTION gconf_engine_get_string ##### -->
<para>
Requests the string (%GCONF_VALUE_STRING) stored at
@key. Automatically performs type-checking, so if a non-string is
stored at @key, an error is returned. On error, or if @key is unset, 
<symbol>NULL</symbol> is returned.
</para>

@conf: a #GConfEngine.
@key: key you want the value of.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
@Returns: allocated string (value of @key), or <symbol>NULL</symbol> if no value is obtained.


<!-- ##### FUNCTION gconf_engine_get_bool ##### -->
<para>
Requests the boolean value (%GCONF_VALUE_BOOL) stored at
@key. Automatically performs type-checking, so if a non-bool is
stored at @key, an error is returned. On error, or if @key is unset, 
<symbol>FALSE</symbol> is returned.
</para>

@conf: a #GConfEngine.
@key: key you want the value of.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
@Returns: the value of @key, or <symbol>FALSE</symbol> if no value is obtained.


<!-- ##### FUNCTION gconf_engine_get_schema ##### -->
<para>
Requests the schema (%GCONF_VALUE_SCHEMA) stored at @key.
Automatically performs type-checking, so if a non-schema is stored at
@key, an error is returned. If no value is set or an error occurs,
<symbol>NULL</symbol> is returned.
</para>

@conf: a #GConfEngine.
@key: key you want the value of.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
@Returns: the value of @key as an allocated #GConfSchema, or <symbol>NULL</symbol> if no value was obtained.


<!-- ##### FUNCTION gconf_engine_get_list ##### -->
<para>
Requests the list (%GCONF_VALUE_LIST) stored at @key.  Automatically
performs type-checking, so if a non-list is stored at @key, or the
list does not contain elements of type @list_type, an error is
returned. If no value is set or an error occurs, <symbol>NULL</symbol>
is returned. Note that <symbol>NULL</symbol> is also the empty list,
so if you need to distinguish the empty list from an unset value, you
must use gconf_engine_get () to obtain a raw #GConfValue.
</para>

<para>
<emphasis>Remember that GConf lists can only store primitive types:
%GCONF_VALUE_FLOAT, %GCONF_VALUE_INT, %GCONF_VALUE_BOOL,
%GCONF_VALUE_STRING, %GCONF_VALUE_SCHEMA.</emphasis> Also remember
that lists must be uniform, you may not mix types in the same list.
</para>

<para>
The type of the list elements depends on @list_type. A #GConfValue
with type %GCONF_VALUE_LIST normally stores a list of more #GConfValue
objects. gconf_engine_get_list() automatically converts to primitive C
types. Thus, the list-&gt;data fields in the returned list 
contain:
 
<informaltable pgwide="1" frame="none">
<tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
<tbody>

<row>
<entry>%GCONF_VALUE_INT</entry>
<entry>The integer itself, converted with GINT_TO_POINTER()</entry>
</row>

<row>
<entry>%GCONF_VALUE_BOOL</entry>
<entry>The bool itself, converted with GINT_TO_POINTER()</entry>
</row>

<row>
<entry>%GCONF_VALUE_FLOAT</entry>
<entry>A pointer to #gdouble, which should be freed with g_free()</entry>
</row>

<row>
<entry>%GCONF_VALUE_STRING</entry>
<entry>A pointer to #gchar, which should be freed with g_free()</entry>
</row>

<row>
<entry>%GCONF_VALUE_SCHEMA</entry>
<entry>A pointer to #GConfSchema, which should be freed with gconf_schema_free()</entry>
</row>

</tbody></tgroup></informaltable>

In the %GCONF_VALUE_FLOAT and %GCONF_VALUE_STRING cases, you must
g_free() each list element. In the %GCONF_VALUE_SCHEMA case you must
gconf_schema_free() each element. In all cases you must free the
list itself with g_slist_free().
</para>

@conf: a #GConfEngine.
@key: key you want the value of.
@list_type: type of each list element.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
@Returns: an allocated list, with elements as described above.


<!-- ##### FUNCTION gconf_engine_get_pair ##### -->
<para>
Requests the pair (%GCONF_VALUE_PAIR) stored at @key.  Automatically
performs type-checking, so if a non-pair is stored at @key, or the
pair does not have the right @car_type and @cdr_type, an error is
returned. Remember that the <firstterm>car</firstterm> of a pair is
its first value, and the <firstterm>cdr</firstterm> is its second
value, in the Lisp tradition. 
</para>

<para>
<emphasis>Remember that GConf pairs can only store primitive types:
%GCONF_VALUE_FLOAT, %GCONF_VALUE_INT, %GCONF_VALUE_BOOL,
%GCONF_VALUE_STRING, %GCONF_VALUE_SCHEMA.</emphasis>
</para>

<para>
gconf_engine_get_pair() stores the two fields of the pair in the locations
pointed to by @car_retloc and @cdr_retloc. The type of these pointers
depends on the corresponding @car_type and @cdr_type:
 
<informaltable pgwide="1" frame="none">
<tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
<tbody>

<row>
<entry>%GCONF_VALUE_INT</entry>
<entry>pointer to #gint</entry>
</row>

<row>
<entry>%GCONF_VALUE_BOOL</entry>
<entry>pointer to #gboolean</entry>
</row>

<row>
<entry>%GCONF_VALUE_FLOAT</entry>
<entry>pointer to #gdouble</entry>
</row>

<row>
<entry>%GCONF_VALUE_STRING</entry>
<entry>pointer to #gchar*</entry>
</row>

<row>
<entry>%GCONF_VALUE_SCHEMA</entry>
<entry>pointer to #GConfSchema*</entry>
</row>

</tbody></tgroup></informaltable>

In the %GCONF_VALUE_STRING case, you must g_free() the string(s)
stored in the return location(s). In the %GCONF_VALUE_SCHEMA case you
must gconf_schema_free() the returned schema. If there's an error
or the value is unset, @car_retloc and @cdr_retloc are left unchanged.
</para>

<para>
gconf_engine_get_pair() returns <symbol>TRUE</symbol> on success.
</para>

<para>
An example of gconf_engine_get_pair() in action:
<programlisting>
gdouble car = 10.0;
gchar* cdr  = NULL; 
GError* error = NULL;

if (!gconf_engine_get_pair(conf, "/foo", 
                    GCONF_VALUE_FLOAT,
                    GCONF_VALUE_STRING, 
                    &amp;car, &amp;cdr, &amp;error))
  {
    /* Note: car/cdr should be untouched, because an error occurred */
    g_assert(error != NULL);
    fprintf(stderr, "Error: %s\n", error->message);
    g_error_free(error);
    error = NULL;
  }
else
  {
    /* Note: car/cdr may be untouched even though there was no error, 
       if no value was set for "/foo"
     */
    printf("Found pair (%g,%s)\n", car, cdr);
    if (cdr != NULL)
      g_free(cdr);
  }
</programlisting>
</para>

@conf: a #GConfEngine.
@key: key you want the value of.
@car_type: desired type of the pair's first field (car).
@cdr_type: desired type of the pair's second field (cdr).
@car_retloc: address of a return location for the car.
@cdr_retloc: address of a return location for the cdr.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
@Returns: <symbol>TRUE</symbol> on success, <symbol>FALSE</symbol> on error.


<!-- ##### FUNCTION gconf_engine_set_float ##### -->
<para>
Change the value of @key to @val. Automatically creates the @key if it didn't exist before (ie it was unset or it only had a default value). If the key already exists but doesn't store a float (GCONF_VALUE_FLOAT), gconf_engine_set_float() will fail.
</para>

@conf: a #GConfEngine.
@key: key you want to set the value of.
@val: new value of @key.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
@Returns: <symbol>TRUE</symbol> on success, <symbol>FALSE</symbol> on error.


<!-- ##### FUNCTION gconf_engine_set_int ##### -->
<para>
Change the value of @key to @val. Automatically creates the @key if it didn't exist before (ie it was unset or it only had a default value). If the key already exists but doesn't store an integer (GCONF_VALUE_INT), gconf_engine_set_int() will fail.
</para>

@conf: a #GConfEngine.
@key: key you want to set the value of.
@val: new value of @key.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
@Returns: <symbol>TRUE</symbol> on success, <symbol>FALSE</symbol> on error.


<!-- ##### FUNCTION gconf_engine_set_string ##### -->
<para>
Change the value of @key to @val. Automatically creates the @key if it didn't exist before (ie it was unset or it only had a default value). If the key already exists but doesn't store a string (GCONF_VALUE_STRING), gconf_engine_set_string() will fail.
</para>

@conf: a #GConfEngine.
@key: key you want to set the value of.
@val: new value of @key.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
@Returns: <symbol>TRUE</symbol> on success, <symbol>FALSE</symbol> on error.


<!-- ##### FUNCTION gconf_engine_set_bool ##### -->
<para>
Change the value of @key to @val. Automatically creates the @key if it didn't exist before (ie it was unset or it only had a default value). If the key already exists but but doesn't store a boolean (GCONF_VALUE_BOOL), gconf_engine_set_bool() will fail.
</para>

@conf: a #GConfEngine.
@key: key you want to set the value of.
@val: new value of @key.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
@Returns: <symbol>TRUE</symbol> on success, <symbol>FALSE</symbol> on error.


<!-- ##### FUNCTION gconf_engine_set_schema ##### -->
<para>
Change the value of @key to @val. Automatically creates the @key if it didn't exist before (ie it was unset or it only had a default value). If the key already exists but doesn't store a schema value (GCONF_VALUE_SCHEMA), gconf_engine_set_schema() will fail.
</para>

@conf: a #GConfEngine.
@key: key you want to set the value of.
@val: new value of @key.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
@Returns: <symbol>TRUE</symbol> on success, <symbol>FALSE</symbol> on error.


<!-- ##### FUNCTION gconf_engine_set_list ##### -->
<para>
Change the value of @key to @list of type @list_type. Automatically creates the @key if it didn't exist before 
(ie it was unset or it only had a default value). If the key already exists but doesn't store a list value 
(GCONF_VALUE_LIST), gconf_engine_set_list() will fail.
</para>

@conf: a #GConfEngine.
@key: key you want to set the value of.
@list_type: type of each list element.
@list: new value of @key.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
@Returns: <symbol>TRUE</symbol> on success, <symbol>FALSE</symbol> on error.


<!-- ##### FUNCTION gconf_engine_set_pair ##### -->
<para>
Change the value of @key to a pair of first type @car_type and second type @cdr_type . Automatically creates the 
@key if it didn't exist before (ie it was unset or it only had a default value). If the key already exists 
but doesn't store a schema value (GCONF_VALUE_SCHEMA), gconf_engine_set_schema() will fail.
</para>

@conf: a #GConfEngine.
@key: key you want to set the value of.
@car_type: type of the pair's first field (car).
@cdr_type: type of the pair's second field (cdr).
@address_of_car: address of the car.
@address_of_cdr: address of the cdr.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
@Returns: <symbol>TRUE</symbol> on success, <symbol>FALSE</symbol> on error.


<!-- ##### STRUCT GConfEnumStringPair ##### -->
<para>

</para>

@enum_value: 
@str: 

<!-- ##### FUNCTION gconf_string_to_enum ##### -->
<para>
It's best to store enumeration values as strings rather than integers. This is
robust against changes in the enumeration, and also human-readable.
This function makes it more convenient to store enums as strings.
</para>

<para>
The first argument is a lookup table, typically declared statically as follows:
<programlisting>
static GConfEnumStringPair foo_enum_lookup_table[] = {
  { FOO_BLAH, "Blah" },
  { FOO_BAR,  "Bar"  },
  { 0, NULL }
};
</programlisting>
Note that the last element of the table is <literal>{ 0, NULL }</literal>.
Typically the strings you use should be semi-human-readable, for GTK+ and GNOME
stripping off the library prefix and converting to StudlyCaps is the recommended
convention.
</para>

<para>
The function returns <symbol>TRUE</symbol> if a match for the string is found,
and if a match is found the enum value is placed in @enum_value_retloc.
</para>

@lookup_table: a lookup table mapping enum values to strings.
@str: the string to convert to an enum value.
@enum_value_retloc: the address of an enum variable.
@Returns: <symbol>TRUE</symbol> if a match was found.


<!-- ##### FUNCTION gconf_enum_to_string ##### -->
<para>
See gconf_string_to_enum() for background information on this function.
</para>

@lookup_table: a lookup table mapping enum values to strings.
@enum_value: the enumeration value to convert to a string.
@Returns: a pointer to the proper string in the lookup table, or <symbol>NULL</symbol> if no match was found.


<!-- ##### FUNCTION gconf_clear_cache ##### -->
<para>
In case of a local #GConfEngine, this function calls gconf_sources_clear_cache () to clear the
cache from the source. Otherwise it obtains the configuration database using gconf_engine_get_database ()
and clears the configuration database cache using ConfigDatabase_clear_cache ().
</para>

@conf: a #GConfEngine.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.


<!-- ##### FUNCTION gconf_synchronous_sync ##### -->
<para>
In case of a local #GConfEngine, this function syncs up all the gconf sources calling
gconf_synchronous_sync (). Otherwise it obtains the configuration database using
gconf_engine_get_database () and syncs up the database calling ConfigDatabase_synchronous_sync ().
</para>

@conf: a #GConfEngine.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.


<!-- ##### FUNCTION gconf_engine_get_full ##### -->
<para>
Returns the #GConfValue of a key and the associated #GConfEntry fields depending on the parameters passed.
</para>

@conf: a #GConfEngine.
@key: the key whose value is to be obtained.
@locale: the preferred locale (as in the locale related environment variables) or<symbol>NULL</symbol> if no locale is to be
passed.
@use_schema_default: a #gboolean value, indicating whether schema information is to be used as the default
value.
@is_default_p: a #gpointer if the is_default field of the #GConfEntry is required, <symbol>NULL</symbol>
otherwise.
@is_writable_p: a #gpointer if the is_writable field of the #GConfEntry is required, <symbol>NULL</symbol>
otherwise.
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
@Returns: the #GConfValue.