fixed #450184
[opensuse:kupdateapplet.git] / src / packagekit / qpackagekitconnector.cpp
1 #include <kdebug.h>
2 #include <KLocale>
3
4 #include "qpackagekitinterface.h"
5 #include "qpackagekittransactioninterface.h"
6 #include "qpackagekitconnector.h"
7 #include "polkitclient.h"
8 #include "pkconstants.h"
9 #include "pkconstants.h"
10
11 QPackageKitConnector::QPackageKitConnector( QObject *parent ) 
12         : QObject( parent )
13         , _lastAction("none")
14         , _lastActionArg(false)
15 {
16 }
17
18
19 void QPackageKitConnector::disconnectFromInterface(QPackageKitTransactionInterface* transactioninterface)
20 {
21         disconnect(transactioninterface, 
22                 SIGNAL( Package(const QString, const QString, const QString) ), 
23                 this,
24                 SLOT( proxy_Package(const QString, const QString, const QString) )
25         );
26
27         disconnect(transactioninterface,
28                 SIGNAL( Finished(const QString, uint) ),
29                 this,
30                 SLOT( proxy_Finished(const QString, uint) )
31         );
32
33         disconnect(transactioninterface,
34                 SIGNAL( ProgressChanged(uint, uint, uint, uint) ),
35                 this,
36                 SLOT( proxy_ProgressChanged(uint,uint, uint, uint) )
37         );
38
39         disconnect(transactioninterface,
40                 SIGNAL( StatusChanged(const QString &) ),
41                 this,
42                 SLOT( proxy_StatusChanged(const QString &) )
43         );
44
45         disconnect(transactioninterface,
46              SIGNAL( Transaction(const QString &, const QString &, bool, const QString &, uint, const QString &) ),
47              this,
48              SLOT(proxy_Transaction(const QString &, const QString &, bool, const QString &, uint, const QString &) )
49         );
50
51         disconnect(transactioninterface, 
52                 SIGNAL( Details(const QString&, const QString&, const QString&,
53                                  const QString&, const QString&, qulonglong)),
54                 this,
55                 SLOT( proxy_Details(const QString&, const QString&, const QString&,
56                                 const QString&, const QString&, qulonglong))
57         );
58
59         disconnect (transactioninterface,
60                 SIGNAL( UpdateDetail(const QString&, const QString&, const QString&, const QString&, 
61                         const QString&, const QString&, const QString&, const QString&,
62                         const QString&, const QString&, const QString&, const QString&)),
63
64                 this,
65                 SLOT( proxy_UpdateDetail(const QString&, const QString&, const QString&, const QString&, 
66                         const QString&, const QString&, const QString&, const QString&,
67                         const QString&, const QString&, const QString&, const QString&))
68         );
69
70
71         disconnect(transactioninterface, 
72                 SIGNAL( ErrorCode(const QString&, const QString& )),
73                 this,
74                 SLOT( slotError( const QString&, const QString&))
75         );
76
77         
78         disconnect(transactioninterface,
79                 SIGNAL ( RepoSignatureRequired(const QString&,  const QString&,
80                         const QString&, const QString&, const QString&,
81                         const QString&, const QString&, const QString&)),
82                 this,
83                 SLOT (proxy_RepoSignatureRequired(const QString&, const QString&,
84                         const QString&, const QString&, const QString &,
85                         const QString&, const QString&, const QString &))
86         );
87
88
89         disconnect(transactioninterface,
90                 SIGNAL( EulaRequired(const QString&, const QString&, const QString&,
91                                 const QString&)),
92                 this,
93                 SLOT( proxy_EulaRequired(const QString&, const QString&, const QString&,
94                                 const QString&))
95         );
96
97         disconnect(transactioninterface,
98                 SIGNAL (RepoDetail(const QString&, const QString&, bool)),
99                 this,
100                 SLOT(proxy_RepoDetail(const QString&, const QString &, bool))
101         );
102
103         disconnect(transactioninterface,
104                 SIGNAL (RequireRestart(const QString&, const QString&)),
105                 this,
106                 SLOT(proxy_RequireRestart(const QString&, const QString &))
107         );
108
109
110         disconnect(transactioninterface,
111                 SIGNAL (Message(const QString&, const QString&)),
112                 this,
113                 SLOT(proxy_Message(const QString&, const QString &))
114         );
115
116         disconnect(transactioninterface,
117                    SIGNAL (DistroUpgrade(const QString&, const QString&, const QString &)),
118                    this,
119                    SLOT(proxy_DistroUpgrade(const QString&, const QString &, const QString &))
120             );
121
122         transactioninterface->deleteLater();
123
124 }
125
126 void QPackageKitConnector::slotError(const QString& code, const QString& message)
127 {
128         // ignore errors which can be handled by showing a 
129         // popup and restart transaction afterwards
130         
131         if (code == "no-license-agreement" ||
132             code == "bad-gpg-signature" ||
133             code == "gpg-failure" ||
134             code == "missing-gpg-signature" ) 
135         { 
136                 emit ErrorMessage(QString());
137         }
138         else
139         {
140                 emit ErrorMessage("PackageKit Error " + code + ": " + message);  
141         }
142 }
143
144 QPackageKitTransactionInterface* QPackageKitConnector::connectToInterface()
145 {
146
147         QString tid = getTid();
148         if (tid == QString())   // tid is not valid
149         {
150                 emit ErrorMessage( 
151                         "DBus error : Unable to get transaction id from packagekit."
152                                  );
153                 return NULL;
154         }
155
156         QPackageKitTransactionInterface *transactioninterface = new QPackageKitTransactionInterface(QString::fromAscii(PK_DBUS_SERVICE),
157                                                                                               tid,
158                                                                                               QDBusConnection::systemBus() );
159
160         connect(transactioninterface, 
161                 SIGNAL( Package(const QString, const QString, const QString) ), 
162                 this,
163                 SLOT( proxy_Package(const QString, const QString, const QString) )
164         );
165
166         connect(transactioninterface,
167                 SIGNAL( Finished(const QString, uint ) ),
168                 this,
169                 SLOT( proxy_Finished(const QString, uint ) )
170         );
171
172         connect(transactioninterface,
173                 SIGNAL( Transaction(const QString &, const QString &, bool, const QString &, uint, const QString &) ),
174                 SLOT(proxy_Transaction(const QString &, const QString &, bool, const QString &, uint, const QString &) )
175         );
176   
177         connect(transactioninterface,
178                 SIGNAL( ProgressChanged(uint, uint, uint, uint) ),
179                 this,
180                 SLOT( proxy_ProgressChanged(uint,uint, uint, uint) )
181         );
182
183         connect(transactioninterface,
184                 SIGNAL( StatusChanged(const QString &) ),
185                 this,
186                 SLOT( proxy_StatusChanged(const QString &) )
187         );
188
189
190
191
192         connect(transactioninterface, 
193                 SIGNAL( Details(const QString&, const QString&, const QString&,
194                                  const QString&, const QString&, qulonglong)),
195                 this,
196                 SLOT( proxy_Details(const QString&, const QString&, const QString&,
197                                 const QString&, const QString&, qulonglong))
198         );
199
200         connect (transactioninterface,
201                 SIGNAL( UpdateDetail(const QString&, const QString&, const QString&, const QString&, 
202                         const QString&, const QString&, const QString&, const QString&,
203                         const QString&, const QString&, const QString&, const QString&)),
204
205                 this,
206                 SLOT( proxy_UpdateDetail(const QString&, const QString&, const QString&, const QString&, 
207                         const QString&, const QString&, const QString&, const QString&,
208                         const QString&, const QString&, const QString&, const QString&))
209         );
210
211         connect(transactioninterface, 
212                 SIGNAL( ErrorCode(const QString&, const QString& )),
213                 this,
214                 SLOT( slotError( const QString&, const QString&))
215         );
216
217         connect(transactioninterface,
218                 SIGNAL ( RepoSignatureRequired(const QString&,  const QString&,
219                         const QString&, const QString&, const QString&,
220                         const QString&, const QString&, const QString&)),
221                 this,
222                 SLOT (proxy_RepoSignatureRequired(const QString&, const QString&,
223                         const QString&, const QString&, const QString &,
224                         const QString&, const QString&, const QString &))
225         );
226
227
228         connect(transactioninterface,
229                 SIGNAL( EulaRequired(const QString&, const QString&, const QString&,
230                                 const QString&)),
231                 this,
232                 SLOT( proxy_EulaRequired(const QString&, const QString&, const QString&,
233                                 const QString&))
234         );
235
236         connect(transactioninterface,
237                 SIGNAL (RepoDetail(const QString&, const QString&, bool)),
238                 this,
239                 SLOT(proxy_RepoDetail(const QString&, const QString &, bool))
240         );
241
242         connect(transactioninterface,
243                 SIGNAL (RequireRestart(const QString&, const QString&)),
244                 this,
245                 SLOT(proxy_RequireRestart(const QString&, const QString &))
246         );
247
248         connect(transactioninterface,
249                 SIGNAL (Message(const QString&, const QString&)),
250                 this,
251                 SLOT(proxy_Message(const QString&, const QString &))
252         );
253
254         connect(transactioninterface,
255                 SIGNAL (DistroUpgrade(const QString&, const QString&, const QString &)),
256                 this,
257                 SLOT(proxy_DistroUpgrade(const QString&, const QString &, const QString &))
258         );
259
260         return transactioninterface;
261
262 }
263
264
265
266 void QPackageKitConnector::sendErrorMessage(QDBusAbstractInterface* interface)
267 {
268     emit ErrorMessage( "DBus error : " 
269                 + interface->lastError().name() +  " : " 
270                 + interface->lastError().message() );
271
272
273 }
274
275
276 bool QPackageKitConnector::getDetails(QStringList packageId)
277 {
278         QPackageKitTransactionInterface* transactioninterface = connectToInterface();
279
280         if (!transactioninterface)
281                 return false;
282
283         QDBusReply<void> reply = transactioninterface->GetDetails(packageId);
284         if(reply.isValid())
285         {
286                 return true;
287         }
288         else
289         {
290                 sendErrorMessage(transactioninterface);
291                 return false;
292         }
293 }
294
295
296
297 bool QPackageKitConnector::getUpdateDetail(QStringList packageId)
298 {
299         QPackageKitTransactionInterface* transactioninterface = connectToInterface();
300
301         if (!transactioninterface)
302                 return false;
303
304         QDBusReply<void> reply = transactioninterface->GetUpdateDetail(packageId);
305         if(reply.isValid())
306         {
307                 return true;
308         }
309         else
310         {
311                 sendErrorMessage(transactioninterface);
312                 return false;
313         }
314 }
315
316
317 bool QPackageKitConnector::acceptEula(QString eulaId)
318 {
319         if(!PackageKit::PolkitClient::instance()->getAuth(AUTH_PACKAGE_EULA_ACCEPT))
320         {
321             emit ErrorMessage( i18n( "User is not permitted: ") + AUTH_PACKAGE_EULA_ACCEPT );
322             return false;
323         }
324
325         QPackageKitTransactionInterface* transactioninterface = connectToInterface();
326
327         if (!transactioninterface)
328                 return false;
329
330         QDBusReply<void> reply = transactioninterface->AcceptEula(eulaId);
331         if(reply.isValid())
332         {
333                 kDebug() << "accept eula valid";
334                 return true;
335         }
336         else
337         {
338                 kDebug() << "accept eula invalid";
339                 sendErrorMessage(transactioninterface);
340                 return false;
341         }
342         return false;
343 }
344
345 bool QPackageKitConnector::getUpdates()
346 {
347         _lastAction    = QString("getUpdates");
348         _lastActionArg = false;
349
350         QPackageKitTransactionInterface* transactioninterface = connectToInterface();
351
352         kDebug() << "try to get updates1";
353         if (!transactioninterface)
354                 return false;
355         kDebug() << "try to get updates2";
356         QDBusReply<void> reply = transactioninterface->GetUpdates("none");
357         if(reply.isValid())
358         {
359                 kDebug() << "updates replay valid";
360                 return true;
361         }
362         else
363         {
364                 kDebug() << "updates replay not valid";
365                 sendErrorMessage(transactioninterface);
366                 return false;
367         }
368 }
369
370 bool QPackageKitConnector::getDistroUpgrades()
371 {
372         _lastAction    = QString("getDistroUpgrades");
373         _lastActionArg = false;
374
375         QPackageKitTransactionInterface* transactioninterface = connectToInterface();
376
377         if (!transactioninterface)
378                 return false;
379         QDBusReply<void> reply = transactioninterface->GetDistroUpgrades();
380         if(reply.isValid())
381         {
382                 kDebug() << "get distro upgrades replay valid";
383                 return true;
384         }
385         else
386         {
387                 kDebug() << "get distro upgrades updates replay not valid";
388                 sendErrorMessage(transactioninterface);
389                 return false;
390         }
391 }
392
393 bool QPackageKitConnector::getDrivers()
394 {
395         _lastAction    = QString("getDrivers");
396         _lastActionArg = false;
397
398         QPackageKitTransactionInterface* transactioninterface = connectToInterface();
399
400         if (!transactioninterface)
401                 return false;
402
403         QDBusReply<void> reply = transactioninterface->WhatProvides("none", "driver", "drivers_for_attached_hardware");
404
405         if(reply.isValid())
406         {
407                 kDebug() << "drivers replay valid";
408                 return true;
409         }
410         else
411         {
412                 kDebug() << "drivers replay not valid";
413                 sendErrorMessage(transactioninterface);
414                 return false;
415         }
416 }
417
418
419 bool QPackageKitConnector::getRepoList()
420 {
421         QPackageKitTransactionInterface* transactioninterface = connectToInterface();
422
423         if (!transactioninterface)
424                 return false;
425         QDBusReply<void> reply = transactioninterface->GetRepoList("none");
426         if(reply.isValid())
427         {
428                 kDebug() << "get repolist valid";
429                 return true;
430         }
431         else
432         {
433                 kDebug() << "get repolist not valid";
434                 sendErrorMessage(transactioninterface);
435                 return false;
436         }
437 }
438
439
440 bool QPackageKitConnector::refreshCache(bool force)
441 {
442         if(!PackageKit::PolkitClient::instance()->getAuth(AUTH_SYSTEM_SOURCES_REFRESH))
443         {
444             emit ErrorMessage( i18n( "User is not permitted: ") + AUTH_SYSTEM_SOURCES_REFRESH );
445             return false;
446         }
447
448         _lastAction    = QString("refreshCache");
449         _lastActionArg = force;
450
451         QPackageKitTransactionInterface* transactioninterface = connectToInterface();
452
453         kDebug() << "try to refresh1";
454         if (!transactioninterface)
455                 return false;
456         kDebug() << "try to refresh2";
457         QDBusReply<void> reply = transactioninterface->RefreshCache(force);
458         if(reply.isValid())
459         {
460                 kDebug() << "refresh replay valid";
461                 return true;
462         }
463         else
464         {
465                 kDebug() << "refresh replay not valid";
466                 sendErrorMessage(transactioninterface);
467                 return false;
468         }
469         return false;
470 }
471
472
473 bool QPackageKitConnector::suggestDaemonQuit()
474 {
475         QPackageKitInterface *interface = new QPackageKitInterface( QString::fromAscii(PK_DBUS_SERVICE),
476                                                                 QString::fromAscii(PK_DBUS_PATH),
477                                                                 QDBusConnection::systemBus() );
478
479         QDBusReply<void> reply = interface->SuggestDaemonQuit();
480         // we can't expect a valig reply, as packagekitd
481         // isn't able to answer when it doesn't run anymore :-)
482
483         return true;
484         delete interface;
485 }
486
487
488
489
490
491
492 QString QPackageKitConnector::getTid()
493 {
494         QPackageKitInterface *interface = new QPackageKitInterface( QString::fromAscii(PK_DBUS_SERVICE),
495                                                                 QString::fromAscii(PK_DBUS_PATH),
496                                                                 QDBusConnection::systemBus() );
497
498         kDebug() << "try get a tid.";
499         QDBusReply<QString> tid = interface->GetTid();
500         if(tid.isValid())
501         {
502                 kDebug() << "tid: " << tid;
503                 return tid;
504         }
505         else
506         {
507                 sendErrorMessage(interface);
508                 return QString();
509         }
510         
511         delete interface;
512
513 }
514
515 bool QPackageKitConnector::triggerLastActionAgain()
516 {
517         kDebug() << "Starting last action again..."; 
518
519         if (_lastAction == QString("getUpdates"))
520                 return getUpdates();
521         else if (_lastAction == QString("getDrivers"))
522                 return getDrivers();
523         else if (_lastAction    == QString("refreshCache"))
524                 return refreshCache(_lastActionArg.toBool());
525         else if (_lastAction    == QString("installPackages"))
526                 return installPackages(_lastActionArg.toStringList());
527         else if (_lastAction    == QString("updatePackages"))
528                 return updatePackages(_lastActionArg.toStringList());
529         else if (_lastAction    == QString("searchFile"))
530                 return searchFile(_lastActionArg.toString());
531         else 
532                 return false;
533 }
534
535 bool QPackageKitConnector::installSignature(QString type, QString key_id, QString package_id)
536 {
537         if(!PackageKit::PolkitClient::instance()->getAuth(AUTH_SYSTEM_TRUST_SIGNING_KEY))
538         {
539             emit ErrorMessage( i18n( "User is not permitted: ") + AUTH_SYSTEM_TRUST_SIGNING_KEY );
540             return false;
541         }
542
543
544         QPackageKitTransactionInterface* transactioninterface = connectToInterface();
545
546         if (!transactioninterface)
547                 return false;
548
549         QDBusReply<void> reply = transactioninterface->InstallSignature(type, key_id, package_id);
550         if(reply.isValid())
551         {
552
553                 kDebug() << "install sig valid";
554                 return true;
555         }
556         else
557         {
558                 kDebug() << "install sig not valid";
559                 sendErrorMessage(transactioninterface);
560                 return false;
561         }
562         sendErrorMessage(transactioninterface);
563         return false;
564 }
565
566 bool QPackageKitConnector::installPackages(QStringList packageIds)
567 {
568         if(!PackageKit::PolkitClient::instance()->getAuth(AUTH_PACKAGE_INSTALL))
569         {
570             emit ErrorMessage( i18n( "User is not permitted: ") + AUTH_PACKAGE_INSTALL );
571             return false;
572         }
573
574
575     _lastAction    = QString("installPackages");
576     _lastActionArg = packageIds;
577
578     QPackageKitTransactionInterface* transactioninterface = connectToInterface();
579
580     if (!transactioninterface)
581         return false;
582
583     QDBusReply<void> reply = transactioninterface->InstallPackages(packageIds);
584     if(reply.isValid())
585     {
586         kDebug() << "install valid";
587         return true;
588     }
589     else
590     {
591         kDebug() << "install not valid";
592         sendErrorMessage(transactioninterface);
593         return false;
594     }
595     return false;
596 }
597
598 bool QPackageKitConnector::updatePackages(QStringList packageIds)
599 {
600         if(!PackageKit::PolkitClient::instance()->getAuth(AUTH_SYSTEM_UPDATE))
601         {
602             emit ErrorMessage( i18n( "User is not permitted: ") + AUTH_SYSTEM_UPDATE );
603             return false;
604         }
605
606
607         _lastAction    = QString("updatePackages");
608         _lastActionArg = packageIds;
609
610
611         QPackageKitTransactionInterface* transactioninterface = connectToInterface();
612
613         if (!transactioninterface)
614                 return false;
615
616         QDBusReply<void> reply = transactioninterface->UpdatePackages(packageIds);
617         if(reply.isValid())
618         {
619
620                 kDebug() << "updatepackages valid";
621                 return true;
622         }
623         else
624         {
625                 kDebug() << "updatepackages not valid";
626                 sendErrorMessage(transactioninterface);
627                 return false;
628         }
629         return false;
630 }
631
632
633 bool QPackageKitConnector::searchFile(const QString& search)
634 {
635         _lastAction    = QString("searchFile");
636         _lastActionArg = search;
637
638
639         QPackageKitTransactionInterface* transactioninterface = connectToInterface();
640
641         if (!transactioninterface)
642                 return false;
643
644         QDBusReply<void> reply = transactioninterface->SearchFile("none", search);
645         if(reply.isValid())
646         {
647
648                 kDebug() << "searchFile valid";
649                 return true;
650         }
651         else
652         {
653                 kDebug() << "searchFile not valid";
654                 sendErrorMessage(transactioninterface);
655                 return false;
656         }
657 }
658
659
660
661 void QPackageKitConnector::proxy_Package( const QString &info, const QString &package_id, const QString &summary)
662 {
663         emit Package(info, package_id, summary);
664 }
665
666 void QPackageKitConnector::proxy_DistroUpgrade( const QString &type, const QString &name, const QString &detail)
667 {
668         emit DistroUpgrade(type, name, detail);
669 }
670
671 void QPackageKitConnector::proxy_Finished(const QString &status, uint runtime)
672 {
673         kDebug() << "Finished [status: " << status << "] [runtime: " << runtime << "]";
674
675         QPackageKitTransactionInterface *transactioninterface = qobject_cast<QPackageKitTransactionInterface *>(QObject::sender());
676   
677         if ( transactioninterface )
678         {
679                 QString param;
680                 QDBusReply<QString> reply = transactioninterface->GetRole(param);
681                 if(!reply.isValid())
682                 {
683                         kDebug() << "role replay not valid";
684 //                      sendErrorMessage(transactioninterface);
685 //                      return;
686                 }
687                 else
688                 {
689                         kDebug() << "role replay valid: " << param << " " << reply.value();
690
691                         if (    reply.value() == "get-updates" ||  
692                                 reply.value() == "what-provides" ||
693                                 reply.value() == "search-file" )
694                                 emit GetUpdatesFinished();
695
696                         if ( reply.value() == "get-repo-list" )
697                                 emit RepoListFinished();
698
699                         if (    reply.value() == "update-system" ||
700                                 reply.value() == "install-package" ||
701                                 reply.value() == "install-packages" ||
702                                 reply.value() == "install-file" ||
703                                 reply.value() == "install-files" ||
704                                 reply.value() == "update-package" ||
705                                 reply.value() == "update-packages" )
706                                 emit InstallFinished();
707
708                         kDebug() <<  reply.value() ;
709                 
710
711                         disconnectFromInterface(transactioninterface);
712                         emit Finished(Exit::fromString(status), runtime);
713                 }
714         } 
715         else
716         {
717                 kDebug() << "Can't figure out which transaction is finishing";
718         }
719 }
720
721 void QPackageKitConnector::proxy_Transaction(const QString &old_tid, const QString &timespec, bool succeeded, const QString &role, uint duration, const QString &data)
722 {
723         Q_UNUSED(timespec);
724         Q_UNUSED(succeeded);
725         Q_UNUSED(duration);
726         Q_UNUSED(data);
727
728
729         kDebug() << "Transaction: " << old_tid << " " << role;
730 }
731
732
733 void QPackageKitConnector::proxy_ProgressChanged(uint percentage, uint subpercentage, uint elapsed, uint remaining)
734 {
735         if(percentage == 101)
736         {
737                 emit NoProgressUpdates();
738         }
739         else
740         {
741                 emit ProgressChanged(percentage, subpercentage, elapsed, remaining);
742         }
743 }
744
745 void QPackageKitConnector::proxy_StatusChanged(const QString &status)
746 {
747     kDebug() << "status changed to: " << status;
748     emit StatusChanged(status);
749 }
750
751
752 void QPackageKitConnector::proxy_RepoSignatureRequired(const QString &package_id, const QString &repository_name,
753          const QString  &key_url, const QString &key_userid, const QString &key_id,
754          const QString &key_fingerprint, const QString &key_timestamp, const QString &type)
755 {
756         kDebug() << "proxy_RepoSignatureRequired";
757
758         emit RepoSignatureRequired(package_id,  repository_name, key_url, key_userid, 
759                 key_id, key_fingerprint, key_timestamp, type); 
760 }
761
762
763 void QPackageKitConnector::proxy_Details(const QString &package_id, const QString &licence, const QString &group, const QString &detail,
764         const QString &url, qulonglong size) 
765 {
766         emit Details(package_id, licence, group, detail, url, size); 
767 }
768
769 void QPackageKitConnector::proxy_EulaRequired(const QString &eula_id, const QString &package_id, const QString &vendor_name, const QString &license_agreement)
770 {
771         emit EulaRequired(eula_id, package_id, vendor_name, license_agreement);
772 }       
773
774
775 void QPackageKitConnector::proxy_RepoDetail(const QString &repo_id, const QString &desc, bool enabled)
776 {
777         emit RepoDetail(repo_id, desc, enabled);
778 }
779
780 void QPackageKitConnector::proxy_UpdateDetail(const QString &package_id, const QString &updates, const QString &obsoletes, const QString &vendor_url,
781         const QString &bugzilla_url, const QString &cve_url, const QString &restart, const QString &update_text,
782         const QString &changelog, const QString &state, const QString &issued, const QString &updated)
783 {
784         emit UpdateDetail(package_id, updates, obsoletes, vendor_url, bugzilla_url, cve_url, restart, update_text,
785                 changelog, state, issued, updated);
786 }
787
788 void QPackageKitConnector::proxy_RequireRestart(const QString &type, const QString &details)
789 {
790         emit RequireRestart(type, details);
791 }
792
793 void QPackageKitConnector::proxy_Message(const QString &type, const QString &details)
794 {
795         emit Message(type, details);
796 }
797