source: projects/synaptic/trunk/common/rinstallprogress.h @ 280

Revision 280, 2.0 KB checked in by yasumichi, 15 years ago (diff)

first import

Line 
1/* rinstallprogress.h
2 *
3 * Copyright (c) 2000, 2001 Conectiva S/A
4 *                     2002 Michael Vogt
5 *
6 * Author: Alfredo K. Kojima <kojima@conectiva.com.br>
7 *         Michael Vogt <mvo@debian.org>
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of the
12 * License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 * USA
23 */
24
25
26#ifndef _RINSTALLPROGRESS_H_
27#define _RINSTALLPROGRESS_H_
28
29#include "config.h"
30#include <rpackagemanager.h>
31
32class RInstallProgress {
33 protected:
34   int _stdout;
35   int _stderr;
36   int _childin;
37
38   int _donePackages;
39   int _numPackages;
40   int _donePackagesTotal;
41   int _numPackagesTotal;
42
43   // update is finished, we can close the window
44   bool _updateFinished;
45
46   static string finishMsg;
47   static string errorMsg;
48   static string incompleteMsg; 
49
50   virtual void startUpdate() {
51   };
52   virtual void updateInterface() {
53   };
54   virtual void finishUpdate() {
55   };
56
57 public:
58   // get a str feed to the user with the result of the install run
59   virtual const char* getResultStr(pkgPackageManager::OrderResult);
60   virtual pkgPackageManager::OrderResult start(RPackageManager *pm,
61                                                int numPackages = 0,
62                                                int numPackagesTotal = 0);
63
64
65   RInstallProgress():_donePackagesTotal(0), _numPackagesTotal(0),_updateFinished(false) {};
66   virtual ~RInstallProgress() {};
67};
68
69
70#endif
Note: See TracBrowser for help on using the repository browser.