BibleTime
btinstallbackend.h
Go to the documentation of this file.
1 /*********
2 *
3 * In the name of the Father, and of the Son, and of the Holy Spirit.
4 *
5 * This file is part of BibleTime's source code, https://bibletime.info/
6 *
7 * Copyright 1999-2021 by the BibleTime developers.
8 * The BibleTime source code is licensed under the GNU General Public License
9 * version 2.0.
10 *
11 **********/
12 
13 #pragma once
14 
15 #include <memory>
16 #include <QString>
17 #include <QStringList>
18 
19 
20 class CSwordBackend;
21 namespace sword { class InstallSource; }
22 
23 namespace BtInstallBackend {
24 
25 /** Adds the source to the backend. */
26 bool addSource(sword::InstallSource& source);
27 
28 /** Returns the source struct. */
29 sword::InstallSource source(const QString &name);
30 
31 /** Deletes the source. */
32 bool deleteSource(const QString &name);
33 
34 /** Tells if the source is remote or local. */
35 bool isRemote(const sword::InstallSource& source);
36 
37 QStringList sourceNameList();
38 
39 /** Returns the path of the sword installer configuration file. */
40 QString configPath();
41 
42 /** Returns the name of the sword installer configuration file. */
43 QString configFilename();
44 
45 /** Returns backend Sword manager for the source. */
46 std::unique_ptr<CSwordBackend> backend(sword::InstallSource const & is);
47 
48 } // namespace BtInstallBackend
The backend layer main class, a backend implementation of Sword.
Definition: cswordbackend.h:56
bool isRemote(const sword::InstallSource &source)
bool deleteSource(const QString &name)
bool addSource(sword::InstallSource &source)
sword::InstallSource source(const QString &name)
QStringList sourceNameList()
std::unique_ptr< CSwordBackend > backend(sword::InstallSource const &is)