]> git.saurik.com Git - apt.git/blame - apt-pkg/acquire.cc
Devel acquire module
[apt.git] / apt-pkg / acquire.cc
CommitLineData
0118833a
AL
1// -*- mode: cpp; mode: fold -*-
2// Description /*{{{*/
3// $Id: acquire.cc,v 1.1 1998/10/15 06:59:59 jgg Exp $
4/* ######################################################################
5
6 Acquire - File Acquiration
7
8 ##################################################################### */
9 /*}}}*/
10// Include Files /*{{{*/
11#ifdef __GNUG__
12#pragma implementation "apt-pkg/acquire.h"
13#endif
14#include <apt-pkg/acquire.h>
15#include <apt-pkg/acquire-item.h>
16#include <apt-pkg/acquire-worker.h>
17 /*}}}*/
18
19// Acquire::pkgAcquire - Constructor /*{{{*/
20// ---------------------------------------------------------------------
21/* */
22pkgAcquire::pkgAcquire()
23{
24 Queues = 0;
25 Configs = 0;
26}
27 /*}}}*/
28// Acquire::~pkgAcquire - Destructor /*{{{*/
29// ---------------------------------------------------------------------
30/* */
31pkgAcquire::~pkgAcquire()
32{
33 while (Items.size() != 0)
34 delete Items[0];
35}
36 /*}}}*/
37// Acquire::Add - Add a new item /*{{{*/
38// ---------------------------------------------------------------------
39/* */
40void pkgAcquire::Add(Item *Itm)
41{
42 Items.push_back(Itm);
43}
44 /*}}}*/
45// Acquire::Remove - Remove a item /*{{{*/
46// ---------------------------------------------------------------------
47/* */
48void pkgAcquire::Remove(Item *Itm)
49{
50 for (vector<Item *>::iterator I = Items.begin(); I < Items.end(); I++)
51 {
52 if (*I == Itm)
53 Items.erase(I);
54 }
55}
56 /*}}}*/
57// Acquire::Enqueue - Queue an URI for fetching /*{{{*/
58// ---------------------------------------------------------------------
59/* */
60void pkgAcquire::Enqueue(Item *Item,string URI)
61{
62 cout << "Fetching " << URI << endl;
63 cout << " to " << Item->ToFile() << endl;
64}
65 /*}}}*/
66