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

« back to all changes in this revision

Viewing changes to subversion/bindings/javahl/src/org/apache/subversion/javahl/types/VersionExtended.java

  • Committer: Package Import Robot
  • Author(s): James McCoy, Peter Samuelson, James McCoy
  • Date: 2014-01-12 19:48:33 UTC
  • mfrom: (0.2.10)
  • Revision ID: package-import@ubuntu.com-20140112194833-w3axfwksn296jn5x
Tags: 1.8.5-1
[ Peter Samuelson ]
* New upstream release.  (Closes: #725787) Rediff patches:
  - Remove apr-abi1 (applied upstream), rename apr-abi2 to apr-abi
  - Remove loosen-sqlite-version-check (shouldn't be needed)
  - Remove java-osgi-metadata (applied upstream)
  - svnmucc prompts for a changelog if none is provided. (Closes: #507430)
  - Remove fix-bdb-version-detection, upstream uses "apu-config --dbm-libs"
  - Remove ruby-test-wc (applied upstream)
  - Fix “svn diff -r N file” when file has svn:mime-type set.
    (Closes: #734163)
  - Support specifying an encoding for mod_dav_svn's environment in which
    hooks are run.  (Closes: #601544)
  - Fix ordering of “svnadmin dump” paths with certain APR versions.
    (Closes: #687291)
  - Provide a better error message when authentication fails with an
    svn+ssh:// URL.  (Closes: #273874)
  - Updated Polish translations.  (Closes: #690815)

[ James McCoy ]
* Remove all traces of libneon, replaced by libserf.
* patches/sqlite_3.8.x_workaround: Upstream fix for wc-queries-test test
  failurse.
* Run configure with --with-apache-libexecdir, which allows removing part of
  patches/rpath.
* Re-enable auth-test as upstream has fixed the problem of picking up
  libraries from the environment rather than the build tree.
  (Closes: #654172)
* Point LD_LIBRARY_PATH at the built auth libraries when running the svn
  command during the build.  (Closes: #678224)
* Add a NEWS entry describing how to configure mod_dav_svn to understand
  UTF-8.  (Closes: #566148)
* Remove ancient transitional package, libsvn-ruby.
* Enable compatibility with Sqlite3 versions back to Wheezy.
* Enable hardening flags.  (Closes: #734918)
* patches/build-fixes: Enable verbose build logs.
* Build against the default ruby version.  (Closes: #722393)

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
 
 
24
package org.apache.subversion.javahl.types;
 
25
 
 
26
/**
 
27
 * Encapsulates information about the compile-time and run-time
 
28
 * properties of the Subversion libraries.
 
29
 * @since 1.8
 
30
 */
 
31
public class VersionExtended
 
32
{
 
33
    /**
 
34
     * @return The date when the libsvn_subr library was compiled, in
 
35
     * the format defined by the C standard macro #__DATE__.
 
36
     */
 
37
    public native String getBuildDate();
 
38
 
 
39
    /**
 
40
     * @return The time when the libsvn_subr library was compiled, in
 
41
     * the format defined by the C standard macro #__TIME__.
 
42
     */
 
43
    public native String getBuildTime();
 
44
 
 
45
    /**
 
46
     * @return The canonical host triplet (arch-vendor-osname) of the
 
47
     * system where libsvn_subr was compiled.
 
48
     *
 
49
     * @note On Unix-like systems (includng Mac OS X), this string is
 
50
     * the same as the output of the config.guess script for the
 
51
     * underlying Subversion libraries.
 
52
     */
 
53
    public native String getBuildHost();
 
54
 
 
55
    /**
 
56
     * @return The localized copyright notice.
 
57
     */
 
58
    public native String getCopyright();
 
59
 
 
60
    /**
 
61
     * @return The canonical host triplet (arch-vendor-osname) of the
 
62
     * system where the current process is running.
 
63
     *
 
64
     * @note This string may not be the same as the output of
 
65
     * config.guess on the same system.
 
66
     */
 
67
    public native String getRuntimeHost();
 
68
 
 
69
    /**
 
70
     * @return The "commercial" release name of the running operating
 
71
     * system, if available.  Not to be confused with, e.g., the
 
72
     * output of "uname -v" or "uname -r".  The returned value may
 
73
     * be #null.
 
74
     */
 
75
    public native String getRuntimeOSName();
 
76
 
 
77
    /**
 
78
     * Dependent library information.
 
79
     * Describes the name and versions of known dependencies
 
80
     * used by libsvn_subr.
 
81
     */
 
82
    public class LinkedLib
 
83
    {
 
84
        /** @return Library name. */
 
85
        public final native String getName();
 
86
 
 
87
        /** @return Compile-time version string. */
 
88
        public final native String getCompiledVersion();
 
89
 
 
90
        /**
 
91
         * @return Run-time version string (may be #null, which
 
92
         * indicates that the library is embedded or statically
 
93
         * linked).
 
94
         */
 
95
        public final native String getRuntimeVersion();
 
96
 
 
97
        LinkedLib(VersionExtended wrapper, int index)
 
98
        {
 
99
            this.wrapper = wrapper;
 
100
            this.index = index;
 
101
        }
 
102
 
 
103
        private final VersionExtended wrapper;
 
104
        private final int index;
 
105
    };
 
106
 
 
107
    /**
 
108
     * @return Iterator for an immutable internal list of #LinkedLib
 
109
     * describing dependent libraries.  The list may be empty.
 
110
     */
 
111
    public java.util.Iterator<LinkedLib> getLinkedLibs()
 
112
    {
 
113
        return new LinkedLibIterator(this);
 
114
    }
 
115
 
 
116
    /**
 
117
     * Loaded shared library information.
 
118
     * Describes the name and, where available, version of the shared
 
119
     * libraries loaded by the running program.
 
120
     */
 
121
    public class LoadedLib
 
122
    {
 
123
        /** @return Library name. */
 
124
        public final native String getName();
 
125
 
 
126
        /** @return Library version (may be #null). */
 
127
        public final native String getVersion();
 
128
 
 
129
        LoadedLib(VersionExtended wrapper, int index)
 
130
        {
 
131
            this.wrapper = wrapper;
 
132
            this.index = index;
 
133
        }
 
134
 
 
135
        private final VersionExtended wrapper;
 
136
        private final int index;
 
137
    };
 
138
 
 
139
    /**
 
140
     * @return Iterator for an immutable internal list of #LoadedLib
 
141
     * describing loaded shared libraries.  The the list may be empty.
 
142
     *
 
143
     * @note On Mac OS X, the loaded frameworks, private frameworks
 
144
     * and system libraries will not be listed.
 
145
     */
 
146
    public java.util.Iterator<LoadedLib> getLoadedLibs()
 
147
    {
 
148
        return new LoadedLibIterator(this);
 
149
    }
 
150
 
 
151
    /**
 
152
     * Iterator for #LinkedLib.
 
153
     */
 
154
    private class LinkedLibIterator implements java.util.Iterator<LinkedLib>
 
155
    {
 
156
        public LinkedLibIterator(VersionExtended wrapper)
 
157
        {
 
158
            this.wrapper = wrapper;
 
159
            this.index = -1;
 
160
        }
 
161
 
 
162
        /**
 
163
         * Implementation of java.util.Iterator#hasNext().
 
164
         * @return #true if next() can be called safely.
 
165
         */
 
166
        public native boolean hasNext();
 
167
 
 
168
        /**
 
169
         * Implementation of java.util.Iterator#next().
 
170
         * @return The next element of the sequence.
 
171
         */
 
172
        public LinkedLib next()
 
173
        {
 
174
            if (!hasNext())
 
175
                throw new java.util.NoSuchElementException();
 
176
            return new LinkedLib(this.wrapper, ++this.index);
 
177
        }
 
178
 
 
179
        /**
 
180
         * Implementation of java.util.Iterator#remove().
 
181
         * @note Not implemented, all sequences are immutable.
 
182
         */
 
183
        public void remove()
 
184
        {
 
185
            throw new java.lang.UnsupportedOperationException();
 
186
        }
 
187
 
 
188
        private final VersionExtended wrapper;
 
189
        private int index;
 
190
    };
 
191
 
 
192
    /**
 
193
     * Iterator for #LoadedLib.
 
194
     */
 
195
    private class LoadedLibIterator implements java.util.Iterator<LoadedLib>
 
196
    {
 
197
        public LoadedLibIterator(VersionExtended wrapper)
 
198
        {
 
199
            this.wrapper = wrapper;
 
200
            this.index = -1;
 
201
        }
 
202
 
 
203
        /**
 
204
         * Implementation of java.util.Iterator#hasNext().
 
205
         * @return #true if next() can be called safely.
 
206
         */
 
207
        public native boolean hasNext();
 
208
 
 
209
        /**
 
210
         * Implementation of java.util.Iterator#next().
 
211
         * @return The next element of the sequence.
 
212
         */
 
213
        public LoadedLib next()
 
214
        {
 
215
            if (!hasNext())
 
216
                throw new java.util.NoSuchElementException();
 
217
            return new LoadedLib(this.wrapper, ++this.index);
 
218
        }
 
219
 
 
220
        /**
 
221
         * Implementation of java.util.Iterator#remove().
 
222
         * @note Not implemented, all sequences are immutable.
 
223
         */
 
224
        public void remove()
 
225
        {
 
226
            throw new java.lang.UnsupportedOperationException();
 
227
        }
 
228
 
 
229
        private final VersionExtended wrapper;
 
230
        private int index;
 
231
    };
 
232
 
 
233
    /**
 
234
     * Slot for the adress of the native peer.
 
235
     * The JNI code is the only user of this member.
 
236
     */
 
237
    private long cppAddr = 0;
 
238
}