entree_stats access
Johnathan Burchill <[email protected]> Wed, 4 Apr 2007 17:09:37 -0400
| Newsgroups | gmane.comp.sysutils.backup.dar.libdar |
|---|---|
| Message-ID | <[email protected]> |
Hi Denis,
It's been a long time, but I've finally put some spare time into
adapting KDar to KDE4 and libdar-4.0.
I'd like to be able to get information about existing archives,
basically the info that is stored in the catalogue and which is
accessible by
entree_stats catalogue::get_stats () const.
Since you don't want the user to call the
const catalogue & archive::get_catalogue () const
function directly, could we have a passthrough for the entree_stats?
This patch for cvs HEAD is what I have in mind.
Index: archive.hpp
===================================================================
RCS file: /cvsroot/dar/dar/src/libdar/archive.hpp,v
retrieving revision 1.35
diff -u -r1.35 archive.hpp
--- archive.hpp 14 Jan 2007 21:16:07 -0000 1.35
+++ archive.hpp 4 Apr 2007 13:24:46 -0000
@@ -494,6 +494,9 @@
/// not part of the API but must remain a public method
for been usable by the database class
const catalogue & get_catalogue() const { if(cat == NULL)
throw SRC_BUG; return *cat; };
+ /// gives access to archive statistics. Obtained from the
archive's catalogue.
+ const entree_stats get_stats() const { if(cat == NULL) throw
SRC_BUG; return cat->get_stats(); };
+
private:
enum operation { oper_create, oper_isolate, oper_merge };
Cheers,
JB
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV