context.hpp

Go to the documentation of this file.
00001 /*
00002  * ====================================================================
00003  * Copyright (c) 2002-2006 The RapidSvn Group.  All rights reserved.
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Lesser General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2.1 of the License, or (at your option) any later version.
00009  * 
00010  * This library 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 GNU
00013  * Lesser General Public License for more details.
00014  * 
00015  * You should have received a copy of the GNU Lesser General Public
00016  * License along with this library (in the file LGPL.txt); if not, 
00017  * write to the Free Software Foundation, Inc., 51 Franklin St, 
00018  * Fifth Floor, Boston, MA  02110-1301  USA
00019  *
00020  * This software consists of voluntary contributions made by many
00021  * individuals.  For exact contribution history, see the revision
00022  * history and logs, available at http://rapidsvn.tigris.org/.
00023  * ====================================================================
00024  */
00025 
00026 #ifndef _SVNCPP_CONTEXT_HPP_
00027 #define _SVNCPP_CONTEXT_HPP_ 
00028 
00029 // stl
00030 #include <string>
00031 
00032 // Subversion api
00033 #include "svn_client.h"
00034 
00035 // svncpp
00036 #include "svncpp/pool.hpp"
00037 
00038 
00039 namespace svn
00040 {
00041   // forward declarations
00042   class ContextListener;
00043 
00049   class Context
00050   {
00051   public:
00059     Context (const std::string & configDir = "");
00060 
00066     Context (const Context &src);
00067 
00071     virtual ~Context ();
00072 
00078     void setAuthCache (bool value);
00079 
00083     void setLogin (const char * username, const char * password);
00084 
00088     operator svn_client_ctx_t * ();
00089 
00093     svn_client_ctx_t * ctx ();
00094 
00099     void reset ();
00100 
00106     void setLogMessage (const char * msg);
00107 
00113     const char * 
00114     getLogMessage () const;
00115     
00121     const char * 
00122     getUsername () const;
00123 
00129     const char *
00130     getPassword () const;
00131 
00139     void 
00140     setListener (ContextListener * listener);
00141 
00147     ContextListener * 
00148     getListener () const;
00149 
00150   private:
00151     struct Data;
00152     Data * m;
00153 
00157     Context & operator = (const Context &);
00158   };
00159 }
00160 
00161 #endif
00162 /* -----------------------------------------------------------------
00163  * local variables:
00164  * eval: (load-file "../../rapidsvn-dev.el")
00165  * end:
00166  */

Generated on Fri Dec 8 18:57:44 2006 for SvnCpp by  doxygen 1.4.7