1 // -*- mode: cpp; mode: fold -*-
3 // $Id: sourcelist.h,v 1.7 1999/03/02 18:35:24 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 distinct
12 All sources have a type associated with them that defines the layout
13 of the archive. The exact format of the file is documented in
16 ##################################################################### */
18 // Header section: pkglib
19 #ifndef PKGLIB_SOURCELIST_H
20 #define PKGLIB_SOURCELIST_H
25 #include <apt-pkg/pkgcache.h>
28 #pragma interface "apt-pkg/sourcelist.h"
36 /* Each item in the source list, each line can have more than one
40 enum {Deb
, DebSrc
} Type
;
46 bool SetType(string S
);
47 bool SetURI(string S
);
48 string
PackagesURI() const;
49 string
PackagesInfo() const;
50 string
ReleaseURI() const;
51 string
ReleaseInfo() const;
52 string
SiteOnly(string URI
) const;
53 string
ArchiveInfo(pkgCache::VerIterator Ver
) const;
54 string
ArchiveURI(string File
) const;
56 typedef vector
<Item
>::const_iterator const_iterator
;
65 bool Read(string File
);
68 inline const_iterator
begin() const {return List
.begin();};
69 inline const_iterator
end() const {return List
.end();};
70 inline unsigned int size() const {return List
.size();};
71 inline bool empty() const {return List
.empty();};
74 pkgSourceList(string File
);
77 ostream
&operator <<(ostream
&O
,pkgSourceList::Item
&Itm
);