Re: API / thread safe libdar

Denis Corbin <[email protected]> Tue, 22 Jun 2004 22:18:24 +0200
Newsgroups gmane.comp.sysutils.backup.dar.libdar
Organization none
Message-ID <[email protected]>
Christian Neumann wrote:
> Hi.
> I just checked out the recent libdar cvs version. The user_interaction
> inheritance works for me, although I don't quite understand why one has
> to overwrite the clone() member or why it exists at all. Maybe I should
> revisit my book's chapters on this topic... 

well, that's a good and interesting question ! :-)

libdar needs to make temporary local copies of user_interaction objects. 
So libdar uses pointer to user_interaction which must be object of 
inherited class (user_interaction is a pure virtual class). A copy 
constructor will not work as it will duplicate only the use_interaction 
data not the data of any inherited class.

So, thanks to the clone() virtual method libdar am able to completely 
duplicate (clone) an given object which is only known through its parent 
class user_interaction.

If you have better way of doing so, my ears are all open ! :-)


> When are you going to release 2.1.4? As my program uses the new API, it
> won't be released before the next unstable libdar.

well, to respect the versionning of dar, the next release that will have 
this new API will be 2.2.0, 2.1.4 will only be the next version that 
only fixes bugs from 2.1.3, but does not add any feature.

When ? Well, it depends on my free time, I want to add encryption and 
multi-language support mainly, plus several other interesting features. 
Once done, there will be an API stabilization phase (where feedback from 
API user is very welcome), then pre-release (usually one month) and 
finally release.

> Another question: dar's TODO says that you will have to choose the
> language of dar at compile time. Is this correct? Won't you use gettext?

I plane to use gettext, the text you read is very old, it was before I 
was aware of gettext... I must fix that :-) I still must read 
documentation about gettext... as you see the '>' are here to help me 
remind the features I have to implement for next release, I don't say I 
will implement all but it would be nice to do so.

Releasing too often make me waste my time, in particular I must spend a 
lot of time in checking against portability issues, and building binary 
packages.

> 
> Regards,
> Christian
> 

Cheers,
Denis.



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com