KDECore
HelperProxy.h
Go to the documentation of this file.
00001 /* 00002 * Copyright (C) 2008 Nicola Gigante <nicola.gigante@gmail.com> 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU Lesser General Public License as published by 00006 * the Free Software Foundation; either version 2.1 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Lesser General Public License 00015 * along with this program; if not, write to the 00016 * Free Software Foundation, Inc., 00017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . 00018 */ 00019 00020 #ifndef HELPER_PROXY_H 00021 #define HELPER_PROXY_H 00022 00023 #include <QObject> 00024 #include <QMap> 00025 #include <QString> 00026 #include <QVariant> 00027 00028 #include "kauthaction.h" 00029 #include "kauthactionreply.h" 00030 #include "kauthactionwatcher.h" 00031 00032 namespace KAuth 00033 { 00034 00035 class HelperProxy : public QObject 00036 { 00037 Q_OBJECT 00038 00039 public: 00040 virtual ~HelperProxy(); 00041 00042 // Application-side methods 00043 virtual bool executeActions(const QList<QPair<QString, QVariantMap> > &list, const QString &helperID) = 0; 00044 virtual ActionReply executeAction(const QString &action, const QString &helperID, const QVariantMap &arguments) = 0; 00045 virtual Action::AuthStatus authorizeAction(const QString &action, const QString &helperID) = 0; 00046 virtual void stopAction(const QString &action, const QString &helperID) = 0; 00047 00048 // Helper-side methods 00049 virtual bool initHelper(const QString &name) = 0; 00050 virtual void setHelperResponder(QObject *o) = 0; 00051 virtual bool hasToStopAction() = 0; 00052 virtual void sendDebugMessage(int level, const char *msg) = 0; 00053 virtual void sendProgressStep(int step) = 0; 00054 virtual void sendProgressStep(const QVariantMap &step) = 0; 00055 00056 signals: 00057 void actionStarted(const QString &action); 00058 void actionPerformed(const QString &action, ActionReply reply); 00059 void progressStep(const QString &action, int progress); 00060 void progressStep(const QString &action, const QVariantMap &data); 00061 }; 00062 00063 } // namespace KAuth 00064 00065 Q_DECLARE_INTERFACE(KAuth::HelperProxy, "org.kde.auth.HelperProxy/0.1") 00066 00067 #endif
KDE 4.6 API Reference