[Dar-libdar_api] entree_stats access
For full, incremental, compressed and encrypted backups or archives
Brought to you by:
edrusb
|
From: Johnathan B. <jk...@ro...> - 2007-04-04 21:09:44
|
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
|