init.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. // See the makefile
  15. #define APT_PKG_MAJOR 4
  16. #define APT_PKG_MINOR 9
  17. #define APT_PKG_RELEASE 0
  18. extern const char *pkgVersion;
  19. extern const char *pkgLibVersion;
  20. bool pkgInitConfig(Configuration &Cnf);
  21. bool pkgInitSystem(Configuration &Cnf,pkgSystem *&Sys);
  22. #ifdef APT_COMPATIBILITY
  23. #if APT_COMPATIBILITY != 986
  24. #warning "Using APT_COMPATIBILITY"
  25. #endif
  26. inline bool pkgInitialize(Configuration &Cnf)
  27. {
  28. return pkgInitConfig(Cnf) && pkgInitSystem(Cnf,_system);
  29. };
  30. #endif
  31. #endif