API / thread safe libdar
Christian Neumann <[email protected]> Wed, 16 Jun 2004 20:18:44 +0200
| Newsgroups | gmane.comp.sysutils.backup.dar.libdar |
|---|---|
| Message-ID | <20040616201844.177d29dc@minerva> |
Hi.
I am currently developing a GUI backup program and I am planning to use
libdar as the backend. But I have some problems with the current API.
For example, it's hard to use a non-static class member function as an
callback. The problem has been discussed some months ago in this list
(thread "callback function context value"). I think that it would be
_really_ nice to have some sort of thread safe Backup class as Denis
Corbin proposed. Will this be implemented or are you, Denis Corbin,
already working on such an API?
And another proposal: I would like to get an error/question id
instead of a complete message. For example:
--snip--
enum eMessageID {
DISC_FULL, PERMISSION_DENIED [...] }
class Warning {
public:
eMessageID mID;
std::slist<std::string> mArgs;
}
--
libdar:
Warning w;
w.mID = PERMISSION_DENIED;
w.mArgs.push_back("/file/that/dar/couldnt/access");
w.mArgs.push_back("/another/file/that/dar/couldnt/access");
call_warning_callback(w);
--
frontend:
void warning_callback(Warning& w)
{
switch(w.mID) {
case(PERMISSION_DENIED) :
[report to user in his own language, tell him what he can do...]
[...]
--snip--
That would be very convenient!
Regards,
Christian
-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND