]>
git.saurik.com Git - apt-legacy.git/blob - apt-pkg/versionmatch.h
1 // -*- mode: cpp; mode: fold -*-
3 // $Id: versionmatch.h,v 1.4 2001/05/29 03:07:12 jgg Exp $
4 /* ######################################################################
8 This module takes a matching string and a type and locates the version
9 record that satisfies the constraint described by the matching string.
12 Release: o=Debian,v=2.1*,c=main
15 Origin: ftp.debian.org
17 Release may be a complex type that can specify matches for any of:
18 Version (v= with prefix)
23 If there are no equals signs in the string then it is scanned in short
24 form - if it starts with a number it is Version otherwise it is an
27 Release may be a '*' to match all releases.
29 ##################################################################### */
31 #ifndef PKGLIB_VERSIONMATCH_H
32 #define PKGLIB_VERSIONMATCH_H
35 #pragma interface "apt-pkg/versionmatch.h"
39 #include <apt-pkg/pkgcache.h>
51 bool RelVerPrefixMatch
;
63 enum MatchType
{None
= 0,Version
,Release
,Origin
} Type
;
65 bool MatchVer(const char *A
,string B
,bool Prefix
);
66 bool FileMatch(pkgCache::PkgFileIterator File
);
67 pkgCache::VerIterator
Find(pkgCache::PkgIterator Pkg
);
69 pkgVersionMatch(string Data
,MatchType Type
);