MiKTeX 26.5-next
A scalable TeX distribution
Loading...
Searching...
No Matches
RemoteService.h
1/* RemoteService.h: -*- C++ -*-
2
3 Copyright (C) 2016-2019 Christian Schenk
4
5 This file is part of MiKTeX Package Manager.
6
7 MiKTeX Package Manager is free software; you can redistribute it
8 and/or modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; either version 2, or
10 (at your option) any later version.
11
12 MiKTeX Package Manager is distributed in the hope that it will be
13 useful, but WITHOUT ANY WARRANTY; without even the implied warranty
14 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with MiKTeX Package Manager; if not, write to the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA. */
21
22#if !defined(B24B3F8AAF90478B97B88D2695E620C2)
23#define B24B3F8AAF90478B97B88D2695E620C2
24
25#include <memory>
26#include <string>
27#include <utility>
28#include <vector>
29
30#include <miktex/PackageManager/PackageManager>
31
32MPM_INTERNAL_BEGIN_NAMESPACE;
33
34class MIKTEXNOVTABLE RemoteService
35{
36public:
37 virtual ~RemoteService() = 0;
38
39public:
40 virtual std::vector<MiKTeX::Packages::RepositoryInfo> GetRepositories(MiKTeX::Packages::RepositoryReleaseState repositoryReleaseState) = 0;
41
42public:
43 virtual std::string PickRepositoryUrl(MiKTeX::Packages::RepositoryReleaseState repositoryReleaseState) = 0;
44
45public:
46 virtual std::pair<bool, MiKTeX::Packages::RepositoryInfo> TryGetRepositoryInfo(const std::string& url) = 0;
47
48public:
49 virtual MiKTeX::Packages::RepositoryInfo Verify(const std::string& url) = 0;
50
51public:
52 static std::unique_ptr<RemoteService> Create(const std::string& endpoint, const MiKTeX::Packages::ProxySettings& proxySettings);
53};
54
55MPM_INTERNAL_END_NAMESPACE;
56
57#endif
Definition RemoteService.h:35
RepositoryReleaseState
Repository release state.
Definition RepositoryInfo.h:174
Definition PackageManager.h:53
Package repository info struct.
Definition RepositoryInfo.h:204