init.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // -*- mode: cpp; mode: fold -*-
  2. // Description /*{{{*/
  3. // $Id: init.h,v 1.9.2.2 2004/01/02 18:51:00 mdz Exp $
  4. /* ######################################################################
  5. Init - Initialize the package library
  6. This function must be called to configure the config class before
  7. calling many APT library functions.
  8. ##################################################################### */
  9. /*}}}*/
  10. #ifndef PKGLIB_INIT_H
  11. #define PKGLIB_INIT_H
  12. #include <apt-pkg/configuration.h>
  13. #include <apt-pkg/pkgsystem.h>
  14. // These lines are extracted by the makefiles and the buildsystem
  15. // Increasing MAJOR or MINOR results in the need of recompiling all
  16. // reverse-dependencies of libapt-pkg against the new SONAME.
  17. // Non-ABI-Breaks should only increase RELEASE number.
  18. // See also buildlib/libversion.mak
  19. // FIXME: this needs to be changed to "4" (without quotes) on the next
  20. // ABI break
  21. #define APT_PKG_MAJOR libc6.10-6-4
  22. #define APT_PKG_MINOR 8
  23. #define APT_PKG_RELEASE 0
  24. extern const char *pkgVersion;
  25. extern const char *pkgLibVersion;
  26. bool pkgInitConfig(Configuration &Cnf);
  27. bool pkgInitSystem(Configuration &Cnf,pkgSystem *&Sys);
  28. #ifdef APT_COMPATIBILITY
  29. #if APT_COMPATIBILITY != 986
  30. #warning "Using APT_COMPATIBILITY"
  31. #endif
  32. inline bool pkgInitialize(Configuration &Cnf)
  33. {
  34. return pkgInitConfig(Cnf) && pkgInitSystem(Cnf,_system);
  35. };
  36. #endif
  37. #endif