File indexing completed on 2024-04-21 05:42:02

0001 /***************************************************************************
0002  *   Copyright (C) 2005-2009 by Rajko Albrecht  ral@alwins-world.de        *
0003  *   https://kde.org/applications/development/org.kde.kdesvn               *
0004  *                                                                         *
0005  *   This program is free software; you can redistribute it and/or modify  *
0006  *   it under the terms of the GNU General Public License as published by  *
0007  *   the Free Software Foundation; either version 2 of the License, or     *
0008  *   (at your option) any later version.                                   *
0009  *                                                                         *
0010  *   This program is distributed in the hope that it will be useful,       *
0011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
0012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
0013  *   GNU General Public License for more details.                          *
0014  *                                                                         *
0015  *   You should have received a copy of the GNU General Public License     *
0016  *   along with this program; if not, write to the                         *
0017  *   Free Software Foundation, Inc.,                                       *
0018  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
0019  ***************************************************************************/
0020 #ifndef KDESVND_LISTENER_H
0021 #define KDESVND_LISTENER_H
0022 
0023 #include "svnqt/context_listener.h"
0024 
0025 class kdesvnd;
0026 
0027 class KdesvndListener : public svn::ContextListener
0028 {
0029     friend class kdesvnd;
0030 
0031     kdesvnd *m_back;
0032 
0033 public:
0034     explicit KdesvndListener(kdesvnd *p);
0035     ~KdesvndListener() override;
0036     /* context-listener methods */
0037     bool contextGetLogin(const QString &realm, QString &username, QString &password, bool &maySave) override;
0038     bool contextGetSavedLogin(const QString &realm, QString &username, QString &password) override;
0039     bool contextGetCachedLogin(const QString &realm, QString &username, QString &password) override;
0040 
0041     void contextNotify(const char *path,
0042                        svn_wc_notify_action_t action,
0043                        svn_node_kind_t kind,
0044                        const char *mime_type,
0045                        svn_wc_notify_state_t content_state,
0046                        svn_wc_notify_state_t prop_state,
0047                        svn_revnum_t revision) override;
0048     void contextNotify(const svn_wc_notify_t *action) override;
0049 
0050     bool contextCancel() override;
0051     bool contextGetLogMessage(QString &msg, const svn::CommitItemList &) override;
0052     svn::ContextListener::SslServerTrustAnswer contextSslServerTrustPrompt(const SslServerTrustData &data, apr_uint32_t &acceptedFailures) override;
0053     bool contextSslClientCertPrompt(QString &certFile) override;
0054     bool contextLoadSslClientCertPw(QString &password, const QString &realm) override;
0055     bool contextSslClientCertPwPrompt(QString &password, const QString &realm, bool &maySave) override;
0056     void contextProgress(long long int current, long long int max) override;
0057 
0058     /* context listener virtuals end */
0059 
0060 protected:
0061     svn::ContextP m_CurrentContext;
0062     svn::ClientP m_Svnclient;
0063 };
0064 
0065 #endif