Debian Codegraph @

docs/api_reference/CXX/envget_backup_callbacks.html

raw symbols SCIP
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>DbEnv::get_backup_callbacks()</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 DbEnv Handle" />
11 <link rel="prev" href="envget_errpfx.html" title="DbEnv::get_errpfx()" />
12 <link rel="next" href="envget_backup_config.html" title="DbEnv::get_backup_config()" />
13 </head>
14 <body>
15 <div xmlns="" class="navheader">
16 <div class="libver">
17 <p>Library Version 11.2.5.3</p>
18 </div>
19 <table width="100%" summary="Navigation header">
20 <tr>
21 <th colspan="3" align="center">DbEnv::get_backup_callbacks()</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="envget_errpfx.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 5. 
26 The DbEnv Handle
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="envget_backup_config.html">Next</a></td>
29 </tr>
30 </table>
31 <hr />
32 </div>
33 <div class="sect1" lang="en" xml:lang="en">
34 <div class="titlepage">
35 <div>
36 <div>
37 <h2 class="title" style="clear: both"><a id="envget_backup_callbacks"></a>DbEnv::get_backup_callbacks()</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db_cxx.h&gt;
42
43 DB_ENV-&gt;get_backup_callbacks(
44 int (**open_func)(DB_ENV *, const char *dbname,
45 const char *target, void **handle),
46 int (**write_func)(DB_ENV *, u_int32_t offset_gbytes,
47 u_int32_t offset_bytes, u_int32_t size,
48 u_int8_t *buf, void *handle),
49 int (**close_func)(DB_ENV *, const char *dbname, void *handle)); </pre>
50 <p>
51 The <code class="methodname">DbEnv::get_backup_callbacks()</code> method
52 retrieves the three callback functions which can be used by the
53 <a class="xref" href="envbackup.html" title="DbEnv::backup()">DbEnv::backup()</a>
54 or
55 <a class="xref" href="envdbbackup.html" title="DbEnv::dbbackup()">DbEnv::dbbackup()</a>
56 methods to override their default behavior. These callbacks are
57 configured using the
58 <a class="xref" href="envset_backup_callbacks.html" title="DbEnv::set_backup_callbacks()">DbEnv::set_backup_callbacks()</a>
59 method.
60 </p>
61 <p>
62 The <code class="methodname">DbEnv::get_backup_callbacks()</code> method may
63 be called at any time during the life of the application.
64 </p>
65 <p>
66 The <code class="methodname">DbEnv::get_backup_callbacks()</code> <span>
67
68 <span>
69 method either returns a non-zero error value or throws an
70 exception that encapsulates a non-zero error value on
71 failure, and returns 0 on success.
72 </span>
73 </span>
74 </p>
75 <div class="sect2" lang="en" xml:lang="en">
76 <div class="titlepage">
77 <div>
78 <div>
79 <h3 class="title"><a id="idp6828344"></a>Parameters</h3>
80 </div>
81 </div>
82 </div>
83 <div class="sect3" lang="en" xml:lang="en">
84 <div class="titlepage">
85 <div>
86 <div>
87 <h4 class="title"><a id="idp6827696"></a>open_func</h4>
88 </div>
89 </div>
90 </div>
91 <p>
92 The <span class="bold"><strong>open_func</strong></span> parameter
93 is the function used when a target location is opened
94 during a backup.
95 </p>
96 </div>
97 <div class="sect3" lang="en" xml:lang="en">
98 <div class="titlepage">
99 <div>
100 <div>
101 <h4 class="title"><a id="idp6816944"></a>write_func</h4>
102 </div>
103 </div>
104 </div>
105 <p>
106 The <span class="bold"><strong>close_func</strong></span> parameter
107 is the function used to write data during a backup.
108 </p>
109 </div>
110 <div class="sect3" lang="en" xml:lang="en">
111 <div class="titlepage">
112 <div>
113 <div>
114 <h4 class="title"><a id="idp6819064"></a>close_func</h4>
115 </div>
116 </div>
117 </div>
118 <p>
119 The <span class="bold"><strong>close_func</strong></span> parameter
120 is the function used when ending a backup and closing a
121 backup target.
122 </p>
123 </div>
124 </div>
125 <div class="sect2" lang="en" xml:lang="en">
126 <div class="titlepage">
127 <div>
128 <div>
129 <h3 class="title"><a id="idp6832008"></a>Class</h3>
130 </div>
131 </div>
132 </div>
133 <p>
134 <a class="link" href="env.html" title="Chapter 5.  The DbEnv Handle">DbEnv</a>
135 </p>
136 </div>
137 <div class="sect2" lang="en" xml:lang="en">
138 <div class="titlepage">
139 <div>
140 <div>
141 <h3 class="title"><a id="idp6823520"></a>See Also</h3>
142 </div>
143 </div>
144 </div>
145 <p>
146 <a class="xref" href="env.html#envlist" title="Database Environments and Related Methods">Database Environments and Related Methods</a>,
147 <a class="xref" href="envset_backup_callbacks.html" title="DbEnv::set_backup_callbacks()">DbEnv::set_backup_callbacks()</a>,
148 <a class="xref" href="envbackup.html" title="DbEnv::backup()">DbEnv::backup()</a>, and
149 <a class="xref" href="envdbbackup.html" title="DbEnv::dbbackup()">DbEnv::dbbackup()</a>.
150 </p>
151 </div>
152 </div>
153 <div class="navfooter">
154 <hr />
155 <table width="100%" summary="Navigation footer">
156 <tr>
157 <td width="40%" align="left"><a accesskey="p" href="envget_errpfx.html">Prev</a> </td>
158 <td width="20%" align="center">
159 <a accesskey="u" href="env.html">Up</a>
160 </td>
161 <td width="40%" align="right"> <a accesskey="n" href="envget_backup_config.html">Next</a></td>
162 </tr>
163 <tr>
164 <td width="40%" align="left" valign="top">DbEnv::get_errpfx() </td>
165 <td width="20%" align="center">
166 <a accesskey="h" href="index.html">Home</a>
167 </td>
168 <td width="40%" align="right" valign="top"> DbEnv::get_backup_config()</td>
169 </tr>
170 </table>
171 </div>
172 </body>
173 </html>