summaryrefslogtreecommitdiff
path: root/apt-pkg/init.h
blob: 44d1d107c37948f10c09d26f0c0fd822539043cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// -*- mode: cpp; mode: fold -*-
// Description								/*{{{*/
// $Id: init.h,v 1.9.2.2 2004/01/02 18:51:00 mdz Exp $
/* ######################################################################

   Init - Initialize the package library

   This function must be called to configure the config class before
   calling many APT library functions.
   
   ##################################################################### */
									/*}}}*/
#ifndef PKGLIB_INIT_H
#define PKGLIB_INIT_H

#include <apt-pkg/configuration.h>
#include <apt-pkg/pkgsystem.h>

// See the makefile
#define APT_PKG_MAJOR 4
#define APT_PKG_MINOR 8
#define APT_PKG_RELEASE 1
    
extern const char *pkgVersion;
extern const char *pkgLibVersion;

bool pkgInitConfig(Configuration &Cnf);
bool pkgInitSystem(Configuration &Cnf,pkgSystem *&Sys);

#ifdef APT_COMPATIBILITY
#if APT_COMPATIBILITY != 986
#warning "Using APT_COMPATIBILITY"
#endif

inline bool pkgInitialize(Configuration &Cnf) 
{
   return pkgInitConfig(Cnf) && pkgInitSystem(Cnf,_system);
};
#endif

#endif