Main Page | Namespace List | Class Hierarchy | Data Structures | File List | Namespace Members | Data Fields | Globals

context_listener.hpp

Go to the documentation of this file.
00001 /* 00002 * ==================================================================== 00003 * Copyright (c) 2002-2004 The RapidSvn Group. All rights reserved. 00004 * 00005 * This software is licensed as described in the file LICENSE.txt, 00006 * which you should have received as part of this distribution. 00007 * 00008 * This software consists of voluntary contributions made by many 00009 * individuals. For exact contribution history, see the revision 00010 * history and logs, available at http://rapidsvn.tigris.org/. 00011 * ==================================================================== 00012 */ 00013 00014 #ifndef _SVNCPP_CONTEXT_LISTENER_HPP_ 00015 #define _SVNCPP_CONTEXT_LISTENER_HPP_ 00016 00017 // stl 00018 #include <string> 00019 00020 // Subversion api 00021 #include "svn_client.h" 00022 00023 // svncpp 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 * this method will be called periodically to allow 00081 * the app to cancel long running operations 00082 * 00083 * @return cancel action? 00084 * @retval true cancel 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 * local variables: 00176 * eval: (load-file "../../rapidsvn-dev.el") 00177 * end: 00178 */

Generated on Thu Sep 2 20:34:39 2004 for SvnCpp by doxygen 1.3.8