~ubuntu-branches/debian/sid/subversion/sid

« back to all changes in this revision

Viewing changes to subversion/bindings/javahl/native/RemoteSession.h

  • Committer: Package Import Robot
  • Author(s): James McCoy
  • Date: 2015-08-07 21:32:47 UTC
  • mfrom: (0.2.15) (4.1.7 experimental)
  • Revision ID: package-import@ubuntu.com-20150807213247-ozyewtmgsr6tkewl
Tags: 1.9.0-1
* Upload to unstable
* New upstream release.
  + Security fixes
    - CVE-2015-3184: Mixed anonymous/authenticated path-based authz with
      httpd 2.4
    - CVE-2015-3187: svn_repos_trace_node_locations() reveals paths hidden
      by authz
* Add >= 2.7 requirement for python-all-dev Build-Depends, needed to run
  tests.
* Remove Build-Conflicts against ruby-test-unit.  (Closes: #791844)
* Remove patches/apache_module_dependency in favor of expressing the
  dependencies in authz_svn.load/dav_svn.load.
* Build-Depend on apache2-dev (>= 2.4.16) to ensure ap_some_authn_required()
  is available when building mod_authz_svn and Depend on apache2-bin (>=
  2.4.16) for runtime support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * @copyright
 
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
 
11
 *
 
12
 *      http://www.apache.org/licenses/LICENSE-2.0
 
13
 *
 
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
 
19
 *    under the License.
 
20
 * ====================================================================
 
21
 * @endcopyright
 
22
 *
 
23
 * @file RemoteSession.h
 
24
 * @brief Interface of the class RemoteSession
 
25
 */
 
26
 
 
27
#ifndef JAVAHL_REMOTE_SESSION_H
 
28
#define JAVAHL_REMOTE_SESSION_H
 
29
 
 
30
#include <jni.h>
 
31
 
 
32
#include "svn_ra.h"
 
33
 
 
34
#include "SVNBase.h"
 
35
#include "RemoteSessionContext.h"
 
36
#include "Prompter.h"
 
37
 
 
38
class CommitEditor;
 
39
 
 
40
/*
 
41
 * This class wraps Ra based operations from svn_ra.h
 
42
 */
 
43
class RemoteSession : public SVNBase
 
44
{
 
45
  public:
 
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);
 
59
    ~RemoteSession();
 
60
 
 
61
    void cancelOperation() const { m_context->cancelOperation(); }
 
62
 
 
63
    virtual void dispose(jobject jthis);
 
64
 
 
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,
 
75
                                jbyteArray jvalue);
 
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);
 
84
    // TODO: update
 
85
    // TODO: switch
 
86
    void status(jobject jthis, jstring jstatus_target,
 
87
                jlong jrevision, jobject jdepth,
 
88
                jobject jstatus_editor, jobject jreporter);
 
89
    // TODO: diff
 
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,
 
100
                             jobject jcallback);
 
101
    void getFileRevisions(jstring jpath,
 
102
                          jlong jstart_revision, jlong jend_revision,
 
103
                          jboolean jinclude_merged_revisions,
 
104
                          jobject jcallback);
 
105
    // TODO: getFileRevisions
 
106
    // TODO: lock
 
107
    // TODO: unlock
 
108
    // TODO: getLock
 
109
    jobject getLocks(jstring jpath, jobject jdepth);
 
110
    // TODO: replayRange
 
111
    // TODO: replay
 
112
    // TODO: getDeletedRevision
 
113
    // TODO: getInheritedProperties
 
114
    jboolean hasCapability(jstring capability);
 
115
 
 
116
  private:
 
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);
 
123
 
 
124
    svn_ra_session_t* m_session;
 
125
    RemoteSessionContext* m_context;
 
126
};
 
127
 
 
128
#endif // JAVAHL_REMOTE_SESSION_H