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 // stl
00018 #include <vector>
00019 #include <utility>
00020 #include <map>
00021 
00022 // svncpp
00023 #include "context.hpp"
00024 #include "exception.hpp"
00025 #include "path.hpp"
00026 #include "entry.hpp"
00027 #include "revision.hpp"
00028 #include "log_entry.hpp"
00029 
00033 namespace svn
00034 {
00035   // forward declarations
00036   class Context;
00037   class Status;
00038   class Targets;
00039   class DirEntry;
00040 
00041   typedef std::vector<LogEntry> LogEntries;
00042   typedef std::vector<Status> StatusEntries;
00043   typedef std::vector<DirEntry> DirEntries;
00044 
00045   // map of property names to values
00046   typedef std::map<std::string,std::string> PropertiesMap;
00047   // pair of path, PropertiesMap
00048   typedef std::pair<std::string, PropertiesMap> PathPropertiesMapEntry;
00049   // list of path, Properties pairs
00050   typedef std::vector<PathPropertiesMapEntry> PathPropertiesMapList;
00051 
00055   class Client
00056   {
00057   public:
00061     Client (Context * context = 0);
00062 
00063     virtual ~Client ();
00064 
00065 
00069     const Context * 
00070     getContext () const;
00071 
00079     void 
00080     setContext (Context * context = NULL);
00081 
00094     StatusEntries 
00095     status (const char * path,
00096             const bool descend = false,
00097             const bool get_all = true,
00098             const bool update = false,
00099             const bool no_ignore = false) throw (ClientException);
00100 
00109     Status 
00110     singleStatus (const char * path) throw (ClientException);
00111 
00121     svn_revnum_t
00122     checkout (const char * moduleName, const Path & destPath, 
00123               const Revision & revision, 
00124               bool recurse) throw (ClientException);
00125   
00130     void 
00131     relocate (const char *from_url, const char *to_url,
00132               const Path & path, bool recurse) throw (ClientException);
00133 
00138     void 
00139     remove (const Path & path, bool force) throw (ClientException);
00140 
00148     void 
00149     remove (const Targets & targets, 
00150             bool force) throw (ClientException);
00151 
00156     void 
00157     revert (const Path & path, bool recurse) throw (ClientException);
00158 
00163     void 
00164     add (const Path & path, bool recurse) throw (ClientException);
00165 
00175     svn_revnum_t 
00176     update (const Path & path, const Revision & revision, 
00177             bool recurse) throw (ClientException);
00178 
00187     std::string
00188     cat (const Path & path, 
00189          const Revision & revision) throw (ClientException);
00190 
00201     svn_revnum_t
00202     commit (const Targets & targets, 
00203             const char * message, 
00204             bool recurse) throw (ClientException);
00205 
00210     void 
00211     copy (const Path & srcPath, 
00212           const Revision & srcRevision,
00213           const Path & destPath) throw (ClientException);
00214 
00219     void 
00220     move (const Path & srcPath, 
00221           const Revision & srcRevision, 
00222           const Path & destPath, 
00223           bool force) throw (ClientException);
00224 
00232     void 
00233     mkdir (const Path & path, 
00234            const char * message) throw (ClientException);
00235     void 
00236     mkdir (const Targets & targets, 
00237            const char * message) throw (ClientException);
00238 
00245     void 
00246     cleanup (const Path & path) throw (ClientException);
00247 
00252     void 
00253     resolved (const Path & path, bool recurse) throw (ClientException);
00254 
00265     svn_revnum_t
00266     doExport (const Path & srcPath, 
00267               const Path & destPath, 
00268               const Revision & revision, 
00269               bool force=false) throw (ClientException);
00270 
00276     svn_revnum_t
00277     doSwitch (const Path & path, const char * url, 
00278               const Revision & revision, 
00279               bool recurse) throw (ClientException);
00280 
00290     void 
00291     import (const Path & path, const char * url,
00292             const char * message, 
00293             bool recurse) throw (ClientException);
00294 
00299     void 
00300     merge (const Path & path1, const Revision & revision1, 
00301            const Path & path2, const Revision & revision2,
00302            const Path & localPath, bool force, 
00303            bool recurse,
00304            bool notice_ancestry=false,
00305            bool dry_run=false) throw (ClientException);
00306 
00314     Entry
00315     info (const char *path );
00316 
00330     const LogEntries *
00331     log (const char * path, const Revision & revisionStart, 
00332          const Revision & revisionEnd) throw (ClientException);
00333 
00356     std::string
00357     diff (const Path & tmpPath, const Path & path,
00358           const Revision & revision1, const Revision & revision2,
00359           const bool recurse, const bool ignoreAncestry,
00360           const bool noDiffDeleted) throw (ClientException);
00361 
00370     DirEntries
00371     ls (const char * pathOrUrl,
00372         svn_opt_revision_t * revision,
00373         bool recurse) throw (ClientException);
00374 
00384     PathPropertiesMapList
00385     proplist(const Path &path,
00386              const Revision &revision,
00387              bool recurse=false);
00388 
00398     PathPropertiesMapList
00399     propget(const char *propName,
00400             const Path &path,
00401             const Revision &revision,
00402             bool recurse=false);
00403 
00415     void
00416     propset(const char *propName,
00417             const char *propValue,
00418             const Path &path,
00419             const Revision &revision,
00420             bool recurse=false);
00421 
00433     void
00434     propdel(const char *propName,
00435             const Path &path,
00436             const Revision &revision,
00437             bool recurse=false);
00438 
00439 
00449     std::pair<svn_revnum_t,PropertiesMap>
00450     revproplist(const Path &path,
00451              const Revision &revision);
00452 
00462     std::pair<svn_revnum_t,std::string>
00463     revpropget(const char *propName,
00464             const Path &path,
00465             const Revision &revision);
00466 
00478     svn_revnum_t
00479     revpropset(const char *propName,
00480             const char *propValue,
00481             const Path &path,
00482             const Revision &revision,
00483     bool force=false);
00484 
00496     svn_revnum_t
00497     revpropdel(const char *propName,
00498             const Path &path,
00499             const Revision &revision,
00500     bool force=false);
00501 
00502 
00503   private:
00504     Context * m_context;
00505 
00509     Client & operator= (const Client &);
00510 
00514     Client (const Client &);
00515 
00516   };
00517 
00518 }
00519 
00520 #endif
00521 /* -----------------------------------------------------------------
00522  * local variables:
00523  * eval: (load-file "../../rapidsvn-dev.el")
00524  * end:
00525  */

Generated on Sat Dec 6 22:47:47 2003 for SvnCpp by doxygen 1.3.4