Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-updates > by-pkgid > 0a67499d76b7ed32632abafb78e24a2f > files > 143

libvirt-docs-5.5.0-1.3.mga7.armv7hl.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-secret.html.in
        Do not edit this file. Changes will be lost.
      -->
  <!--
        This page was generated at Sun Jun 30 20:35:18 UTC 2019.
      -->
  <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-secret from libvirt</title>
    <meta name="description" content="libvirt, virtualization, virtualization API"/>
    <script type="text/javascript" src="../js/main.js">
      <!--// forces non-empty element-->
    </script>
  </head>
  <body onload="pageload()">
    <div id="body">
      <div id="content">
        <h1>Module libvirt-secret from libvirt</h1>
        <p>Provides APIs for the management of secrets Copyright (C) 2006-2014, 2016 Red Hat, Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>
        <h2>Table of Contents</h2>
        <h3>
          <a href="#macros">Macros</a>
        </h3>
        <pre class="api"><span class="directive">#define</span> <a href="#VIR_SECRET_EVENT_CALLBACK">VIR_SECRET_EVENT_CALLBACK</a>
</pre>
        <h3>
          <a href="#types">Types</a>
        </h3>
        <pre class="api"><span class="keyword">typedef</span> <span class="keyword">enum</span> <a href="#virConnectListAllSecretsFlags">virConnectListAllSecretsFlags</a>
<span class="keyword">typedef</span> <span class="type">struct _virSecret</span> <a href="#virSecret">virSecret</a>
<span class="keyword">typedef</span> <span class="keyword">enum</span> <a href="#virSecretEventID">virSecretEventID</a>
<span class="keyword">typedef</span> <span class="keyword">enum</span> <a href="#virSecretEventLifecycleType">virSecretEventLifecycleType</a>
<span class="keyword">typedef</span> <span class="type"><a href="libvirt-libvirt-secret.html#virSecret">virSecret</a> *</span> <a name="virSecretPtr">virSecretPtr</a>
<span class="keyword">typedef</span> <span class="keyword">enum</span> <a href="#virSecretUsageType">virSecretUsageType</a>
</pre>
        <h3>
          <a href="#functions">Functions</a>
        </h3>
        <pre class="api"><span class="type">int</span>	<a href="#virConnectListAllSecrets">virConnectListAllSecrets</a>	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a> **</span> secrets, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virConnectListSecrets">virConnectListSecrets</a>		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type">char **</span> uuids, <br/>					 <span class="type">int</span> maxuuids)
<span class="type">int</span>	<a href="#virConnectNumOfSecrets">virConnectNumOfSecrets</a>		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn)
<span class="type">int</span>	<a href="#virConnectSecretEventDeregisterAny">virConnectSecretEventDeregisterAny</a>	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>						 <span class="type">int</span> callbackID)
<span class="keyword">typedef</span> <a href="#virConnectSecretEventGenericCallback">virConnectSecretEventGenericCallback</a>
<span class="type">void</span>	<a href="#virConnectSecretEventGenericCallback">virConnectSecretEventGenericCallback</a>	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>						 <span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span> secret, <br/>						 <span class="type">void *</span> opaque)

<span class="keyword">typedef</span> <a href="#virConnectSecretEventLifecycleCallback">virConnectSecretEventLifecycleCallback</a>
<span class="type">void</span>	<a href="#virConnectSecretEventLifecycleCallback">virConnectSecretEventLifecycleCallback</a>	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>						 <span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span> secret, <br/>						 <span class="type">int</span> event, <br/>						 <span class="type">int</span> detail, <br/>						 <span class="type">void *</span> opaque)

<span class="type">int</span>	<a href="#virConnectSecretEventRegisterAny">virConnectSecretEventRegisterAny</a>	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>						 <span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span> secret, <br/>						 <span class="type">int</span> eventID, <br/>						 <span class="type"><a href="libvirt-libvirt-secret.html#virConnectSecretEventGenericCallback">virConnectSecretEventGenericCallback</a></span> cb, <br/>						 <span class="type">void *</span> opaque, <br/>						 <span class="type"><a href="libvirt-libvirt-common.html#virFreeCallback">virFreeCallback</a></span> freecb)
<span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span>	<a href="#virSecretDefineXML">virSecretDefineXML</a>	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type">const char *</span> xml, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virSecretFree">virSecretFree</a>			(<span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span> secret)
<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span>	<a href="#virSecretGetConnect">virSecretGetConnect</a>	(<span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span> secret)
<span class="type">int</span>	<a href="#virSecretGetUUID">virSecretGetUUID</a>		(<span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span> secret, <br/>					 <span class="type">unsigned char *</span> uuid)
<span class="type">int</span>	<a href="#virSecretGetUUIDString">virSecretGetUUIDString</a>		(<span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span> secret, <br/>					 <span class="type">char *</span> buf)
<span class="type">const char *</span>	<a href="#virSecretGetUsageID">virSecretGetUsageID</a>	(<span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span> secret)
<span class="type">int</span>	<a href="#virSecretGetUsageType">virSecretGetUsageType</a>		(<span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span> secret)
<span class="type">unsigned char *</span>	<a href="#virSecretGetValue">virSecretGetValue</a>	(<span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span> secret, <br/>					 <span class="type">size_t *</span> value_size, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type">char *</span>	<a href="#virSecretGetXMLDesc">virSecretGetXMLDesc</a>		(<span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span> secret, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span>	<a href="#virSecretLookupByUUID">virSecretLookupByUUID</a>	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type">const unsigned char *</span> uuid)
<span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span>	<a href="#virSecretLookupByUUIDString">virSecretLookupByUUIDString</a>	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>						 <span class="type">const char *</span> uuidstr)
<span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span>	<a href="#virSecretLookupByUsage">virSecretLookupByUsage</a>	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type">int</span> usageType, <br/>					 <span class="type">const char *</span> usageID)
<span class="type">int</span>	<a href="#virSecretRef">virSecretRef</a>			(<span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span> secret)
<span class="type">int</span>	<a href="#virSecretSetValue">virSecretSetValue</a>		(<span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span> secret, <br/>					 <span class="type">const unsigned char *</span> value, <br/>					 <span class="type">size_t</span> value_size, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virSecretUndefine">virSecretUndefine</a>		(<span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span> secret)
</pre>
        <h2>Description</h2>
        <h3>
          <a name="macros">Macros</a>
        </h3>
        <h3>
          <a name="VIR_SECRET_EVENT_CALLBACK">
            <code>VIR_SECRET_EVENT_CALLBACK</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_SECRET_EVENT_CALLBACK</pre>
        <div class="description">
          <p>Used to cast the event specific callback into the generic one for use for <a href="libvirt-libvirt-secret.html#virConnectSecretEventRegisterAny">virConnectSecretEventRegisterAny</a>()</p>
        </div>
        <h3>
          <a name="types">Types</a>
        </h3>
        <h3>
          <a name="virConnectListAllSecretsFlags">
            <code>virConnectListAllSecretsFlags</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">enum</span> virConnectListAllSecretsFlags {
</pre>
          <table>
            <tr>
              <td>
                <a name="VIR_CONNECT_LIST_SECRETS_EPHEMERAL">VIR_CONNECT_LIST_SECRETS_EPHEMERAL</a>
              </td>
              <td> = </td>
              <td class="enumvalue">1 (0x1; 1 &lt;&lt; 0)</td>
              <td>
                <div class="comment">kept in memory, never stored persistently</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CONNECT_LIST_SECRETS_NO_EPHEMERAL">VIR_CONNECT_LIST_SECRETS_NO_EPHEMERAL</a>
              </td>
              <td> = </td>
              <td colspan="2" class="enumvalue">2 (0x2; 1 &lt;&lt; 1)</td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CONNECT_LIST_SECRETS_PRIVATE">VIR_CONNECT_LIST_SECRETS_PRIVATE</a>
              </td>
              <td> = </td>
              <td class="enumvalue">4 (0x4; 1 &lt;&lt; 2)</td>
              <td>
                <div class="comment">not revealed to any caller of libvirt, nor to any other node</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CONNECT_LIST_SECRETS_NO_PRIVATE">VIR_CONNECT_LIST_SECRETS_NO_PRIVATE</a>
              </td>
              <td> = </td>
              <td colspan="2" class="enumvalue">8 (0x8; 1 &lt;&lt; 3)</td>
            </tr>
          </table>
          <pre>}
</pre>
        </div>
        <h3>
          <a name="virSecret">
            <code>virSecret</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">struct </span>virSecret {
</pre>
          <div class="undisclosed">The content of this structure is not made public by the API</div>
          <pre>
}
</pre>
        </div>
        <h3>
          <a name="virSecretEventID">
            <code>virSecretEventID</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">enum</span> virSecretEventID {
</pre>
          <table>
            <tr>
              <td>
                <a name="VIR_SECRET_EVENT_ID_LIFECYCLE">VIR_SECRET_EVENT_ID_LIFECYCLE</a>
              </td>
              <td> = </td>
              <td class="enumvalue">0 (0x0)</td>
              <td>
                <div class="comment">
                  <a href="libvirt-libvirt-secret.html#virConnectSecretEventLifecycleCallback">virConnectSecretEventLifecycleCallback</a>
                </div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_SECRET_EVENT_ID_VALUE_CHANGED">VIR_SECRET_EVENT_ID_VALUE_CHANGED</a>
              </td>
              <td> = </td>
              <td class="enumvalue">1 (0x1)</td>
              <td>
                <div class="comment">
                  <a href="libvirt-libvirt-secret.html#virConnectSecretEventGenericCallback">virConnectSecretEventGenericCallback</a>
                </div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_SECRET_EVENT_ID_LAST">VIR_SECRET_EVENT_ID_LAST</a>
              </td>
              <td> = </td>
              <td class="enumvalue">2 (0x2)</td>
              <td>
                <div class="comment">NB: this enum value will increase over time as new events are added to the libvirt API. It reflects the last event ID supported by this version of the libvirt API.</div>
              </td>
            </tr>
          </table>
          <pre>}
</pre>
        </div>
        <h3>
          <a name="virSecretEventLifecycleType">
            <code>virSecretEventLifecycleType</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">enum</span> virSecretEventLifecycleType {
</pre>
          <table>
            <tr>
              <td>
                <a name="VIR_SECRET_EVENT_DEFINED">VIR_SECRET_EVENT_DEFINED</a>
              </td>
              <td> = </td>
              <td colspan="2" class="enumvalue">0 (0x0)</td>
            </tr>
            <tr>
              <td>
                <a name="VIR_SECRET_EVENT_UNDEFINED">VIR_SECRET_EVENT_UNDEFINED</a>
              </td>
              <td> = </td>
              <td colspan="2" class="enumvalue">1 (0x1)</td>
            </tr>
            <tr>
              <td>
                <a name="VIR_SECRET_EVENT_LAST">VIR_SECRET_EVENT_LAST</a>
              </td>
              <td> = </td>
              <td colspan="2" class="enumvalue">2 (0x2)</td>
            </tr>
          </table>
          <pre>}
</pre>
        </div>
        <h3>
          <a name="virSecretUsageType">
            <code>virSecretUsageType</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">enum</span> virSecretUsageType {
</pre>
          <table>
            <tr>
              <td>
                <a name="VIR_SECRET_USAGE_TYPE_NONE">VIR_SECRET_USAGE_TYPE_NONE</a>
              </td>
              <td> = </td>
              <td colspan="2" class="enumvalue">0 (0x0)</td>
            </tr>
            <tr>
              <td>
                <a name="VIR_SECRET_USAGE_TYPE_VOLUME">VIR_SECRET_USAGE_TYPE_VOLUME</a>
              </td>
              <td> = </td>
              <td colspan="2" class="enumvalue">1 (0x1)</td>
            </tr>
            <tr>
              <td>
                <a name="VIR_SECRET_USAGE_TYPE_CEPH">VIR_SECRET_USAGE_TYPE_CEPH</a>
              </td>
              <td> = </td>
              <td colspan="2" class="enumvalue">2 (0x2)</td>
            </tr>
            <tr>
              <td>
                <a name="VIR_SECRET_USAGE_TYPE_ISCSI">VIR_SECRET_USAGE_TYPE_ISCSI</a>
              </td>
              <td> = </td>
              <td colspan="2" class="enumvalue">3 (0x3)</td>
            </tr>
            <tr>
              <td>
                <a name="VIR_SECRET_USAGE_TYPE_TLS">VIR_SECRET_USAGE_TYPE_TLS</a>
              </td>
              <td> = </td>
              <td colspan="2" class="enumvalue">4 (0x4)</td>
            </tr>
            <tr>
              <td>
                <a name="VIR_SECRET_USAGE_TYPE_LAST">VIR_SECRET_USAGE_TYPE_LAST</a>
              </td>
              <td> = </td>
              <td class="enumvalue">5 (0x5)</td>
              <td>
                <div class="comment">NB: this enum value will increase over time as new events are added to the libvirt API. It reflects the last secret owner ID supported by this version of the libvirt API.</div>
              </td>
            </tr>
          </table>
          <pre>}
</pre>
        </div>
        <h3>
          <a name="functions">Functions</a>
        </h3>
        <h3>
          <a name="virConnectListAllSecrets">
            <code>virConnectListAllSecrets</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virConnectListAllSecrets	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a> **</span> secrets,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Collect the list of secrets, and allocate an array to store those objects.</p>
          <p>Normally, all secrets are returned; however, @flags can be used to filter the results for a smaller list of targeted secrets. The valid flags are divided into groups, where each group contains bits that describe mutually exclusive attributes of a secret, and where all bits within a group describe all possible secrets.</p>
          <p>The first group of @flags is used to filter secrets by its storage location. Flag <a href="libvirt-libvirt-secret.html#VIR_CONNECT_LIST_SECRETS_EPHEMERAL">VIR_CONNECT_LIST_SECRETS_EPHEMERAL</a> selects secrets that are kept only in memory. Flag <a href="libvirt-libvirt-secret.html#VIR_CONNECT_LIST_SECRETS_NO_EPHEMERAL">VIR_CONNECT_LIST_SECRETS_NO_EPHEMERAL</a> selects secrets that are kept in persistent storage.</p>
          <p>The second group of @flags is used to filter secrets by privacy. Flag <a href="libvirt-libvirt-secret.html#VIR_CONNECT_LIST_SECRETS_PRIVATE">VIR_CONNECT_LIST_SECRETS_PRIVATE</a> selects secrets that are never revealed to any caller of libvirt nor to any other node. Flag <a href="libvirt-libvirt-secret.html#VIR_CONNECT_LIST_SECRETS_NO_PRIVATE">VIR_CONNECT_LIST_SECRETS_NO_PRIVATE</a> selects non-private secrets.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>Pointer to the hypervisor connection.</dd>
          <dt>secrets</dt>
          <dd>Pointer to a variable to store the array containing the secret objects or NULL if the list is not required (just returns the number of secrets).</dd>
          <dt>flags</dt>
          <dd>bitwise-OR of <a href="libvirt-libvirt-secret.html#virConnectListAllSecretsFlags">virConnectListAllSecretsFlags</a>.</dd>
          <dt>Returns</dt>
          <dd>the number of secrets found or -1 and sets @secrets to NULL in case of error. On success, the array stored into @secrets 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-secret.html#virSecretFree">virSecretFree</a>() on each array element, then calling free() on @secrets.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virConnectListSecrets">
            <code>virConnectListSecrets</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virConnectListSecrets		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type">char **</span> uuids,
					 <span class="type">int</span> maxuuids)</pre>
        <div class="description">
          <p>List UUIDs of defined secrets, store pointers to names in uuids.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd><a href="libvirt-libvirt-host.html#virConnect">virConnect</a> connection</dd>
          <dt>uuids</dt>
          <dd>Pointer to an array to store the UUIDs</dd>
          <dt>maxuuids</dt>
          <dd>size of the array.</dd>
          <dt>Returns</dt>
          <dd>the number of UUIDs provided in the array, or -1 on failure.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virConnectNumOfSecrets">
            <code>virConnectNumOfSecrets</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virConnectNumOfSecrets		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn)</pre>
        <div class="description">
          <p>Fetch number of currently defined secrets.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd><a href="libvirt-libvirt-host.html#virConnect">virConnect</a> connection</dd>
          <dt>Returns</dt>
          <dd>the number currently defined secrets.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virConnectSecretEventDeregisterAny">
            <code>virConnectSecretEventDeregisterAny</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virConnectSecretEventDeregisterAny	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
						 <span class="type">int</span> callbackID)</pre>
        <div class="description">
          <p>Removes an event callback. The callbackID parameter should be the value obtained from a previous <a href="libvirt-libvirt-secret.html#virConnectSecretEventRegisterAny">virConnectSecretEventRegisterAny</a>() method.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the connection</dd>
          <dt>callbackID</dt>
          <dd>the callback identifier</dd>
          <dt>Returns</dt>
          <dd>0 on success, -1 on failure.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virConnectSecretEventGenericCallback">
            <code>virConnectSecretEventGenericCallback</code>
          </a>
        </h3>
        <pre class="api"><span class="keyword">typedef</span> <span class="type">void</span>	(*virConnectSecretEventGenericCallback)	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
						 <span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span> secret,
						 <span class="type">void *</span> opaque)
</pre>
        <div class="description">
          <p>A generic secret event callback handler, for use with <a href="libvirt-libvirt-secret.html#virConnectSecretEventRegisterAny">virConnectSecretEventRegisterAny</a>(). Specific events usually have a customization with extra parameters, often with @opaque being passed in a different parameter position; use <a href="libvirt-libvirt-secret.html#VIR_SECRET_EVENT_CALLBACK">VIR_SECRET_EVENT_CALLBACK</a>() when registering an appropriate handler.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>the connection pointer</dd>
          <dt>secret</dt>
          <dd>the secret pointer</dd>
          <dt>opaque</dt>
          <dd>application specified data</dd>
        </dl>
        <br/>
        <h3>
          <a name="virConnectSecretEventLifecycleCallback">
            <code>virConnectSecretEventLifecycleCallback</code>
          </a>
        </h3>
        <pre class="api"><span class="keyword">typedef</span> <span class="type">void</span>	(*virConnectSecretEventLifecycleCallback)	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
						 <span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span> secret,
						 <span class="type">int</span> event,
						 <span class="type">int</span> detail,
						 <span class="type">void *</span> opaque)
</pre>
        <div class="description">
          <p>This callback is called when a secret lifecycle action is performed, like added or removed.</p>
          <p>The callback signature to use when registering for an event of type <a href="libvirt-libvirt-secret.html#VIR_SECRET_EVENT_ID_LIFECYCLE">VIR_SECRET_EVENT_ID_LIFECYCLE</a> with <a href="libvirt-libvirt-secret.html#virConnectSecretEventRegisterAny">virConnectSecretEventRegisterAny</a>()</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>connection object</dd>
          <dt>secret</dt>
          <dd>secret on which the event occurred</dd>
          <dt>event</dt>
          <dd>The specific virSecretEventLifeCycleType which occurred</dd>
          <dt>detail</dt>
          <dd>contains some details on the reason of the event.</dd>
          <dt>opaque</dt>
          <dd>application specified data</dd>
        </dl>
        <br/>
        <h3>
          <a name="virConnectSecretEventRegisterAny">
            <code>virConnectSecretEventRegisterAny</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virConnectSecretEventRegisterAny	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
						 <span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span> secret,
						 <span class="type">int</span> eventID,
						 <span class="type"><a href="libvirt-libvirt-secret.html#virConnectSecretEventGenericCallback">virConnectSecretEventGenericCallback</a></span> cb,
						 <span class="type">void *</span> opaque,
						 <span class="type"><a href="libvirt-libvirt-common.html#virFreeCallback">virFreeCallback</a></span> freecb)</pre>
        <div class="description">
          <p>Adds a callback to receive notifications of arbitrary secret events occurring on a secret. This function requires that an event loop has been previously registered with <a href="libvirt-libvirt-event.html#virEventRegisterImpl">virEventRegisterImpl</a>() or <a href="libvirt-libvirt-event.html#virEventRegisterDefaultImpl">virEventRegisterDefaultImpl</a>().</p>
          <p>If @secret is NULL, then events will be monitored for any secret. If @secret is non-NULL, then only the specific secret will be monitored.</p>
          <p>Most types of events have a callback providing a custom set of parameters for the event. When registering an event, it is thus necessary to use the <a href="libvirt-libvirt-secret.html#VIR_SECRET_EVENT_CALLBACK">VIR_SECRET_EVENT_CALLBACK</a>() macro to cast the supplied function pointer to match the signature of this method.</p>
          <p>The <a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a> object handle passed into the callback upon delivery of an event is only valid for the duration of execution of the callback. If the callback wishes to keep the secret object after the callback returns, it shall take a reference to it, by calling <a href="libvirt-libvirt-secret.html#virSecretRef">virSecretRef</a>(). The reference can be released once the object is no longer required by calling <a href="libvirt-libvirt-secret.html#virSecretFree">virSecretFree</a>().</p>
          <p>The return value from this method is a positive integer identifier for the callback. To unregister a callback, this callback ID should be passed to the <a href="libvirt-libvirt-secret.html#virConnectSecretEventDeregisterAny">virConnectSecretEventDeregisterAny</a>() method.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the connection</dd>
          <dt>secret</dt>
          <dd>pointer to the secret</dd>
          <dt>eventID</dt>
          <dd>the event type to receive</dd>
          <dt>cb</dt>
          <dd>callback to the function handling secret events</dd>
          <dt>opaque</dt>
          <dd>opaque data to pass on to the callback</dd>
          <dt>freecb</dt>
          <dd>optional function to deallocate opaque when not used anymore</dd>
          <dt>Returns</dt>
          <dd>a callback identifier on success, -1 on failure.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virSecretDefineXML">
            <code>virSecretDefineXML</code>
          </a>
        </h3>
        <pre class="api"><span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span>	virSecretDefineXML	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type">const char *</span> xml,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>If XML specifies a UUID, locates the specified secret and replaces all attributes of the secret specified by UUID by attributes specified in xml (any attributes not specified in xml are discarded).</p>
          <p>Otherwise, creates a new secret with an automatically chosen UUID, and initializes its attributes from xml.</p>
          <p><a href="libvirt-libvirt-secret.html#virSecretFree">virSecretFree</a> should be used to free the resources after the secret object is no longer needed.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd><a href="libvirt-libvirt-host.html#virConnect">virConnect</a> connection</dd>
          <dt>xml</dt>
          <dd>XML describing the secret.</dd>
          <dt>flags</dt>
          <dd>extra flags; not used yet, so callers should always pass 0</dd>
          <dt>Returns</dt>
          <dd>a secret on success, NULL on failure.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virSecretFree">
            <code>virSecretFree</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virSecretFree			(<span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span> secret)</pre>
        <div class="description">
          <p>Release the secret handle. The underlying secret continues to exist.</p>
        </div>
        <dl class="variablelist">
          <dt>secret</dt>
          <dd>pointer to a secret</dd>
          <dt>Returns</dt>
          <dd>0 on success, or -1 on error</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virSecretGetConnect">
            <code>virSecretGetConnect</code>
          </a>
        </h3>
        <pre class="api"><span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span>	virSecretGetConnect	(<span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span> secret)</pre>
        <div class="description">
          <p>Provides the connection pointer associated with a secret. The reference counter on the connection is not increased by this call.</p>
        </div>
        <dl class="variablelist">
          <dt>secret</dt>
          <dd>A <a href="libvirt-libvirt-secret.html#virSecret">virSecret</a> secret</dd>
          <dt>Returns</dt>
          <dd>the <a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a> or NULL in case of failure.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virSecretGetUUID">
            <code>virSecretGetUUID</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virSecretGetUUID		(<span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span> secret,
					 <span class="type">unsigned char *</span> uuid)</pre>
        <div class="description">
          <p>Fetches the UUID of the secret.</p>
        </div>
        <dl class="variablelist">
          <dt>secret</dt>
          <dd>A <a href="libvirt-libvirt-secret.html#virSecret">virSecret</a> secret</dd>
          <dt>uuid</dt>
          <dd>buffer of <a href="libvirt-libvirt-host.html#VIR_UUID_BUFLEN">VIR_UUID_BUFLEN</a> bytes in size</dd>
          <dt>Returns</dt>
          <dd>0 on success with the uuid buffer being filled, or -1 upon failure.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virSecretGetUUIDString">
            <code>virSecretGetUUIDString</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virSecretGetUUIDString		(<span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span> secret,
					 <span class="type">char *</span> buf)</pre>
        <div class="description">
          <p>Get the UUID for a secret as string. For more information about UUID see RFC4122.</p>
        </div>
        <dl class="variablelist">
          <dt>secret</dt>
          <dd>a secret object</dd>
          <dt>buf</dt>
          <dd>pointer to a <a href="libvirt-libvirt-host.html#VIR_UUID_STRING_BUFLEN">VIR_UUID_STRING_BUFLEN</a> bytes array</dd>
          <dt>Returns</dt>
          <dd>-1 in case of error, 0 in case of success</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virSecretGetUsageID">
            <code>virSecretGetUsageID</code>
          </a>
        </h3>
        <pre class="api"><span class="type">const char *</span>	virSecretGetUsageID	(<span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span> secret)</pre>
        <div class="description">
          <p>Get the unique identifier of the object with which this secret is to be used. The format of the identifier is dependent on the usage type of the secret. For a secret with a usage type of <a href="libvirt-libvirt-secret.html#VIR_SECRET_USAGE_TYPE_VOLUME">VIR_SECRET_USAGE_TYPE_VOLUME</a> the identifier will be a fully qualified path name. The identifiers are intended to be unique within the set of all secrets sharing the same usage type. ie, there shall only ever be one secret for each volume path.</p>
        </div>
        <dl class="variablelist">
          <dt>secret</dt>
          <dd>a secret object</dd>
          <dt>Returns</dt>
          <dd>a string identifying the object using the secret, or NULL upon error</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virSecretGetUsageType">
            <code>virSecretGetUsageType</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virSecretGetUsageType		(<span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span> secret)</pre>
        <div class="description">
          <p>Get the type of object which uses this secret. The returned value is one of the constants defined in the <a href="libvirt-libvirt-secret.html#virSecretUsageType">virSecretUsageType</a> enumeration. More values may be added to this enumeration in the future, so callers should expect to see usage types they do not explicitly know about.</p>
        </div>
        <dl class="variablelist">
          <dt>secret</dt>
          <dd>a secret object</dd>
          <dt>Returns</dt>
          <dd>a positive integer identifying the type of object, or -1 upon error.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virSecretGetValue">
            <code>virSecretGetValue</code>
          </a>
        </h3>
        <pre class="api"><span class="type">unsigned char *</span>	virSecretGetValue	(<span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span> secret,
					 <span class="type">size_t *</span> value_size,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Fetches the value of a secret.</p>
        </div>
        <dl class="variablelist">
          <dt>secret</dt>
          <dd>A <a href="libvirt-libvirt-secret.html#virSecret">virSecret</a> connection</dd>
          <dt>value_size</dt>
          <dd>Place for storing size of the secret value</dd>
          <dt>flags</dt>
          <dd>extra flags; not used yet, so callers should always pass 0</dd>
          <dt>Returns</dt>
          <dd>the secret value on success, NULL on failure. The caller must free() the secret value.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virSecretGetXMLDesc">
            <code>virSecretGetXMLDesc</code>
          </a>
        </h3>
        <pre class="api"><span class="type">char *</span>	virSecretGetXMLDesc		(<span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span> secret,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Fetches an XML document describing attributes of the secret.</p>
        </div>
        <dl class="variablelist">
          <dt>secret</dt>
          <dd>A <a href="libvirt-libvirt-secret.html#virSecret">virSecret</a> secret</dd>
          <dt>flags</dt>
          <dd>extra flags; not used yet, so callers should always pass 0</dd>
          <dt>Returns</dt>
          <dd>the XML document on success, NULL on failure. The caller must free() the XML.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virSecretLookupByUUID">
            <code>virSecretLookupByUUID</code>
          </a>
        </h3>
        <pre class="api"><span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span>	virSecretLookupByUUID	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type">const unsigned char *</span> uuid)</pre>
        <div class="description">
          <p>Try to lookup a secret on the given hypervisor based on its UUID. Uses the 16 bytes of raw data to describe the UUID</p>
          <p><a href="libvirt-libvirt-secret.html#virSecretFree">virSecretFree</a> should be used to free the resources after the secret object is no longer needed.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the hypervisor connection</dd>
          <dt>uuid</dt>
          <dd>the raw UUID for the secret</dd>
          <dt>Returns</dt>
          <dd>a new secret object or NULL in case of failure. If the secret cannot be found, then <a href="libvirt-virterror.html#VIR_ERR_NO_SECRET">VIR_ERR_NO_SECRET</a> error is raised.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virSecretLookupByUUIDString">
            <code>virSecretLookupByUUIDString</code>
          </a>
        </h3>
        <pre class="api"><span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span>	virSecretLookupByUUIDString	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
						 <span class="type">const char *</span> uuidstr)</pre>
        <div class="description">
          <p>Try to lookup a secret on the given hypervisor based on its UUID. Uses the printable string value to describe the UUID</p>
          <p><a href="libvirt-libvirt-secret.html#virSecretFree">virSecretFree</a> should be used to free the resources after the secret object is no longer needed.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the hypervisor connection</dd>
          <dt>uuidstr</dt>
          <dd>the string UUID for the secret</dd>
          <dt>Returns</dt>
          <dd>a new secret object or NULL in case of failure. If the secret cannot be found, then <a href="libvirt-virterror.html#VIR_ERR_NO_SECRET">VIR_ERR_NO_SECRET</a> error is raised.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virSecretLookupByUsage">
            <code>virSecretLookupByUsage</code>
          </a>
        </h3>
        <pre class="api"><span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span>	virSecretLookupByUsage	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type">int</span> usageType,
					 <span class="type">const char *</span> usageID)</pre>
        <div class="description">
          <p>Try to lookup a secret on the given hypervisor based on its usage The usageID is unique within the set of secrets sharing the same usageType value.</p>
          <p><a href="libvirt-libvirt-secret.html#virSecretFree">virSecretFree</a> should be used to free the resources after the secret object is no longer needed.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the hypervisor connection</dd>
          <dt>usageType</dt>
          <dd>the type of secret usage</dd>
          <dt>usageID</dt>
          <dd>identifier of the object using the secret</dd>
          <dt>Returns</dt>
          <dd>a new secret object or NULL in case of failure. If the secret cannot be found, then <a href="libvirt-virterror.html#VIR_ERR_NO_SECRET">VIR_ERR_NO_SECRET</a> error is raised.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virSecretRef">
            <code>virSecretRef</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virSecretRef			(<span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span> secret)</pre>
        <div class="description">
          <p>Increment the reference count on the secret. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt-secret.html#virSecretFree">virSecretFree</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 remain open until all threads have finished using it. ie, each new thread using a secret would increment the reference count.</p>
        </div>
        <dl class="variablelist">
          <dt>secret</dt>
          <dd>the secret to hold a reference on</dd>
          <dt>Returns</dt>
          <dd>0 in case of success, -1 in case of failure.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virSecretSetValue">
            <code>virSecretSetValue</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virSecretSetValue		(<span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span> secret,
					 <span class="type">const unsigned char *</span> value,
					 <span class="type">size_t</span> value_size,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Sets the value of a secret.</p>
        </div>
        <dl class="variablelist">
          <dt>secret</dt>
          <dd>A <a href="libvirt-libvirt-secret.html#virSecret">virSecret</a> secret</dd>
          <dt>value</dt>
          <dd>Value of the secret</dd>
          <dt>value_size</dt>
          <dd>Size of the value</dd>
          <dt>flags</dt>
          <dd>extra flags; not used yet, so callers should always pass 0</dd>
          <dt>Returns</dt>
          <dd>0 on success, -1 on failure.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virSecretUndefine">
            <code>virSecretUndefine</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virSecretUndefine		(<span class="type"><a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a></span> secret)</pre>
        <div class="description">
          <p>Deletes the specified secret. This does not free the associated <a href="libvirt-libvirt-secret.html#virSecretPtr">virSecretPtr</a> object.</p>
        </div>
        <dl class="variablelist">
          <dt>secret</dt>
          <dd>A <a href="libvirt-libvirt-secret.html#virSecret">virSecret</a> secret</dd>
          <dt>Returns</dt>
          <dd>0 on success, -1 on 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 id="simplesearch" action="https://www.google.com/search" enctype="application/x-www-form-urlencoded" method="get">
          <div>
            <input id="searchsite" name="sitesearch" type="hidden" value="libvirt.org"/>
            <input id="searchq" name="q" type="text" size="12" value=""/>
            <input name="submit" type="submit" value="Go"/>
          </div>
        </form>
        <div id="advancedsearch">
          <span>
            <input type="radio" name="what" id="whatwebsite" checked="checked" value="website"/>
            <label for="whatwebsite">Website</label>
          </span>
          <span>
            <input type="radio" name="what" id="whatwiki" value="wiki"/>
            <label for="whatwiki">Wiki</label>
          </span>
          <span>
            <input type="radio" name="what" id="whatdevs" value="devs"/>
            <label for="whatdevs">Developers list</label>
          </span>
          <span>
            <input type="radio" name="what" id="whatusers" value="users"/>
            <label for="whatusers">Users list</label>
          </span>
        </div>
      </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="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>