SvnCpp
context_listener.hpp
Go to the documentation of this file.
1/*
2 * ====================================================================
3 * Copyright (c) 2002-2018 The RapidSVN Group. All rights reserved.
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as
7 * published by the Free Software Foundation, either version 3 of the
8 * License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this program (in the file LGPL.txt).
17 * If not, see <http://www.gnu.org/licenses/>.
18 *
19 * This software consists of voluntary contributions made by many
20 * individuals. For exact contribution history, see the revision
21 * history and logs, available at http://rapidsvn.tigris.org/.
22 * ====================================================================
23 */
24
25#ifndef _SVNCPP_CONTEXT_LISTENER_HPP_
26#define _SVNCPP_CONTEXT_LISTENER_HPP_
27
28// stl
30
31// Subversion api
32#include "svn_client.h"
33
34// svncpp
35#include "svncpp/pool.hpp"
36
37namespace svn
38{
46 {
47 public:
62 virtual bool
63 contextGetLogin(const std::string & realm,
64 std::string & username,
65 std::string & password,
66 bool & maySave) = 0;
67
80 virtual void
81 contextNotify(const char *path,
82 svn_wc_notify_action_t action,
83 svn_node_kind_t kind,
84 const char *mime_type,
85 svn_wc_notify_state_t content_state,
86 svn_wc_notify_state_t prop_state,
87 svn_revnum_t revision,
88 const char *detail) = 0;
89
90 /*
91 * this method will be called periodically to allow
92 * the app to cancel long running operations
93 *
94 * @return cancel action?
95 * @retval true cancel
96 */
97 virtual bool
99
111 virtual bool
112 contextGetLogMessage(std::string & msg) = 0;
113
120
121
127 {
128 public:
130 apr_uint32_t failures;
131
133 std::string hostname;
134 std::string fingerprint;
135 std::string validFrom;
136 std::string validUntil;
137 std::string issuerDName;
138 std::string realm;
140
141 SslServerTrustData(const apr_uint32_t failures_ = 0)
142 : failures(failures_), hostname(""), fingerprint(""),
143 validFrom(""), validUntil(""), issuerDName(""),
144 realm(""), maySave(true)
145 {
146 }
147
149 : failures(src.failures)
150 {
151 hostname = src.hostname;
153 validFrom = src.validFrom;
156 realm = src.realm;
157 maySave = src.maySave;
158 }
159
162 {
163 if (this == &src)
164 return *this;
165
166 hostname = src.hostname;
168 validFrom = src.validFrom;
171 realm = src.realm;
172 maySave = src.maySave;
173 failures = src.failures;
174
175 return *this;
176 }
177 };
178
179
190 apr_uint32_t & acceptedFailures) = 0;
191
196 virtual bool
197 contextSslClientCertPrompt(std::string & certFile) = 0;
198
207 virtual bool
208 contextSslClientCertPwPrompt(std::string & password,
209 const std::string & realm,
210 bool & maySave) = 0;
211
212 virtual ~ContextListener() { }
213 };
214}
215
216#endif
217/* -----------------------------------------------------------------
218 * local variables:
219 * eval: (load-file "../../rapidsvn-dev.el")
220 * end:
221 */
Definition context_listener.hpp:46
virtual ~ContextListener()
Definition context_listener.hpp:212
virtual SslServerTrustAnswer contextSslServerTrustPrompt(const SslServerTrustData &data, apr_uint32_t &acceptedFailures)=0
virtual void contextNotify(const char *path, svn_wc_notify_action_t action, svn_node_kind_t kind, const char *mime_type, svn_wc_notify_state_t content_state, svn_wc_notify_state_t prop_state, svn_revnum_t revision, const char *detail)=0
virtual bool contextGetLogin(const std::string &realm, std::string &username, std::string &password, bool &maySave)=0
virtual bool contextSslClientCertPrompt(std::string &certFile)=0
virtual bool contextSslClientCertPwPrompt(std::string &password, const std::string &realm, bool &maySave)=0
SslServerTrustAnswer
Definition context_listener.hpp:115
@ ACCEPT_TEMPORARILY
Definition context_listener.hpp:117
@ ACCEPT_PERMANENTLY
Definition context_listener.hpp:118
@ DONT_ACCEPT
Definition context_listener.hpp:116
virtual bool contextCancel()=0
virtual bool contextGetLogMessage(std::string &msg)=0
Definition annotate_line.hpp:32
Definition context_listener.hpp:127
std::string hostname
Definition context_listener.hpp:133
std::string fingerprint
Definition context_listener.hpp:134
SslServerTrustData(const SslServerTrustData &src)
Definition context_listener.hpp:148
apr_uint32_t failures
Definition context_listener.hpp:130
std::string realm
Definition context_listener.hpp:138
SslServerTrustData & operator=(const SslServerTrustData &src)
Definition context_listener.hpp:161
std::string validFrom
Definition context_listener.hpp:135
std::string validUntil
Definition context_listener.hpp:136
bool maySave
Definition context_listener.hpp:139
SslServerTrustData(const apr_uint32_t failures_=0)
Definition context_listener.hpp:141
std::string issuerDName
Definition context_listener.hpp:137