3
* ====================================================================
4
* Licensed to the Apache Software Foundation (ASF) under one
5
* or more contributor license agreements. See the NOTICE file
6
* distributed with this work for additional information
7
* regarding copyright ownership. The ASF licenses this file
8
* to you under the Apache License, Version 2.0 (the
9
* "License"); you may not use this file except in compliance
10
* with the License. You may obtain a copy of the License at
12
* http://www.apache.org/licenses/LICENSE-2.0
14
* Unless required by applicable law or agreed to in writing,
15
* software distributed under the License is distributed on an
16
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
* KIND, either express or implied. See the License for the
18
* specific language governing permissions and limitations
20
* ====================================================================
23
* @file RemoteSession.h
24
* @brief Interface of the class RemoteSession
27
#ifndef JAVAHL_REMOTE_SESSION_H
28
#define JAVAHL_REMOTE_SESSION_H
35
#include "RemoteSessionContext.h"
41
* This class wraps Ra based operations from svn_ra.h
43
class RemoteSession : public SVNBase
46
static RemoteSession* getCppObject(jobject jthis);
47
static jobject open(jint jretryAttempts,
48
jstring jurl, jstring juuid,
49
jstring jconfigDirectory,
50
jstring jusername, jstring jpassword,
51
jobject jprompter, jobject jdeprecatedPrompter,
52
jobject jprogress, jobject jcfgcb, jobject jtunnelcb);
53
static jobject open(jint jretryAttempts,
54
const char* url, const char* uuid,
55
const char* configDirectory,
56
const char* username, const char* password,
57
Prompter::UniquePtr prompter, jobject jprogress,
58
jobject jcfgcb, jobject jtunnelcb);
61
void cancelOperation() const { m_context->cancelOperation(); }
63
virtual void dispose(jobject jthis);
65
void reparent(jstring jurl);
66
jstring getSessionUrl();
67
jstring getSessionRelativePath(jstring jurl);
68
jstring getReposRelativePath(jstring jurl);
69
jstring getReposUUID();
70
jstring getReposRootUrl();
71
jlong getLatestRevision();
72
jlong getRevisionByTimestamp(jlong jtimestamp);
73
void changeRevisionProperty(jlong jrevision, jstring jname,
74
jbyteArray jold_value,
76
jobject getRevisionProperties(jlong jrevision);
77
jbyteArray getRevisionProperty(jlong jrevision, jstring jname);
78
jlong getFile(jlong jrevision, jstring jpath,
79
jobject jcontents, jobject jproperties);
80
jlong getDirectory(jlong jrevision, jstring jpath, jint jdirent_fields,
81
jobject jdirents, jobject jproperties);
82
jobject getMergeinfo(jobject jpaths, jlong jrevision, jobject jinherit,
83
jboolean jinclude_descendants);
86
void status(jobject jthis, jstring jstatus_target,
87
jlong jrevision, jobject jdepth,
88
jobject jstatus_editor, jobject jreporter);
90
void getLog(jobject jpaths, jlong jstartrev, jlong jendrev, jint jlimit,
91
jboolean jstrict_node_history, jboolean jdiscover_changed_paths,
92
jboolean jinclude_merged_revisions,
93
jobject jrevprops, jobject jlog_callback);
94
jobject checkPath(jstring jpath, jlong jrevision);
95
jobject stat(jstring jpath, jlong jrevision);
96
jobject getLocations(jstring jpath, jlong jpeg_revision,
97
jobject jlocation_revisions);
98
void getLocationSegments(jstring jpath, jlong jpeg_revision,
99
jlong jstart_revision, jlong jend_revision,
101
void getFileRevisions(jstring jpath,
102
jlong jstart_revision, jlong jend_revision,
103
jboolean jinclude_merged_revisions,
105
// TODO: getFileRevisions
109
jobject getLocks(jstring jpath, jobject jdepth);
112
// TODO: getDeletedRevision
113
// TODO: getInheritedProperties
114
jboolean hasCapability(jstring capability);
117
friend class CommitEditor;
118
RemoteSession(int retryAttempts,
119
const char* url, const char* uuid,
120
const char* configDirectory,
121
const char* username, const char* password,
122
Prompter::UniquePtr prompter, jobject jcfgcb, jobject jtunnelcb);
124
svn_ra_session_t* m_session;
125
RemoteSessionContext* m_context;
128
#endif // JAVAHL_REMOTE_SESSION_H