ssu
Loading...
Searching...
No Matches
ssuurlresolver.h
Go to the documentation of this file.
1
7
8#ifndef _SsuUrlResolver_H
9#define _SsuUrlResolver_H
10
11#include <QObject>
12#include <QSettings>
13#include <QDebug>
14#include <QEventLoop>
15#include <QFile>
16
17#include <iostream>
18#include <zypp/APIConfig.h>
19#if LIBZYPP_VERSION >= 173402
20#include <zypp-core/rpc/PluginFrame.h>
21#else
22#include <zypp/PluginFrame.h>
23#endif
24
25#include "libssu/ssu.h"
26
27// quick hack for waiting for a signal
28class SignalWait: public QObject
29{
30 Q_OBJECT
31public:
32 SignalWait()
33 {
34 needRunning = 1;
35 }
36
37public slots:
38 void sleep()
39 {
40 if (needRunning == 1)
41 loop.exec();
42 }
43
44 virtual void finished()
45 {
46 needRunning = 0;
47 loop.exit();
48 }
49
50private:
51 QEventLoop loop;
52 int needRunning;
53};
54
55using namespace zypp;
56
57class SsuUrlResolver: public QObject
58{
59 Q_OBJECT
60
61public:
62 SsuUrlResolver();
63
64private:
65 Ssu ssu;
66 void error(const QString &message);
67 void ack() const;
68 void resolve(zypp::PluginFrame &in);
69 bool writeZyppCredentialsIfNeeded(const QString &credentialsScope);
70
71public slots:
72 void run();
73
74signals:
75 void done();
76
77};
78
79#endif
Definition ssu.h:37