Debian Codegraph @

src/base/bittorrent/torrentdescriptor.h

raw symbols SCIP
1 /*
2 * Bittorrent Client using Qt and libtorrent.
3 * Copyright (C) 2015-2023 Vladimir Golovnev <[email protected]>
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 *
19 * In addition, as a special exception, the copyright holders give permission to
20 * link this program with the OpenSSL project's "OpenSSL" library (or with
21 * modified versions of it that use the same license as the "OpenSSL" library),
22 * and distribute the linked executables. You must obey the GNU General Public
23 * License in all respects for all of the code used other than "OpenSSL". If you
24 * modify file(s), you may extend this exception to your version of the file(s),
25 * but you are not obligated to do so. If you do not wish to do so, delete this
26 * exception statement from your version.
27 */
28
29 #pragma once
30
31 #include <optional>
32
33 #include <libtorrent/add_torrent_params.hpp>
34
35 #include <QtContainerFwd>
36 #include <QDateTime>
37 #include <QMetaType>
38 #include <QString>
39
40 #include "base/3rdparty/expected.hpp"cxx . . $ `<file>/src/base/3rdparty/expected.hpp`/
41 #include "base/path.h"cxx . . $ `<file>/src/base/path.h`/
42 #include "torrentinfo.h"cxx . . $ `<file>/src/base/bittorrent/torrentinfo.h`/
43
44 class QByteArraycxx . . $ QByteArray#;
45 class QUrlcxx . . $ QUrl#;
46
47 namespace BitTorrentcxx . . $ BitTorrent/
48 {
49 class InfoHashcxx . . $ BitTorrent/InfoHash#;
50 struct TrackerEntrycxx . . $ BitTorrent/TrackerEntry#;
51
52 class TorrentDescriptorcxx . . $ BitTorrent/TorrentDescriptor#
53 {
54 public:
55 TorrentDescriptorcxx . . $ BitTorrent/TorrentDescriptor#TorrentDescriptor(49f6e7a06ebc5aa8).() = default;
56
57 InfoHashcxx . . $ BitTorrent/InfoHash# infoHashcxx . . $ BitTorrent/TorrentDescriptor#infoHash(bec345100f895f7f).() const;
58 QStringcxx . . $ QString# namecxx . . $ BitTorrent/TorrentDescriptor#name(6ef7b6c27b00b43d).() const;
59 QDateTimecxx . . $ QDateTime# creationDatecxx . . $ BitTorrent/TorrentDescriptor#creationDate(4e062b5c490497ac).() const;
60 QStringcxx . . $ QString# creatorcxx . . $ BitTorrent/TorrentDescriptor#creator(6ef7b6c27b00b43d).() const;
61 QStringcxx . . $ QString# commentcxx . . $ BitTorrent/TorrentDescriptor#comment(6ef7b6c27b00b43d).() const;
62 QListcxx . . $ QList#<TrackerEntrycxx . . $ BitTorrent/TrackerEntry#> trackerscxx . . $ BitTorrent/TorrentDescriptor#trackers(db3b5c189b19bca2).() const;
63 QListcxx . . $ QList#<QUrlcxx . . $ QUrl#> urlSeedscxx . . $ BitTorrent/TorrentDescriptor#urlSeeds(c6c41d17fe0b8cf7).() const;
64 const stdcxx . . $ std/::optionalcxx . . $ std/optional#<TorrentInfocxx . . $ BitTorrent/TorrentInfo#> &infocxx . . $ BitTorrent/TorrentDescriptor#info(da5ca8e19dd52344).() const;
65
66 void setTorrentInfocxx . . $ BitTorrent/TorrentDescriptor#setTorrentInfo(3b5b63565bc29ad).(TorrentInfocxx . . $ BitTorrent/TorrentInfo# torrentInfo);
67
68 static nonstdcxx . . $ nonstd/::expectedcxx . . $ nonstd/expected_lite/expected#<TorrentDescriptorcxx . . $ BitTorrent/TorrentDescriptor#, QStringcxx . . $ QString#> loadcxx . . $ BitTorrent/TorrentDescriptor#load(e5ed04246105f393).(const QByteArraycxx . . $ QByteArray# &data) noexcept;
69 static nonstdcxx . . $ nonstd/::expectedcxx . . $ nonstd/expected_lite/expected#<TorrentDescriptorcxx . . $ BitTorrent/TorrentDescriptor#, QStringcxx . . $ QString#> loadFromFilecxx . . $ BitTorrent/TorrentDescriptor#loadFromFile(21e74a1542e860f1).(const Pathcxx . . $ Path# &path) noexcept;
70 static nonstdcxx . . $ nonstd/::expectedcxx . . $ nonstd/expected_lite/expected#<TorrentDescriptorcxx . . $ BitTorrent/TorrentDescriptor#, QStringcxx . . $ QString#> parsecxx . . $ BitTorrent/TorrentDescriptor#parse(90f2f7c14f168069).(const QStringcxx . . $ QString# &str) noexcept;
71 nonstdcxx . . $ nonstd/::expectedcxx . . $ nonstd/expected_lite/expected#<void, QStringcxx . . $ QString#> saveToFilecxx . . $ BitTorrent/TorrentDescriptor#saveToFile(3c88be116ce0647b).(const Pathcxx . . $ Path# &path) const;
72 nonstdcxx . . $ nonstd/::expectedcxx . . $ nonstd/expected_lite/expected#<QByteArraycxx . . $ QByteArray#, QStringcxx . . $ QString#> saveToBuffercxx . . $ BitTorrent/TorrentDescriptor#saveToBuffer(573cfd850c70c676).() const;
73
74 const lt::add_torrent_paramscxx . . $ libtorrent/add_torrent_params# &ltAddTorrentParamscxx . . $ BitTorrent/TorrentDescriptor#ltAddTorrentParams(cccd421d88f67ca6).() const;
75
76 private:
77 explicit TorrentDescriptorcxx . . $ BitTorrent/TorrentDescriptor#TorrentDescriptor(d9b6ca42adecb59c).(lt::add_torrent_paramscxx . . $ libtorrent/add_torrent_params# ltAddTorrentParams);
78
79 lt::add_torrent_paramscxx . . $ libtorrent/add_torrent_params# m_ltAddTorrentParamscxx . . $ BitTorrent/TorrentDescriptor#m_ltAddTorrentParams.;
80 stdcxx . . $ std/::optionalcxx . . $ std/optional#<TorrentInfocxx . . $ BitTorrent/TorrentInfo#> m_infocxx . . $ BitTorrent/TorrentDescriptor#m_info.;
81 QDateTimecxx . . $ QDateTime# m_creationDatecxx . . $ BitTorrent/TorrentDescriptor#m_creationDate.;
82 QStringcxx . . $ QString# m_creatorcxx . . $ BitTorrent/TorrentDescriptor#m_creator.;
83 QStringcxx . . $ QString# m_commentcxx . . $ BitTorrent/TorrentDescriptor#m_comment.;
84 };
85 }
86
87 Q_DECLARE_METATYPEcxx . . $ QByteArrayView#QByteArrayView(80d8335016fb1bdc).(BitTorrent::TorrentDescriptor)