-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathobsinstance.cpp
44 lines (38 loc) · 1.23 KB
/
obsinstance.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include "obsinstance.h"
OBSInstance* OBSInstance::OBS = new OBSInstance(QString("openSUSE"), QUrl("https://api.opensuse.org/"), QUrl("https://download.opensuse.org/repositories/%1/%2/%1.repo"));
OBSInstance* OBSInstance::PMBS = new OBSInstance(QString("Packman"), QUrl("https://pmbs.links2linux.de/"), QUrl("https://ftp.gwdg.de/pub/linux/misc/packman/suse/%2/packman.repo"), QString("openSUSE.org:"));
/**
* @brief OBSInstance::OBSInstance
* @param name
* @param apiRootUrl
* @param repoRootUrl
* @param distPrefix Other OBS instance need a prefix "openSUSE.org:"
* @param parent
*/
OBSInstance::OBSInstance(QString name, QUrl apiRootUrl, QUrl repoRootUrl, QString distPrefix, QObject *parent): QObject(parent)
{
this->name = name;
this->apiRootUrl = apiRootUrl;
this->repoRootUrl = repoRootUrl;
this->distPrefix = distPrefix;
}
QString OBSInstance::getName()
{
return name;
}
QUrl OBSInstance::getApiRootUrl()
{
return apiRootUrl;
}
/**
* @brief OBSInstance::getRepoRootUrl
* @return String of RPM repository URL, %1 is project (home:guoyunhe), %2 is baseproject (openSUSE:Leap:15.1)
*/
QUrl OBSInstance::getRepoRootUrl()
{
return repoRootUrl;
}
QString OBSInstance::getDistPrefix()
{
return distPrefix;
}