* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
[svn.git] / subversion / bindings / javahl / native / Notify2.h
blob539e13578c2fc8b411c43b1ddf68b3ab9e822c3e
1 /**
2 * @copyright
3 * ====================================================================
4 * Copyright (c) 2003-2006 CollabNet. All rights reserved.
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.
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/.
15 * ====================================================================
16 * @endcopyright
18 * @file Notify2.h
19 * @brief Interface of the class Notify2
22 #ifndef NOTIFY2_H
23 #define NOTIFY2_H
25 #include <jni.h>
26 #include "svn_wc.h"
28 /**
29 * This class passes notification from subversion to a Java object
30 * (1.2 version).
32 class Notify2
34 private:
35 /**
36 * The Java object to receive the notifications. This is a global
37 * reference because it has to live longer than the
38 * SVNClient.notification call.
40 jobject m_notify;
41 Notify2(jobject p_notify);
43 public:
44 static Notify2 *makeCNotify(jobject notify);
45 ~Notify2();
47 /**
48 * Implementation of the svn_wc_notify_func_t API.
50 * @param baton notification instance is passed using this parameter
51 * @param notify all the information about the event
52 * @param pool An APR pool from which to allocate memory.
54 static void notify(void *baton,
55 const svn_wc_notify_t *notify,
56 apr_pool_t *pool);
58 /**
59 * Handler for Subversion notifications.
61 * @param notify all the information about the event
62 * @param pool An APR pool from which to allocate memory.
64 void onNotify(const svn_wc_notify_t *notify,
65 apr_pool_t *pool);
68 #endif // NOTIFY2_H