1 // -*- mode: cpp; mode: fold -*-
3 // $Id: sourcelist.h,v 1.2 1998/07/09 05:12:31 jgg Exp $
4 /* ######################################################################
6 SourceList - Manage a list of sources
8 The Source List class provides access to a list of sources. It
9 can read them from a file and generate a list of all the permutations.
11 ##################################################################### */
13 // Header section: pkglib
14 #ifndef PKGLIB_SOURCELIST_H
15 #define PKGLIB_SOURCELIST_H
20 #include <pkglib/pkgcache.h>
23 #pragma interface "pkglib/sourcelist.h"
31 /* Each item in the source list, each line can have more than one
41 bool SetType(string S
);
42 bool SetURI(string S
);
43 string
PackagesURI() const;
44 string
PackagesInfo() const;
45 string
SiteOnly(string URI
) const;
46 string
ArchiveInfo(pkgCache::VerIterator Ver
) const;
47 string
ArchiveURI(string File
) const;
49 typedef vector
<Item
>::const_iterator const_iterator
;
58 bool Read(string File
);
59 string
SanitizeURI(string URI
);
60 const_iterator
MatchPkgFile(pkgCache::VerIterator Ver
);
63 inline const_iterator
begin() const {return List
.begin();};
64 inline const_iterator
end() const {return List
.end();};
65 inline unsigned int size() const {return List
.size();};
66 inline bool empty() const {return List
.empty();};
69 pkgSourceList(string File
);
72 ostream
&operator <<(ostream
&O
,pkgSourceList::Item
&Itm
);