add more spacing
[personal-kdebase.git] / runtime / soliduiserver / soliduiserver.h
blobd871f636a6164d5126f9be08f1f0316cec17e5b7
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>
25 #include <kio/job.h>
28 #include <QMap>
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
41 Q_OBJECT
42 Q_CLASSINFO("D-Bus Interface", "org.kde.SolidUiServer")
44 public:
45 SolidUiServer(QObject* parent, const QList<QVariant>&);
46 virtual ~SolidUiServer();
48 public Q_SLOTS:
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);
57 private Q_SLOTS:
58 void onActionDialogFinished();
59 void onPassphraseDialogCompleted(const QString &pass, bool keep);
60 void onPassphraseDialogRejected();
62 private:
63 void reparentDialog(QWidget *dialog, WId wId, const QString &appId, bool modal);
65 QMap<QString, DeviceActionsDialog*> m_udiToActionsDialog;
66 QMap<QString, KPasswordDialog*> m_idToPassphraseDialog;
68 #if 0
69 private Q_SLOTS:
70 void slotStatResult(KJob *job);
72 private:
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;
81 #endif
83 #endif