</pre><p>Frees all data associated to the handle</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conf</tt></i>:</span></td><td>a configuration file handle</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error.</td></tr></tbody></table></div></div>
</pre><p>Lookup the value associated to this entry in the configuration file</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conf</tt></i>:</span></td><td>a configuration file handle</td></tr><tr><td><spanclass="term"><i><tt>setting</tt></i>:</span></td><td/></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the value or NULL if the lookup failed, the data associated will be freed when virConfFree() is called</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>filename</tt></i>:</span></td><td>the path to the configuration file.</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>an handle to lookup settings or NULL if it failed to read or parse the file, use virConfFree() to free the data.</td></tr></tbody></table></div></div>
<hr/>
<divclass="refsect2"lang="en"><h3><aname="virConfReadMem"/>virConfReadMem ()</h3><preclass="programlisting"><ahref="libvirt-conf.html#virConfPtr">virConfPtr</a> virConfReadMem (const char * memory, <br/> int len)<br/>
</pre><p>Reads a configuration file loaded in memory. The string can be zero terminated in which case @len can be 0</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>memory</tt></i>:</span></td><td>pointer to the content of the configuration file</td></tr><tr><td><spanclass="term"><i><tt>len</tt></i>:</span></td><td>length in byte</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>an handle to lookup settings or NULL if it failed to parse the content, use virConfFree() to free the data.</td></tr></tbody></table></div></div>
</pre><p>Writes a configuration file back to a file.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>filename</tt></i>:</span></td><td>the path to the configuration file.</td></tr><tr><td><spanclass="term"><i><tt>conf</tt></i>:</span></td><td>the conf</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of error.</td></tr></tbody></table></div></div>
</pre><p>Writes a configuration file back to a memory area. @len is an IN/OUT parameter, it indicates the size available in bytes, and on output the size required for the configuration file (even if the call fails due to insufficient space).</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>memory</tt></i>:</span></td><td>pointer to the memory to store the config file</td></tr><tr><td><spanclass="term"><i><tt>len</tt></i>:</span></td><td>pointer to the length in byte of the store, on output the size</td></tr><tr><td><spanclass="term"><i><tt>conf</tt></i>:</span></td><td>the conf</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of error.</td></tr></tbody></table></div></div>