1 // -*- mode: cpp; mode: fold -*-
3 // $Id: sourcelist.h,v 1.4 1998/07/19 04:22:05 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 <apt-pkg/pkgcache.h>
23 #pragma interface "apt-pkg/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
);
61 inline const_iterator
begin() const {return List
.begin();};
62 inline const_iterator
end() const {return List
.end();};
63 inline unsigned int size() const {return List
.size();};
64 inline bool empty() const {return List
.empty();};
67 pkgSourceList(string File
);
70 ostream
&operator <<(ostream
&O
,pkgSourceList::Item
&Itm
);