HTTrack Website Copier
Free software offline browser - FORUM
Subject: Re: backward compatibility with 4.31
Author: Xavier Roche
Date: 07/25/2006 20:02
 
> Howerver, it seems that this new version does not
> have backward compatibility and interfaces are
> changed.

Yes. To summarize, most parameters that were statically defined (in global
variables) are now stored in the htsopt* structure (created by
hts_create_opt())

For example ;

#include "httrack-library.h"
#include "htsopt.h"
#include "htsdefines.h"

httrackp *opt = hts_create_opt();
CHAIN_FUNCTION(opt, init, my_init, /*user-defined arg*/NULL);
..

Will create a new httrack context, and then chain the "init" callback, using
the my_init function.

The advantage is that you get type some strict checking, because
CHAIN_FUNCTION() is only a macro-definition.

> httrackp *opt is added in some of the apis.

In most public ones (httrack-library.h)

> Also hts_uninitialize is removed from the library.

static void __cdecl my_uninit_function(t_hts_callbackarg *carg) {
fprintf(stderr, "bye!\n");
}
CHAIN_FUNCTION(opt, uninit, my_uninit_function, NULL);

Please refer to the new "HTTrack Programming page - plugging functions" page:
<http://www.httrack.com/html/plug.html>

Don't hesitate to ask for additional informatio on this forum.

 
Reply Create subthread


All articles

Subject Author Date
backward compatibility with 4.31

07/25/2006 12:51
Re: backward compatibility with 4.31

07/25/2006 20:02




f

Created with FORUM 2.0.11