3
* This file is part of BibleTime's source code, http://www.bibletime.info/.
5
* Copyright 1999-2006 by the BibleTime developers.
6
* The BibleTime source code is licensed under the GNU General Public License version 2.0.
12
#ifndef BTINSTALLMGR_H
13
#define BTINSTALLMGR_H
17
#include "backend/cswordbackend.h"
21
#include <installmgr.h>
28
#include <qstringlist.h>
30
namespace BookshelfManager {
32
typedef QPtrList<sword::InstallSource> InstallSourceList;
34
/**Our own reimplementation to provide status bar updates.
35
*@author The BibleTime team
37
class BTInstallMgr : public QObject, public sword::InstallMgr, public sword::StatusReporter {
44
static const QString swordConfigFilename();
45
static QStringList targetList();
46
static void setTargetList( const QStringList& );
54
static void initConfig();
55
static const QString configPath();
56
static const QString configFilename();
58
static void resetRemoteSources();
59
static void resetLocalSources();
61
static QStringList sourceList( sword::InstallMgr* );
62
static sword::InstallSource source( sword::InstallMgr*, const QString& name );
63
static const bool isRemoteSource( sword::InstallSource* is );
64
static void addSource( sword::InstallSource* );
65
static void removeSource( sword::InstallMgr*, sword::InstallSource* );
73
static CSwordBackend* backend( sword::InstallSource* const );
81
virtual ~BTInstallMgr();
84
/* Reimplementations of method in StatusReporter */
85
virtual void statusUpdate(double dltotal, double dlnow);
86
virtual void preStatus(long totalBytes, long completedBytes, const char *message);
88
virtual FTPTransport *createFTPTransport(const char *host, StatusReporter *statusReporter);
91
long m_completedBytes;
94
void completed( const int, const int );
96
* Emitted when a new file gets downloaded.
98
void downloadStarted( const QString& );