Mercurial > hg > audiodb
view close.cpp @ 399:a65b31660804 api-inversion
Invert audioDB::dump / audiodb_dump().
No real API/ABI breakages, modulo the disappearance of
audiodb_dump_withdir() (which really should have been audiodb_dump()
itself from the start). There were of course ABI breakages in the
previous commits.
The dodgy thing in this patch is the horribleness of audiodb_dump()
itself; there must be a better way of writing it, or at least
abstracting some of the body into individual functional pieces. The
declaration block at the top tells its own story.
We also need to alter the way that audioDB::status handles the adb;
rather than having a local variable, use the C++ audioDB object instance
field and only open the database if necessary -- then everything has a
consistent view.
author | mas01cr |
---|---|
date | Thu, 27 Nov 2008 15:19:49 +0000 |
parents | 78fed0d4c108 |
children | 58b88ab69424 |
line wrap: on
line source
#include "audioDB.h" extern "C" { #include "audioDB_API.h" } void audiodb_close(adb_t *adb) { free(adb->path); free(adb->header); close(adb->fd); free(adb); }