00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef _SVNCPP_CONTEXT_LISTENER_HPP_
00015 #define _SVNCPP_CONTEXT_LISTENER_HPP_
00016
00017
00018 #include <string>
00019
00020
00021 #include "svn_client.h"
00022
00023
00024 #include "svncpp/pool.hpp"
00025
00026
00027 namespace svn
00028 {
00035 class ContextListener
00036 {
00037 public:
00052 virtual bool
00053 contextGetLogin (const std::string & realm,
00054 std::string & username,
00055 std::string & password,
00056 bool & maySave) = 0;
00057
00070 virtual void
00071 contextNotify (const char *path,
00072 svn_wc_notify_action_t action,
00073 svn_node_kind_t kind,
00074 const char *mime_type,
00075 svn_wc_notify_state_t content_state,
00076 svn_wc_notify_state_t prop_state,
00077 svn_revnum_t revision) = 0;
00078
00079
00080
00081
00082
00083
00084
00085
00086 virtual bool
00087 contextCancel() = 0;
00088
00100 virtual bool
00101 contextGetLogMessage (std::string & msg) = 0;
00102
00103 typedef enum
00104 {
00105 DONT_ACCEPT = 0,
00106 ACCEPT_TEMPORARILY,
00107 ACCEPT_PERMANENTLY
00108 } SslServerTrustAnswer;
00109
00110
00115 struct SslServerTrustData
00116 {
00117 public:
00119 const apr_uint32_t failures;
00120
00122 std::string hostname;
00123 std::string fingerprint;
00124 std::string validFrom;
00125 std::string validUntil;
00126 std::string issuerDName;
00127 std::string realm;
00128 bool maySave;
00129
00130 SslServerTrustData (const apr_uint32_t failures_ = 0)
00131 : failures (failures_), hostname (""), fingerprint (""),
00132 validFrom (""), validUntil (""), issuerDName (""),
00133 realm (""), maySave (true)
00134 {
00135 }
00136 };
00137
00138
00147 virtual SslServerTrustAnswer
00148 contextSslServerTrustPrompt (const SslServerTrustData & data,
00149 apr_uint32_t & acceptedFailures) = 0;
00150
00155 virtual bool
00156 contextSslClientCertPrompt (std::string & certFile) = 0;
00157
00166 virtual bool
00167 contextSslClientCertPwPrompt (std::string & password,
00168 const std::string & realm,
00169 bool & maySave) = 0;
00170 };
00171 }
00172
00173 #endif
00174
00175
00176
00177
00178