client.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
#ifndef _SVNCPP_CLIENT_H_
00015
#define _SVNCPP_CLIENT_H_
00016
00017
00018
#if defined (_MSC_VER) && _MSC_VER <= 1200
00019
#pragma warning (disable: 4786)
00020
#endif
00021
00022
00023
#if defined (_MSC_VER) && _MSC_VER > 1200 && _MSC_VER <= 1310
00024
#pragma warning (disable: 4290)
00025
#endif
00026
00027
00028
00029
#include <vector>
00030
#include <utility>
00031
#include <map>
00032
00033
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
00043
namespace svn
00044 {
00045
00046
class Context;
00047
class Status;
00048
class Targets;
00049
class DirEntry;
00050
00051 typedef std::vector<LogEntry>
LogEntries;
00052 typedef std::vector<Status>
StatusEntries;
00053 typedef std::vector<DirEntry>
DirEntries;
00054 typedef std::vector<AnnotateLine>
AnnotatedFile;
00055
00056
00057 typedef std::map<std::string,std::string>
PropertiesMap;
00058
00059 typedef std::pair<std::string, PropertiesMap>
PathPropertiesMapEntry;
00060
00061 typedef std::vector<PathPropertiesMapEntry>
PathPropertiesMapList;
00062
00066 class Client
00067 {
00068
public:
00072
Client (
Context * context = 0);
00073
00074
virtual ~Client ();
00075
00076
00080
const Context *
00081
getContext ()
const;
00082
00090
void
00091
setContext (
Context * context = NULL);
00092
00105
StatusEntries
00106
status (
const char * path,
00107
const bool descend =
false,
00108
const bool get_all =
true,
00109
const bool update =
false,
00110
const bool no_ignore =
false)
throw (
ClientException);
00111
00120
Status
00121
singleStatus (
const char * path)
throw (
ClientException);
00122
00132 svn_revnum_t
00133
checkout (
const char * moduleName,
const Path & destPath,
00134
const Revision & revision,
00135
bool recurse)
throw (
ClientException);
00136
00141
void
00142
relocate (
const Path & path,
const char *from_url,
00143
const char *to_url,
bool recurse)
throw (
ClientException);
00144
00149
void
00150
remove (
const Path & path,
bool force)
throw (
ClientException);
00151
00159
void
00160
remove (
const Targets & targets,
00161
bool force)
throw (
ClientException);
00162
00167
void
00168
revert (
const Targets & targets,
bool recurse)
throw (
ClientException);
00169
00170
00175
void
00176
add (
const Path & path,
bool recurse)
throw (
ClientException);
00177
00187 svn_revnum_t
00188
update (
const Path & path,
const Revision & revision,
00189
bool recurse)
throw (
ClientException);
00190
00199 std::string
00200
cat (
const Path & path,
00201
const Revision & revision)
throw (
ClientException);
00202
00203
00219
void
00220
get (
Path & dstPath,
const Path & path,
00221
const Revision & revision)
throw (
ClientException);
00222
00223
00233
AnnotatedFile *
00234
annotate (
const Path & path,
00235
const Revision & revisionStart,
00236
const Revision & revisionEnd)
throw (
ClientException);
00237
00248 svn_revnum_t
00249
commit (
const Targets & targets,
00250
const char * message,
00251
bool recurse)
throw (
ClientException);
00252
00257
void
00258
copy (
const Path & srcPath,
00259
const Revision & srcRevision,
00260
const Path & destPath)
throw (
ClientException);
00261
00266
void
00267
move (
const Path & srcPath,
00268
const Revision & srcRevision,
00269
const Path & destPath,
00270
bool force)
throw (
ClientException);
00271
00281
void
00282
mkdir (
const Path & path,
00283
const char * message)
throw (
ClientException);
00284
void
00285
mkdir (
const Targets & targets,
00286
const char * message)
throw (
ClientException);
00287
00294
void
00295
cleanup (
const Path & path)
throw (
ClientException);
00296
00301
void
00302
resolved (
const Path & path,
bool recurse)
throw (
ClientException);
00303
00314 svn_revnum_t
00315
doExport (
const Path & srcPath,
00316
const Path & destPath,
00317
const Revision & revision,
00318
bool force=
false)
throw (
ClientException);
00319
00325 svn_revnum_t
00326
doSwitch (
const Path & path,
const char * url,
00327
const Revision & revision,
00328
bool recurse)
throw (
ClientException);
00329
00339
void
00340
import (
const Path & path,
const char * url,
00341
const char * message,
00342
bool recurse)
throw (
ClientException);
00343
00348
void
00349
merge (
const Path & path1,
const Revision & revision1,
00350
const Path & path2,
const Revision & revision2,
00351
const Path & localPath,
bool force,
00352
bool recurse,
00353
bool notice_ancestry=
false,
00354
bool dry_run=
false)
throw (
ClientException);
00355
00363
Entry
00364
info (
const char *path );
00365
00381
const LogEntries *
00382
log (
const char * path,
const Revision & revisionStart,
00383
const Revision & revisionEnd,
00384
bool discoverChangedPaths=
false,
00385
bool strictNodeHistory=
true)
throw (
ClientException);
00386
00409 std::string
00410
diff (
const Path & tmpPath,
const Path & path,
00411
const Revision & revision1,
const Revision & revision2,
00412
const bool recurse,
const bool ignoreAncestry,
00413
const bool noDiffDeleted)
throw (
ClientException);
00414
00423
DirEntries
00424
ls (
const char * pathOrUrl,
00425 svn_opt_revision_t * revision,
00426
bool recurse)
throw (
ClientException);
00427
00437
PathPropertiesMapList
00438
proplist(
const Path &path,
00439
const Revision &revision,
00440
bool recurse=
false);
00441
00452
PathPropertiesMapList
00453
propget(
const char *propName,
00454
const Path &path,
00455
const Revision &revision,
00456
bool recurse=
false);
00457
00469
void
00470
propset(
const char *propName,
00471
const char *propValue,
00472
const Path &path,
00473
const Revision &revision,
00474
bool recurse=
false);
00475
00485
void
00486
propdel(
const char *propName,
00487
const Path &path,
00488
const Revision &revision,
00489
bool recurse=
false);
00490
00491
00500 std::pair<svn_revnum_t,PropertiesMap>
00501
revproplist(
const Path &path,
00502
const Revision &revision);
00503
00513 std::pair<svn_revnum_t,std::string>
00514
revpropget(
const char *propName,
00515
const Path &path,
00516
const Revision &revision);
00517
00529 svn_revnum_t
00530
revpropset(
const char *propName,
00531
const char *propValue,
00532
const Path &path,
00533
const Revision &revision,
00534
bool force=
false);
00535
00546 svn_revnum_t
00547
revpropdel(
const char *propName,
00548
const Path &path,
00549
const Revision &revision,
00550
bool force=
false);
00551
00552
00553
private:
00554
Context * m_context;
00555
00559
Client & operator= (
const Client &);
00560
00564
Client (
const Client &);
00565
00566 };
00567
00568 }
00569
00570
#endif
00571
00572
00573
00574
00575
Generated on Fri Sep 3 00:33:07 2004 for SvnCpp by
1.3.8