apt @VERSION@

init.h

00001 // -*- mode: cpp; mode: fold -*-
00002 // Description                                                          /*{{{*/
00003 // $Id: init.h,v 1.9.2.2 2004/01/02 18:51:00 mdz Exp $
00004 /* ######################################################################
00005 
00006    Init - Initialize the package library
00007 
00008    This function must be called to configure the config class before
00009    calling many APT library functions.
00010    
00011    ##################################################################### */
00012                                                                         /*}}}*/
00013 #ifndef PKGLIB_INIT_H
00014 #define PKGLIB_INIT_H
00015 
00016 #include <apt-pkg/configuration.h>
00017 #include <apt-pkg/pkgsystem.h>
00018 
00019 // These lines are extracted by the makefiles and the buildsystem
00020 // Increasing MAJOR or MINOR results in the need of recompiling all
00021 // reverse-dependencies of libapt-pkg against the new SONAME.
00022 // Non-ABI-Breaks should only increase RELEASE number.
00023 // See also buildlib/libversion.mak
00024 #define APT_PKG_MAJOR  4
00025 #define APT_PKG_MINOR 10
00026 #define APT_PKG_RELEASE 1
00027     
00028 extern const char *pkgVersion;
00029 extern const char *pkgLibVersion;
00030 
00031 bool pkgInitConfig(Configuration &Cnf);
00032 bool pkgInitSystem(Configuration &Cnf,pkgSystem *&Sys);
00033 
00034 #ifdef APT_COMPATIBILITY
00035 #if APT_COMPATIBILITY != 986
00036 #warning "Using APT_COMPATIBILITY"
00037 #endif
00038 
00039 inline bool pkgInitialize(Configuration &Cnf) 
00040 {
00041    return pkgInitConfig(Cnf) && pkgInitSystem(Cnf,_system);
00042 };
00043 #endif
00044 
00045 #endif