| 1 | /* |
| 2 | * Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved. |
| 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
| 4 | * |
| 5 | * This code is free software; you can redistribute it and/or modify it |
| 6 | * under the terms of the GNU General Public License version 2 only, as |
| 7 | * published by the Free Software Foundation. Oracle designates this |
| 8 | * particular file as subject to the "Classpath" exception as provided |
| 9 | * by Oracle in the LICENSE file that accompanied this code. |
| 10 | * |
| 11 | * This code is distributed in the hope that it will be useful, but WITHOUT |
| 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 14 | * version 2 for more details (a copy is included in the LICENSE file that |
| 15 | * accompanied this code). |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License version |
| 18 | * 2 along with this work; if not, write to the Free Software Foundation, |
| 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
| 20 | * |
| 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
| 22 | * or visit www.oracle.com if you need additional information or have any |
| 23 | * questions. |
| 24 | */ |
| 25 | |
| 26 | #ifndef JDWP_EVENTHANDLERRESTRICTED_H |
| 27 | #define JDWP_EVENTHANDLERRESTRICTED_H |
| 28 | |
| 29 | /** |
| 30 | * eventHandler functionality restricted to use only by it's |
| 31 | * component - eventFilter. |
| 32 | */ |
| 33 | |
| 34 | typedef jboolean (*IteratorFunction)(JNIEnv *env, |
| 35 | HandlerNode *node, |
| 36 | void *arg); |
| 37 | jboolean eventHandlerRestricted_iterator(EventIndex ei, |
| 38 | IteratorFunction func, void *arg); |
| 39 | |
| 40 | /* HandlerNode data has three components: |
| 41 | * public info (HandlerNode) as declared in eventHandler.h |
| 42 | * eventHandler private data (EventHandlerPrivate_Data) as declared below |
| 43 | * eventFilter private data declared privately in eventFilter.c |
| 44 | * |
| 45 | * These three components are stored sequentially within the node. |
| 46 | */ |
| 47 | |
| 48 | /* this is HandlerNode PRIVATE data -- |
| 49 | * present in this .h file only for defining EventHandlerRestricted_HandlerNode |
| 50 | */ |
| 51 | typedef struct EventHandlerPrivate_Data_ { |
| 52 | struct HandlerNode_ *private_next; |
| 53 | struct HandlerNode_ *private_prev; |
| 54 | struct HandlerChain_ *private_chain; |
| 55 | HandlerFunction private_handlerFunction; |
| 56 | } EventHandlerPrivate_Data; |
| 57 | |
| 58 | /* this structure should only be used outside of eventHandler |
| 59 | * for proper address computation |
| 60 | */ |
| 61 | typedef struct EventHandlerRestricted_HandlerNode_ { |
| 62 | HandlerNode hn; |
| 63 | EventHandlerPrivate_Data private_ehpd; |
| 64 | } EventHandlerRestricted_HandlerNode; |
| 65 | |
| 66 | #endif |
| 67 | |