ssu
ssuurlresolver.h
Go to the documentation of this file.
1 
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/PluginFrame.h>
19 
20 #include "libssu/ssu.h"
21 
22 // quick hack for waiting for a signal
23 class SignalWait: public QObject
24 {
25  Q_OBJECT
26 public:
27  SignalWait()
28  {
29  needRunning = 1;
30  }
31 
32 public slots:
33  void sleep()
34  {
35  if (needRunning == 1)
36  loop.exec();
37  }
38 
39  virtual void finished()
40  {
41  needRunning = 0;
42  loop.exit();
43  }
44 
45 private:
46  QEventLoop loop;
47  int needRunning;
48 };
49 
50 using namespace zypp;
51 
52 class SsuUrlResolver: public QObject
53 {
54  Q_OBJECT
55 
56 public:
58 
59 private:
60  Ssu ssu;
61  void error(const QString &message);
62  void ack() const;
63  void resolve(zypp::PluginFrame &in);
64  bool writeZyppCredentialsIfNeeded(const QString &credentialsScope);
65 
66 public slots:
67  void run();
68 
69 signals:
70  void done();
71 
72 };
73 
74 #endif
SignalWait
Definition: ssuurlresolver.h:23
Ssu
Definition: ssu.h:36
ssu.h
SsuUrlResolver
Definition: ssuurlresolver.h:52