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
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>nm-keyfile: libnm Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="libnm Reference Manual">
<link rel="up" href="ch05.html" title="Utility API Reference">
<link rel="prev" href="ch05.html" title="Utility API Reference">
<link rel="next" href="libnm-nm-utils.html" title="nm-utils">
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
<a href="#libnm-nm-keyfile.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
<a href="#libnm-nm-keyfile.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch05.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="ch05.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libnm-nm-utils.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libnm-nm-keyfile"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libnm-nm-keyfile.top_of_page"></a>nm-keyfile</span></h2>
<p>nm-keyfile</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libnm-nm-keyfile.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="libnm-nm-keyfile.html#NMKeyfileReadHandler" title="NMKeyfileReadHandler ()">*NMKeyfileReadHandler</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="NMConnection.html" title="NMConnection"><span class="returnvalue">NMConnection</span></a> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-keyfile.html#nm-keyfile-read" title="nm_keyfile_read ()">nm_keyfile_read</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="libnm-nm-keyfile.html#NMKeyfileWriteHandler" title="NMKeyfileWriteHandler ()">*NMKeyfileWriteHandler</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="returnvalue">GKeyFile</span></a> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-keyfile.html#nm-keyfile-write" title="nm_keyfile_write ()">nm_keyfile_write</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-keyfile.html#nm-keyfile-handler-data-fail-with-error" title="nm_keyfile_handler_data_fail_with_error ()">nm_keyfile_handler_data_fail_with_error</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-keyfile.html#nm-keyfile-handler-data-get-context" title="nm_keyfile_handler_data_get_context ()">nm_keyfile_handler_data_get_context</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-keyfile.html#nm-keyfile-handler-data-warn-get" title="nm_keyfile_handler_data_warn_get ()">nm_keyfile_handler_data_warn_get</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libnm-nm-keyfile.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="libnm-nm-keyfile.html#NMKeyfileHandlerFlags" title="enum NMKeyfileHandlerFlags">NMKeyfileHandlerFlags</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="libnm-nm-keyfile.html#NMKeyfileHandlerType" title="enum NMKeyfileHandlerType">NMKeyfileHandlerType</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="libnm-nm-keyfile.html#NMKeyfileWarnSeverity" title="enum NMKeyfileWarnSeverity">NMKeyfileWarnSeverity</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="libnm-nm-keyfile.html#NMKeyfileHandlerData" title="NMKeyfileHandlerData">NMKeyfileHandlerData</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libnm-nm-keyfile.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> <a href="/usr/share/gtk-doc/html/gobject/gobject-Enumeration-and-Flag-Types.html">GEnum</a>
<span class="lineart">├──</span> NMKeyfileHandlerType
<span class="lineart">╰──</span> NMKeyfileWarnSeverity
<a href="/usr/share/gtk-doc/html/gobject/gobject-Enumeration-and-Flag-Types.html">GFlags</a>
<span class="lineart">╰──</span> NMKeyfileHandlerFlags
</pre>
</div>
<div class="refsect1">
<a name="libnm-nm-keyfile.description"></a><h2>Description</h2>
</div>
<div class="refsect1">
<a name="libnm-nm-keyfile.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="NMKeyfileReadHandler"></a><h3>NMKeyfileReadHandler ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="c_punctuation">(</span>*NMKeyfileReadHandler<span class="c_punctuation">)</span> (<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="type">GKeyFile</span></a> *keyfile</code></em>,
<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>,
<em class="parameter"><code><a class="link" href="libnm-nm-keyfile.html#NMKeyfileHandlerType" title="enum NMKeyfileHandlerType"><span class="type">NMKeyfileHandlerType</span></a> handler_type</code></em>,
<em class="parameter"><code><a class="link" href="libnm-nm-keyfile.html#NMKeyfileHandlerData" title="NMKeyfileHandlerData"><span class="type">NMKeyfileHandlerData</span></a> *handler_data</code></em>,
<em class="parameter"><code><span class="type">void</span> *user_data</code></em>);</pre>
<p>Hook to <a class="link" href="libnm-nm-keyfile.html#nm-keyfile-read" title="nm_keyfile_read ()"><code class="function">nm_keyfile_read()</code></a>.</p>
<p>The callee may abort the reading by setting an error via <a class="link" href="libnm-nm-keyfile.html#nm-keyfile-handler-data-fail-with-error" title="nm_keyfile_handler_data_fail_with_error ()"><code class="function">nm_keyfile_handler_data_fail_with_error()</code></a>.</p>
<div class="refsect3">
<a name="NMKeyfileReadHandler.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>keyfile</p></td>
<td class="parameter_description"><p>the <a href="https://developer.gnome.org/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="type">GKeyFile</span></a> that is currently read</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>connection</p></td>
<td class="parameter_description"><p>the <a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> that is being constructed.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>handler_type</p></td>
<td class="parameter_description"><p>the <a class="link" href="libnm-nm-keyfile.html#NMKeyfileHandlerType" title="enum NMKeyfileHandlerType"><code class="literal">NMKeyfileHandlerType</code></a> that indicates which type
the request is.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>handler_data</p></td>
<td class="parameter_description"><p>the <a class="link" href="libnm-nm-keyfile.html#NMKeyfileHandlerData" title="NMKeyfileHandlerData"><span class="type">NMKeyfileHandlerData</span></a>. What you can do with it
depends on the <em class="parameter"><code>handler_type</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>the user-data argument to <a class="link" href="libnm-nm-keyfile.html#nm-keyfile-read" title="nm_keyfile_read ()"><code class="function">nm_keyfile_read()</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="NMKeyfileReadHandler.returns"></a><h4>Returns</h4>
<p> the callee should return TRUE, if the event was handled and/or recognized.
Otherwise, a default action will be performed that depends on the <em class="parameter"><code>type</code></em>
.
For <a class="link" href="libnm-nm-keyfile.html#NM-KEYFILE-HANDLER-TYPE-WARN:CAPS"><code class="literal">NM_KEYFILE_HANDLER_TYPE_WARN</code></a> type, the default action is doing nothing.</p>
</div>
<p class="since">Since: 1.30</p>
</div>
<hr>
<div class="refsect2">
<a name="nm-keyfile-read"></a><h3>nm_keyfile_read ()</h3>
<pre class="programlisting"><a class="link" href="NMConnection.html" title="NMConnection"><span class="returnvalue">NMConnection</span></a> *
nm_keyfile_read (<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="type">GKeyFile</span></a> *keyfile</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *base_dir</code></em>,
<em class="parameter"><code><a class="link" href="libnm-nm-keyfile.html#NMKeyfileHandlerFlags" title="enum NMKeyfileHandlerFlags"><span class="type">NMKeyfileHandlerFlags</span></a> handler_flags</code></em>,
<em class="parameter"><code><a class="link" href="libnm-nm-keyfile.html#NMKeyfileReadHandler" title="NMKeyfileReadHandler ()"><span class="type">NMKeyfileReadHandler</span></a> handler</code></em>,
<em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Tries to create a NMConnection from a keyfile. The resulting keyfile is
not normalized and might not even verify.</p>
<div class="refsect3">
<a name="nm-keyfile-read.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>keyfile</p></td>
<td class="parameter_description"><p>the keyfile from which to create the connection</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>base_dir</p></td>
<td class="parameter_description"><p>when reading certificates from files with relative name,
the relative path is made absolute using <em class="parameter"><code>base_dir</code></em>
. This must
be an absolute path.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>handler_flags</p></td>
<td class="parameter_description"><p>the <a class="link" href="libnm-nm-keyfile.html#NMKeyfileHandlerFlags" title="enum NMKeyfileHandlerFlags"><span class="type">NMKeyfileHandlerFlags</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>handler</p></td>
<td class="parameter_description"><p>read handler. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="The callback is valid only during the call to the method."><span class="acronym">scope call</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data for read handler</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>error. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-keyfile-read.returns"></a><h4>Returns</h4>
<p>on success, returns the created connection. </p>
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: 1.30</p>
</div>
<hr>
<div class="refsect2">
<a name="NMKeyfileWriteHandler"></a><h3>NMKeyfileWriteHandler ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="c_punctuation">(</span>*NMKeyfileWriteHandler<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="type">GKeyFile</span></a> *keyfile</code></em>,
<em class="parameter"><code><a class="link" href="libnm-nm-keyfile.html#NMKeyfileHandlerType" title="enum NMKeyfileHandlerType"><span class="type">NMKeyfileHandlerType</span></a> handler_type</code></em>,
<em class="parameter"><code><a class="link" href="libnm-nm-keyfile.html#NMKeyfileHandlerData" title="NMKeyfileHandlerData"><span class="type">NMKeyfileHandlerData</span></a> *handler_data</code></em>,
<em class="parameter"><code><span class="type">void</span> *user_data</code></em>);</pre>
<p>This is a hook to tweak the serialization.</p>
<p>Handler for certain properties or events that are not entirely contained
within the keyfile or that might be serialized differently. The <em class="parameter"><code>type</code></em>
and
<em class="parameter"><code>handler_data</code></em>
arguments tell which kind of argument we have at hand.</p>
<p>Currently only the type <a class="link" href="libnm-nm-keyfile.html#NM-KEYFILE-HANDLER-TYPE-WRITE-CERT:CAPS"><code class="literal">NM_KEYFILE_HANDLER_TYPE_WRITE_CERT</code></a> is supported.</p>
<p>The callee may call <a class="link" href="libnm-nm-keyfile.html#nm-keyfile-handler-data-fail-with-error" title="nm_keyfile_handler_data_fail_with_error ()"><code class="function">nm_keyfile_handler_data_fail_with_error()</code></a> to abort
the writing with error.</p>
<div class="refsect3">
<a name="NMKeyfileWriteHandler.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>connection</p></td>
<td class="parameter_description"><p>the <a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> that is currently written.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>keyfile</p></td>
<td class="parameter_description"><p>the <a href="https://developer.gnome.org/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="type">GKeyFile</span></a> that is currently constructed.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>handler_type</p></td>
<td class="parameter_description"><p>the <a class="link" href="libnm-nm-keyfile.html#NMKeyfileHandlerType" title="enum NMKeyfileHandlerType"><code class="literal">NMKeyfileHandlerType</code></a> that indicates which type
the request is.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>handler_data</p></td>
<td class="parameter_description"><p>the <a class="link" href="libnm-nm-keyfile.html#NMKeyfileHandlerData" title="NMKeyfileHandlerData"><span class="type">NMKeyfileHandlerData</span></a>. What you can do with it
depends on the <em class="parameter"><code>handler_type</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>the user-data argument to <a class="link" href="libnm-nm-keyfile.html#nm-keyfile-read" title="nm_keyfile_read ()"><code class="function">nm_keyfile_read()</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="NMKeyfileWriteHandler.returns"></a><h4>Returns</h4>
<p> the callee should return <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the event was handled. If the
event was unhandled, a default action will be performed that depends on
the <em class="parameter"><code>handler_type</code></em>
.</p>
</div>
<p class="since">Since: 1.30</p>
</div>
<hr>
<div class="refsect2">
<a name="nm-keyfile-write"></a><h3>nm_keyfile_write ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="returnvalue">GKeyFile</span></a> *
nm_keyfile_write (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>,
<em class="parameter"><code><a class="link" href="libnm-nm-keyfile.html#NMKeyfileHandlerFlags" title="enum NMKeyfileHandlerFlags"><span class="type">NMKeyfileHandlerFlags</span></a> handler_flags</code></em>,
<em class="parameter"><code><a class="link" href="libnm-nm-keyfile.html#NMKeyfileWriteHandler" title="NMKeyfileWriteHandler ()"><span class="type">NMKeyfileWriteHandler</span></a> handler</code></em>,
<em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p><em class="parameter"><code>connection</code></em>
should verify as a valid profile according to
<a class="link" href="NMConnection.html#nm-connection-verify" title="nm_connection_verify ()"><code class="function">nm_connection_verify()</code></a>. If it does not verify, the keyfile may
be incomplete and the parser may not be able to fully recreate
the original profile.</p>
<div class="refsect3">
<a name="nm-keyfile-write.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>connection</p></td>
<td class="parameter_description"><p>the <a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> to persist to keyfile.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>handler_flags</p></td>
<td class="parameter_description"><p>the <a class="link" href="libnm-nm-keyfile.html#NMKeyfileHandlerFlags" title="enum NMKeyfileHandlerFlags"><span class="type">NMKeyfileHandlerFlags</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>handler</p></td>
<td class="parameter_description"><p>optional handler for events and
to override the default behavior. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="The callback is valid only during the call to the method."><span class="acronym">scope call</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>argument for <em class="parameter"><code>handler</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>the <a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> in case writing fails.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-keyfile-write.returns"></a><h4>Returns</h4>
<p>a new <a href="https://developer.gnome.org/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="type">GKeyFile</span></a> or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p>
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: 1.30</p>
</div>
<hr>
<div class="refsect2">
<a name="nm-keyfile-handler-data-fail-with-error"></a><h3>nm_keyfile_handler_data_fail_with_error ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
nm_keyfile_handler_data_fail_with_error
(<em class="parameter"><code><a class="link" href="libnm-nm-keyfile.html#NMKeyfileHandlerData" title="NMKeyfileHandlerData"><span class="type">NMKeyfileHandlerData</span></a> *handler_data</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *src</code></em>);</pre>
<p>Set the error for the handler. This lets the operation fail
with the provided error. You may only set the error once.</p>
<p><em class="parameter"><code>src</code></em>
must be non-<a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
<p>Note that <em class="parameter"><code>src</code></em>
is no longer valid after this call. If you want
to keep using the same GError*, you need to set it to <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
after calling this function on it.</p>
<div class="refsect3">
<a name="nm-keyfile-handler-data-fail-with-error.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>handler_data</p></td>
<td class="parameter_description"><p>the <a class="link" href="libnm-nm-keyfile.html#NMKeyfileHandlerData" title="NMKeyfileHandlerData"><span class="type">NMKeyfileHandlerData</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>src</p></td>
<td class="parameter_description"><p>error to move into the return location. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 1.30</p>
</div>
<hr>
<div class="refsect2">
<a name="nm-keyfile-handler-data-get-context"></a><h3>nm_keyfile_handler_data_get_context ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
nm_keyfile_handler_data_get_context (<em class="parameter"><code>const <a class="link" href="libnm-nm-keyfile.html#NMKeyfileHandlerData" title="NMKeyfileHandlerData"><span class="type">NMKeyfileHandlerData</span></a> *handler_data</code></em>,
<em class="parameter"><code>const <span class="type">char</span> **out_kf_group_name</code></em>,
<em class="parameter"><code>const <span class="type">char</span> **out_kf_key_name</code></em>,
<em class="parameter"><code><a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> **out_cur_setting</code></em>,
<em class="parameter"><code>const <span class="type">char</span> **out_cur_property_name</code></em>);</pre>
<p>Get context information of the current event. This function can be called
on all events, but the context information may be unset.</p>
<div class="refsect3">
<a name="nm-keyfile-handler-data-get-context.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>handler_data</p></td>
<td class="parameter_description"><p>the <a class="link" href="libnm-nm-keyfile.html#NMKeyfileHandlerData" title="NMKeyfileHandlerData"><span class="type">NMKeyfileHandlerData</span></a> for any event.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>out_kf_group_name</p></td>
<td class="parameter_description"><p>if the event is in the
context of a keyfile group, the group name. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>out_kf_key_name</p></td>
<td class="parameter_description"><p>if the event is in the
context of a keyfile value, the key name. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>out_cur_setting</p></td>
<td class="parameter_description"><p>if the event happens while
handling a particular <a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> instance. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>out_cur_property_name</p></td>
<td class="parameter_description"><p>the property name if applicable. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 1.30</p>
</div>
<hr>
<div class="refsect2">
<a name="nm-keyfile-handler-data-warn-get"></a><h3>nm_keyfile_handler_data_warn_get ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
nm_keyfile_handler_data_warn_get (<em class="parameter"><code>const <a class="link" href="libnm-nm-keyfile.html#NMKeyfileHandlerData" title="NMKeyfileHandlerData"><span class="type">NMKeyfileHandlerData</span></a> *handler_data</code></em>,
<em class="parameter"><code>const <span class="type">char</span> **out_message</code></em>,
<em class="parameter"><code><a class="link" href="libnm-nm-keyfile.html#NMKeyfileWarnSeverity" title="enum NMKeyfileWarnSeverity"><span class="type">NMKeyfileWarnSeverity</span></a> *out_severity</code></em>);</pre>
<div class="refsect3">
<a name="nm-keyfile-handler-data-warn-get.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>handler_data</p></td>
<td class="parameter_description"><p>the <a class="link" href="libnm-nm-keyfile.html#NMKeyfileHandlerData" title="NMKeyfileHandlerData"><span class="type">NMKeyfileHandlerData</span></a> for a <a class="link" href="libnm-nm-keyfile.html#NM-KEYFILE-HANDLER-TYPE-WARN:CAPS"><code class="literal">NM_KEYFILE_HANDLER_TYPE_WARN</code></a>
event.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>out_message</p></td>
<td class="parameter_description"><p>the warning message. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>out_severity</p></td>
<td class="parameter_description"><p>the <a class="link" href="libnm-nm-keyfile.html#NMKeyfileWarnSeverity" title="enum NMKeyfileWarnSeverity"><span class="type">NMKeyfileWarnSeverity</span></a> warning severity. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 1.30</p>
</div>
</div>
<div class="refsect1">
<a name="libnm-nm-keyfile.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="NMKeyfileHandlerFlags"></a><h3>enum NMKeyfileHandlerFlags</h3>
<p>Flags for customizing <a class="link" href="libnm-nm-keyfile.html#nm-keyfile-read" title="nm_keyfile_read ()"><code class="function">nm_keyfile_read()</code></a> and <a class="link" href="libnm-nm-keyfile.html#nm-keyfile-write" title="nm_keyfile_write ()"><code class="function">nm_keyfile_write()</code></a>.</p>
<p>Currently no flags are implemented.</p>
<div class="refsect3">
<a name="NMKeyfileHandlerFlags.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody><tr>
<td class="enum_member_name"><p><a name="NM-KEYFILE-HANDLER-FLAGS-NONE:CAPS"></a>NM_KEYFILE_HANDLER_FLAGS_NONE</p></td>
<td class="enum_member_description">
<p>no flags set.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: 1.30</p>
</div>
<hr>
<div class="refsect2">
<a name="NMKeyfileHandlerType"></a><h3>enum NMKeyfileHandlerType</h3>
<p>The type of the callback for <a class="link" href="libnm-nm-keyfile.html#NMKeyfileReadHandler" title="NMKeyfileReadHandler ()"><code class="literal">NMKeyfileReadHandler</code></a> and <a class="link" href="libnm-nm-keyfile.html#NMKeyfileWriteHandler" title="NMKeyfileWriteHandler ()"><code class="literal">NMKeyfileWriteHandler</code></a>.
Depending on the type, you can interpret <a class="link" href="libnm-nm-keyfile.html#NMKeyfileHandlerData" title="NMKeyfileHandlerData"><code class="literal">NMKeyfileHandlerData</code></a>.</p>
<div class="refsect3">
<a name="NMKeyfileHandlerType.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="NM-KEYFILE-HANDLER-TYPE-WARN:CAPS"></a>NM_KEYFILE_HANDLER_TYPE_WARN</p></td>
<td class="enum_member_description">
<p>a warning.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="NM-KEYFILE-HANDLER-TYPE-WRITE-CERT:CAPS"></a>NM_KEYFILE_HANDLER_TYPE_WRITE_CERT</p></td>
<td class="enum_member_description">
<p>for handling certificates while writing
a connection to keyfile.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 1.30</p>
</div>
<hr>
<div class="refsect2">
<a name="NMKeyfileWarnSeverity"></a><h3>enum NMKeyfileWarnSeverity</h3>
<p>The severity level of <a class="link" href="libnm-nm-keyfile.html#NM-KEYFILE-HANDLER-TYPE-WARN:CAPS"><code class="literal">NM_KEYFILE_HANDLER_TYPE_WARN</code></a> events.</p>
<div class="refsect3">
<a name="NMKeyfileWarnSeverity.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="NM-KEYFILE-WARN-SEVERITY-DEBUG:CAPS"></a>NM_KEYFILE_WARN_SEVERITY_DEBUG</p></td>
<td class="enum_member_description">
<p>debug message</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="NM-KEYFILE-WARN-SEVERITY-INFO:CAPS"></a>NM_KEYFILE_WARN_SEVERITY_INFO</p></td>
<td class="enum_member_description">
<p>info message</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="NM-KEYFILE-WARN-SEVERITY-INFO-MISSING-FILE:CAPS"></a>NM_KEYFILE_WARN_SEVERITY_INFO_MISSING_FILE</p></td>
<td class="enum_member_description">
<p>info message about a missing file</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="NM-KEYFILE-WARN-SEVERITY-WARN:CAPS"></a>NM_KEYFILE_WARN_SEVERITY_WARN</p></td>
<td class="enum_member_description">
<p>a warning message</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 1.30</p>
</div>
<hr>
<div class="refsect2">
<a name="NMKeyfileHandlerData"></a><h3>NMKeyfileHandlerData</h3>
<pre class="programlisting">typedef struct _NMKeyfileHandlerData NMKeyfileHandlerData;</pre>
<p>Opaque type with parameters for the callback. The actual content
depends on the <a class="link" href="libnm-nm-keyfile.html#NMKeyfileHandlerType" title="enum NMKeyfileHandlerType"><code class="literal">NMKeyfileHandlerType</code></a>.</p>
<p class="since">Since: 1.30</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>
|