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

client.hpp

Go to the documentation of this file.
00001 /*
00002  * ====================================================================
00003  * Copyright (c) 2002, 2003 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_CLIENT_H_
00015 #define _SVNCPP_CLIENT_H_
00016 
00017 // Ignore MSVC 6 compiler warning: debug symbol truncated
00018 #if defined (_MSC_VER) && _MSC_VER <= 1200
00019 #pragma warning (disable: 4786)
00020 #endif
00021 
00022 // Ignore MSVC 7 compiler warning: C++ exception specification
00023 #if defined (_MSC_VER) && _MSCVER > 1200 && _MSCVER <= 1310
00024 #pragma warning (disable: 4290)
00025 #endif
00026 
00027 
00028 // stl
00029 #include <vector>
00030 #include <utility>
00031 #include <map>
00032 
00033 // svncpp
00034 #include "svncpp/context.hpp"
00035 #include "svncpp/exception.hpp"
00036 #include "svncpp/path.hpp"
00037 #include "svncpp/entry.hpp"
00038 #include "svncpp/revision.hpp"
00039 #include "svncpp/log_entry.hpp"
00040 #include "svncpp/annotate_line.hpp"
00041 
00042 
00046 namespace svn
00047 {
00048   // forward declarations
00049   class Context;
00050   class Status;
00051   class Targets;
00052   class DirEntry;
00053 
00054   typedef std::vector<LogEntry> LogEntries;
00055   typedef std::vector<Status> StatusEntries;
00056   typedef std::vector<DirEntry> DirEntries;
00057   typedef std::vector<AnnotateLine> AnnotatedFile;
00058 
00059   // map of property names to values
00060   typedef std::map<std::string,std::string> PropertiesMap;
00061   // pair of path, PropertiesMap
00062   typedef std::pair<std::string, PropertiesMap> PathPropertiesMapEntry;
00063   // vector of path, Properties pairs
00064   typedef std::vector<PathPropertiesMapEntry> PathPropertiesMapList;
00065 
00069   class Client
00070   {
00071   public:
00075     Client (Context * context = 0);
00076 
00077     virtual ~Client ();
00078 
00079 
00083     const Context * 
00084     getContext () const;
00085 
00093     void 
00094     setContext (Context * context = NULL);
00095 
00108     StatusEntries 
00109     status (const char * path,
00110             const bool descend = false,
00111             const bool get_all = true,
00112             const bool update = false,
00113             const bool no_ignore = false) throw (ClientException);
00114 
00123     Status 
00124     singleStatus (const char * path) throw (ClientException);
00125 
00135     svn_revnum_t
00136     checkout (const char * moduleName, const Path & destPath, 
00137               const Revision & revision, 
00138               bool recurse) throw (ClientException);
00139   
00144     void 
00145     relocate (const Path & path, const char *from_url,
00146               const char *to_url, bool recurse) throw (ClientException);
00147 
00152     void 
00153     remove (const Path & path, bool force) throw (ClientException);
00154 
00162     void 
00163     remove (const Targets & targets, 
00164             bool force) throw (ClientException);
00165 
00170     void
00171     revert (const Targets & targets, bool recurse) throw (ClientException);
00172 
00173 
00178     void 
00179     add (const Path & path, bool recurse) throw (ClientException);
00180 
00190     svn_revnum_t 
00191     update (const Path & path, const Revision & revision, 
00192             bool recurse) throw (ClientException);
00193 
00202     std::string
00203     cat (const Path & path, 
00204          const Revision & revision) throw (ClientException);
00205 
00206 
00222     void
00223     get (Path & dstPath, const Path & path,
00224          const Revision & revision) throw (ClientException);
00225 
00226 
00236     AnnotatedFile *
00237     annotate (const Path & path, 
00238               const Revision & revisionStart, 
00239               const Revision & revisionEnd) throw (ClientException);
00240 
00251     svn_revnum_t
00252     commit (const Targets & targets, 
00253             const char * message, 
00254             bool recurse) throw (ClientException);
00255 
00260     void 
00261     copy (const Path & srcPath, 
00262           const Revision & srcRevision,
00263           const Path & destPath) throw (ClientException);
00264 
00269     void 
00270     move (const Path & srcPath, 
00271           const Revision & srcRevision, 
00272           const Path & destPath, 
00273           bool force) throw (ClientException);
00274 
00282     void 
00283     mkdir (const Path & path, 
00284            const char * message) throw (ClientException);
00285     void 
00286     mkdir (const Targets & targets, 
00287            const char * message) throw (ClientException);
00288 
00295     void 
00296     cleanup (const Path & path) throw (ClientException);
00297 
00302     void 
00303     resolved (const Path & path, bool recurse) throw (ClientException);
00304 
00315     svn_revnum_t
00316     doExport (const Path & srcPath, 
00317               const Path & destPath, 
00318               const Revision & revision, 
00319               bool force=false) throw (ClientException);
00320 
00326     svn_revnum_t
00327     doSwitch (const Path & path, const char * url, 
00328               const Revision & revision, 
00329               bool recurse) throw (ClientException);
00330 
00340     void 
00341     import (const Path & path, const char * url,
00342             const char * message, 
00343             bool recurse) throw (ClientException);
00344 
00349     void 
00350     merge (const Path & path1, const Revision & revision1, 
00351            const Path & path2, const Revision & revision2,
00352            const Path & localPath, bool force, 
00353            bool recurse,
00354            bool notice_ancestry=false,
00355            bool dry_run=false) throw (ClientException);
00356 
00364     Entry
00365     info (const char *path );
00366 
00380     const LogEntries *
00381     log (const char * path, const Revision & revisionStart, 
00382          const Revision & revisionEnd) throw (ClientException);
00383 
00406     std::string
00407     diff (const Path & tmpPath, const Path & path,
00408           const Revision & revision1, const Revision & revision2,
00409           const bool recurse, const bool ignoreAncestry,
00410           const bool noDiffDeleted) throw (ClientException);
00411 
00420     DirEntries
00421     ls (const char * pathOrUrl,
00422         svn_opt_revision_t * revision,
00423         bool recurse) throw (ClientException);
00424 
00434     PathPropertiesMapList
00435     proplist(const Path &path,
00436              const Revision &revision,
00437              bool recurse=false);
00438 
00448     PathPropertiesMapList
00449     propget(const char *propName,
00450             const Path &path,
00451             const Revision &revision,
00452             bool recurse=false);
00453 
00465     void
00466     propset(const char *propName,
00467             const char *propValue,
00468             const Path &path,
00469             const Revision &revision,
00470             bool recurse=false);
00471 
00481     void
00482     propdel(const char *propName,
00483             const Path &path,
00484             const Revision &revision,
00485             bool recurse=false);
00486 
00487 
00496     std::pair<svn_revnum_t,PropertiesMap>
00497     revproplist(const Path &path,
00498                 const Revision &revision);
00499 
00509     std::pair<svn_revnum_t,std::string>
00510     revpropget(const char *propName,
00511                const Path &path,
00512                const Revision &revision);
00513 
00525     svn_revnum_t
00526     revpropset(const char *propName,
00527                const char *propValue,
00528                const Path &path,
00529                const Revision &revision,
00530                bool force=false);
00531 
00542     svn_revnum_t
00543     revpropdel(const char *propName,
00544                const Path &path,
00545                const Revision &revision,
00546                bool force=false);
00547 
00548 
00549   private:
00550     Context * m_context;
00551 
00555     Client & operator= (const Client &);
00556 
00560     Client (const Client &);
00561 
00562   };
00563 
00564 }
00565 
00566 #endif
00567 /* -----------------------------------------------------------------
00568  * local variables:
00569  * eval: (load-file "../../rapidsvn-dev.el")
00570  * end:
00571  */

Generated on Mon Feb 2 23:06:01 2004 for SvnCpp by doxygen 1.3.4