Thanks a lot for sending such a patch to gnucash-devel. Indeed the changes for 
gnucash are really very minor, so that the source code can and will be kept 
compatible for aqbanking3 and aqbanking4 alike.

When seeing the #ifdef for the version number, I though with aqbanking4 you 
might consider introducing a combined version number macro that should make 
such version conditions a bit easier. Something like

#define AQBANKING_VERSIONNUMBER \
  10000 * AQBANKING_VERSION_MAJOR \
  + 100 * AQBANKING_VERSION_MINOR \
  + AQBANKING_VERSION_PATCHLEVEL

which enables a condition like this

#if AQBANKING_VERSIONNUMBER >= 040000
  // code for aqbanking >= 4.0.0
#else
  // older code
#endif

which is how they have something available in boost, or like the method in qt 
which uses the same but in hex,

#define AQBANKING_VERSIONNUMBER \
  AQBANKING_VERSION_MAJOR << 32 \
  + AQBANKING_VERSION_MINOR << 16 \
  + AQBANKING_VERSION_PATCHLEVEL

which gives

#if AQBANKING_VERSIONNUMBER >= 0x040000
// ...

Right now this would of course introduce a new preprocessor macro so that 
gnucash (or another app) would have to have a condition on this defined,

#ifdef AQBANKING_VERSIONNUMBER
#  if AQBANKING_VERSIONNUMBER > 040000
// ...

What do you think?

Cheers,

Christian


Am Samstag, 4. Oktober 2008 13:26 schrieb Martin Preuss:
> Hi,
>
> the attached patch allows for GnuCash to be compiled against the upcoming
> AqBanking4.
> As you can see the impact on GnuCash is minor (we only need to add a
> argument to AB_Banking_OnlineInit() and AB_Banking_OnlineFini()).
>
> The patch can be applied against the latest SVN of branch 2.2 (r17613).
>
>
> Regards
> Martin

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Aqbanking-devel mailing list
Aqbanking-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aqbanking-devel

Reply via email to