SvnCpp
context.hpp
Go to the documentation of this file.
00001 /*
00002  * ====================================================================
00003  * Copyright (c) 2002-2009 The RapidSvn Group.  All rights reserved.
00004  *
00005  * This program is free software: you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation, either version 3 of the License, or
00008  * (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program (in the file GPL.txt.  
00017  * If not, see <http://www.gnu.org/licenses/>.
00018  *
00019  * This software consists of voluntary contributions made by many
00020  * individuals.  For exact contribution history, see the revision
00021  * history and logs, available at http://rapidsvn.tigris.org/.
00022  * ====================================================================
00023  */
00024 
00025 #ifndef _SVNCPP_CONTEXT_HPP_
00026 #define _SVNCPP_CONTEXT_HPP_
00027 
00028 // stl
00029 #include "svncpp/string_wrapper.hpp"
00030 
00031 // Subversion api
00032 #include "svn_client.h"
00033 
00034 // svncpp
00035 #include "svncpp/pool.hpp"
00036 
00037 
00038 namespace svn
00039 {
00040   // forward declarations
00041   class ContextListener;
00042 
00048   class Context
00049   {
00050   public:
00058     Context(const std::string & configDir = "");
00059 
00065     Context(const Context &src);
00066 
00070     virtual ~Context();
00071 
00077     void setAuthCache(bool value);
00078 
00082     void setLogin(const char * username, const char * password);
00083 
00087     operator svn_client_ctx_t * ();
00088 
00092     svn_client_ctx_t * ctx();
00093 
00098     void reset();
00099 
00105     void setLogMessage(const char * msg);
00106 
00112     const char *
00113     getLogMessage() const;
00114 
00120     const char *
00121     getUsername() const;
00122 
00128     const char *
00129     getPassword() const;
00130 
00138     void
00139     setListener(ContextListener * listener);
00140 
00146     ContextListener *
00147     getListener() const;
00148 
00149   private:
00150     struct Data;
00151     Data * m;
00152 
00156     Context & operator = (const Context &);
00157   };
00158 }
00159 
00160 #endif
00161 /* -----------------------------------------------------------------
00162  * local variables:
00163  * eval: (load-file "../../rapidsvn-dev.el")
00164  * end:
00165  */