Blob Blame History Raw
<!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>
 must 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>.</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>