• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/db-4.8.30/docs/api_reference/C/
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4  <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6    <title>DB_ENV-&gt;set_feedback()</title>
7    <link rel="stylesheet" href="apiReference.css" type="text/css" />
8    <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9    <link rel="start" href="index.html" title="Berkeley DB C API Reference" />
10    <link rel="up" href="env.html" title="Chapter��5.�� The DB_ENV Handle" />
11    <link rel="prev" href="envset_errpfx.html" title="DB_ENV-&gt;set_errpfx()" />
12    <link rel="next" href="envset_flags.html" title="DB_ENV-&gt;set_flags()" />
13  </head>
14  <body>
15    <div class="navheader">
16      <table width="100%" summary="Navigation header">
17        <tr>
18          <th colspan="3" align="center">DB_ENV-&gt;set_feedback()</th>
19        </tr>
20        <tr>
21          <td width="20%" align="left"><a accesskey="p" href="envset_errpfx.html">Prev</a>��</td>
22          <th width="60%" align="center">Chapter��5.��
23                The DB_ENV Handle
24        </th>
25          <td width="20%" align="right">��<a accesskey="n" href="envset_flags.html">Next</a></td>
26        </tr>
27      </table>
28      <hr />
29    </div>
30    <div class="sect1" lang="en" xml:lang="en">
31      <div class="titlepage">
32        <div>
33          <div>
34            <h2 class="title" style="clear: both"><a id="envset_feedback"></a>DB_ENV-&gt;set_feedback()</h2>
35          </div>
36        </div>
37      </div>
38      <pre class="programlisting">#include &lt;db.h&gt;
39
40int
41DB_ENV-&gt;set_feedback(DB_ENV *dbenv,
42    void (*db_feedback_fcn)(DB_ENV *dbenv, int opcode, int percent));  </pre>
43      <p>
44         Some operations performed by the Berkeley DB library can take
45         non-trivial amounts of time.  The <code class="methodname">DB_ENV-&gt;set_feedback()</code> method can
46         be used by applications to monitor progress within these operations. 
47         When an operation is likely to take a long time, Berkeley DB will call
48         the specified callback function with progress information.
49    </p>
50      <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
51        <h3 class="title">Note</h3>
52        <p>
53                    Berkeley DB is not re-entrant. Callback functions should not attempt to make library calls (for
54                    example, to release locks or close open handles). Re-entering Berkeley DB is not guaranteed to work
55                    correctly, and the results are undefined.
56            </p>
57      </div>
58      <p>
59         It is up to the callback function to display this information in an
60         appropriate manner.
61    </p>
62      <p>
63         The <code class="methodname">DB_ENV-&gt;set_feedback()</code> method configures operations performed
64         using the specified <a class="link" href="env.html" title="Chapter��5.�� The DB_ENV Handle">DB_ENV</a>  handle.
65    </p>
66      <p>
67         The <code class="methodname">DB_ENV-&gt;set_feedback()</code> method may be called at any time during
68         the life of the application.
69    </p>
70      <p>
71         The <code class="methodname">DB_ENV-&gt;set_feedback()</code> method returns a non-zero error value on
72         failure and 0 on success.
73    </p>
74      <div class="sect2" lang="en" xml:lang="en">
75        <div class="titlepage">
76          <div>
77            <div>
78              <h3 class="title"><a id="id1669110"></a>Parameters</h3>
79            </div>
80          </div>
81        </div>
82        <div class="sect3" lang="en" xml:lang="en">
83          <div class="titlepage">
84            <div>
85              <div>
86                <h4 class="title"><a id="id1669034"></a>db_feedback_fcn</h4>
87              </div>
88            </div>
89          </div>
90          <p>
91                          The <span class="bold"><strong>db_feedback_fcn</strong></span> parameter is the
92                          application-specified feedback function called to report Berkeley DB
93                          operation progress.  The callback function must take three parameters:
94                     </p>
95          <div class="itemizedlist">
96            <ul type="disc">
97              <li>
98                <p>
99                     <code class="literal">dbenv</code>
100            </p>
101                <p>
102                 The <span class="bold"><strong>dbenv</strong></span> parameter is a reference to
103                 the enclosing database environment.
104            </p>
105              </li>
106              <li>
107                <p>
108                <code class="literal">opcode</code>
109            </p>
110                <p>
111                 The <span class="bold"><strong>opcode</strong></span> parameter is an operation
112                 code.  The <span class="bold"><strong>opcode</strong></span> parameter may take
113                 on any of the following values:
114            </p>
115                <div class="itemizedlist">
116                  <ul type="circle">
117                    <li>
118                      <p><a id="set_feedback_DB_RECOVER"></a>
119                                 <code class="literal">DB_RECOVER</code>
120                            </p>
121                      <p>
122                                The environment is being recovered.
123                            </p>
124                    </li>
125                  </ul>
126                </div>
127              </li>
128              <li>
129                <p>
130                <code class="literal">percent</code>
131            </p>
132                <p>
133                 The <span class="bold"><strong>percent</strong></span> parameter is the percent
134                 of the operation that has been completed, specified as an integer
135                 value between 0 and 100.
136            </p>
137              </li>
138            </ul>
139          </div>
140        </div>
141      </div>
142      <div class="sect2" lang="en" xml:lang="en">
143        <div class="titlepage">
144          <div>
145            <div>
146              <h3 class="title"><a id="id1669273"></a>Class</h3>
147            </div>
148          </div>
149        </div>
150        <p>
151                <a class="link" href="env.html" title="Chapter��5.�� The DB_ENV Handle">DB_ENV</a>  
152            </p>
153      </div>
154      <div class="sect2" lang="en" xml:lang="en">
155        <div class="titlepage">
156          <div>
157            <div>
158              <h3 class="title"><a id="id1669385"></a>See Also</h3>
159            </div>
160          </div>
161        </div>
162        <p>
163                     <a class="xref" href="env.html#envlist" title="Database Environments and Related Methods">Database Environments and Related Methods</a> 
164                </p>
165      </div>
166    </div>
167    <div class="navfooter">
168      <hr />
169      <table width="100%" summary="Navigation footer">
170        <tr>
171          <td width="40%" align="left"><a accesskey="p" href="envset_errpfx.html">Prev</a>��</td>
172          <td width="20%" align="center">
173            <a accesskey="u" href="env.html">Up</a>
174          </td>
175          <td width="40%" align="right">��<a accesskey="n" href="envset_flags.html">Next</a></td>
176        </tr>
177        <tr>
178          <td width="40%" align="left" valign="top">DB_ENV-&gt;set_errpfx()��</td>
179          <td width="20%" align="center">
180            <a accesskey="h" href="index.html">Home</a>
181          </td>
182          <td width="40%" align="right" valign="top">��DB_ENV-&gt;set_flags()</td>
183        </tr>
184      </table>
185    </div>
186  </body>
187</html>
188