~svn/ubuntu/oneiric/subversion/ppa

« back to all changes in this revision

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

  • Committer: Max Bowsher
  • Date: 2012-06-27 12:25:12 UTC
  • mfrom: (44.1.46 precise)
  • Revision ID: _@maxb.eu-20120627122512-kmo8fj0lr7mlkppj
Make tree identical to precise branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
2
 * @copyright
3
3
 * ====================================================================
4
 
 * Copyright (c) 2003-2004 CollabNet.  All rights reserved.
5
 
 *
6
 
 * This software is licensed as described in the file COPYING, which
7
 
 * you should have received as part of this distribution.  The terms
8
 
 * are also available at http://subversion.tigris.org/license-1.html.
9
 
 * If newer versions of this license are posted there, you may use a
10
 
 * newer version instead, at your option.
11
 
 *
12
 
 * This software consists of voluntary contributions made by many
13
 
 * individuals.  For exact contribution history, see the revision
14
 
 * history and logs, available at http://subversion.tigris.org/.
 
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.
15
20
 * ====================================================================
16
21
 * @endcopyright
17
22
 *
23
28
#define COMMITMESSAGE_H
24
29
 
25
30
#include <jni.h>
26
 
struct apr_array_header_t;
 
31
 
 
32
#include "svn_client.h"
27
33
 
28
34
/**
29
35
 * This class stores a Java object implementing the CommitMessage
32
38
class CommitMessage
33
39
{
34
40
 public:
35
 
  /**
36
 
   * Deletes the global reference to m_jcommitMessage.
37
 
   */
 
41
  CommitMessage(jobject jcommitMessage);
38
42
  ~CommitMessage();
39
43
 
40
 
  jstring getCommitMessage(const apr_array_header_t *commit_items);
 
44
  static svn_error_t *callback(const char **log_msg,
 
45
                               const char **tmp_file,
 
46
                               const apr_array_header_t *commit_items,
 
47
                               void *baton,
 
48
                               apr_pool_t *pool);
41
49
 
42
 
  /**
43
 
   * Create a C++ holding object for the Java object passed into the
44
 
   * native code.
45
 
   *
46
 
   * @param jcommitMessage The local reference to a
47
 
   * org.tigris.subversion.javahl.CommitMessage Java commit message
48
 
   * object.
49
 
   */
50
 
  static CommitMessage *makeCCommitMessage(jobject jcommitMessage);
 
50
 protected:
 
51
  svn_error_t *getCommitMessage(const char **log_msg,
 
52
                                const char **tmp_file,
 
53
                                const apr_array_header_t *commit_items,
 
54
                                apr_pool_t *pool);
51
55
 
52
56
 private:
53
 
  /**
54
 
   * A global reference to the Java object, because the reference
55
 
   * must be valid longer than the SVNClient.commitMessage call.
56
 
   */
 
57
  /* A local reference. */
57
58
  jobject m_jcommitMessage;
58
59
 
59
 
  /**
60
 
   * Create a commit message object.
61
 
   *
62
 
   * @param jcommitMessage The Java object to receive the callback.
63
 
   */
64
 
  CommitMessage(jobject jcommitMessage);
65
60
};
66
61
 
67
62
#endif  // COMMITMESSAGE_H