1 /* This file is part of the KDE Project
2 Copyright (c) 2005 Jean-Remy Falleri <jr.falleri@laposte.net>
3 Copyright (c) 2005-2007 Kevin Ottens <ervin@kde.org>
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License version 2 as published by the Free Software Foundation.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
20 #ifndef SOLIDUISERVER_H
21 #define SOLIDUISERVER_H
23 #include <kdedmodule.h>
24 #include <kfileitem.h>
30 //solid specific includes
31 #include <solid/devicenotifier.h>
32 #include <solid/device.h>
33 #include <solid/deviceinterface.h>
34 #include <solid/predicate.h>
36 class DeviceActionsDialog
;
37 class KPasswordDialog
;
39 class SolidUiServer
: public KDEDModule
42 Q_CLASSINFO("D-Bus Interface", "org.kde.SolidUiServer")
45 SolidUiServer(QObject
* parent
, const QList
<QVariant
>&);
46 virtual ~SolidUiServer();
49 Q_SCRIPTABLE
void showActionsDialog(const QString
&udi
,
50 const QStringList
&desktopFiles
);
52 Q_SCRIPTABLE
void showPassphraseDialog(const QString
&udi
,
53 const QString
&returnService
, const QString
&returnObject
,
54 uint wId
, const QString
&appId
);
58 void onActionDialogFinished();
59 void onPassphraseDialogCompleted(const QString
&pass
, bool keep
);
60 void onPassphraseDialogRejected();
63 void reparentDialog(QWidget
*dialog
, WId wId
, const QString
&appId
, bool modal
);
65 QMap
<QString
, DeviceActionsDialog
*> m_udiToActionsDialog
;
66 QMap
<QString
, KPasswordDialog
*> m_idToPassphraseDialog
;
70 void slotStatResult(KJob
*job
);
73 bool autostart(const KFileItem
&medium
);
75 bool execAutorun(const KFileItem
&medium
, const QString
&path
,
76 const QString
&autorunFile
);
77 bool execAutoopen(const KFileItem
&medium
, const QString
&path
,
78 const QString
&autoopenFile
);
80 QMap
<KJob
*,bool> m_allowNotificationMap
;