KIO
kpasswdserverloop_p.h
Go to the documentation of this file.
00001 /* 00002 * This file is part of the KDE libraries 00003 * Copyright (c) 2009 Michael Leupold <lemma@confuego.org> 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Lesser General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2.1 of the License, or (at your option) version 3, or any 00009 * later version accepted by the membership of KDE e.V. (or its 00010 * successor approved by the membership of KDE e.V.), which shall 00011 * act as a proxy defined in Section 6 of version 3 of the license. 00012 * 00013 * This library is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 00020 */ 00021 00022 #ifndef KPASSWDSERVERLOOP_P_H 00023 #define KPASSWDSERVERLOOP_P_H 00024 00025 #include <kio/authinfo.h> 00026 #include <QtCore/QByteArray> 00027 #include <QtCore/QEventLoop> 00028 00029 namespace KIO { 00030 00031 // Wait for the result of an asynchronous D-Bus request to KPasswdServer. 00032 // Objects of this class are one-way ie. as soon as they have received 00033 // a result you can't call waitForResult() again. 00034 class KPasswdServerLoop : public QEventLoop 00035 { 00036 Q_OBJECT 00037 00038 public: 00039 KPasswdServerLoop(); 00040 virtual ~KPasswdServerLoop(); 00041 bool waitForResult(qlonglong requestId); 00042 00043 qlonglong seqNr() const; 00044 const AuthInfo &authInfo() const; 00045 00046 public Q_SLOTS: 00047 void slotQueryResult(qlonglong requestId, qlonglong seqNr, const KIO::AuthInfo &authInfo); 00048 00049 private Q_SLOTS: 00050 void kdedServiceUnregistered(); 00051 00052 private: 00053 qlonglong m_requestId; 00054 qlonglong m_seqNr; 00055 AuthInfo m_authInfo; 00056 }; 00057 00058 } 00059 00060 #endif
KDE 4.6 API Reference