1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>QOF: Book</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.6-20040222 -->
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></div>
<h1>Book<br>
<small>
[<a class="el" href="group__Object.html">Object: Dynamic Object Class Framework</a>]</small>
</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
A QOF Book is a dataset. It provides a single handle through which all the various collections of entities can be found. In particular, given only the type of the entity, the collection can be found.<p>
Books also provide the 'natural' place to working with a storage backend, as a book can encapsulate everything held in storage.
<p>
<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Files</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>file </td><td class="memItemRight" valign=bottom><a class="el" href="qofbook_8h.html">qofbook.h</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Encapsulate all the information about a dataset. <br><br></td></tr>
<p>
<tr><td colspan=2><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__Book.html#ga17">QOF_BOOK_LOOKUP_ENTITY</a>(book, guid, e_type, c_type)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Encapsulates all the information about a dataset manipulated by GnuCash. This is the top-most structure used for anchoring data. <a href="#ga17"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga18" doxytag="Book::QOF_BOOK_KVP" ></a>
#define </td><td class="memItemRight" valign=bottom><b>QOF_BOOK_KVP</b> "qof-kvp"</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__Book.html#ga19">qof_book_get_guid</a>(X) qof_entity_get_guid (QOF_ENTITY(X))</td></tr>
<tr><td colspan=2><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga0" doxytag="Book::QofBook" ></a>
typedef <a class="el" href="struct__QofBook.html">_QofBook</a> </td><td class="memItemRight" valign=bottom><b>QofBook</b></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>typedef GList </td><td class="memItemRight" valign=bottom><a class="el" href="group__Book.html#ga1">QofBookList</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>typedef void(* </td><td class="memItemRight" valign=bottom><a class="el" href="group__Book.html#ga2">QofCollectionForeachCB</a> )(QofCollection *, gpointer user_data)</td></tr>
<tr><td colspan=2><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>gboolean </td><td class="memItemRight" valign=bottom><a class="el" href="group__Book.html#ga3">qof_book_register</a> (void)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="struct__QofBook.html">QofBook</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="group__Book.html#ga4">qof_book_new</a> (void)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__Book.html#ga5">qof_book_destroy</a> (<a class="el" href="struct__QofBook.html">QofBook</a> *book)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>QofCollection * </td><td class="memItemRight" valign=bottom><a class="el" href="group__Book.html#ga6">qof_book_get_collection</a> (<a class="el" href="struct__QofBook.html">QofBook</a> *, QofIdType)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga7" doxytag="Book::qof_book_foreach_collection" ></a>
void </td><td class="memItemRight" valign=bottom><b>qof_book_foreach_collection</b> (<a class="el" href="struct__QofBook.html">QofBook</a> *, <a class="el" href="group__Book.html#ga2">QofCollectionForeachCB</a>, gpointer)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="group__KVP.html#ga0">KvpFrame</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="group__Book.html#ga8">qof_book_get_slots</a> (<a class="el" href="struct__QofBook.html">QofBook</a> *book)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__Book.html#ga9">qof_book_set_data</a> (<a class="el" href="struct__QofBook.html">QofBook</a> *book, const char *key, gpointer data)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>gpointer </td><td class="memItemRight" valign=bottom><a class="el" href="group__Book.html#ga10">qof_book_get_data</a> (<a class="el" href="struct__QofBook.html">QofBook</a> *book, const char *key)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="struct__QofBackend.html">QofBackend</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="group__Book.html#ga11">qof_book_get_backend</a> (<a class="el" href="struct__QofBook.html">QofBook</a> *book)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga12" doxytag="Book::qof_book_set_backend" ></a>
void </td><td class="memItemRight" valign=bottom><b>qof_book_set_backend</b> (<a class="el" href="struct__QofBook.html">QofBook</a> *book, <a class="el" href="struct__QofBackend.html">QofBackend</a> *)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>gboolean </td><td class="memItemRight" valign=bottom><a class="el" href="group__Book.html#ga13">qof_book_not_saved</a> (<a class="el" href="struct__QofBook.html">QofBook</a> *book)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__Book.html#ga14">qof_book_kvp_changed</a> (<a class="el" href="struct__QofBook.html">QofBook</a> *book)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>gboolean </td><td class="memItemRight" valign=bottom><a class="el" href="group__Book.html#ga15">qof_book_equal</a> (<a class="el" href="struct__QofBook.html">QofBook</a> *book_1, <a class="el" href="struct__QofBook.html">QofBook</a> *book_2)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>gint64 </td><td class="memItemRight" valign=bottom><a class="el" href="group__Book.html#ga16">qof_book_get_counter</a> (<a class="el" href="struct__QofBook.html">QofBook</a> *book, const char *counter_name)</td></tr>
</table>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="ga19" doxytag="qofbook.h::qof_book_get_guid" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> #define qof_book_get_guid</td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">X </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap> qof_entity_get_guid (QOF_ENTITY(X))
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
deprecated </td>
</tr>
</table>
<a class="anchor" name="ga17" doxytag="qofbook.h::QOF_BOOK_LOOKUP_ENTITY" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> #define QOF_BOOK_LOOKUP_ENTITY</td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">book, <tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>guid, <tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>e_type, <tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>c_type </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<b>Value:</b><div class="fragment"><pre>({ \
QofEntity *val = NULL; \
<span class="keywordflow">if</span> (guid && book) { \
QofCollection *col; \
col = <a class="code" href="group__Book.html#ga14">qof_book_get_collection</a> (book, e_type); \
val = <a class="code" href="group__Entities.html#ga14">qof_collection_lookup_entity</a> (col, guid); \
} \
(c_type *) val; \
})
</pre></div>Encapsulates all the information about a dataset manipulated by GnuCash. This is the top-most structure used for anchoring data.
<p>
Lookup an entity by guid, returning pointer to the entity </td>
</tr>
</table>
<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="ga1" doxytag="qofbook.h::QofBookList" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> typedef GList <a class="el" href="group__Book.html#ga1">QofBookList</a>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
GList of QofBook </td>
</tr>
</table>
<a class="anchor" name="ga2" doxytag="qofbook.h::QofCollectionForeachCB" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> typedef void(* <a class="el" href="group__Book.html#ga2">QofCollectionForeachCB</a>)(QofCollection *, gpointer user_data)
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Invoke the indicated callback on each collection in the book. </td>
</tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="ga5" doxytag="qofbook.h::qof_book_destroy" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void qof_book_destroy </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="struct__QofBook.html">QofBook</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>book</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
End any editing sessions associated with book, and free all memory associated with it. </td>
</tr>
</table>
<a class="anchor" name="ga15" doxytag="qofbook.h::qof_book_equal" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> gboolean qof_book_equal </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="struct__QofBook.html">QofBook</a> * </td>
<td class="mdname" nowrap> <em>book_1</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="struct__QofBook.html">QofBook</a> * </td>
<td class="mdname" nowrap> <em>book_2</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
The <a class="el" href="group__Book.html#ga5">qof_book_equal()</a> method returns TRUE if books are equal. XXX this routine is broken, and does not currently compare data. </td>
</tr>
</table>
<a class="anchor" name="ga11" doxytag="qofbook.h::qof_book_get_backend" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="struct__QofBackend.html">QofBackend</a>* qof_book_get_backend </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="struct__QofBook.html">QofBook</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>book</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
DOCUMENT ME! </td>
</tr>
</table>
<a class="anchor" name="ga6" doxytag="qofbook.h::qof_book_get_collection" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> QofCollection* qof_book_get_collection </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="struct__QofBook.html">QofBook</a> * </td>
<td class="mdname" nowrap>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>QofIdType </td>
<td class="mdname" nowrap></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<dl compact><dt><b>Returns:</b></dt><dd>The table of entities of the given type. If the collection doesn't yet exist for the indicated type, it is created. Thus, this routine is gaurenteed to return a non-NULL value. (Unless the system malloc failed (out of memory) in which case what happens??). </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga16" doxytag="qofbook.h::qof_book_get_counter" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> gint64 qof_book_get_counter </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="struct__QofBook.html">QofBook</a> * </td>
<td class="mdname" nowrap> <em>book</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>const char * </td>
<td class="mdname" nowrap> <em>counter_name</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
This will 'get and increment' the named counter for this book. The return value is -1 on error or the incremented counter. </td>
</tr>
</table>
<a class="anchor" name="ga10" doxytag="qofbook.h::qof_book_get_data" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> gpointer qof_book_get_data </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="struct__QofBook.html">QofBook</a> * </td>
<td class="mdname" nowrap> <em>book</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>const char * </td>
<td class="mdname" nowrap> <em>key</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Retreives arbitrary pointers to structs stored by qof_book_set_data. </td>
</tr>
</table>
<a class="anchor" name="ga8" doxytag="qofbook.h::qof_book_get_slots" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="group__KVP.html#ga0">KvpFrame</a>* qof_book_get_slots </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="struct__QofBook.html">QofBook</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>book</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<dl compact><dt><b>Returns:</b></dt><dd>The kvp data for the book </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga14" doxytag="qofbook.h::qof_book_kvp_changed" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void qof_book_kvp_changed </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="struct__QofBook.html">QofBook</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>book</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Call this function when you change the book kvp, to make sure the book is marked 'dirty'. </td>
</tr>
</table>
<a class="anchor" name="ga4" doxytag="qofbook.h::qof_book_new" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="struct__QofBook.html">QofBook</a>* qof_book_new </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Allocate, initialise and return a new QofBook. Books contain references to all of the top-level object containers. </td>
</tr>
</table>
<a class="anchor" name="ga13" doxytag="qofbook.h::qof_book_not_saved" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> gboolean qof_book_not_saved </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="struct__QofBook.html">QofBook</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>book</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<a class="el" href="group__Book.html#ga6">qof_book_not_saved()</a> will return TRUE if any data in the book hasn't been saved to long-term storage. (Actually, that's not quite true. The book doesn't know anything about saving. Its just that whenever data is modified, the 'dirty' flag is set. This routine returns the value of the 'dirty' flag. Its up to the backend to periodically reset this flag, when it acutally does save the data.) </td>
</tr>
</table>
<a class="anchor" name="ga3" doxytag="qofbook.h::qof_book_register" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> gboolean qof_book_register </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Register books with the engine </td>
</tr>
</table>
<a class="anchor" name="ga9" doxytag="qofbook.h::qof_book_set_data" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void qof_book_set_data </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="struct__QofBook.html">QofBook</a> * </td>
<td class="mdname" nowrap> <em>book</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>const char * </td>
<td class="mdname" nowrap> <em>key</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>gpointer </td>
<td class="mdname" nowrap> <em>data</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
The <a class="el" href="group__Book.html#ga12">qof_book_set_data()</a> allows arbitrary pointers to structs to be stored in QofBook. This is the "prefered" method for extending QofBook to hold new data types.<p>
XXX FIXME: we need to add a destroy callback, so that when the book gets destroyed, the user gets notified and thus has a chance to clean up. </td>
</tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Sun May 23 15:41:48 2004 for QOF by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.6-20040222 </small></address>
</body>
</html>
|