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

client.hpp

Go to the documentation of this file.
00001 /*
00002  * ====================================================================
00003  * Copyright (c) 2002-2005 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_CLIENT_H_
00027 #define _SVNCPP_CLIENT_H_
00028 
00029 // Ignore MSVC 6 compiler warning: debug symbol truncated
00030 #if defined (_MSC_VER) && _MSC_VER <= 1200
00031 #pragma warning (disable: 4786)
00032 #endif
00033 
00034 // Ignore MSVC 7 compiler warning: C++ exception specification
00035 #if defined (_MSC_VER) && _MSC_VER > 1200 && _MSC_VER <= 1310
00036 #pragma warning (disable: 4290)
00037 #endif
00038 
00039 
00040 // stl
00041 #include <vector>
00042 #include <utility>
00043 #include <map>
00044 
00045 // svncpp
00046 #include "svncpp/context.hpp"
00047 #include "svncpp/exception.hpp"
00048 #include "svncpp/path.hpp"
00049 #include "svncpp/entry.hpp"
00050 #include "svncpp/revision.hpp"
00051 #include "svncpp/log_entry.hpp"
00052 #include "svncpp/annotate_line.hpp"
00053 
00054 
00055 namespace svn
00056 {
00057   // forward declarations
00058   class Context;
00059   class Status;
00060   class Targets;
00061   class DirEntry;
00062 
00063   typedef std::vector<LogEntry> LogEntries;
00064   typedef std::vector<Status> StatusEntries;
00065   typedef std::vector<DirEntry> DirEntries;
00066   typedef std::vector<AnnotateLine> AnnotatedFile;
00067 
00068   // map of property names to values
00069   typedef std::map<std::string,std::string> PropertiesMap;
00070   // pair of path, PropertiesMap
00071   typedef std::pair<std::string, PropertiesMap> PathPropertiesMapEntry;
00072   // vector of path, Properties pairs
00073   typedef std::vector<PathPropertiesMapEntry> PathPropertiesMapList;
00074 
00078   class Client
00079   {
00080   public:
00084     Client (Context * context = 0);
00085 
00086     virtual ~Client ();
00087 
00088 
00092     const Context * 
00093     getContext () const;
00094 
00102     void 
00103     setContext (Context * context = NULL);
00104 
00117     StatusEntries 
00118     status (const char * path,
00119             const bool descend = false,
00120             const bool get_all = true,
00121             const bool update = false,
00122             const bool no_ignore = false) throw (ClientException);
00123 
00132     Status 
00133     singleStatus (const char * path) throw (ClientException);
00134 
00144     svn_revnum_t
00145     checkout (const char * moduleName, const Path & destPath, 
00146               const Revision & revision, 
00147               bool recurse) throw (ClientException);
00148   
00153     void 
00154     relocate (const Path & path, const char *from_url,
00155               const char *to_url, bool recurse) throw (ClientException);
00156 
00161     void 
00162     remove (const Path & path, bool force) throw (ClientException);
00163 
00171     void 
00172     remove (const Targets & targets, 
00173             bool force) throw (ClientException);
00174 
00179     void
00180     revert (const Targets & targets, bool recurse) throw (ClientException);
00181 
00182 
00187     void 
00188     add (const Path & path, bool recurse) throw (ClientException);
00189 
00199     svn_revnum_t 
00200     update (const Path & path, const Revision & revision, 
00201             bool recurse) throw (ClientException);
00202 
00211     std::string
00212     cat (const Path & path, 
00213          const Revision & revision) throw (ClientException);
00214 
00215 
00231     void
00232     get (Path & dstPath, const Path & path,
00233          const Revision & revision) throw (ClientException);
00234 
00235 
00245     AnnotatedFile *
00246     annotate (const Path & path, 
00247               const Revision & revisionStart, 
00248               const Revision & revisionEnd) throw (ClientException);
00249 
00260     svn_revnum_t
00261     commit (const Targets & targets, 
00262             const char * message, 
00263             bool recurse) throw (ClientException);
00264 
00269     void 
00270     copy (const Path & srcPath, 
00271           const Revision & srcRevision,
00272           const Path & destPath) throw (ClientException);
00273 
00278     void 
00279     move (const Path & srcPath, 
00280           const Revision & srcRevision, 
00281           const Path & destPath, 
00282           bool force) throw (ClientException);
00283 
00293     void 
00294     mkdir (const Path & path, 
00295            const char * message) throw (ClientException);
00296     void 
00297     mkdir (const Targets & targets, 
00298            const char * message) throw (ClientException);
00299 
00306     void 
00307     cleanup (const Path & path) throw (ClientException);
00308 
00313     void 
00314     resolved (const Path & path, bool recurse) throw (ClientException);
00315 
00326     svn_revnum_t
00327     doExport (const Path & srcPath, 
00328               const Path & destPath, 
00329               const Revision & revision, 
00330               bool force=false) throw (ClientException);
00331 
00337     svn_revnum_t
00338     doSwitch (const Path & path, const char * url, 
00339               const Revision & revision, 
00340               bool recurse) throw (ClientException);
00341 
00351     void 
00352     import (const Path & path, const char * url,
00353             const char * message, 
00354             bool recurse) throw (ClientException);
00355 
00360     void 
00361     merge (const Path & path1, const Revision & revision1, 
00362            const Path & path2, const Revision & revision2,
00363            const Path & localPath, bool force, 
00364            bool recurse,
00365            bool notice_ancestry=false,
00366            bool dry_run=false) throw (ClientException);
00367 
00375     Entry
00376     info (const char *path );
00377 
00393     const LogEntries *
00394     log (const char * path, const Revision & revisionStart, 
00395          const Revision & revisionEnd,
00396          bool discoverChangedPaths=false, 
00397          bool strictNodeHistory=true) throw (ClientException);
00398 
00421     std::string
00422     diff (const Path & tmpPath, const Path & path,
00423           const Revision & revision1, const Revision & revision2,
00424           const bool recurse, const bool ignoreAncestry,
00425           const bool noDiffDeleted) throw (ClientException);
00426 
00450     DirEntries
00451     ls (const char * pathOrUrl,
00452         svn_opt_revision_t * revision,
00453         bool recurse) throw (ClientException);
00454 
00465     DirEntries
00466     list (const char * pathOrUrl,
00467           svn_opt_revision_t * revision,
00468           bool recurse) throw (ClientException);
00469 
00479     PathPropertiesMapList
00480     proplist(const Path &path,
00481              const Revision &revision,
00482              bool recurse=false);
00483 
00494     PathPropertiesMapList
00495     propget(const char *propName,
00496             const Path &path,
00497             const Revision &revision,
00498             bool recurse=false);
00499 
00511     void
00512     propset(const char *propName,
00513             const char *propValue,
00514             const Path &path,
00515             const Revision &revision,
00516             bool recurse=false);
00517 
00527     void
00528     propdel(const char *propName,
00529             const Path &path,
00530             const Revision &revision,
00531             bool recurse=false);
00532 
00533 
00542     std::pair<svn_revnum_t,PropertiesMap>
00543     revproplist(const Path &path,
00544                 const Revision &revision);
00545 
00555     std::pair<svn_revnum_t,std::string>
00556     revpropget(const char *propName,
00557                const Path &path,
00558                const Revision &revision);
00559 
00571     svn_revnum_t
00572     revpropset(const char *propName,
00573                const char *propValue,
00574                const Path &path,
00575                const Revision &revision,
00576                bool force=false);
00577 
00588     svn_revnum_t
00589     revpropdel(const char *propName,
00590                const Path &path,
00591                const Revision &revision,
00592                bool force=false);
00593 
00594 
00595   private:
00596     Context * m_context;
00597 
00601     Client & operator= (const Client &);
00602 
00606     Client (const Client &);
00607 
00608   };
00609 
00610 }
00611 
00612 #endif
00613 /* -----------------------------------------------------------------
00614  * local variables:
00615  * eval: (load-file "../../rapidsvn-dev.el")
00616  * end:
00617  */

Generated on Tue Oct 25 23:07:20 2005 for SvnCpp by  doxygen 1.4.4