</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><h3><aname="virConfGetValue"id="virConfGetValue"></a>Function: virConfGetValue</h3><preclass="programlisting"><ahref="libvirt-conf.html#virConfValuePtr">virConfValuePtr</a> virConfGetValue (<ahref="libvirt-conf.html#virConfPtr">virConfPtr</a> conf, <br/> const char * setting)<br/>
</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></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><h3><aname="virConfReadFile"id="virConfReadFile"></a>Function: virConfReadFile</h3><preclass="programlisting"><ahref="libvirt-conf.html#virConfPtr">virConfPtr</a> virConfReadFile (const char * filename)<br/>
</pre><p>Reads a configuration 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>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><h3><aname="virConfReadMem"id="virConfReadMem"></a>Function: 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><h3><aname="virConfWriteFile"id="virConfWriteFile"></a>Function: virConfWriteFile</h3><preclass="programlisting">int virConfWriteFile (const char * filename, <br/><ahref="libvirt-conf.html#virConfPtr">virConfPtr</a> conf)<br/>
</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><h3><aname="virConfWriteMem"id="virConfWriteMem"></a>Function: virConfWriteMem</h3><preclass="programlisting">int virConfWriteMem (char * memory, <br/> int * len, <br/><ahref="libvirt-conf.html#virConfPtr">virConfPtr</a> conf)<br/>
</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></div><divclass="linkList2"><divclass="llinks2"><h3class="links2"><span>main menu</span></h3><ul><li><ahref="../index.html">Home</a></li><li><ahref="../html/index.html">API Menu</a></li><li><ahref="../examples/index.html">C code examples</a></li><li><ahref="../ChangeLog.html">Recent Changes</a></li></ul></div><divclass="llinks2"><h3class="links2"><span>related links</span></h3><ul><li><ahref="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><ahref="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><ahref="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><ahref="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</a></li><li><ahref="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><formaction="../search.php"enctype="application/x-www-form-urlencoded"method="get"><inputname="query"type="text"size="12"value="Search..."/><inputname="submit"type="submit"value="Go"/></form></li><li><ahref="http://xmlsoft.org/"><imgsrc="../Libxml2-Logo-90x34.gif"alt="Made with Libxml2 Logo"/></a></li></ul><pclass="credits">Graphics and design by <ahref="mail:dfong@redhat.com">Diana Fong</a></p></div></div><divid="bottom"><pclass="p1"></p></div></div></body></html>