]>
Commit | Line | Data |
---|---|---|
9c14e3d6 AL |
1 | // -*- mode: cpp; mode: fold -*- |
2 | // Description /*{{{*/ | |
7db98ffc | 3 | // $Id: init.h,v 1.9.2.2 2004/01/02 18:51:00 mdz Exp $ |
9c14e3d6 AL |
4 | /* ###################################################################### |
5 | ||
6 | Init - Initialize the package library | |
7 | ||
8 | This function must be called to configure the config class before | |
9 | calling many APT library functions. | |
10 | ||
11 | ##################################################################### */ | |
12 | /*}}}*/ | |
9c14e3d6 AL |
13 | #ifndef PKGLIB_INIT_H |
14 | #define PKGLIB_INIT_H | |
15 | ||
094a497d | 16 | #include <apt-pkg/configuration.h> |
b2e465d6 | 17 | #include <apt-pkg/pkgsystem.h> |
9c14e3d6 | 18 | |
b2e465d6 AL |
19 | // See the makefile |
20 | #define APT_PKG_MAJOR 3 | |
dfa11ecc | 21 | #define APT_PKG_MINOR 10 |
f604cf55 | 22 | #define APT_PKG_RELEASE 0 |
63b1700f | 23 | |
b2e465d6 AL |
24 | extern const char *pkgVersion; |
25 | extern const char *pkgLibVersion; | |
26 | extern const char *pkgOS; | |
27 | extern const char *pkgCPU; | |
28 | ||
29 | bool pkgInitConfig(Configuration &Cnf); | |
30 | bool pkgInitSystem(Configuration &Cnf,pkgSystem *&Sys); | |
31 | ||
32 | #ifdef APT_COMPATIBILITY | |
33 | #if APT_COMPATIBILITY != 986 | |
34 | #warning "Using APT_COMPATIBILITY" | |
35 | #endif | |
36 | ||
37 | inline bool pkgInitialize(Configuration &Cnf) | |
38 | { | |
39 | return pkgInitConfig(Cnf) && pkgInitSystem(Cnf,_system); | |
40 | }; | |
41 | #endif | |
9c14e3d6 AL |
42 | |
43 | #endif |