00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _SVNCPP_CONTEXT_LISTENER_HPP_
00027 #define _SVNCPP_CONTEXT_LISTENER_HPP_
00028
00029
00030 #include <string>
00031
00032
00033 #include "svn_client.h"
00034
00035
00036 #include "svncpp/pool.hpp"
00037
00038
00039 namespace svn
00040 {
00047 class ContextListener
00048 {
00049 public:
00064 virtual bool
00065 contextGetLogin (const std::string & realm,
00066 std::string & username,
00067 std::string & password,
00068 bool & maySave) = 0;
00069
00082 virtual void
00083 contextNotify (const char *path,
00084 svn_wc_notify_action_t action,
00085 svn_node_kind_t kind,
00086 const char *mime_type,
00087 svn_wc_notify_state_t content_state,
00088 svn_wc_notify_state_t prop_state,
00089 svn_revnum_t revision) = 0;
00090
00091
00092
00093
00094
00095
00096
00097
00098 virtual bool
00099 contextCancel() = 0;
00100
00112 virtual bool
00113 contextGetLogMessage (std::string & msg) = 0;
00114
00115 typedef enum
00116 {
00117 DONT_ACCEPT = 0,
00118 ACCEPT_TEMPORARILY,
00119 ACCEPT_PERMANENTLY
00120 } SslServerTrustAnswer;
00121
00122
00127 struct SslServerTrustData
00128 {
00129 public:
00131 const apr_uint32_t failures;
00132
00134 std::string hostname;
00135 std::string fingerprint;
00136 std::string validFrom;
00137 std::string validUntil;
00138 std::string issuerDName;
00139 std::string realm;
00140 bool maySave;
00141
00142 SslServerTrustData (const apr_uint32_t failures_ = 0)
00143 : failures (failures_), hostname (""), fingerprint (""),
00144 validFrom (""), validUntil (""), issuerDName (""),
00145 realm (""), maySave (true)
00146 {
00147 }
00148 };
00149
00150
00159 virtual SslServerTrustAnswer
00160 contextSslServerTrustPrompt (const SslServerTrustData & data,
00161 apr_uint32_t & acceptedFailures) = 0;
00162
00167 virtual bool
00168 contextSslClientCertPrompt (std::string & certFile) = 0;
00169
00178 virtual bool
00179 contextSslClientCertPwPrompt (std::string & password,
00180 const std::string & realm,
00181 bool & maySave) = 0;
00182 };
00183 }
00184
00185 #endif
00186
00187
00188
00189
00190