Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > core-updates > by-pkgid > 13f578376e4e807e78e7ef322e364e58 > files > 121

libvirt-docs-3.10.0-1.5.mga6.x86_64.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
  <!--
        This file is autogenerated from html/libvirt-libvirt-domain-snapshot.html.in
        Do not edit this file. Changes will be lost.
      -->
  <!--
        This page was generated at Wed Nov 29 16:10:36 UTC 2017.
      -->
  <head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <link rel="stylesheet" type="text/css" href="../main.css"/>
    <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/>
    <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/>
    <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/>
    <link rel="manifest" href="/manifest.json"/>
    <meta name="theme-color" content="#ffffff"/>
    <title>libvirt: Module libvirt-domain-snapshot from libvirt</title>
    <meta name="description" content="libvirt, virtualization, virtualization API"/>
    <script type="text/javascript">
      <!--
          
      function init() {
      window.addEventListener('scroll', function(e){
              var distanceY = window.pageYOffset || document.documentElement.scrollTop,
              shrinkOn = 94
              home = document.getElementById("home");
              links = document.getElementById("jumplinks");
              search = document.getElementById("search");
              body = document.getElementById("body");
              if (distanceY > shrinkOn) {
                  if (home.className != "navhide") {
                      body.className = "navhide"
                      home.className = "navhide"
                      links.className = "navhide"
                      search.className = "navhide"
                  }
              } else {
                  if (home.className == "navhide") {
                      body.className = ""
                      home.className = ""
                      links.className = ""
                      search.className = ""
                  }
              }
      });
      }
      window.onload = init();
           
          -->
    </script>
  </head>
  <body>
    <div id="body">
      <div id="content">
        <h1>Module libvirt-domain-snapshot from libvirt</h1>
        <p>Provides APIs for the management of domain snapshots</p>
        <h2>Table of Contents</h2>
        <h3>
          <a href="#types">Types</a>
        </h3>
        <pre class="api"><span class="keyword">typedef</span> <span class="type">struct _virDomainSnapshot</span> <a href="#virDomainSnapshot">virDomainSnapshot</a>
<span class="keyword">typedef</span> <span class="keyword">enum</span> <a href="#virDomainSnapshotCreateFlags">virDomainSnapshotCreateFlags</a>
<span class="keyword">typedef</span> <span class="keyword">enum</span> <a href="#virDomainSnapshotDeleteFlags">virDomainSnapshotDeleteFlags</a>
<span class="keyword">typedef</span> <span class="keyword">enum</span> <a href="#virDomainSnapshotListFlags">virDomainSnapshotListFlags</a>
<span class="keyword">typedef</span> <span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshot">virDomainSnapshot</a> *</span> <a name="virDomainSnapshotPtr">virDomainSnapshotPtr</a>
<span class="keyword">typedef</span> <span class="keyword">enum</span> <a href="#virDomainSnapshotRevertFlags">virDomainSnapshotRevertFlags</a>
</pre>
        <h3>
          <a href="#functions">Functions</a>
        </h3>
        <pre class="api"><span class="type">int</span>	<a href="#virDomainHasCurrentSnapshot">virDomainHasCurrentSnapshot</a>	(<span class="type"><a href="libvirt-libvirt-domain.html#virDomainPtr">virDomainPtr</a></span> domain, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virDomainListAllSnapshots">virDomainListAllSnapshots</a>	(<span class="type"><a href="libvirt-libvirt-domain.html#virDomainPtr">virDomainPtr</a></span> domain, <br/>					 <span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a> **</span> snaps, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virDomainRevertToSnapshot">virDomainRevertToSnapshot</a>	(<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span> snapshot, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span>	<a href="#virDomainSnapshotCreateXML">virDomainSnapshotCreateXML</a>	(<span class="type"><a href="libvirt-libvirt-domain.html#virDomainPtr">virDomainPtr</a></span> domain, <br/>							 <span class="type">const char *</span> xmlDesc, <br/>							 <span class="type">unsigned int</span> flags)
<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span>	<a href="#virDomainSnapshotCurrent">virDomainSnapshotCurrent</a>	(<span class="type"><a href="libvirt-libvirt-domain.html#virDomainPtr">virDomainPtr</a></span> domain, <br/>							 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virDomainSnapshotDelete">virDomainSnapshotDelete</a>		(<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span> snapshot, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virDomainSnapshotFree">virDomainSnapshotFree</a>		(<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span> snapshot)
<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span>	<a href="#virDomainSnapshotGetConnect">virDomainSnapshotGetConnect</a>	(<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span> snapshot)
<span class="type"><a href="libvirt-libvirt-domain.html#virDomainPtr">virDomainPtr</a></span>	<a href="#virDomainSnapshotGetDomain">virDomainSnapshotGetDomain</a>	(<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span> snapshot)
<span class="type">const char *</span>	<a href="#virDomainSnapshotGetName">virDomainSnapshotGetName</a>	(<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span> snapshot)
<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span>	<a href="#virDomainSnapshotGetParent">virDomainSnapshotGetParent</a>	(<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span> snapshot, <br/>							 <span class="type">unsigned int</span> flags)
<span class="type">char *</span>	<a href="#virDomainSnapshotGetXMLDesc">virDomainSnapshotGetXMLDesc</a>	(<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span> snapshot, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virDomainSnapshotHasMetadata">virDomainSnapshotHasMetadata</a>	(<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span> snapshot, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virDomainSnapshotIsCurrent">virDomainSnapshotIsCurrent</a>	(<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span> snapshot, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virDomainSnapshotListAllChildren">virDomainSnapshotListAllChildren</a>	(<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span> snapshot, <br/>						 <span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a> **</span> snaps, <br/>						 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virDomainSnapshotListChildrenNames">virDomainSnapshotListChildrenNames</a>	(<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span> snapshot, <br/>						 <span class="type">char **</span> names, <br/>						 <span class="type">int</span> nameslen, <br/>						 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virDomainSnapshotListNames">virDomainSnapshotListNames</a>	(<span class="type"><a href="libvirt-libvirt-domain.html#virDomainPtr">virDomainPtr</a></span> domain, <br/>					 <span class="type">char **</span> names, <br/>					 <span class="type">int</span> nameslen, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span>	<a href="#virDomainSnapshotLookupByName">virDomainSnapshotLookupByName</a>	(<span class="type"><a href="libvirt-libvirt-domain.html#virDomainPtr">virDomainPtr</a></span> domain, <br/>							 <span class="type">const char *</span> name, <br/>							 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virDomainSnapshotNum">virDomainSnapshotNum</a>		(<span class="type"><a href="libvirt-libvirt-domain.html#virDomainPtr">virDomainPtr</a></span> domain, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virDomainSnapshotNumChildren">virDomainSnapshotNumChildren</a>	(<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span> snapshot, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virDomainSnapshotRef">virDomainSnapshotRef</a>		(<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span> snapshot)
</pre>
        <h2>Description</h2>
        <h3>
          <a name="types">Types</a>
        </h3>
        <h3>
          <a name="virDomainSnapshot">
            <code>virDomainSnapshot</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">struct </span>virDomainSnapshot {
</pre>
          <div class="undisclosed">The content of this structure is not made public by the API</div>
          <pre>
}
</pre>
        </div>
        <h3>
          <a name="virDomainSnapshotCreateFlags">
            <code>virDomainSnapshotCreateFlags</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">enum</span> virDomainSnapshotCreateFlags {
</pre>
          <table>
            <tr>
              <td>
                <a name="VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE">VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE</a>
              </td>
              <td> = </td>
              <td>1</td>
              <td>
                <div class="comment">Restore or alter metadata</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_DOMAIN_SNAPSHOT_CREATE_CURRENT">VIR_DOMAIN_SNAPSHOT_CREATE_CURRENT</a>
              </td>
              <td> = </td>
              <td>2</td>
              <td>
                <div class="comment">With redefine, make snapshot current</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_DOMAIN_SNAPSHOT_CREATE_NO_METADATA">VIR_DOMAIN_SNAPSHOT_CREATE_NO_METADATA</a>
              </td>
              <td> = </td>
              <td>4</td>
              <td>
                <div class="comment">Make snapshot without remembering it</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_DOMAIN_SNAPSHOT_CREATE_HALT">VIR_DOMAIN_SNAPSHOT_CREATE_HALT</a>
              </td>
              <td> = </td>
              <td>8</td>
              <td>
                <div class="comment">Stop running guest after snapshot</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY">VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY</a>
              </td>
              <td> = </td>
              <td>16</td>
              <td>
                <div class="comment">disk snapshot, not system checkpoint</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_DOMAIN_SNAPSHOT_CREATE_REUSE_EXT">VIR_DOMAIN_SNAPSHOT_CREATE_REUSE_EXT</a>
              </td>
              <td> = </td>
              <td>32</td>
              <td>
                <div class="comment">reuse any existing external files</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE">VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE</a>
              </td>
              <td> = </td>
              <td>64</td>
              <td>
                <div class="comment">use guest agent to quiesce all mounted file systems within the domain</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_DOMAIN_SNAPSHOT_CREATE_ATOMIC">VIR_DOMAIN_SNAPSHOT_CREATE_ATOMIC</a>
              </td>
              <td> = </td>
              <td>128</td>
              <td>
                <div class="comment">atomically avoid partial changes</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_DOMAIN_SNAPSHOT_CREATE_LIVE">VIR_DOMAIN_SNAPSHOT_CREATE_LIVE</a>
              </td>
              <td> = </td>
              <td>256</td>
              <td>
                <div class="comment">create the snapshot while the guest is running</div>
              </td>
            </tr>
          </table>
          <pre>}
</pre>
        </div>
        <h3>
          <a name="virDomainSnapshotDeleteFlags">
            <code>virDomainSnapshotDeleteFlags</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">enum</span> virDomainSnapshotDeleteFlags {
</pre>
          <table>
            <tr>
              <td>
                <a name="VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN">VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN</a>
              </td>
              <td> = </td>
              <td>1</td>
              <td>
                <div class="comment">Also delete children</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_DOMAIN_SNAPSHOT_DELETE_METADATA_ONLY">VIR_DOMAIN_SNAPSHOT_DELETE_METADATA_ONLY</a>
              </td>
              <td> = </td>
              <td>2</td>
              <td>
                <div class="comment">Delete just metadata</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN_ONLY">VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN_ONLY</a>
              </td>
              <td> = </td>
              <td>4</td>
              <td>
                <div class="comment">Delete just children</div>
              </td>
            </tr>
          </table>
          <pre>}
</pre>
        </div>
        <h3>
          <a name="virDomainSnapshotListFlags">
            <code>virDomainSnapshotListFlags</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">enum</span> virDomainSnapshotListFlags {
</pre>
          <table>
            <tr>
              <td>
                <a name="VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS">VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS</a>
              </td>
              <td> = </td>
              <td>1</td>
              <td>
                <div class="comment">List all descendants, not just children, when listing a snapshot For historical reasons, groups do not use contiguous bits.</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_DOMAIN_SNAPSHOT_LIST_ROOTS">VIR_DOMAIN_SNAPSHOT_LIST_ROOTS</a>
              </td>
              <td> = </td>
              <td>1</td>
              <td>
                <div class="comment">Filter by snapshots with no parents, when listing a domain</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_DOMAIN_SNAPSHOT_LIST_METADATA">VIR_DOMAIN_SNAPSHOT_LIST_METADATA</a>
              </td>
              <td> = </td>
              <td>2</td>
              <td>
                <div class="comment">Filter by snapshots which have metadata</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_DOMAIN_SNAPSHOT_LIST_LEAVES">VIR_DOMAIN_SNAPSHOT_LIST_LEAVES</a>
              </td>
              <td> = </td>
              <td>4</td>
              <td>
                <div class="comment">Filter by snapshots with no children</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_DOMAIN_SNAPSHOT_LIST_NO_LEAVES">VIR_DOMAIN_SNAPSHOT_LIST_NO_LEAVES</a>
              </td>
              <td> = </td>
              <td>8</td>
              <td>
                <div class="comment">Filter by snapshots that have children</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA">VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA</a>
              </td>
              <td> = </td>
              <td>16</td>
              <td>
                <div class="comment">Filter by snapshots with no metadata</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_DOMAIN_SNAPSHOT_LIST_INACTIVE">VIR_DOMAIN_SNAPSHOT_LIST_INACTIVE</a>
              </td>
              <td> = </td>
              <td>32</td>
              <td>
                <div class="comment">Filter by snapshots taken while guest was shut off</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_DOMAIN_SNAPSHOT_LIST_ACTIVE">VIR_DOMAIN_SNAPSHOT_LIST_ACTIVE</a>
              </td>
              <td> = </td>
              <td>64</td>
              <td>
                <div class="comment">Filter by snapshots taken while guest was active, and with memory state</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_DOMAIN_SNAPSHOT_LIST_DISK_ONLY">VIR_DOMAIN_SNAPSHOT_LIST_DISK_ONLY</a>
              </td>
              <td> = </td>
              <td>128</td>
              <td>
                <div class="comment">Filter by snapshots taken while guest was active, but without memory state</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_DOMAIN_SNAPSHOT_LIST_INTERNAL">VIR_DOMAIN_SNAPSHOT_LIST_INTERNAL</a>
              </td>
              <td> = </td>
              <td>256</td>
              <td>
                <div class="comment">Filter by snapshots stored internal to disk images</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_DOMAIN_SNAPSHOT_LIST_EXTERNAL">VIR_DOMAIN_SNAPSHOT_LIST_EXTERNAL</a>
              </td>
              <td> = </td>
              <td>512</td>
              <td>
                <div class="comment">Filter by snapshots that use files external to disk images</div>
              </td>
            </tr>
          </table>
          <pre>}
</pre>
        </div>
        <h3>
          <a name="virDomainSnapshotRevertFlags">
            <code>virDomainSnapshotRevertFlags</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">enum</span> virDomainSnapshotRevertFlags {
</pre>
          <table>
            <tr>
              <td>
                <a name="VIR_DOMAIN_SNAPSHOT_REVERT_RUNNING">VIR_DOMAIN_SNAPSHOT_REVERT_RUNNING</a>
              </td>
              <td> = </td>
              <td>1</td>
              <td>
                <div class="comment">Run after revert</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED">VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED</a>
              </td>
              <td> = </td>
              <td>2</td>
              <td>
                <div class="comment">Pause after revert</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_DOMAIN_SNAPSHOT_REVERT_FORCE">VIR_DOMAIN_SNAPSHOT_REVERT_FORCE</a>
              </td>
              <td> = </td>
              <td>4</td>
              <td>
                <div class="comment">Allow risky reverts</div>
              </td>
            </tr>
          </table>
          <pre>}
</pre>
        </div>
        <h3>
          <a name="functions">Functions</a>
        </h3>
        <h3>
          <a name="virDomainHasCurrentSnapshot">
            <code>virDomainHasCurrentSnapshot</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virDomainHasCurrentSnapshot	(<span class="type"><a href="libvirt-libvirt-domain.html#virDomainPtr">virDomainPtr</a></span> domain,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Determine if the domain has a current snapshot.</p>
        </div>
        <dl class="variablelist">
          <dt>domain</dt>
          <dd>pointer to the domain object</dd>
          <dt>flags</dt>
          <dd>extra flags; not used yet, so callers should always pass 0</dd>
          <dt>Returns</dt>
          <dd>1 if such snapshot exists, 0 if it doesn't, -1 on error.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virDomainListAllSnapshots">
            <code>virDomainListAllSnapshots</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virDomainListAllSnapshots	(<span class="type"><a href="libvirt-libvirt-domain.html#virDomainPtr">virDomainPtr</a></span> domain,
					 <span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a> **</span> snaps,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Collect the list of domain snapshots for the given domain, and allocate an array to store those objects. This API solves the race inherent in <a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotListNames">virDomainSnapshotListNames</a>().</p>
          <p>By default, this command covers all snapshots; it is also possible to limit things to just snapshots with no parents, when @flags includes <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_ROOTS">VIR_DOMAIN_SNAPSHOT_LIST_ROOTS</a>. Additional filters are provided in groups, where each group contains bits that describe mutually exclusive attributes of a snapshot, and where all bits within a group describe all possible snapshots. Some hypervisors might reject explicit bits from a group where the hypervisor cannot make a distinction. For a group supported by a given hypervisor, the behavior when no bits of a group are set is identical to the behavior when all bits in that group are set. When setting bits from more than one group, it is possible to select an impossible combination, in that case a hypervisor may return either 0 or an error.</p>
          <p>The first group of @flags is <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_LEAVES">VIR_DOMAIN_SNAPSHOT_LIST_LEAVES</a> and <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_NO_LEAVES">VIR_DOMAIN_SNAPSHOT_LIST_NO_LEAVES</a>, to filter based on snapshots that have no further children (a leaf snapshot).</p>
          <p>The next group of @flags is <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_METADATA">VIR_DOMAIN_SNAPSHOT_LIST_METADATA</a> and <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA">VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA</a>, for filtering snapshots based on whether they have metadata that would prevent the removal of the last reference to a domain.</p>
          <p>The next group of @flags is <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_INACTIVE">VIR_DOMAIN_SNAPSHOT_LIST_INACTIVE</a>, <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_ACTIVE">VIR_DOMAIN_SNAPSHOT_LIST_ACTIVE</a>, and <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_DISK_ONLY">VIR_DOMAIN_SNAPSHOT_LIST_DISK_ONLY</a>, for filtering snapshots based on what domain state is tracked by the snapshot.</p>
          <p>The next group of @flags is <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_INTERNAL">VIR_DOMAIN_SNAPSHOT_LIST_INTERNAL</a> and <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_EXTERNAL">VIR_DOMAIN_SNAPSHOT_LIST_EXTERNAL</a>, for filtering snapshots based on whether the snapshot is stored inside the disk images or as additional files.</p>
        </div>
        <dl class="variablelist">
          <dt>domain</dt>
          <dd>a domain object</dd>
          <dt>snaps</dt>
          <dd>pointer to variable to store the array containing snapshot objects, or NULL if the list is not required (just returns number of snapshots)</dd>
          <dt>flags</dt>
          <dd>bitwise-OR of supported <a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotListFlags">virDomainSnapshotListFlags</a></dd>
          <dt>Returns</dt>
          <dd>the number of domain snapshots found or -1 and sets @snaps to NULL in case of error. On success, the array stored into @snaps is guaranteed to have an extra allocated element set to NULL but not included in the return count, to make iteration easier. The caller is responsible for calling <a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotFree">virDomainSnapshotFree</a>() on each array element, then calling free() on @snaps.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virDomainRevertToSnapshot">
            <code>virDomainRevertToSnapshot</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virDomainRevertToSnapshot	(<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span> snapshot,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Revert the domain to a given snapshot.</p>
          <p>Normally, the domain will revert to the same state the domain was in while the snapshot was taken (whether inactive, running, or paused), except that disk snapshots default to reverting to inactive state. Including <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_REVERT_RUNNING">VIR_DOMAIN_SNAPSHOT_REVERT_RUNNING</a> in @flags overrides the snapshot state to guarantee a running domain after the revert; or including <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED">VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED</a> in @flags guarantees a paused domain after the revert. These two flags are mutually exclusive. While a persistent domain does not need either flag, it is not possible to revert a transient domain into an inactive state, so transient domains require the use of one of these two flags.</p>
          <p>Reverting to any snapshot discards all configuration changes made since the last snapshot. Additionally, reverting to a snapshot from a running domain is a form of data loss, since it discards whatever is in the guest's RAM at the time. Since the very nature of keeping snapshots implies the intent to roll back state, no additional confirmation is normally required for these lossy effects.</p>
          <p>However, there are two particular situations where reverting will be refused by default, and where @flags must include <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_REVERT_FORCE">VIR_DOMAIN_SNAPSHOT_REVERT_FORCE</a> to acknowledge the risks. 1) Any attempt to revert to a snapshot that lacks the metadata to perform ABI compatibility checks (generally the case for snapshots that lack a full &lt;domain&gt; when listed by <a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotGetXMLDesc">virDomainSnapshotGetXMLDesc</a>(), such as those created prior to libvirt 0.9.5). 2) Any attempt to revert a running domain to an active state that requires starting a new hypervisor instance rather than reusing the existing hypervisor (since this would terminate all connections to the domain, such as such as VNC or Spice graphics) - this condition arises from active snapshots that are provably ABI incompatible, as well as from inactive snapshots with a @flags request to start the domain after the revert.</p>
        </div>
        <dl class="variablelist">
          <dt>snapshot</dt>
          <dd>a domain snapshot object</dd>
          <dt>flags</dt>
          <dd>bitwise-OR of <a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotRevertFlags">virDomainSnapshotRevertFlags</a></dd>
          <dt>Returns</dt>
          <dd>0 if the creation is successful, -1 on error.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virDomainSnapshotCreateXML">
            <code>virDomainSnapshotCreateXML</code>
          </a>
        </h3>
        <pre class="api"><span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span>	virDomainSnapshotCreateXML	(<span class="type"><a href="libvirt-libvirt-domain.html#virDomainPtr">virDomainPtr</a></span> domain,
							 <span class="type">const char *</span> xmlDesc,
							 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Creates a new snapshot of a domain based on the snapshot xml contained in xmlDesc.</p>
          <p>If @flags is 0, the domain can be active, in which case the snapshot will be a system checkpoint (both disk state and runtime VM state such as RAM contents), where reverting to the snapshot is the same as resuming from hibernation (TCP connections may have timed out, but everything else picks up where it left off); or the domain can be inactive, in which case the snapshot includes just the disk state prior to booting. The newly created snapshot becomes current (see <a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotCurrent">virDomainSnapshotCurrent</a>()), and is a child of any previous current snapshot.</p>
          <p>If @flags includes <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE">VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE</a>, then this is a request to reinstate snapshot metadata that was previously discarded, rather than creating a new snapshot. This can be used to recreate a snapshot hierarchy on a destination, then remove it on the source, in order to allow migration (since migration normally fails if snapshot metadata still remains on the source machine). When redefining snapshot metadata, the current snapshot will not be altered unless the <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_CREATE_CURRENT">VIR_DOMAIN_SNAPSHOT_CREATE_CURRENT</a> flag is also present. It is an error to request the <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_CREATE_CURRENT">VIR_DOMAIN_SNAPSHOT_CREATE_CURRENT</a> flag without <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE">VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE</a>. On some hypervisors, redefining an existing snapshot can be used to alter host-specific portions of the domain XML to be used during revert (such as backing filenames associated with disk devices), but must not alter guest-visible layout. When redefining a snapshot name that does not exist, the hypervisor may validate that reverting to the snapshot appears to be possible (for example, disk images have snapshot contents by the requested name). Not all hypervisors support these flags.</p>
          <p>If @flags includes <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_CREATE_NO_METADATA">VIR_DOMAIN_SNAPSHOT_CREATE_NO_METADATA</a>, then the domain's disk images are modified according to @xmlDesc, but then the just-created snapshot has its metadata deleted. This flag is incompatible with <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE">VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE</a>.</p>
          <p>If @flags includes <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_CREATE_HALT">VIR_DOMAIN_SNAPSHOT_CREATE_HALT</a>, then the domain will be inactive after the snapshot completes, regardless of whether it was active before; otherwise, a running domain will still be running after the snapshot. This flag is invalid on transient domains, and is incompatible with <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE">VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE</a>.</p>
          <p>If @flags includes <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_CREATE_LIVE">VIR_DOMAIN_SNAPSHOT_CREATE_LIVE</a>, then the domain is not paused while creating the snapshot. This increases the size of the memory dump file, but reduces downtime of the guest while taking the snapshot. Some hypervisors only support this flag during external checkpoints.</p>
          <p>If @flags includes <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY">VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY</a>, then the snapshot will be limited to the disks described in @xmlDesc, and no VM state will be saved. For an active guest, the disk image may be inconsistent (as if power had been pulled), and specifying this with the <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_CREATE_HALT">VIR_DOMAIN_SNAPSHOT_CREATE_HALT</a> flag risks data loss.</p>
          <p>If @flags includes <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE">VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE</a>, then the libvirt will attempt to use guest agent to freeze and thaw all file systems in use within domain OS. However, if the guest agent is not present, an error is thrown. Moreover, this flag requires <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY">VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY</a> to be passed as well.</p>
          <p>By default, if the snapshot involves external files, and any of the destination files already exist as a non-empty regular file, the snapshot is rejected to avoid losing contents of those files. However, if @flags includes <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_CREATE_REUSE_EXT">VIR_DOMAIN_SNAPSHOT_CREATE_REUSE_EXT</a>, then the destination files must be pre-created manually with the correct image format and metadata including backing store path (this allows a management app to pre-create files with relative backing file names, rather than the default of creating with absolute backing file names). Note that only the file specified in the snapshot XML is inserted as a snapshot thus setting incorrect metadata in the pre-created image may lead to the VM being unable to start or other block jobs may fail.</p>
          <p>Be aware that although libvirt prefers to report errors up front with no other effect, some hypervisors have certain types of failures where the overall command can easily fail even though the guest configuration was partially altered (for example, if a disk snapshot request for two disks fails on the second disk, but the first disk alteration cannot be rolled back). If this API call fails, it is therefore normally necessary to follow up with <a href="libvirt-libvirt-domain.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a>() and check each disk to determine if any partial changes occurred. However, if @flags contains <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_CREATE_ATOMIC">VIR_DOMAIN_SNAPSHOT_CREATE_ATOMIC</a>, then libvirt guarantees that this command will not alter any disks unless the entire set of changes can be done atomically, making failure recovery simpler (note that it is still possible to fail after disks have changed, but only in the much rarer cases of running out of memory or disk space).</p>
          <p>Some hypervisors may prevent this operation if there is a current block copy operation; in that case, use <a href="libvirt-libvirt-domain.html#virDomainBlockJobAbort">virDomainBlockJobAbort</a>() to stop the block copy first.</p>
          <p><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotFree">virDomainSnapshotFree</a> should be used to free the resources after the snapshot object is no longer needed.</p>
        </div>
        <dl class="variablelist">
          <dt>domain</dt>
          <dd>a domain object</dd>
          <dt>xmlDesc</dt>
          <dd>string containing an XML description of the domain</dd>
          <dt>flags</dt>
          <dd>bitwise-OR of <a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotCreateFlags">virDomainSnapshotCreateFlags</a></dd>
          <dt>Returns</dt>
          <dd>an (opaque) <a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a> on success, NULL on failure.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virDomainSnapshotCurrent">
            <code>virDomainSnapshotCurrent</code>
          </a>
        </h3>
        <pre class="api"><span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span>	virDomainSnapshotCurrent	(<span class="type"><a href="libvirt-libvirt-domain.html#virDomainPtr">virDomainPtr</a></span> domain,
							 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Get the current snapshot for a domain, if any.</p>
          <p><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotFree">virDomainSnapshotFree</a> should be used to free the resources after the snapshot object is no longer needed.</p>
        </div>
        <dl class="variablelist">
          <dt>domain</dt>
          <dd>a domain object</dd>
          <dt>flags</dt>
          <dd>extra flags; not used yet, so callers should always pass 0</dd>
          <dt>Returns</dt>
          <dd>a domain snapshot object or NULL in case of failure. If the current domain snapshot cannot be found, then the <a href="libvirt-virterror.html#VIR_ERR_NO_DOMAIN_SNAPSHOT">VIR_ERR_NO_DOMAIN_SNAPSHOT</a> error is raised.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virDomainSnapshotDelete">
            <code>virDomainSnapshotDelete</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virDomainSnapshotDelete		(<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span> snapshot,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Delete the snapshot.</p>
          <p>If @flags is 0, then just this snapshot is deleted, and changes from this snapshot are automatically merged into children snapshots. If @flags includes <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN">VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN</a>, then this snapshot and any descendant snapshots are deleted. If @flags includes <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN_ONLY">VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN_ONLY</a>, then any descendant snapshots are deleted, but this snapshot remains. These two flags are mutually exclusive.</p>
          <p>If @flags includes <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_DELETE_METADATA_ONLY">VIR_DOMAIN_SNAPSHOT_DELETE_METADATA_ONLY</a>, then any snapshot metadata tracked by libvirt is removed while keeping the snapshot contents intact; if a hypervisor does not require any libvirt metadata to track snapshots, then this flag is silently ignored.</p>
        </div>
        <dl class="variablelist">
          <dt>snapshot</dt>
          <dd>a domain snapshot object</dd>
          <dt>flags</dt>
          <dd>bitwise-OR of supported <a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotDeleteFlags">virDomainSnapshotDeleteFlags</a></dd>
          <dt>Returns</dt>
          <dd>0 if the selected snapshot(s) were successfully deleted, -1 on error.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virDomainSnapshotFree">
            <code>virDomainSnapshotFree</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virDomainSnapshotFree		(<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span> snapshot)</pre>
        <div class="description">
          <p>Free the domain snapshot object. The snapshot itself is not modified. The data structure is freed and should not be used thereafter.</p>
        </div>
        <dl class="variablelist">
          <dt>snapshot</dt>
          <dd>a domain snapshot object</dd>
          <dt>Returns</dt>
          <dd>0 in case of success and -1 in case of failure.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virDomainSnapshotGetConnect">
            <code>virDomainSnapshotGetConnect</code>
          </a>
        </h3>
        <pre class="api"><span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span>	virDomainSnapshotGetConnect	(<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span> snapshot)</pre>
        <div class="description">
          <p>Provides the connection pointer associated with a snapshot. The reference counter on the connection is not increased by this call.</p>
        </div>
        <dl class="variablelist">
          <dt>snapshot</dt>
          <dd>a snapshot object</dd>
          <dt>Returns</dt>
          <dd>the connection or NULL.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virDomainSnapshotGetDomain">
            <code>virDomainSnapshotGetDomain</code>
          </a>
        </h3>
        <pre class="api"><span class="type"><a href="libvirt-libvirt-domain.html#virDomainPtr">virDomainPtr</a></span>	virDomainSnapshotGetDomain	(<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span> snapshot)</pre>
        <div class="description">
          <p>Provides the domain pointer associated with a snapshot. The reference counter on the domain is not increased by this call.</p>
        </div>
        <dl class="variablelist">
          <dt>snapshot</dt>
          <dd>a snapshot object</dd>
          <dt>Returns</dt>
          <dd>the domain or NULL.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virDomainSnapshotGetName">
            <code>virDomainSnapshotGetName</code>
          </a>
        </h3>
        <pre class="api"><span class="type">const char *</span>	virDomainSnapshotGetName	(<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span> snapshot)</pre>
        <div class="description">
          <p>Get the public name for that snapshot</p>
        </div>
        <dl class="variablelist">
          <dt>snapshot</dt>
          <dd>a snapshot object</dd>
          <dt>Returns</dt>
          <dd>a pointer to the name or NULL, the string need not be deallocated as its lifetime will be the same as the snapshot object.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virDomainSnapshotGetParent">
            <code>virDomainSnapshotGetParent</code>
          </a>
        </h3>
        <pre class="api"><span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span>	virDomainSnapshotGetParent	(<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span> snapshot,
							 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Get the parent snapshot for @snapshot, if any.</p>
          <p><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotFree">virDomainSnapshotFree</a> should be used to free the resources after the snapshot object is no longer needed.</p>
        </div>
        <dl class="variablelist">
          <dt>snapshot</dt>
          <dd>a snapshot object</dd>
          <dt>flags</dt>
          <dd>extra flags; not used yet, so callers should always pass 0</dd>
          <dt>Returns</dt>
          <dd>a domain snapshot object or NULL in case of failure. If the given snapshot is a root (no parent), then the <a href="libvirt-virterror.html#VIR_ERR_NO_DOMAIN_SNAPSHOT">VIR_ERR_NO_DOMAIN_SNAPSHOT</a> error is raised.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virDomainSnapshotGetXMLDesc">
            <code>virDomainSnapshotGetXMLDesc</code>
          </a>
        </h3>
        <pre class="api"><span class="type">char *</span>	virDomainSnapshotGetXMLDesc	(<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span> snapshot,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Provide an XML description of the domain snapshot.</p>
          <p>No security-sensitive data will be included unless @flags contains <a href="libvirt-libvirt-domain.html#VIR_DOMAIN_XML_SECURE">VIR_DOMAIN_XML_SECURE</a>; this flag is rejected on read-only connections. For this API, @flags should not contain either <a href="libvirt-libvirt-domain.html#VIR_DOMAIN_XML_INACTIVE">VIR_DOMAIN_XML_INACTIVE</a> or <a href="libvirt-libvirt-domain.html#VIR_DOMAIN_XML_UPDATE_CPU">VIR_DOMAIN_XML_UPDATE_CPU</a>.</p>
        </div>
        <dl class="variablelist">
          <dt>snapshot</dt>
          <dd>a domain snapshot object</dd>
          <dt>flags</dt>
          <dd>bitwise-OR of subset of <a href="libvirt-libvirt-domain.html#virDomainXMLFlags">virDomainXMLFlags</a></dd>
          <dt>Returns</dt>
          <dd>a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virDomainSnapshotHasMetadata">
            <code>virDomainSnapshotHasMetadata</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virDomainSnapshotHasMetadata	(<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span> snapshot,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Determine if the given snapshot is associated with libvirt metadata that would prevent the deletion of the domain.</p>
        </div>
        <dl class="variablelist">
          <dt>snapshot</dt>
          <dd>a snapshot object</dd>
          <dt>flags</dt>
          <dd>extra flags; not used yet, so callers should always pass 0</dd>
          <dt>Returns</dt>
          <dd>1 if the snapshot has metadata, 0 if the snapshot exists without help from libvirt, or -1 on error.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virDomainSnapshotIsCurrent">
            <code>virDomainSnapshotIsCurrent</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virDomainSnapshotIsCurrent	(<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span> snapshot,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Determine if the given snapshot is the domain's current snapshot. See also <a href="libvirt-libvirt-domain-snapshot.html#virDomainHasCurrentSnapshot">virDomainHasCurrentSnapshot</a>().</p>
        </div>
        <dl class="variablelist">
          <dt>snapshot</dt>
          <dd>a snapshot object</dd>
          <dt>flags</dt>
          <dd>extra flags; not used yet, so callers should always pass 0</dd>
          <dt>Returns</dt>
          <dd>1 if current, 0 if not current, or -1 on error.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virDomainSnapshotListAllChildren">
            <code>virDomainSnapshotListAllChildren</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virDomainSnapshotListAllChildren	(<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span> snapshot,
						 <span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a> **</span> snaps,
						 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Collect the list of domain snapshots that are children of the given snapshot, and allocate an array to store those objects. This API solves the race inherent in <a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotListChildrenNames">virDomainSnapshotListChildrenNames</a>().</p>
          <p>By default, this command covers only direct children; it is also possible to expand things to cover all descendants, when @flags includes <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS">VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS</a>. Also, some filters are provided in groups, where each group contains bits that describe mutually exclusive attributes of a snapshot, and where all bits within a group describe all possible snapshots. Some hypervisors might reject explicit bits from a group where the hypervisor cannot make a distinction. For a group supported by a given hypervisor, the behavior when no bits of a group are set is identical to the behavior when all bits in that group are set. When setting bits from more than one group, it is possible to select an impossible combination, in that case a hypervisor may return either 0 or an error.</p>
          <p>The first group of @flags is <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_LEAVES">VIR_DOMAIN_SNAPSHOT_LIST_LEAVES</a> and <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_NO_LEAVES">VIR_DOMAIN_SNAPSHOT_LIST_NO_LEAVES</a>, to filter based on snapshots that have no further children (a leaf snapshot).</p>
          <p>The next group of @flags is <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_METADATA">VIR_DOMAIN_SNAPSHOT_LIST_METADATA</a> and <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA">VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA</a>, for filtering snapshots based on whether they have metadata that would prevent the removal of the last reference to a domain.</p>
          <p>The next group of @flags is <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_INACTIVE">VIR_DOMAIN_SNAPSHOT_LIST_INACTIVE</a>, <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_ACTIVE">VIR_DOMAIN_SNAPSHOT_LIST_ACTIVE</a>, and <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_DISK_ONLY">VIR_DOMAIN_SNAPSHOT_LIST_DISK_ONLY</a>, for filtering snapshots based on what domain state is tracked by the snapshot.</p>
          <p>The next group of @flags is <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_INTERNAL">VIR_DOMAIN_SNAPSHOT_LIST_INTERNAL</a> and <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_EXTERNAL">VIR_DOMAIN_SNAPSHOT_LIST_EXTERNAL</a>, for filtering snapshots based on whether the snapshot is stored inside the disk images or as additional files.</p>
        </div>
        <dl class="variablelist">
          <dt>snapshot</dt>
          <dd>a domain snapshot object</dd>
          <dt>snaps</dt>
          <dd>pointer to variable to store the array containing snapshot objects, or NULL if the list is not required (just returns number of snapshots)</dd>
          <dt>flags</dt>
          <dd>bitwise-OR of supported <a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotListFlags">virDomainSnapshotListFlags</a></dd>
          <dt>Returns</dt>
          <dd>the number of domain snapshots found or -1 and sets @snaps to NULL in case of error. On success, the array stored into @snaps is guaranteed to have an extra allocated element set to NULL but not included in the return count, to make iteration easier. The caller is responsible for calling <a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotFree">virDomainSnapshotFree</a>() on each array element, then calling free() on @snaps.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virDomainSnapshotListChildrenNames">
            <code>virDomainSnapshotListChildrenNames</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virDomainSnapshotListChildrenNames	(<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span> snapshot,
						 <span class="type">char **</span> names,
						 <span class="type">int</span> nameslen,
						 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Collect the list of domain snapshots that are children of the given snapshot, and store their names in @names. The value to use for @nameslen can be determined by <a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotNumChildren">virDomainSnapshotNumChildren</a>() with the same @flags.</p>
          <p>By default, this command covers only direct children; it is also possible to expand things to cover all descendants, when @flags includes <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS">VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS</a>. Also, some filters are provided in groups, where each group contains bits that describe mutually exclusive attributes of a snapshot, and where all bits within a group describe all possible snapshots. Some hypervisors might reject explicit bits from a group where the hypervisor cannot make a distinction. For a group supported by a given hypervisor, the behavior when no bits of a group are set is identical to the behavior when all bits in that group are set. When setting bits from more than one group, it is possible to select an impossible combination, in that case a hypervisor may return either 0 or an error.</p>
          <p>The first group of @flags is <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_LEAVES">VIR_DOMAIN_SNAPSHOT_LIST_LEAVES</a> and <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_NO_LEAVES">VIR_DOMAIN_SNAPSHOT_LIST_NO_LEAVES</a>, to filter based on snapshots that have no further children (a leaf snapshot).</p>
          <p>The next group of @flags is <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_METADATA">VIR_DOMAIN_SNAPSHOT_LIST_METADATA</a> and <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA">VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA</a>, for filtering snapshots based on whether they have metadata that would prevent the removal of the last reference to a domain.</p>
          <p>The next group of @flags is <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_INACTIVE">VIR_DOMAIN_SNAPSHOT_LIST_INACTIVE</a>, <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_ACTIVE">VIR_DOMAIN_SNAPSHOT_LIST_ACTIVE</a>, and <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_DISK_ONLY">VIR_DOMAIN_SNAPSHOT_LIST_DISK_ONLY</a>, for filtering snapshots based on what domain state is tracked by the snapshot.</p>
          <p>The next group of @flags is <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_INTERNAL">VIR_DOMAIN_SNAPSHOT_LIST_INTERNAL</a> and <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_EXTERNAL">VIR_DOMAIN_SNAPSHOT_LIST_EXTERNAL</a>, for filtering snapshots based on whether the snapshot is stored inside the disk images or as additional files.</p>
        </div>
        <dl class="variablelist">
          <dt>snapshot</dt>
          <dd>a domain snapshot object</dd>
          <dt>names</dt>
          <dd>array to collect the list of names of snapshots</dd>
          <dt>nameslen</dt>
          <dd>size of @names</dd>
          <dt>flags</dt>
          <dd>bitwise-OR of supported <a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotListFlags">virDomainSnapshotListFlags</a></dd>
          <dt>Returns</dt>
          <dd>the number of domain snapshots found or -1 in case of error. Note that this command is inherently racy: another connection can define a new snapshot between a call to <a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotNumChildren">virDomainSnapshotNumChildren</a>() and this call. You are only guaranteed that all currently defined snapshots were listed if the return is less than @nameslen. Likewise, you should be prepared for <a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotLookupByName">virDomainSnapshotLookupByName</a>() to fail when converting a name from this call into a snapshot object, if another connection deletes the snapshot in the meantime. For more control over the results, see <a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotListAllChildren">virDomainSnapshotListAllChildren</a>(). Returns the number of domain snapshots found or -1 in case of error. The caller is responsible to call free() for each member of the array.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virDomainSnapshotListNames">
            <code>virDomainSnapshotListNames</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virDomainSnapshotListNames	(<span class="type"><a href="libvirt-libvirt-domain.html#virDomainPtr">virDomainPtr</a></span> domain,
					 <span class="type">char **</span> names,
					 <span class="type">int</span> nameslen,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Collect the list of domain snapshots for the given domain, and store their names in @names. The value to use for @nameslen can be determined by <a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotNum">virDomainSnapshotNum</a>() with the same @flags.</p>
          <p>By default, this command covers all snapshots; it is also possible to limit things to just snapshots with no parents, when @flags includes <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_ROOTS">VIR_DOMAIN_SNAPSHOT_LIST_ROOTS</a>. Additional filters are provided in groups, where each group contains bits that describe mutually exclusive attributes of a snapshot, and where all bits within a group describe all possible snapshots. Some hypervisors might reject explicit bits from a group where the hypervisor cannot make a distinction. For a group supported by a given hypervisor, the behavior when no bits of a group are set is identical to the behavior when all bits in that group are set. When setting bits from more than one group, it is possible to select an impossible combination, in that case a hypervisor may return either 0 or an error.</p>
          <p>The first group of @flags is <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_LEAVES">VIR_DOMAIN_SNAPSHOT_LIST_LEAVES</a> and <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_NO_LEAVES">VIR_DOMAIN_SNAPSHOT_LIST_NO_LEAVES</a>, to filter based on snapshots that have no further children (a leaf snapshot).</p>
          <p>The next group of @flags is <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_METADATA">VIR_DOMAIN_SNAPSHOT_LIST_METADATA</a> and <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA">VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA</a>, for filtering snapshots based on whether they have metadata that would prevent the removal of the last reference to a domain.</p>
          <p>The next group of @flags is <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_INACTIVE">VIR_DOMAIN_SNAPSHOT_LIST_INACTIVE</a>, <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_ACTIVE">VIR_DOMAIN_SNAPSHOT_LIST_ACTIVE</a>, and <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_DISK_ONLY">VIR_DOMAIN_SNAPSHOT_LIST_DISK_ONLY</a>, for filtering snapshots based on what domain state is tracked by the snapshot.</p>
          <p>The next group of @flags is <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_INTERNAL">VIR_DOMAIN_SNAPSHOT_LIST_INTERNAL</a> and <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_EXTERNAL">VIR_DOMAIN_SNAPSHOT_LIST_EXTERNAL</a>, for filtering snapshots based on whether the snapshot is stored inside the disk images or as additional files.</p>
          <p>Note that this command is inherently racy: another connection can define a new snapshot between a call to <a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotNum">virDomainSnapshotNum</a>() and this call. You are only guaranteed that all currently defined snapshots were listed if the return is less than @nameslen. Likewise, you should be prepared for <a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotLookupByName">virDomainSnapshotLookupByName</a>() to fail when converting a name from this call into a snapshot object, if another connection deletes the snapshot in the meantime. For more control over the results, see <a href="libvirt-libvirt-domain-snapshot.html#virDomainListAllSnapshots">virDomainListAllSnapshots</a>().</p>
        </div>
        <dl class="variablelist">
          <dt>domain</dt>
          <dd>a domain object</dd>
          <dt>names</dt>
          <dd>array to collect the list of names of snapshots</dd>
          <dt>nameslen</dt>
          <dd>size of @names</dd>
          <dt>flags</dt>
          <dd>bitwise-OR of supported <a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotListFlags">virDomainSnapshotListFlags</a></dd>
          <dt>Returns</dt>
          <dd>the number of domain snapshots found or -1 in case of error. The caller is responsible to call free() for each member of the array.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virDomainSnapshotLookupByName">
            <code>virDomainSnapshotLookupByName</code>
          </a>
        </h3>
        <pre class="api"><span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span>	virDomainSnapshotLookupByName	(<span class="type"><a href="libvirt-libvirt-domain.html#virDomainPtr">virDomainPtr</a></span> domain,
							 <span class="type">const char *</span> name,
							 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Try to lookup a domain snapshot based on its name.</p>
        </div>
        <dl class="variablelist">
          <dt>domain</dt>
          <dd>a domain object</dd>
          <dt>name</dt>
          <dd>name for the domain snapshot</dd>
          <dt>flags</dt>
          <dd>extra flags; not used yet, so callers should always pass 0</dd>
          <dt>Returns</dt>
          <dd>a domain snapshot object or NULL in case of failure. If the domain snapshot cannot be found, then the <a href="libvirt-virterror.html#VIR_ERR_NO_DOMAIN_SNAPSHOT">VIR_ERR_NO_DOMAIN_SNAPSHOT</a> error is raised.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virDomainSnapshotNum">
            <code>virDomainSnapshotNum</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virDomainSnapshotNum		(<span class="type"><a href="libvirt-libvirt-domain.html#virDomainPtr">virDomainPtr</a></span> domain,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Provides the number of domain snapshots for this domain.</p>
          <p>By default, this command covers all snapshots; it is also possible to limit things to just snapshots with no parents, when @flags includes <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_ROOTS">VIR_DOMAIN_SNAPSHOT_LIST_ROOTS</a>. Additional filters are provided in groups, where each group contains bits that describe mutually exclusive attributes of a snapshot, and where all bits within a group describe all possible snapshots. Some hypervisors might reject explicit bits from a group where the hypervisor cannot make a distinction. For a group supported by a given hypervisor, the behavior when no bits of a group are set is identical to the behavior when all bits in that group are set. When setting bits from more than one group, it is possible to select an impossible combination, in that case a hypervisor may return either 0 or an error.</p>
          <p>The first group of @flags is <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_LEAVES">VIR_DOMAIN_SNAPSHOT_LIST_LEAVES</a> and <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_NO_LEAVES">VIR_DOMAIN_SNAPSHOT_LIST_NO_LEAVES</a>, to filter based on snapshots that have no further children (a leaf snapshot).</p>
          <p>The next group of @flags is <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_METADATA">VIR_DOMAIN_SNAPSHOT_LIST_METADATA</a> and <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA">VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA</a>, for filtering snapshots based on whether they have metadata that would prevent the removal of the last reference to a domain.</p>
          <p>The next group of @flags is <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_INACTIVE">VIR_DOMAIN_SNAPSHOT_LIST_INACTIVE</a>, <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_ACTIVE">VIR_DOMAIN_SNAPSHOT_LIST_ACTIVE</a>, and <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_DISK_ONLY">VIR_DOMAIN_SNAPSHOT_LIST_DISK_ONLY</a>, for filtering snapshots based on what domain state is tracked by the snapshot.</p>
          <p>The next group of @flags is <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_INTERNAL">VIR_DOMAIN_SNAPSHOT_LIST_INTERNAL</a> and <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_EXTERNAL">VIR_DOMAIN_SNAPSHOT_LIST_EXTERNAL</a>, for filtering snapshots based on whether the snapshot is stored inside the disk images or as additional files.</p>
        </div>
        <dl class="variablelist">
          <dt>domain</dt>
          <dd>a domain object</dd>
          <dt>flags</dt>
          <dd>bitwise-OR of supported <a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotListFlags">virDomainSnapshotListFlags</a></dd>
          <dt>Returns</dt>
          <dd>the number of domain snapshots found or -1 in case of error.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virDomainSnapshotNumChildren">
            <code>virDomainSnapshotNumChildren</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virDomainSnapshotNumChildren	(<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span> snapshot,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Provides the number of child snapshots for this domain snapshot.</p>
          <p>By default, this command covers only direct children; it is also possible to expand things to cover all descendants, when @flags includes <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS">VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS</a>. Also, some filters are provided in groups, where each group contains bits that describe mutually exclusive attributes of a snapshot, and where all bits within a group describe all possible snapshots. Some hypervisors might reject explicit bits from a group where the hypervisor cannot make a distinction. For a group supported by a given hypervisor, the behavior when no bits of a group are set is identical to the behavior when all bits in that group are set. When setting bits from more than one group, it is possible to select an impossible combination, in that case a hypervisor may return either 0 or an error.</p>
          <p>The first group of @flags is <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_LEAVES">VIR_DOMAIN_SNAPSHOT_LIST_LEAVES</a> and <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_NO_LEAVES">VIR_DOMAIN_SNAPSHOT_LIST_NO_LEAVES</a>, to filter based on snapshots that have no further children (a leaf snapshot).</p>
          <p>The next group of @flags is <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_METADATA">VIR_DOMAIN_SNAPSHOT_LIST_METADATA</a> and <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA">VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA</a>, for filtering snapshots based on whether they have metadata that would prevent the removal of the last reference to a domain.</p>
          <p>The next group of @flags is <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_INACTIVE">VIR_DOMAIN_SNAPSHOT_LIST_INACTIVE</a>, <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_ACTIVE">VIR_DOMAIN_SNAPSHOT_LIST_ACTIVE</a>, and <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_DISK_ONLY">VIR_DOMAIN_SNAPSHOT_LIST_DISK_ONLY</a>, for filtering snapshots based on what domain state is tracked by the snapshot.</p>
          <p>The next group of @flags is <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_INTERNAL">VIR_DOMAIN_SNAPSHOT_LIST_INTERNAL</a> and <a href="libvirt-libvirt-domain-snapshot.html#VIR_DOMAIN_SNAPSHOT_LIST_EXTERNAL">VIR_DOMAIN_SNAPSHOT_LIST_EXTERNAL</a>, for filtering snapshots based on whether the snapshot is stored inside the disk images or as additional files.</p>
        </div>
        <dl class="variablelist">
          <dt>snapshot</dt>
          <dd>a domain snapshot object</dd>
          <dt>flags</dt>
          <dd>bitwise-OR of supported <a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotListFlags">virDomainSnapshotListFlags</a></dd>
          <dt>Returns</dt>
          <dd>the number of domain snapshots found or -1 in case of error.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virDomainSnapshotRef">
            <code>virDomainSnapshotRef</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virDomainSnapshotRef		(<span class="type"><a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotPtr">virDomainSnapshotPtr</a></span> snapshot)</pre>
        <div class="description">
          <p>Increment the reference count on the snapshot. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt-domain-snapshot.html#virDomainSnapshotFree">virDomainSnapshotFree</a> to release the reference count, once the caller no longer needs the reference to this object.</p>
          <p>This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection and domain remain open until all threads have finished using the snapshot. ie, each new thread using a snapshot would increment the reference count.</p>
        </div>
        <dl class="variablelist">
          <dt>snapshot</dt>
          <dd>the snapshot to hold a reference on</dd>
          <dt>Returns</dt>
          <dd>0 in case of success and -1 in case of failure.</dd>
        </dl>
        <div class="acl"/>
      </div>
    </div>
    <div id="nav">
      <div id="home">
        <a href="../index.html">Home</a>
      </div>
      <div id="jumplinks">
        <ul>
          <li>
            <a href="../downloads.html">Download</a>
          </li>
          <li>
            <a href="../contribute.html">Contribute</a>
          </li>
          <li>
            <a href="../docs.html">Docs</a>
          </li>
        </ul>
      </div>
      <div id="search">
        <form action="../search.php" enctype="application/x-www-form-urlencoded" method="get">
          <div>
            <input name="query" type="text" size="12" value=""/>
            <input name="submit" type="submit" value="Go"/>
          </div>
        </form>
      </div>
    </div>
    <div id="footer">
      <div id="contact">
        <h3>Contact</h3>
        <ul>
          <li>
            <a href="../contact.html#email">email</a>
          </li>
          <li>
            <a href="../contact.html#irc">irc</a>
          </li>
        </ul>
      </div>
      <div id="community">
        <h3>Community</h3>
        <ul>
          <li>
            <a href="https://twitter.com/hashtag/libvirt">twitter</a>
          </li>
          <li>
            <a href="https://plus.google.com/communities/109522598353007505282">google+</a>
          </li>
          <li>
            <a href="http://stackoverflow.com/questions/tagged/libvirt">stackoverflow</a>
          </li>
          <li>
            <a href="http://serverfault.com/questions/tagged/libvirt">serverfault</a>
          </li>
        </ul>
      </div>
      <div id="conduct">
            Participants in the libvirt project agree to abide by <a href="../governance.html#codeofconduct">the project code of conduct</a></div>
      <br class="clear"/>
    </div>
  </body>
</html>