]> git.saurik.com Git - apt.git/blob - apt-private/acqprogress.h
Merge branch 'debian/jessie' into debian/experimental
[apt.git] / apt-private / acqprogress.h
1 // -*- mode: cpp; mode: fold -*-
2 // Description /*{{{*/
3 /* ######################################################################
4
5 Acquire Progress - Command line progress meter
6
7 ##################################################################### */
8 /*}}}*/
9 #ifndef ACQPROGRESS_H
10 #define ACQPROGRESS_H
11
12 #include <apt-pkg/acquire.h>
13 #include <apt-pkg/macros.h>
14
15 #include <string>
16 #include <iostream>
17
18 class APT_PUBLIC AcqTextStatus : public pkgAcquireStatus
19 {
20 std::ostream &out;
21 unsigned int &ScreenWidth;
22 size_t LastLineLength;
23 unsigned long ID;
24 unsigned long Quiet;
25
26 void clearLastLine();
27
28 public:
29
30 virtual bool MediaChange(std::string Media,std::string Drive);
31 virtual void IMSHit(pkgAcquire::ItemDesc &Itm);
32 virtual void Fetch(pkgAcquire::ItemDesc &Itm);
33 virtual void Done(pkgAcquire::ItemDesc &Itm);
34 virtual void Fail(pkgAcquire::ItemDesc &Itm);
35 virtual void Start();
36 virtual void Stop();
37
38 bool Pulse(pkgAcquire *Owner);
39
40 AcqTextStatus(std::ostream &out, unsigned int &ScreenWidth,unsigned int const Quiet);
41 };
42
43 #endif