From db4c7934ec5f8389367cbe2097cb60a60ab74ccd Mon Sep 17 00:00:00 2001 From: Rik Veenboer Date: Mon, 7 Feb 2011 07:43:34 +0000 Subject: [PATCH 01/36] --- lib/wiiuse.lib | Bin 0 -> 10344 bytes msvc/WiiUseJ.sln | 20 ++ msvc/WiiUseJ.suo | Bin 0 -> 19456 bytes msvc/WiiUseJ.vcxproj | 98 +++++ msvc/WiiUseJ.vcxproj.filters | 33 ++ msvc/WiiUseJ.vcxproj.user | 3 + msvc/copy.bat | 1 + speaker.h | 23 ++ wiiuse.h | 653 ++++++++++++++++++++++++++++++++++ wiiusej_Speaker.c | 68 ++++ wiiusej_Speaker.h | 317 +++++++++++++++++ wiiusej_WiiUseApi.c | 671 +++++++++++++++++++++++++++++++++++ wiiusej_WiiUseApi.def | 34 ++ wiiusej_WiiUseApi.h | 317 +++++++++++++++++ 14 files changed, 2238 insertions(+) create mode 100644 lib/wiiuse.lib create mode 100644 msvc/WiiUseJ.sln create mode 100644 msvc/WiiUseJ.suo create mode 100644 msvc/WiiUseJ.vcxproj create mode 100644 msvc/WiiUseJ.vcxproj.filters create mode 100644 msvc/WiiUseJ.vcxproj.user create mode 100644 msvc/copy.bat create mode 100644 speaker.h create mode 100644 wiiuse.h create mode 100644 wiiusej_Speaker.c create mode 100644 wiiusej_Speaker.h create mode 100644 wiiusej_WiiUseApi.c create mode 100644 wiiusej_WiiUseApi.def create mode 100644 wiiusej_WiiUseApi.h diff --git a/lib/wiiuse.lib b/lib/wiiuse.lib new file mode 100644 index 0000000000000000000000000000000000000000..fe754f9a599d9ecd20d478e8adbd85489ca1ee23 GIT binary patch literal 10344 zcmb_iOK%iM5H8yRj6;Zd7{BfH0~!j>L&!*&W*>);pWs*+rbl zDW@pEAcq{Hh!ck>ha4k>I3binet?gN6K4)ds;9fBt9yFJvssT+p6=?Z{`yrl)wQ1b ztXMB?ecpFAr$6TxFD@093(NU}&Oaxrix? zr<`Vfz&g_G8%}d80F35wtc(UfffYH!*oQCgW9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NZv42JPl(=QLa;otVweCdwkkG&r}vTYuhkUJE$ zg)aLN-WiK!({g{8x~RsXm?zmy2Va_TMIsxI(?zr@_WqA`27V&`*KHu^1&t_s{MH$G z;@5}%R%;da_M-8$c43d-Iszm9%P<$eY2dMG(^^*F#$D(5tvzty&tn`*#M;e=Q49a` z9t-&|MF8}+lkdNZecSoQMf?76r}XT!zwWKP@9!TsT}RT*1mxt4_1Wg zz4$Bk1N`X7P%7C!ny3EShZAA+4rb%wOe&ig(CIv(F4~9W$N>JeamVQB?vS_H*H|5_ zaX0y^>m26Y@xfCC;|`PZSuG`6+ETO+qLc;kI{?ak=;5h7m7EeUaWPAE=VGbAPv!sl z&6m?JXN+1+Z|1Ec2AX&C{J)4_rXqgT@x)kjxN!ceJfD;3w@d_4QR$gOFD4I0YUdt* zzVhbK%l(6EK#-YwAEUES<1?Y(nYu4Ta$bLGviINkIgf#Md;iD!3k3Qfmt#fZ@bVT{ z;NnsA3;)9&zjX$FBL2^hfd5{NHhcWmZ$Rk(EyrAL0QW$f*0OpMcLjdSfevqqy?2UV yKdqyWjPwr}+EdQIQR#(OKE3nmvu{}MJ{DY)I{&?+GeMGm3nsD+hE@IlT>b}PU~q>3 literal 0 HcmV?d00001 diff --git a/msvc/WiiUseJ.vcxproj b/msvc/WiiUseJ.vcxproj new file mode 100644 index 0000000..5364935 --- /dev/null +++ b/msvc/WiiUseJ.vcxproj @@ -0,0 +1,98 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {A4941142-CEF2-43EF-873E-D8C5F0D33BC4} + Win32Proj + WiiUseJ + + + + DynamicLibrary + true + Unicode + + + DynamicLibrary + false + true + Unicode + + + + + + + + + + + + + true + C:\Program Files\Java\jdk1.6.0_20\include;C:\Program Files\Java\jdk1.6.0_20\include\win32;C:\Users\Rik\My Dropbox\Eclipse\WiiTunes\c\wiiuse;$(IncludePath) + + + false + C:\Program Files (x86)\Java\jdk1.6.0_23\include;C:\Program Files (x86)\Java\jdk1.6.0_23\include\win32;$(IncludePath) + .\Release\ + $(ExtensionsToDeleteOnClean) + + + + + + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;WIIUSEJ_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + C:\Users\Rik\My Dropbox\Eclipse\WiiTunes\c\wiiuse\msvc\Release;%(AdditionalLibraryDirectories) + wiiuse.lib;%(AdditionalDependencies) + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;WIIUSEJ_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + true + true + wiiuse.lib;%(AdditionalDependencies) + ..\..\wiiuse\msvc\Release;%(AdditionalLibraryDirectories) + + + copy.bat + + + + + + + + + + + + + + \ No newline at end of file diff --git a/msvc/WiiUseJ.vcxproj.filters b/msvc/WiiUseJ.vcxproj.filters new file mode 100644 index 0000000..cc1e8b3 --- /dev/null +++ b/msvc/WiiUseJ.vcxproj.filters @@ -0,0 +1,33 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/msvc/WiiUseJ.vcxproj.user b/msvc/WiiUseJ.vcxproj.user new file mode 100644 index 0000000..695b5c7 --- /dev/null +++ b/msvc/WiiUseJ.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/msvc/copy.bat b/msvc/copy.bat new file mode 100644 index 0000000..017a544 --- /dev/null +++ b/msvc/copy.bat @@ -0,0 +1 @@ +copy Release\WiiUseJ.dll ..\..\..\java\native\ \ No newline at end of file diff --git a/speaker.h b/speaker.h new file mode 100644 index 0000000..8b8267d --- /dev/null +++ b/speaker.h @@ -0,0 +1,23 @@ +#include "wiiuse.h" + +#define WIIMOTE_GET_RUMBLE(wm) (WIIMOTE_IS_SET(wm, WIIMOTE_STATE_RUMBLE) ? 0x01 : 0x00) + +#define WM_CMD_SPEAKER_ENABLE 0x14 +#define WM_CMD_STREAM_DATA 0x18 +#define WM_CMD_SPEAKER_MUTE 0x19 + +#define WM_CTRL_STATUS_BYTE1_SPEAKER_MUTE 0x04 + +#define WM_REG_SPEAKER 0x04a20001 + +static byte cfg[9] = {0x00, 0x00, 0x00, 0xdd, 0x40, 0x00, 0x00, 0x01, 0x01}; + +WIIUSE_EXPORT extern void wiiuse_speaker_enable(struct wiimote_t* wm); +WIIUSE_EXPORT extern void wiiuse_speaker_disable(struct wiimote_t* wm); +WIIUSE_EXPORT extern void wiiuse_speaker_mute(struct wiimote_t* wm); +WIIUSE_EXPORT extern void wiiuse_speaker_unmute(struct wiimote_t* wm); +WIIUSE_EXPORT extern void wiiuse_speaker_activate(struct wiimote_t* wm); +WIIUSE_EXPORT extern void wiiuse_speaker_deactivate(struct wiimote_t* wm); +WIIUSE_EXPORT extern void wiiuse_speaker_volume(struct wiimote_t* wm, byte vol); +WIIUSE_EXPORT extern void wiiuse_speaker_frequency(struct wiimote_t* wm, unsigned short freq); +WIIUSE_EXPORT extern void wiiuse_speaker_data(struct wiimote_t* wm, byte* data); \ No newline at end of file diff --git a/wiiuse.h b/wiiuse.h new file mode 100644 index 0000000..9dff81c --- /dev/null +++ b/wiiuse.h @@ -0,0 +1,653 @@ +/* + * wiiuse + * + * Written By: + * Michael Laforest < para > + * Email: < thepara (--AT--) g m a i l [--DOT--] com > + * + * Copyright 2006-2007 + * + * This file is part of wiiuse. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * $Header$ + * + */ + +/** + * @file + * + * @brief API header file. + * + * If this file is included from inside the wiiuse source + * and not from a third party program, then wiimote_internal.h + * is also included which extends this file. + */ + +#ifndef WIIUSE_H_INCLUDED +#define WIIUSE_H_INCLUDED + +#ifdef _WIN32 + /* windows */ + #include +#else + /* nix */ + #include +#endif + +#ifdef WIIUSE_INTERNAL_H_INCLUDED + #define WCONST +#else + #define WCONST const +#endif + +/* led bit masks */ +#define WIIMOTE_LED_NONE 0x00 +#define WIIMOTE_LED_1 0x10 +#define WIIMOTE_LED_2 0x20 +#define WIIMOTE_LED_3 0x40 +#define WIIMOTE_LED_4 0x80 + +/* button codes */ +#define WIIMOTE_BUTTON_TWO 0x0001 +#define WIIMOTE_BUTTON_ONE 0x0002 +#define WIIMOTE_BUTTON_B 0x0004 +#define WIIMOTE_BUTTON_A 0x0008 +#define WIIMOTE_BUTTON_MINUS 0x0010 +#define WIIMOTE_BUTTON_ZACCEL_BIT6 0x0020 +#define WIIMOTE_BUTTON_ZACCEL_BIT7 0x0040 +#define WIIMOTE_BUTTON_HOME 0x0080 +#define WIIMOTE_BUTTON_LEFT 0x0100 +#define WIIMOTE_BUTTON_RIGHT 0x0200 +#define WIIMOTE_BUTTON_DOWN 0x0400 +#define WIIMOTE_BUTTON_UP 0x0800 +#define WIIMOTE_BUTTON_PLUS 0x1000 +#define WIIMOTE_BUTTON_ZACCEL_BIT4 0x2000 +#define WIIMOTE_BUTTON_ZACCEL_BIT5 0x4000 +#define WIIMOTE_BUTTON_UNKNOWN 0x8000 +#define WIIMOTE_BUTTON_ALL 0x1F9F + +/* nunchul button codes */ +#define NUNCHUK_BUTTON_Z 0x01 +#define NUNCHUK_BUTTON_C 0x02 +#define NUNCHUK_BUTTON_ALL 0x03 + +/* classic controller button codes */ +#define CLASSIC_CTRL_BUTTON_UP 0x0001 +#define CLASSIC_CTRL_BUTTON_LEFT 0x0002 +#define CLASSIC_CTRL_BUTTON_ZR 0x0004 +#define CLASSIC_CTRL_BUTTON_X 0x0008 +#define CLASSIC_CTRL_BUTTON_A 0x0010 +#define CLASSIC_CTRL_BUTTON_Y 0x0020 +#define CLASSIC_CTRL_BUTTON_B 0x0040 +#define CLASSIC_CTRL_BUTTON_ZL 0x0080 +#define CLASSIC_CTRL_BUTTON_FULL_R 0x0200 +#define CLASSIC_CTRL_BUTTON_PLUS 0x0400 +#define CLASSIC_CTRL_BUTTON_HOME 0x0800 +#define CLASSIC_CTRL_BUTTON_MINUS 0x1000 +#define CLASSIC_CTRL_BUTTON_FULL_L 0x2000 +#define CLASSIC_CTRL_BUTTON_DOWN 0x4000 +#define CLASSIC_CTRL_BUTTON_RIGHT 0x8000 +#define CLASSIC_CTRL_BUTTON_ALL 0xFEFF + +/* guitar hero 3 button codes */ +#define GUITAR_HERO_3_BUTTON_STRUM_UP 0x0001 +#define GUITAR_HERO_3_BUTTON_YELLOW 0x0008 +#define GUITAR_HERO_3_BUTTON_GREEN 0x0010 +#define GUITAR_HERO_3_BUTTON_BLUE 0x0020 +#define GUITAR_HERO_3_BUTTON_RED 0x0040 +#define GUITAR_HERO_3_BUTTON_ORANGE 0x0080 +#define GUITAR_HERO_3_BUTTON_PLUS 0x0400 +#define GUITAR_HERO_3_BUTTON_MINUS 0x1000 +#define GUITAR_HERO_3_BUTTON_STRUM_DOWN 0x4000 +#define GUITAR_HERO_3_BUTTON_ALL 0xFEFF + + +/* wiimote option flags */ +#define WIIUSE_SMOOTHING 0x01 +#define WIIUSE_CONTINUOUS 0x02 +#define WIIUSE_ORIENT_THRESH 0x04 +#define WIIUSE_INIT_FLAGS (WIIUSE_SMOOTHING | WIIUSE_ORIENT_THRESH) + +#define WIIUSE_ORIENT_PRECISION 100.0f + +/* expansion codes */ +#define EXP_NONE 0 +#define EXP_NUNCHUK 1 +#define EXP_CLASSIC 2 +#define EXP_GUITAR_HERO_3 3 + +/* IR correction types */ +typedef enum ir_position_t { + WIIUSE_IR_ABOVE, + WIIUSE_IR_BELOW +} ir_position_t; + +/** + * @brief Check if a button is pressed. + * @param dev Pointer to a wiimote_t or expansion structure. + * @param button The button you are interested in. + * @return 1 if the button is pressed, 0 if not. + */ +#define IS_PRESSED(dev, button) ((dev->btns & button) == button) + +/** + * @brief Check if a button is being held. + * @param dev Pointer to a wiimote_t or expansion structure. + * @param button The button you are interested in. + * @return 1 if the button is held, 0 if not. + */ +#define IS_HELD(dev, button) ((dev->btns_held & button) == button) + +/** + * @brief Check if a button is released on this event. \n\n + * This does not mean the button is not pressed, it means \n + * this button was just now released. + * @param dev Pointer to a wiimote_t or expansion structure. + * @param button The button you are interested in. + * @return 1 if the button is released, 0 if not. + * + */ +#define IS_RELEASED(dev, button) ((dev->btns_released & button) == button) + +/** + * @brief Check if a button has just been pressed this event. + * @param dev Pointer to a wiimote_t or expansion structure. + * @param button The button you are interested in. + * @return 1 if the button is pressed, 0 if not. + */ +#define IS_JUST_PRESSED(dev, button) (IS_PRESSED(dev, button) && !IS_HELD(dev, button)) + +/** + * @brief Return the IR sensitivity level. + * @param wm Pointer to a wiimote_t structure. + * @param lvl [out] Pointer to an int that will hold the level setting. + * If no level is set 'lvl' will be set to 0. + */ +#define WIIUSE_GET_IR_SENSITIVITY(dev, lvl) \ + do { \ + if ((wm->state & 0x0200) == 0x0200) *lvl = 1; \ + else if ((wm->state & 0x0400) == 0x0400) *lvl = 2; \ + else if ((wm->state & 0x0800) == 0x0800) *lvl = 3; \ + else if ((wm->state & 0x1000) == 0x1000) *lvl = 4; \ + else if ((wm->state & 0x2000) == 0x2000) *lvl = 5; \ + else *lvl = 0; \ + } while (0) + +#define WIIUSE_USING_ACC(wm) ((wm->state & 0x020) == 0x020) +#define WIIUSE_USING_EXP(wm) ((wm->state & 0x040) == 0x040) +#define WIIUSE_USING_IR(wm) ((wm->state & 0x080) == 0x080) +#define WIIUSE_USING_SPEAKER(wm) ((wm->state & 0x100) == 0x100) + +#define WIIUSE_IS_LED_SET(wm, num) ((wm->leds & WIIMOTE_LED_##num) == WIIMOTE_LED_##num) + +/* + * Largest known payload is 21 bytes. + * Add 2 for the prefix and round up to a power of 2. + */ +#define MAX_PAYLOAD 32 + +/* + * This is left over from an old hack, but it may actually + * be a useful feature to keep so it wasn't removed. + */ +#ifdef WIN32 + #define WIIMOTE_DEFAULT_TIMEOUT 10 + #define WIIMOTE_EXP_TIMEOUT 10 +#endif + +typedef unsigned char byte; +typedef char sbyte; + +struct wiimote_t; +struct vec3b_t; +struct orient_t; +struct gforce_t; + + +/** + * @brief Callback that handles a read event. + * + * @param wm Pointer to a wiimote_t structure. + * @param data Pointer to the filled data block. + * @param len Length in bytes of the data block. + * + * @see wiiuse_init() + * + * A registered function of this type is called automatically by the wiiuse + * library when the wiimote has returned the full data requested by a previous + * call to wiiuse_read_data(). + */ +typedef void (*wiiuse_read_cb)(struct wiimote_t* wm, byte* data, unsigned short len); + + +/** + * @struct read_req_t + * @brief Data read request structure. + */ +struct read_req_t { + wiiuse_read_cb cb; /**< read data callback */ + byte* buf; /**< buffer where read data is written */ + unsigned int addr; /**< the offset that the read started at */ + unsigned short size; /**< the length of the data read */ + unsigned short wait; /**< num bytes still needed to finish read */ + byte dirty; /**< set to 1 if not using callback and needs to be cleaned up */ + + struct read_req_t* next; /**< next read request in the queue */ +}; + + +/** + * @struct vec2b_t + * @brief Unsigned x,y byte vector. + */ +typedef struct vec2b_t { + byte x, y; +} vec2b_t; + + +/** + * @struct vec3b_t + * @brief Unsigned x,y,z byte vector. + */ +typedef struct vec3b_t { + byte x, y, z; +} vec3b_t; + + +/** + * @struct vec3f_t + * @brief Signed x,y,z float struct. + */ +typedef struct vec3f_t { + float x, y, z; +} vec3f_t; + + +/** + * @struct orient_t + * @brief Orientation struct. + * + * Yaw, pitch, and roll range from -180 to 180 degrees. + */ +typedef struct orient_t { + float roll; /**< roll, this may be smoothed if enabled */ + float pitch; /**< pitch, this may be smoothed if enabled */ + float yaw; + + float a_roll; /**< absolute roll, unsmoothed */ + float a_pitch; /**< absolute pitch, unsmoothed */ +} orient_t; + + +/** + * @struct gforce_t + * @brief Gravity force struct. + */ +typedef struct gforce_t { + float x, y, z; +} gforce_t; + + +/** + * @struct accel_t + * @brief Accelerometer struct. For any device with an accelerometer. + */ +typedef struct accel_t { + struct vec3b_t cal_zero; /**< zero calibration */ + struct vec3b_t cal_g; /**< 1g difference around 0cal */ + + float st_roll; /**< last smoothed roll value */ + float st_pitch; /**< last smoothed roll pitch */ + float st_alpha; /**< alpha value for smoothing [0-1] */ +} accel_t; + + +/** + * @struct ir_dot_t + * @brief A single IR source. + */ +typedef struct ir_dot_t { + byte visible; /**< if the IR source is visible */ + + unsigned int x; /**< interpolated X coordinate */ + unsigned int y; /**< interpolated Y coordinate */ + + short rx; /**< raw X coordinate (0-1023) */ + short ry; /**< raw Y coordinate (0-767) */ + + byte order; /**< increasing order by x-axis value */ + + byte size; /**< size of the IR dot (0-15) */ +} ir_dot_t; + + +/** + * @enum aspect_t + * @brief Screen aspect ratio. + */ +typedef enum aspect_t { + WIIUSE_ASPECT_4_3, + WIIUSE_ASPECT_16_9 +} aspect_t; + + +/** + * @struct ir_t + * @brief IR struct. Hold all data related to the IR tracking. + */ +typedef struct ir_t { + struct ir_dot_t dot[4]; /**< IR dots */ + byte num_dots; /**< number of dots at this time */ + + enum aspect_t aspect; /**< aspect ratio of the screen */ + + enum ir_position_t pos; /**< IR sensor bar position */ + + unsigned int vres[2]; /**< IR virtual screen resolution */ + int offset[2]; /**< IR XY correction offset */ + int state; /**< keeps track of the IR state */ + + int ax; /**< absolute X coordinate */ + int ay; /**< absolute Y coordinate */ + + int x; /**< calculated X coordinate */ + int y; /**< calculated Y coordinate */ + + float distance; /**< pixel distance between first 2 dots*/ + float z; /**< calculated distance */ +} ir_t; + + +/** + * @struct joystick_t + * @brief Joystick calibration structure. + * + * The angle \a ang is relative to the positive y-axis into quadrant I + * and ranges from 0 to 360 degrees. So if the joystick is held straight + * upwards then angle is 0 degrees. If it is held to the right it is 90, + * down is 180, and left is 270. + * + * The magnitude \a mag is the distance from the center to where the + * joystick is being held. The magnitude ranges from 0 to 1. + * If the joystick is only slightly tilted from the center the magnitude + * will be low, but if it is closer to the outter edge the value will + * be higher. + */ +typedef struct joystick_t { + struct vec2b_t max; /**< maximum joystick values */ + struct vec2b_t min; /**< minimum joystick values */ + struct vec2b_t center; /**< center joystick values */ + + float ang; /**< angle the joystick is being held */ + float mag; /**< magnitude of the joystick (range 0-1) */ +} joystick_t; + + +/** + * @struct nunchuk_t + * @brief Nunchuk expansion device. + */ +typedef struct nunchuk_t { + struct accel_t accel_calib; /**< nunchuk accelerometer calibration */ + struct joystick_t js; /**< joystick calibration */ + + int* flags; /**< options flag (points to wiimote_t.flags) */ + + byte btns; /**< what buttons have just been pressed */ + byte btns_held; /**< what buttons are being held down */ + byte btns_released; /**< what buttons were just released this */ + + float orient_threshold; /**< threshold for orient to generate an event */ + int accel_threshold; /**< threshold for accel to generate an event */ + + struct vec3b_t accel; /**< current raw acceleration data */ + struct orient_t orient; /**< current orientation on each axis */ + struct gforce_t gforce; /**< current gravity forces on each axis */ +} nunchuk_t; + + +/** + * @struct classic_ctrl_t + * @brief Classic controller expansion device. + */ +typedef struct classic_ctrl_t { + short btns; /**< what buttons have just been pressed */ + short btns_held; /**< what buttons are being held down */ + short btns_released; /**< what buttons were just released this */ + + float r_shoulder; /**< right shoulder button (range 0-1) */ + float l_shoulder; /**< left shoulder button (range 0-1) */ + + struct joystick_t ljs; /**< left joystick calibration */ + struct joystick_t rjs; /**< right joystick calibration */ +} classic_ctrl_t; + + +/** + * @struct guitar_hero_3_t + * @brief Guitar Hero 3 expansion device. + */ +typedef struct guitar_hero_3_t { + short btns; /**< what buttons have just been pressed */ + short btns_held; /**< what buttons are being held down */ + short btns_released; /**< what buttons were just released this */ + + float whammy_bar; /**< whammy bar (range 0-1) */ + + struct joystick_t js; /**< joystick calibration */ +} guitar_hero_3_t; + + +/** + * @struct expansion_t + * @brief Generic expansion device plugged into wiimote. + */ +typedef struct expansion_t { + int type; /**< type of expansion attached */ + + union { + struct nunchuk_t nunchuk; + struct classic_ctrl_t classic; + struct guitar_hero_3_t gh3; + }; +} expansion_t; + + +/** + * @enum win32_bt_stack_t + * @brief Available bluetooth stacks for Windows. + */ +typedef enum win_bt_stack_t { + WIIUSE_STACK_UNKNOWN, + WIIUSE_STACK_MS, + WIIUSE_STACK_BLUESOLEIL +} win_bt_stack_t; + + +/** + * @struct wiimote_state_t + * @brief Significant data from the previous event. + */ +typedef struct wiimote_state_t { + /* expansion_t */ + float exp_ljs_ang; + float exp_rjs_ang; + float exp_ljs_mag; + float exp_rjs_mag; + unsigned short exp_btns; + struct orient_t exp_orient; + struct vec3b_t exp_accel; + float exp_r_shoulder; + float exp_l_shoulder; + + /* ir_t */ + int ir_ax; + int ir_ay; + float ir_distance; + + struct orient_t orient; + unsigned short btns; + + struct vec3b_t accel; +} wiimote_state_t; + + +/** + * @enum WIIUSE_EVENT_TYPE + * @brief Events that wiiuse can generate from a poll. + */ +typedef enum WIIUSE_EVENT_TYPE { + WIIUSE_NONE = 0, + WIIUSE_EVENT, + WIIUSE_STATUS, + WIIUSE_CONNECT, + WIIUSE_DISCONNECT, + WIIUSE_UNEXPECTED_DISCONNECT, + WIIUSE_READ_DATA, + WIIUSE_NUNCHUK_INSERTED, + WIIUSE_NUNCHUK_REMOVED, + WIIUSE_CLASSIC_CTRL_INSERTED, + WIIUSE_CLASSIC_CTRL_REMOVED, + WIIUSE_GUITAR_HERO_3_CTRL_INSERTED, + WIIUSE_GUITAR_HERO_3_CTRL_REMOVED +} WIIUSE_EVENT_TYPE; + +/** + * @struct wiimote_t + * @brief Wiimote structure. + */ +typedef struct wiimote_t { + WCONST int unid; /**< user specified id */ + + #ifndef WIN32 + WCONST bdaddr_t bdaddr; /**< bt address */ + WCONST char bdaddr_str[18]; /**< readable bt address */ + WCONST int out_sock; /**< output socket */ + WCONST int in_sock; /**< input socket */ + #else + WCONST HANDLE dev_handle; /**< HID handle */ + WCONST OVERLAPPED hid_overlap; /**< overlap handle */ + WCONST enum win_bt_stack_t stack; /**< type of bluetooth stack to use */ + WCONST int timeout; /**< read timeout */ + WCONST byte normal_timeout; /**< normal timeout */ + WCONST byte exp_timeout; /**< timeout for expansion handshake */ + #endif + + WCONST int state; /**< various state flags */ + WCONST byte leds; /**< currently lit leds */ + WCONST float battery_level; /**< battery level */ + + WCONST int flags; /**< options flag */ + + WCONST byte handshake_state; /**< the state of the connection handshake */ + + WCONST struct read_req_t* read_req; /**< list of data read requests */ + WCONST struct accel_t accel_calib; /**< wiimote accelerometer calibration */ + WCONST struct expansion_t exp; /**< wiimote expansion device */ + + WCONST struct vec3b_t accel; /**< current raw acceleration data */ + WCONST struct orient_t orient; /**< current orientation on each axis */ + WCONST struct gforce_t gforce; /**< current gravity forces on each axis */ + + WCONST struct ir_t ir; /**< IR data */ + + WCONST unsigned short btns; /**< what buttons have just been pressed */ + WCONST unsigned short btns_held; /**< what buttons are being held down */ + WCONST unsigned short btns_released; /**< what buttons were just released this */ + + WCONST float orient_threshold; /**< threshold for orient to generate an event */ + WCONST int accel_threshold; /**< threshold for accel to generate an event */ + + WCONST struct wiimote_state_t lstate; /**< last saved state */ + + WCONST WIIUSE_EVENT_TYPE event; /**< type of event that occured */ + WCONST byte event_buf[MAX_PAYLOAD]; /**< event buffer */ +} wiimote; + + +/***************************************** + * + * Include API specific stuff + * + *****************************************/ + +#ifdef _WIN32 + #define WIIUSE_EXPORT_DECL __declspec(dllexport) + #define WIIUSE_IMPORT_DECL __declspec(dllimport) +#else + #define WIIUSE_EXPORT_DECL + #define WIIUSE_IMPORT_DECL +#endif + +#ifdef WIIUSE_COMPILE_LIB + #define WIIUSE_EXPORT WIIUSE_EXPORT_DECL +#else + #define WIIUSE_EXPORT WIIUSE_IMPORT_DECL +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* wiiuse.c */ +WIIUSE_EXPORT extern const char* wiiuse_version(); + +WIIUSE_EXPORT extern struct wiimote_t** wiiuse_init(int wiimotes); +WIIUSE_EXPORT extern void wiiuse_disconnected(struct wiimote_t* wm); +WIIUSE_EXPORT extern void wiiuse_cleanup(struct wiimote_t** wm, int wiimotes); +WIIUSE_EXPORT extern void wiiuse_rumble(struct wiimote_t* wm, int status); +WIIUSE_EXPORT extern void wiiuse_toggle_rumble(struct wiimote_t* wm); +WIIUSE_EXPORT extern void wiiuse_set_leds(struct wiimote_t* wm, int leds); +WIIUSE_EXPORT extern void wiiuse_motion_sensing(struct wiimote_t* wm, int status); +WIIUSE_EXPORT extern int wiiuse_read_data(struct wiimote_t* wm, byte* buffer, unsigned int offset, unsigned short len); +WIIUSE_EXPORT extern int wiiuse_write_data(struct wiimote_t* wm, unsigned int addr, byte* data, byte len); +WIIUSE_EXPORT extern void wiiuse_status(struct wiimote_t* wm); +WIIUSE_EXPORT extern struct wiimote_t* wiiuse_get_by_id(struct wiimote_t** wm, int wiimotes, int unid); +WIIUSE_EXPORT extern int wiiuse_set_flags(struct wiimote_t* wm, int enable, int disable); +WIIUSE_EXPORT extern float wiiuse_set_smooth_alpha(struct wiimote_t* wm, float alpha); +WIIUSE_EXPORT extern void wiiuse_set_bluetooth_stack(struct wiimote_t** wm, int wiimotes, enum win_bt_stack_t type); +WIIUSE_EXPORT extern void wiiuse_set_orient_threshold(struct wiimote_t* wm, float threshold); +WIIUSE_EXPORT extern void wiiuse_resync(struct wiimote_t* wm); +WIIUSE_EXPORT extern void wiiuse_set_timeout(struct wiimote_t** wm, int wiimotes, byte normal_timeout, byte exp_timeout); +WIIUSE_EXPORT extern void wiiuse_set_accel_threshold(struct wiimote_t* wm, int threshold); + +/* connect.c */ +WIIUSE_EXPORT extern int wiiuse_find(struct wiimote_t** wm, int max_wiimotes, int timeout); +WIIUSE_EXPORT extern int wiiuse_connect(struct wiimote_t** wm, int wiimotes); +WIIUSE_EXPORT extern void wiiuse_disconnect(struct wiimote_t* wm); + +/* events.c */ +WIIUSE_EXPORT extern int wiiuse_poll(struct wiimote_t** wm, int wiimotes); + +/* ir.c */ +WIIUSE_EXPORT extern void wiiuse_set_ir(struct wiimote_t* wm, int status); +WIIUSE_EXPORT extern void wiiuse_set_ir_vres(struct wiimote_t* wm, unsigned int x, unsigned int y); +WIIUSE_EXPORT extern void wiiuse_set_ir_position(struct wiimote_t* wm, enum ir_position_t pos); +WIIUSE_EXPORT extern void wiiuse_set_aspect_ratio(struct wiimote_t* wm, enum aspect_t aspect); +WIIUSE_EXPORT extern void wiiuse_set_ir_sensitivity(struct wiimote_t* wm, int level); + +/* nunchuk.c */ +WIIUSE_EXPORT extern void wiiuse_set_nunchuk_orient_threshold(struct wiimote_t* wm, float threshold); +WIIUSE_EXPORT extern void wiiuse_set_nunchuk_accel_threshold(struct wiimote_t* wm, int threshold); + + +#ifdef __cplusplus +} +#endif + + +#endif /* WIIUSE_H_INCLUDED */ + diff --git a/wiiusej_Speaker.c b/wiiusej_Speaker.c new file mode 100644 index 0000000..c795649 --- /dev/null +++ b/wiiusej_Speaker.c @@ -0,0 +1,68 @@ +#include "wiiusej_WiiUseApi.h" +#include "speaker.h" +#include "wiiuse.h" + +static wiimote** wiimotes; +static int nbMaxWiimotes; + +/* +void test(struct wiimote_t* wm) { + int i; + byte data[20] = { + 0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3, + 0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3}; + wiiuse_speaker_activate(wm); + for (i = 0; i < 50; ++i) { + wiiuse_speaker_data(wm, data); + } + wiiuse_speaker_deactivate(wm); +}*/ + +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_activateSpeaker +(JNIEnv *env, jobject obj, jint id) { + wiiuse_speaker_activate(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id)); +} + +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_deactivateSpeaker +(JNIEnv *env, jobject obj, jint id) { + wiiuse_speaker_deactivate(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id)); +} +/* +void testen(struct wiimote_t* wm, unsigned short freq) { + if (freq > 0x0000) { + cfg[2] = freq & 0x00ff; + cfg[3] = (freq & 0xff00) >> 8; + } + printf("unaangepast %d\n", freq); + printf("speaker 0x%02x%02x\n", cfg[2], cfg[3]); + fflush(stdout); + wiiuse_write_data(wm, WM_REG_SPEAKER, cfg, 9); +}*/ + + +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setSpeakerFrequency +(JNIEnv *env, jobject obj, jint id, jint freq) { + wiiuse_speaker_frequency(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), (unsigned short) freq); + //short a = ((short) freq) & 0xffff; + //printf("jni %d %d\n", freq, a); + //fflush(stdout); + //testen(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), (unsigned short) freq); +} + +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setSpeakerVolume +(JNIEnv *env, jobject obj, jint id, jshort vol) { + wiiuse_speaker_frequency(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), vol); +} + + +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_streamSpeakerData +(JNIEnv *env, jobject obj, jint id, jshortArray sArray) { + int i = 0; + jshort *jShorts = (*env)->GetShortArrayElements(env, sArray, JNI_FALSE); + byte data[sizeof(jShorts)]; + for (i = 0; i < sizeof(jShorts); ++i) { + data[i] = (byte) jShorts[i]; + } + wiiuse_speaker_data(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), data); + (*env)->ReleaseShortArrayElements(env, sArray, jShorts, JNI_FALSE); +} \ No newline at end of file diff --git a/wiiusej_Speaker.h b/wiiusej_Speaker.h new file mode 100644 index 0000000..031958b --- /dev/null +++ b/wiiusej_Speaker.h @@ -0,0 +1,317 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class wiiusej_WiiUseApi */ + +#ifndef _Included_wiiusej_WiiUseApi +#define _Included_wiiusej_WiiUseApi +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: wiiusej_WiiUseApi + * Method: connect + * Signature: (I)I + */ +JNIEXPORT jint JNICALL Java_wiiusej_WiiUseApi_connect + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: find + * Signature: (II)I + */ +JNIEXPORT jint JNICALL Java_wiiusej_WiiUseApi_find + (JNIEnv *, jobject, jint, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: init + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_init + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: closeConnection + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_closeConnection + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: getUnId + * Signature: (I)I + */ +JNIEXPORT jint JNICALL Java_wiiusej_WiiUseApi_getUnId + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: cleanUp + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_cleanUp + (JNIEnv *, jobject); + +/* + * Class: wiiusej_WiiUseApi + * Method: activateRumble + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_activateRumble + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: deactivateRumble + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_deactivateRumble + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: activateIRTracking + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_activateIRTracking + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: deactivateIRTracking + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_deactivateIRTracking + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: activateMotionSensing + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_activateMotionSensing + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: deactivateMotionSensing + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_deactivateMotionSensing + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: setLeds + * Signature: (IZZZZ)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setLeds + (JNIEnv *, jobject, jint, jboolean, jboolean, jboolean, jboolean); + +/* + * Class: wiiusej_WiiUseApi + * Method: setOrientThreshold + * Signature: (IF)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setOrientThreshold + (JNIEnv *, jobject, jint, jfloat); + +/* + * Class: wiiusej_WiiUseApi + * Method: setAccelThreshold + * Signature: (II)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setAccelThreshold + (JNIEnv *, jobject, jint, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: setAlphaSmoothing + * Signature: (IF)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setAlphaSmoothing + (JNIEnv *, jobject, jint, jfloat); + +/* + * Class: wiiusej_WiiUseApi + * Method: reSync + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_reSync + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: activateSmoothing + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_activateSmoothing + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: deactivateSmoothing + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_deactivateSmoothing + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: activateContinuous + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_activateContinuous + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: deactivateContinuous + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_deactivateContinuous + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: setScreenRatio43 + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setScreenRatio43 + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: setScreenRatio169 + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setScreenRatio169 + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: setSensorBarAboveScreen + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setSensorBarAboveScreen + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: setSensorBarBelowScreen + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setSensorBarBelowScreen + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: setVirtualScreenResolution + * Signature: (III)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setVirtualScreenResolution + (JNIEnv *, jobject, jint, jint, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: getStatus + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_getStatus + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: setTimeout + * Signature: (ISS)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setTimeout + (JNIEnv *, jobject, jint, jshort, jshort); + +/* + * Class: wiiusej_WiiUseApi + * Method: setIrSensitivity + * Signature: (II)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setIrSensitivity + (JNIEnv *, jobject, jint, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: setNunchukOrientationThreshold + * Signature: (IF)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setNunchukOrientationThreshold + (JNIEnv *, jobject, jint, jfloat); + +/* + * Class: wiiusej_WiiUseApi + * Method: setNunchukAccelerationThreshold + * Signature: (II)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setNunchukAccelerationThreshold + (JNIEnv *, jobject, jint, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: windowsSetBluetoothStack + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_windowsSetBluetoothStack + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: specialPoll + * Signature: (Lwiiusej/wiiusejevents/utils/EventsGatherer;)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_specialPoll + (JNIEnv *, jobject, jobject); + +/* + * Class: wiiusej_WiiUseApi + * Method: activateSpeaker + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_activateSpeaker + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: deactivateSpeaker + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_deactivateSpeaker + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: setSpeakerVolume + * Signature: (IS)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setSpeakerVolume + (JNIEnv *, jobject, jint, jshort); + +/* + * Class: wiiusej_WiiUseApi + * Method: setSpeakerFrequency + * Signature: (II)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setSpeakerFrequency + (JNIEnv *, jobject, jint, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: streamSpeakerData + * Signature: (I[S)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_streamSpeakerData + (JNIEnv *, jobject, jint, jshortArray); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/wiiusej_WiiUseApi.c b/wiiusej_WiiUseApi.c new file mode 100644 index 0000000..8d43e93 --- /dev/null +++ b/wiiusej_WiiUseApi.c @@ -0,0 +1,671 @@ +/** + * This file is part of WiiuseJ. + * + * WiiuseJ is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * WiiuseJ is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with WiiuseJ. If not, see . + */ +#ifndef WIN32 +#include +#else + +#endif + +#include "wiiusej_WiiUseApi.h" +#include "wiiuse.h" +/* + * These are some identifiers for wiimotes + * + * See below in main() for what they are used for. + */ +#define WIIMOTE_STATE_RUMBLE 0x0010 +#define WIIMOTE_STATE_CONNECTED 0x0008 +#define WIIMOTE_IS_SET(wm, s) ((wm->state & (s)) == (s)) +#define WIIMOTE_IS_FLAG_SET(wm, s) ((wm->flags & (s)) == (s)) +#define WIIUSE_GET_IR_SENSITIVITY_CORRECTED(wm, lvl) \ + do { \ + if ((wm->state & 0x0200) == 0x0200) *lvl = 1; \ + else if ((wm->state & 0x0400) == 0x0400) *lvl = 2; \ + else if ((wm->state & 0x0800) == 0x0800) *lvl = 3; \ + else if ((wm->state & 0x1000) == 0x1000) *lvl = 4; \ + else if ((wm->state & 0x2000) == 0x2000) *lvl = 5; \ + else *lvl = 0; \ + } while (0) + +/********************* VARIABLES DECLARATIONS *****************************/ + +/* + * Make a temp array of wiimote ids. + * Here I only anticipate connecting up to + * two wiimotes. Each wiimote connected + * will get one of these ids. + */ +static wiimote** wiimotes; +static int nbMaxWiimotes; + +/****************** GENERAL FUNCTIONS DEFINITIONS *************************/ + +/** + * Connect to a wiimote or wiimotes once an address is known. + * @param nbWiimotes The number of wiimotes. + * @return The number of wiimotes that successfully connected. + */ +JNIEXPORT jint JNICALL Java_wiiusej_WiiUseApi_connect +(JNIEnv *env, jobject obj, jint nbWiimotes) { + return wiiuse_connect(wiimotes, nbWiimotes); +} + +/** + * Find a wiimote or wiimotes. + * @param nbMaxWiimotes The number of wiimotes. + * @param timeout The number of seconds before the search times out. + * @return The number of wiimotes found. + */ +JNIEXPORT jint JNICALL Java_wiiusej_WiiUseApi_find +(JNIEnv *env, jobject obj, jint nbMaxWiimotes, jint timeout) { + return wiiuse_find(wiimotes, nbMaxWiimotes, timeout); +} + +/** + * Initialize an array of wiimote structures (for the C side of the library). + * @param nbPossibleWiimotes size of the array. + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_init +(JNIEnv *env, jobject obj, jint nbPossibleWiimotes) { + wiimotes = wiiuse_init(nbPossibleWiimotes); + nbMaxWiimotes = nbPossibleWiimotes; +} + +/** + * Close connection to the wiimote with the given id. + * + * @param id the id of the wiimote to disconnect.Must be 1 or 2. + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_closeConnection +(JNIEnv *env, jobject obj, jint id) { + wiiuse_disconnect(wiimotes[id]); +} + +/** + * Get unique id of a wiimote in the wiimotes array. + * Please make sure you call an existing index with a + * wiimote initialized at this index, + * other wise you'll get a wrong value. + * @param index index of the wiimote in the wiimotes array. + */ +JNIEXPORT jint JNICALL Java_wiiusej_WiiUseApi_getUnId +(JNIEnv *env, jobject obj, jint index) { + return wiimotes[index]->unid; +} + +/** + * Shutdown api. + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_cleanUp +(JNIEnv *env, jobject obj) { + wiiuse_cleanup(wiimotes, nbMaxWiimotes); +} + +/** + * Activate rumble for the wiimote with the given id. + * @param id the id of the wiimote.Must be 1 or 2. + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_activateRumble +(JNIEnv *env, jobject obj, jint id) { + wiiuse_rumble(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), 1); +} + +/** + * Deactivate rumble for the wiimote with the given id. + * @param id the id of the wiimote.Must be 1 or 2. + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_deactivateRumble +(JNIEnv *env, jobject obj, jint id) { + wiiuse_rumble(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), 0); +} + +/** + * Activate IR TRacking for the wiimote with the given id. + * @param id the id of the wiimote. + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_activateIRTracking +(JNIEnv *env, jobject obj, jint id) { + wiiuse_set_ir(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), 1); +} + +/** + * Deactivate IR TRacking for the wiimote with the given id. + * @param id the id of the wiimote.Must be 1 or 2. + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_deactivateIRTracking +(JNIEnv *env, jobject obj, jint id) { + wiiuse_set_ir(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), 0); +} + +/** + * Activate Motion Sensing for the wiimote with the given id. + * @param id the id of the wiimote.Must be 1 or 2. + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_activateMotionSensing +(JNIEnv *env, jobject obj, jint id) { + wiiuse_motion_sensing(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), 1); +} + +/** + * Deactivate Motion Sensing for the wiimote with the given id. + * @param id the id of the wiimote.Must be 1 or 2. + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_deactivateMotionSensing +(JNIEnv *env, jobject obj, jint id) { + wiiuse_motion_sensing(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), 0); +} + +/** + * Set wiimote leds status. + * @param id the id of the wiimote concerned + * @param led1 status of led1: True=ON, False=OFF + * @param led2 status of led2: True=ON, False=OFF + * @param led3 status of led3: True=ON, False=OFF + * @param led4 status of led4: True=ON, False=OFF + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setLeds +(JNIEnv *env, jobject obj, jint id, jboolean led1, jboolean led2, jboolean led3, jboolean led4) { + int leds = 0; + + if (led1) leds |= WIIMOTE_LED_1; + if (led2) leds |= WIIMOTE_LED_2; + if (led3) leds |= WIIMOTE_LED_3; + if (led4) leds |= WIIMOTE_LED_4; + + wiiuse_set_leds(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), leds); +} + +/** + * Set how many degrees an angle must change to generate an event. + * @param id id of the wiimote concerned + * @param thresh minimum angle detected by an event + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setOrientThreshold +(JNIEnv *env, jobject obj, jint id, jfloat thresh) { + wiiuse_set_orient_threshold(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), thresh); +} + +/** + * Set how much acceleration must change to generate an event. + * @param id id of the wiimote concerned + * @param val minimum value detected by an event + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setAccelThreshold +(JNIEnv *env, jobject obj, jint id, jint val) { + wiiuse_set_accel_threshold(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), val); +} + +/** + * Set alpha smoothing parameter for the given id. + * @param id id of the wiimote concerned + * @param value alpha smoothing value + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setAlphaSmoothing +(JNIEnv *env, jobject obj, jint id, jfloat val) { + wiiuse_set_smooth_alpha(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), val); +} + +/** + * Try to resync with the wiimote by starting a new handshake. + * @param id id of the wiimote concerned + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_reSync +(JNIEnv *env, jobject obj, jint id) { + wiiuse_resync(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id)); +} + +/** + * Make the the accelerometers give smoother results. + * This is set by default. + * @param id the id of the wiimote concerned + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_activateSmoothing +(JNIEnv *env, jobject obj, jint id) { + wiiuse_set_flags(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), WIIUSE_SMOOTHING, 0); +} + +/** + * Make the the accelerometers give raw results. + * @param id the id of the wiimote concerned + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_deactivateSmoothing +(JNIEnv *env, jobject obj, jint id) { + wiiuse_set_flags(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), 0, WIIUSE_SMOOTHING); +} + +/** + * Make the wiimote generate an event each time we poll. + * Not set by default. + * @param id the id of the wiimote concerned + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_activateContinuous +(JNIEnv *env, jobject obj, jint id) { + wiiuse_set_flags(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), WIIUSE_CONTINUOUS, 0); +} + +/** + * Make the wiimote generate an event only when there is one. + * (default behavior) + * @param id the id of the wiimote concerned + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_deactivateContinuous +(JNIEnv *env, jobject obj, jint id) { + wiiuse_set_flags(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), 0, WIIUSE_CONTINUOUS); +} + +/** + * Notify wiiuse that your screen has an aspect ratio of 4/3. + * @param id the id of the wiimote concerned + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setScreenRatio43 +(JNIEnv *env, jobject obj, jint id) { + wiiuse_set_aspect_ratio(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), WIIUSE_ASPECT_4_3); +} + +/** + * Notify wiiuse that your screen has an aspect ratio of 16/9. + * @param id the id of the wiimote concerned + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setScreenRatio169 +(JNIEnv *env, jobject obj, jint id) { + wiiuse_set_aspect_ratio(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), WIIUSE_ASPECT_4_3); +} + +/** + * Notify wiiuse that the sensor bar is above your screen. + * @param id the id of the wiimote concerned + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setSensorBarAboveScreen +(JNIEnv *env, jobject obj, jint id) { + wiiuse_set_ir_position(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), WIIUSE_IR_ABOVE); +} + +/** + * Notify wiiuse that the sensor bar is below your screen. + * @param id the id of the wiimote concerned + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setSensorBarBelowScreen +(JNIEnv *env, jobject obj, jint id) { + wiiuse_set_ir_position(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), WIIUSE_IR_BELOW); +} + +/** + * Set virtual screen resolution. It is used to automatically + * compute the position of a cursor on this virtual screen + * using the sensor bar. These results come in the IREvent. + * @param id the id of the wiimote concerned + * @param x x resolution. + * @param y y resolution. + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setVirtualScreenResolution +(JNIEnv *env, jobject obj, jint id, jint x, jint y) { + wiiuse_set_ir_vres(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), x, y); +} + +/** + * Get status from the wiimotes and send it through call backs. + * + * @param id the id of the wiimote. Must be 1 or 2. + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_getStatus +(JNIEnv *env, jobject obj, jint id) { + wiiuse_status(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id)); +} + +/** + * Set the normal and expansion handshake timeouts. + * + * @param id + * the id of the wiimote concerned. + * @param normalTimeout + * The timeout in milliseconds for a normal read. + * @param expansionTimeout + * The timeout in millisecondsd to wait for an expansion + * handshake. + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setTimeout +(JNIEnv *env, jobject obj, jint id, jshort normalTimeout, jshort expansionTimeout) { + wiiuse_set_timeout(wiimotes, nbMaxWiimotes, normalTimeout, expansionTimeout); +} + +/** + * Set the IR sensitivity. + * + * @param id + * the id of the wiimote concerned. + * @param level + * 1-5, same as Wii system sensitivity setting. If the level is < + * 1, then level will be set to 1. If the level is > 5, then + * level will be set to 5. + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setIrSensitivity +(JNIEnv *env, jobject obj, jint id, jint level) { + wiiuse_set_ir_sensitivity(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), level); +} + +/** + * Set how many degrees an angle must change to generate an event for the nunchuk. + * @param id id of the wiimote concerned + * @param thresh minimum angle detected by an event + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setNunchukOrientationThreshold +(JNIEnv *env, jobject obj, jint id, jfloat thresh) { + wiiuse_set_nunchuk_orient_threshold(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), thresh); +} + +/** + * Set how much acceleration must change to generate an event for the nunchuk. + * @param id id of the wiimote concerned + * @param val minimum value detected by an event + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setNunchukAccelerationThreshold +(JNIEnv *env, jobject obj, jint id, jint val) { + wiiuse_set_nunchuk_accel_threshold(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), val); +} + +/** + * Force the bluetooth stack type.(useful only for windows) + * + * @param bluetoothStackType + * must be WiiUseApi.WIIUSE_STACK_UNKNOWN or WiiUseApi.WIIUSE_STACK_MS or + * WiiUseApi.WIIUSE_STACK_BLUESOLEIL. + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_windowsSetBluetoothStack +(JNIEnv *env, jobject obj, jint bluetoothStackType) { + if (bluetoothStackType == 0) { + wiiuse_set_bluetooth_stack(wiimotes, nbMaxWiimotes, WIIUSE_STACK_UNKNOWN); + } else if (bluetoothStackType == 1) { + wiiuse_set_bluetooth_stack(wiimotes, nbMaxWiimotes, WIIUSE_STACK_MS); + } else if (bluetoothStackType == 2) { + wiiuse_set_bluetooth_stack(wiimotes, nbMaxWiimotes, WIIUSE_STACK_BLUESOLEIL); + } +} + +/** + * Get status and values from the wiimotes and send it through callbacks. + * @param wim the wiimote object to fill with the datas. + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_specialPoll +(JNIEnv *env, jobject obj, jobject gath) { + + /* Variables Declarations */ + int i, a; + short leds = 0; + jclass cls = (*env)->GetObjectClass(env, gath); + jmethodID mid; + struct nunchuk_t* nc; + struct guitar_hero_3_t* gh; + struct classic_ctrl_t* cl; + //printf("avant poll, nbMaxwiimotes : %i \n",nbMaxWiimotes); + if (wiiuse_poll(wiimotes, nbMaxWiimotes)) { + /* + * This happens if something happened on any wiimote. + * So go through each one and check if anything happened. + */ + //printf("il y a des events\n"); + for (i=0; i < nbMaxWiimotes; ++i) { + //printf("recupe events wiimote : %i\n",nbMaxWiimotes); + switch (wiimotes[i]->event) { + case WIIUSE_EVENT: + /* a generic event occured */ + + //printf("Generic event\n"); + mid = (*env)->GetMethodID(env, cls, "prepareWiiMoteEvent", "(ISSS)V"); + if (mid == 0) { + return; + } + (*env)->CallVoidMethod(env, gath, mid, wiimotes[i]->unid, wiimotes[i]->btns, + wiimotes[i]->btns_released, wiimotes[i]->btns_held); + /* + * If IR tracking is enabled then print the coordinates + * on the virtual screen that the wiimote is pointing to. + * + * Also make sure that we see at least 1 dot. + */ + if (WIIUSE_USING_IR(wiimotes[i])) { + //printf("IR event\n"); + + WIIUSE_GET_IR_SENSITIVITY_CORRECTED(wiimotes[i], &a); + + mid = (*env)->GetMethodID(env, cls, "prepareIRevent", "(IIFIIIIIISSSF)V"); + if (mid == 0) { + return; + } + (*env)->CallVoidMethod(env, gath, mid, + wiimotes[i]->ir.x, wiimotes[i]->ir.y, wiimotes[i]->ir.z, + wiimotes[i]->ir.ax, wiimotes[i]->ir.ay, + wiimotes[i]->ir.vres[0], wiimotes[i]->ir.vres[1], + wiimotes[i]->ir.offset[0], wiimotes[i]->ir.offset[1], + wiimotes[i]->ir.pos, wiimotes[i]->ir.aspect, + a , wiimotes[i]->ir.distance); + + mid = (*env)->GetMethodID(env, cls, "addIRPointToPreparedWiiMoteEvent", + "(IISSS)V"); + if (mid == 0) { + return; + } + /* go through each of the 4 possible IR sources */ + for (a=0; a < 4; a++) { + /* check if the source is visible */ + if (wiimotes[i]->ir.dot[a].visible) { + (*env)->CallVoidMethod(env, gath, mid, + wiimotes[i]->ir.dot[a].x, wiimotes[i]->ir.dot[a].y, + wiimotes[i]->ir.dot[a].rx, wiimotes[i]->ir.dot[a].ry, + wiimotes[i]->ir.dot[a].size); + } + } + } + + /* Motion Sensing */ + if (WIIUSE_USING_ACC(wiimotes[i])) { + //printf("acc event\n"); + /* set orientation and gravity force */ + mid = (*env)->GetMethodID(env, cls, + "addMotionSensingValues", "(FIZFFFFFFFFFSSS)V"); + if (mid == 0) { + return; + } + (*env)->CallVoidMethod(env, gath, mid, + wiimotes[i]->orient_threshold, wiimotes[i]->accel_threshold, + WIIMOTE_IS_FLAG_SET(wiimotes[i],WIIUSE_SMOOTHING), wiimotes[i]->accel_calib.st_alpha, + wiimotes[i]->orient.roll, wiimotes[i]->orient.pitch, wiimotes[i]->orient.yaw, + wiimotes[i]->orient.a_roll, wiimotes[i]->orient.a_pitch, + wiimotes[i]->gforce.x, wiimotes[i]->gforce.y, wiimotes[i]->gforce.z, + wiimotes[i]->accel.x, wiimotes[i]->accel.y, wiimotes[i]->accel.z); + } + + /* Expansions support support*/ + if (WIIUSE_USING_EXP(wiimotes[i])) { + /* Nunchuk support */ + if (wiimotes[i]->exp.type == EXP_NUNCHUK) { + /* put nunchuk values in wiimote generic event */ + mid = (*env)->GetMethodID(env, cls, + "addNunchunkEventToPreparedWiimoteEvent", "(SSSFIZFFFFFFFFFSSSFFSSSSSS)V"); + if (mid == 0) { + return; + } + nc = (nunchuk_t*)&wiimotes[i]->exp.nunchuk; + + (*env)->CallVoidMethod(env, gath, mid, + /* buttons */ + nc->btns,nc->btns_released,nc->btns_held, + /* motion sensing */ + nc->orient_threshold,nc->accel_threshold, + WIIMOTE_IS_FLAG_SET(wiimotes[i],WIIUSE_SMOOTHING),nc->accel_calib.st_alpha, + nc->orient.roll, nc->orient.pitch, nc->orient.yaw, + nc->orient.a_roll, nc->orient.a_pitch, + nc->gforce.x, nc->gforce.y, nc->gforce.z, + nc->accel.x, nc->accel.y, nc->accel.z, + /* joystick */ + nc->js.ang,nc->js.mag, + nc->js.max.x,nc->js.max.y, + nc->js.min.x,nc->js.min.y, + nc->js.center.x,nc->js.center.y); + } + else if (wiimotes[i]->exp.type == EXP_GUITAR_HERO_3) { + /* put guitar hero values in wiimote generic event */ + mid = (*env)->GetMethodID(env, cls, + "addGuitarHeroEventToPreparedWiimoteEvent", "(SSSFFFSSSSSS)V"); + if (mid == 0) { + return; + } + gh = (guitar_hero_3_t*)&wiimotes[i]->exp.gh3; + + (*env)->CallVoidMethod(env, gath, mid, + /* buttons */ + gh->btns,gh->btns_released,gh->btns_held, + /* whammy bar */ + gh->whammy_bar, + /* joystick */ + gh->js.ang,gh->js.mag, + gh->js.max.x,gh->js.max.y, + gh->js.min.x,gh->js.min.y, + gh->js.center.x,gh->js.center.y); + }if (wiimotes[i]->exp.type == EXP_CLASSIC) { + /* put classic controller values in wiimote generic event */ + mid = (*env)->GetMethodID(env, cls, + "addClassicControllerEventToPreparedWiimoteEvent", "(SSSFFFFSSSSSSFFSSSSSS)V"); + if (mid == 0) { + return; + } + cl = (classic_ctrl_t*)&wiimotes[i]->exp.classic; + + (*env)->CallVoidMethod(env, gath, mid, + /* buttons */ + cl->btns,cl->btns_released,cl->btns_held, + /* shoulder buttons */ + cl->r_shoulder,cl->l_shoulder, + /* joystick left*/ + cl->ljs.ang,cl->ljs.mag, + cl->ljs.max.x,cl->ljs.max.y, + cl->ljs.min.x,cl->ljs.min.y, + cl->ljs.center.x,cl->ljs.center.y, + /* joystick right */ + cl->rjs.ang,cl->rjs.mag, + cl->rjs.max.x,cl->rjs.max.y, + cl->rjs.min.x,cl->rjs.min.y, + cl->rjs.center.x,cl->rjs.center.y); + } + } + + /* add generic event to java object used to gather events in c environment */ + mid = (*env)->GetMethodID(env, cls, "addWiimoteEvent", + "()V"); + if (mid == 0) { + return; + } + (*env)->CallVoidMethod(env, gath, mid); + break; + + case WIIUSE_DISCONNECT: + /* the wiimote disconnected */ + mid = (*env)->GetMethodID(env, cls, "addDisconnectionEvent", "(I)V"); + if (mid == 0) { + return; + } + (*env)->CallVoidMethod(env, gath, mid, wiimotes[i]->unid); + break; + + case WIIUSE_UNEXPECTED_DISCONNECT: + /* the wimote disconnected */ + mid = (*env)->GetMethodID(env, cls, "addDisconnectionEvent", "(I)V"); + if (mid == 0) { + return; + } + (*env)->CallVoidMethod(env, gath, mid, wiimotes[i]->unid); + break; + + case WIIUSE_NUNCHUK_INSERTED: + /* the nunchuk was just connected */ + mid = (*env)->GetMethodID(env, cls, "addNunchukInsertedEvent", "(I)V"); + if (mid == 0) { + return; + } + (*env)->CallVoidMethod(env, gath, mid, wiimotes[i]->unid); + break; + + case WIIUSE_NUNCHUK_REMOVED: + /* the nunchuk disconnected */ + mid = (*env)->GetMethodID(env, cls, "addNunchukRemovedEvent", "(I)V"); + if (mid == 0) { + return; + } + (*env)->CallVoidMethod(env, gath, mid, wiimotes[i]->unid); + break; + + case WIIUSE_GUITAR_HERO_3_CTRL_INSERTED: + /* the guitar hero was just connected */ + mid = (*env)->GetMethodID(env, cls, "addGuitarHeroInsertedEvent", "(I)V"); + if (mid == 0) { + return; + } + (*env)->CallVoidMethod(env, gath, mid, wiimotes[i]->unid); + break; + + case WIIUSE_GUITAR_HERO_3_CTRL_REMOVED: + /* the guitar hero disconnected */ + mid = (*env)->GetMethodID(env, cls, "addGuitarHeroRemovedEvent", "(I)V"); + if (mid == 0) { + return; + } + (*env)->CallVoidMethod(env, gath, mid, wiimotes[i]->unid); + break; + + case WIIUSE_CLASSIC_CTRL_INSERTED: + /* the classic controller was just connected */ + mid = (*env)->GetMethodID(env, cls, "addClassicControllerInsertedEvent", "(I)V"); + if (mid == 0) { + return; + } + (*env)->CallVoidMethod(env, gath, mid, wiimotes[i]->unid); + break; + + case WIIUSE_CLASSIC_CTRL_REMOVED: + /* the classic controller disconnected */ + mid = (*env)->GetMethodID(env, cls, "addClassicControllerRemovedEvent", "(I)V"); + if (mid == 0) { + return; + } + (*env)->CallVoidMethod(env, gath, mid, wiimotes[i]->unid); + break; + + case WIIUSE_STATUS: + /* a status event occured */ + mid = (*env)->GetMethodID(env, cls, "addStatusEvent", "(IZFSZIZZZZ)V"); + if (mid == 0) { + return; + } + /* LEDS */ + if (WIIUSE_IS_LED_SET(wiimotes[i], 1)) leds += 1; + if (WIIUSE_IS_LED_SET(wiimotes[i], 2)) leds += 2; + if (WIIUSE_IS_LED_SET(wiimotes[i], 3)) leds += 4; + if (WIIUSE_IS_LED_SET(wiimotes[i], 4)) leds += 8; + + (*env)->CallVoidMethod(env, gath, mid, + wiimotes[i]->unid, WIIMOTE_IS_SET(wiimotes[i], WIIMOTE_STATE_CONNECTED), + wiimotes[i]->battery_level, leds, WIIUSE_USING_SPEAKER(wiimotes[i]), + wiimotes[i]->exp.type,WIIMOTE_IS_SET(wiimotes[i], WIIMOTE_STATE_RUMBLE), + WIIMOTE_IS_FLAG_SET(wiimotes[i],WIIUSE_CONTINUOUS), + WIIUSE_USING_IR(wiimotes[i]),WIIUSE_USING_ACC(wiimotes[i])); + break; + + default: + break; + } + } + } +} \ No newline at end of file diff --git a/wiiusej_WiiUseApi.def b/wiiusej_WiiUseApi.def new file mode 100644 index 0000000..e7aebd3 --- /dev/null +++ b/wiiusej_WiiUseApi.def @@ -0,0 +1,34 @@ +EXPORTS +Java_wiiusej_WiiUseApi_connect +Java_wiiusej_WiiUseApi_find +Java_wiiusej_WiiUseApi_init +Java_wiiusej_WiiUseApi_closeConnection +Java_wiiusej_WiiUseApi_getUnId +Java_wiiusej_WiiUseApi_cleanUp +Java_wiiusej_WiiUseApi_activateRumble +Java_wiiusej_WiiUseApi_deactivateRumble +Java_wiiusej_WiiUseApi_activateIRTracking +Java_wiiusej_WiiUseApi_deactivateIRTracking +Java_wiiusej_WiiUseApi_activateMotionSensing +Java_wiiusej_WiiUseApi_deactivateMotionSensing +Java_wiiusej_WiiUseApi_setLeds +Java_wiiusej_WiiUseApi_setOrientThreshold +Java_wiiusej_WiiUseApi_setAccelThreshold +Java_wiiusej_WiiUseApi_setAlphaSmoothing +Java_wiiusej_WiiUseApi_reSync +Java_wiiusej_WiiUseApi_activateSmoothing +Java_wiiusej_WiiUseApi_deactivateSmoothing +Java_wiiusej_WiiUseApi_activateContinuous +Java_wiiusej_WiiUseApi_deactivateContinuous +Java_wiiusej_WiiUseApi_setScreenRatio43 +Java_wiiusej_WiiUseApi_setScreenRatio169 +Java_wiiusej_WiiUseApi_setSensorBarAboveScreen +Java_wiiusej_WiiUseApi_setSensorBarBelowScreen +Java_wiiusej_WiiUseApi_setVirtualScreenResolution +Java_wiiusej_WiiUseApi_getStatus +Java_wiiusej_WiiUseApi_setTimeout +Java_wiiusej_WiiUseApi_setIrSensitivity +Java_wiiusej_WiiUseApi_setNunchukOrientationThreshold +Java_wiiusej_WiiUseApi_setNunchukAccelerationThreshold +Java_wiiusej_WiiUseApi_windowsSetBluetoothStack +Java_wiiusej_WiiUseApi_specialPoll diff --git a/wiiusej_WiiUseApi.h b/wiiusej_WiiUseApi.h new file mode 100644 index 0000000..031958b --- /dev/null +++ b/wiiusej_WiiUseApi.h @@ -0,0 +1,317 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class wiiusej_WiiUseApi */ + +#ifndef _Included_wiiusej_WiiUseApi +#define _Included_wiiusej_WiiUseApi +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: wiiusej_WiiUseApi + * Method: connect + * Signature: (I)I + */ +JNIEXPORT jint JNICALL Java_wiiusej_WiiUseApi_connect + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: find + * Signature: (II)I + */ +JNIEXPORT jint JNICALL Java_wiiusej_WiiUseApi_find + (JNIEnv *, jobject, jint, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: init + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_init + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: closeConnection + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_closeConnection + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: getUnId + * Signature: (I)I + */ +JNIEXPORT jint JNICALL Java_wiiusej_WiiUseApi_getUnId + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: cleanUp + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_cleanUp + (JNIEnv *, jobject); + +/* + * Class: wiiusej_WiiUseApi + * Method: activateRumble + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_activateRumble + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: deactivateRumble + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_deactivateRumble + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: activateIRTracking + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_activateIRTracking + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: deactivateIRTracking + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_deactivateIRTracking + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: activateMotionSensing + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_activateMotionSensing + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: deactivateMotionSensing + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_deactivateMotionSensing + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: setLeds + * Signature: (IZZZZ)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setLeds + (JNIEnv *, jobject, jint, jboolean, jboolean, jboolean, jboolean); + +/* + * Class: wiiusej_WiiUseApi + * Method: setOrientThreshold + * Signature: (IF)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setOrientThreshold + (JNIEnv *, jobject, jint, jfloat); + +/* + * Class: wiiusej_WiiUseApi + * Method: setAccelThreshold + * Signature: (II)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setAccelThreshold + (JNIEnv *, jobject, jint, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: setAlphaSmoothing + * Signature: (IF)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setAlphaSmoothing + (JNIEnv *, jobject, jint, jfloat); + +/* + * Class: wiiusej_WiiUseApi + * Method: reSync + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_reSync + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: activateSmoothing + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_activateSmoothing + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: deactivateSmoothing + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_deactivateSmoothing + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: activateContinuous + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_activateContinuous + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: deactivateContinuous + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_deactivateContinuous + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: setScreenRatio43 + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setScreenRatio43 + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: setScreenRatio169 + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setScreenRatio169 + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: setSensorBarAboveScreen + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setSensorBarAboveScreen + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: setSensorBarBelowScreen + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setSensorBarBelowScreen + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: setVirtualScreenResolution + * Signature: (III)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setVirtualScreenResolution + (JNIEnv *, jobject, jint, jint, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: getStatus + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_getStatus + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: setTimeout + * Signature: (ISS)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setTimeout + (JNIEnv *, jobject, jint, jshort, jshort); + +/* + * Class: wiiusej_WiiUseApi + * Method: setIrSensitivity + * Signature: (II)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setIrSensitivity + (JNIEnv *, jobject, jint, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: setNunchukOrientationThreshold + * Signature: (IF)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setNunchukOrientationThreshold + (JNIEnv *, jobject, jint, jfloat); + +/* + * Class: wiiusej_WiiUseApi + * Method: setNunchukAccelerationThreshold + * Signature: (II)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setNunchukAccelerationThreshold + (JNIEnv *, jobject, jint, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: windowsSetBluetoothStack + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_windowsSetBluetoothStack + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: specialPoll + * Signature: (Lwiiusej/wiiusejevents/utils/EventsGatherer;)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_specialPoll + (JNIEnv *, jobject, jobject); + +/* + * Class: wiiusej_WiiUseApi + * Method: activateSpeaker + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_activateSpeaker + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: deactivateSpeaker + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_deactivateSpeaker + (JNIEnv *, jobject, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: setSpeakerVolume + * Signature: (IS)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setSpeakerVolume + (JNIEnv *, jobject, jint, jshort); + +/* + * Class: wiiusej_WiiUseApi + * Method: setSpeakerFrequency + * Signature: (II)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setSpeakerFrequency + (JNIEnv *, jobject, jint, jint); + +/* + * Class: wiiusej_WiiUseApi + * Method: streamSpeakerData + * Signature: (I[S)V + */ +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_streamSpeakerData + (JNIEnv *, jobject, jint, jshortArray); + +#ifdef __cplusplus +} +#endif +#endif From c6ddcec049aed15f25a60e3131a73f8c366fd9e4 Mon Sep 17 00:00:00 2001 From: Rik Veenboer Date: Tue, 8 Feb 2011 18:47:08 +0000 Subject: [PATCH 02/36] Dll van wiiuse verplaatst. --- lib/wiiuse.lib | Bin 10344 -> 10344 bytes msvc/WiiUseJ.suo | Bin 19456 -> 19456 bytes msvc/WiiUseJ.vcxproj | 9 ++++++--- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/wiiuse.lib b/lib/wiiuse.lib index fe754f9a599d9ecd20d478e8adbd85489ca1ee23..98aeaa3243b335cc2e7ca93cbc7f43e7f7c8d5f3 100644 GIT binary patch delta 1101 zcmZ9LziSjh6vtPNm@F~5BzwEFm%aU&yWJxq7a_@=K_n+O7QwZ&^1v!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Rl9=}PQHE$|EMU#fEe diff --git a/msvc/WiiUseJ.vcxproj b/msvc/WiiUseJ.vcxproj index 5364935..65fe5f8 100644 --- a/msvc/WiiUseJ.vcxproj +++ b/msvc/WiiUseJ.vcxproj @@ -39,13 +39,15 @@ true - C:\Program Files\Java\jdk1.6.0_20\include;C:\Program Files\Java\jdk1.6.0_20\include\win32;C:\Users\Rik\My Dropbox\Eclipse\WiiTunes\c\wiiuse;$(IncludePath) + C:\Program Files (x86)\Java\jdk1.6.0_23\include;C:\Program Files (x86)\Java\jdk1.6.0_23\include\win32;$(IncludePath) + ..\lib;$(LibraryPath) false C:\Program Files (x86)\Java\jdk1.6.0_23\include;C:\Program Files (x86)\Java\jdk1.6.0_23\include\win32;$(IncludePath) .\Release\ $(ExtensionsToDeleteOnClean) + ..\lib;$(LibraryPath) @@ -58,9 +60,11 @@ Windows true - C:\Users\Rik\My Dropbox\Eclipse\WiiTunes\c\wiiuse\msvc\Release;%(AdditionalLibraryDirectories) wiiuse.lib;%(AdditionalDependencies) + + copy.bat + @@ -78,7 +82,6 @@ true true wiiuse.lib;%(AdditionalDependencies) - ..\..\wiiuse\msvc\Release;%(AdditionalLibraryDirectories) copy.bat From 66e02d0479853b4cebeb712ec1ff4c48441f6198 Mon Sep 17 00:00:00 2001 From: Rik Veenboer Date: Tue, 15 Feb 2011 14:59:52 +0000 Subject: [PATCH 03/36] Calibratie toegevoegd aan WiiuseJ --- lib/wiiuse.lib | Bin 10344 -> 10344 bytes msvc/WiiUseJ.suo | Bin 19456 -> 19968 bytes msvc/WiiUseJ.vcxproj | 1 + msvc/WiiUseJ.vcxproj.filters | 3 +++ wiiusej_Calibration.c | 21 +++++++++++++++++++ wiiusej_WiiUseApi.c | 2 +- wiiusej_WiiUseApi.def | 34 ------------------------------- wiiusej_WiiUseApi.h | 38 +++-------------------------------- 8 files changed, 29 insertions(+), 70 deletions(-) create mode 100644 wiiusej_Calibration.c delete mode 100644 wiiusej_WiiUseApi.def diff --git a/lib/wi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/WiiUseJ.suo index 93a5e57ea0f5759a6291a6e27f769bad4415bb2e..1032800f8d61a04d593b70d4a02625513febd4bb 100644 GIT binary patch delta 474 zcmZpe!Pqc|aYGLirz!&j!@vLk|Nq+H}ptfq3#n zeT~UqcmgOdYFTtsFW3uD>jjmpxK zHz;{cPSp|s8pZ;YtpSTIkn)?XX(TjxnxfL=1yT-^Z|h2J?o%@3;}8KVQG*%s#UO-* zg$v4?Tw)qBSx`@B^A}Tg7RITQ|5zqS&H&2I1mamh4D#C?AUzkv-dt)W#Ll{ak%2*U zbC0756XU$ejLzAU3&go5w43JPQ}*-=YuvYx9NV-L{K>dBWhg(ml@s!Uc;3Yq*sif{57CyC8( zTw|EPjxF&BVC2vN8e#y%pupYy#gm6=l8FMN(PTw?Wfnt_Fwj@r(}9d5Knw(v|Enrb iRB3_l+5@z*nryAU`Bi~2w`F2f$}Don1-;3z@<#tSr|`G z{$rUiF+^o^gB3eFE68Tq%{`7LOp`U7#JNF^g@Vb7c5;(+u1$8*>6vVx&BDky+1{yj b^BdO~CKi355|IBkmv{s)f}Q)tlZOca|2|L5 diff --git a/msvc/WiiUseJ.vcxproj b/msvc/WiiUseJ.vcxproj index 65fe5f8..ea82aed 100644 --- a/msvc/WiiUseJ.vcxproj +++ b/msvc/WiiUseJ.vcxproj @@ -92,6 +92,7 @@ + diff --git a/msvc/WiiUseJ.vcxproj.filters b/msvc/WiiUseJ.vcxproj.filters index cc1e8b3..380ac77 100644 --- a/msvc/WiiUseJ.vcxproj.filters +++ b/msvc/WiiUseJ.vcxproj.filters @@ -29,5 +29,8 @@ Source Files + + Source Files + \ No newline at end of file diff --git a/wiiusej_Calibration.c b/wiiusej_Calibration.c new file mode 100644 index 0000000..2456fee --- /dev/null +++ b/wiiusej_Calibration.c @@ -0,0 +1,21 @@ +#include "wiiusej_WiiUseApi.h" +#include "wiiuse.h" + +static wiimote** wiimotes; +static int nbMaxWiimotes; + + +JNIEXPORT jshortArray JNICALL Java_wiiusej_WiiUseApi_getCalibration +(JNIEnv *env, jobject obj, jint id) { + struct wiimote_t* wm = wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id); + const accel_t* accel = &wm->accel_calib; + const vec3b_t* zero = &accel->cal_zero; + const vec3b_t* g = &accel->cal_g; + short calibration[] = { + zero->x, zero->y, zero->z, + g->x, g->y, g->z}; + int size = 6; + jshortArray jShorts = (*env)->NewShortArray(env, size); + (*env)->SetShortArrayRegion(env, jShorts, 0, size, calibration); + return jShorts; +} \ No newline at end of file diff --git a/wiiusej_WiiUseApi.c b/wiiusej_WiiUseApi.c index 8d43e93..d5215ae 100644 --- a/wiiusej_WiiUseApi.c +++ b/wiiusej_WiiUseApi.c @@ -339,7 +339,7 @@ JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_getStatus */ JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setTimeout (JNIEnv *env, jobject obj, jint id, jshort normalTimeout, jshort expansionTimeout) { - wiiuse_set_timeout(wiimotes, nbMaxWiimotes, normalTimeout, expansionTimeout); + wiiuse_set_timeout(wiimotes, nbMaxWiimotes, (byte) normalTimeout, (byte) expansionTimeout); } /** diff --git a/wiiusej_WiiUseApi.def b/wiiusej_WiiUseApi.def deleted file mode 100644 index e7aebd3..0000000 --- a/wiiusej_WiiUseApi.def +++ /dev/null @@ -1,34 +0,0 @@ -EXPORTS -Java_wiiusej_WiiUseApi_connect -Java_wiiusej_WiiUseApi_find -Java_wiiusej_WiiUseApi_init -Java_wiiusej_WiiUseApi_closeConnection -Java_wiiusej_WiiUseApi_getUnId -Java_wiiusej_WiiUseApi_cleanUp -Java_wiiusej_WiiUseApi_activateRumble -Java_wiiusej_WiiUseApi_deactivateRumble -Java_wiiusej_WiiUseApi_activateIRTracking -Java_wiiusej_WiiUseApi_deactivateIRTracking -Java_wiiusej_WiiUseApi_activateMotionSensing -Java_wiiusej_WiiUseApi_deactivateMotionSensing -Java_wiiusej_WiiUseApi_setLeds -Java_wiiusej_WiiUseApi_setOrientThreshold -Java_wiiusej_WiiUseApi_setAccelThreshold -Java_wiiusej_WiiUseApi_setAlphaSmoothing -Java_wiiusej_WiiUseApi_reSync -Java_wiiusej_WiiUseApi_activateSmoothing -Java_wiiusej_WiiUseApi_deactivateSmoothing -Java_wiiusej_WiiUseApi_activateContinuous -Java_wiiusej_WiiUseApi_deactivateContinuous -Java_wiiusej_WiiUseApi_setScreenRatio43 -Java_wiiusej_WiiUseApi_setScreenRatio169 -Java_wiiusej_WiiUseApi_setSensorBarAboveScreen -Java_wiiusej_WiiUseApi_setSensorBarBelowScreen -Java_wiiusej_WiiUseApi_setVirtualScreenResolution -Java_wiiusej_WiiUseApi_getStatus -Java_wiiusej_WiiUseApi_setTimeout -Java_wiiusej_WiiUseApi_setIrSensitivity -Java_wiiusej_WiiUseApi_setNunchukOrientationThreshold -Java_wiiusej_WiiUseApi_setNunchukAccelerationThreshold -Java_wiiusej_WiiUseApi_windowsSetBluetoothStack -Java_wiiusej_WiiUseApi_specialPoll diff --git a/wiiusej_WiiUseApi.h b/wiiusej_WiiUseApi.h index 031958b..29dde3f 100644 --- a/wiiusej_WiiUseApi.h +++ b/wiiusej_WiiUseApi.h @@ -273,44 +273,12 @@ JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_specialPoll /* * Class: wiiusej_WiiUseApi - * Method: activateSpeaker - * Signature: (I)V + * Method: getCalibration + * Signature: (I)[S */ -JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_activateSpeaker +JNIEXPORT jshortArray JNICALL Java_wiiusej_WiiUseApi_getCalibration (JNIEnv *, jobject, jint); -/* - * Class: wiiusej_WiiUseApi - * Method: deactivateSpeaker - * Signature: (I)V - */ -JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_deactivateSpeaker - (JNIEnv *, jobject, jint); - -/* - * Class: wiiusej_WiiUseApi - * Method: setSpeakerVolume - * Signature: (IS)V - */ -JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setSpeakerVolume - (JNIEnv *, jobject, jint, jshort); - -/* - * Class: wiiusej_WiiUseApi - * Method: setSpeakerFrequency - * Signature: (II)V - */ -JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setSpeakerFrequency - (JNIEnv *, jobject, jint, jint); - -/* - * Class: wiiusej_WiiUseApi - * Method: streamSpeakerData - * Signature: (I[S)V - */ -JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_streamSpeakerData - (JNIEnv *, jobject, jint, jshortArray); - #ifdef __cplusplus } #endif From fcfafc0ac3391213eacdee400239f2795fba1b69 Mon Sep 17 00:00:00 2001 From: Rik Veenboer Date: Tue, 15 Feb 2011 17:08:56 +0000 Subject: [PATCH 04/36] Calibratie in WiiuseJ gerepareerd. --- lib/wiiuse.lib | Bin 10344 -> 10344 bytes msvc/WiiUseJ.suo | Bin 19968 -> 20992 bytes msvc/WiiUseJ.vcxproj | 3 -- msvc/WiiUseJ.vcxproj.filters | 9 ---- wiiusej_Calibration.c | 21 ---------- wiiusej_Speaker.c | 68 ------------------------------ wiiusej_WiiUseApi.c | 79 ++++++++++++++++++++++++++++++++++- 7 files changed, 78 insertions(+), 102 deletions(-) delete mode 100644 wiiusej_Calibration.c delete mode 100644 wiiusej_Speaker.c diff --git a/lib/wiiuse.lib b/lib/wiiuse.lib index 93409c6339e05df5ad1faf58cac35cf661205275..f477ac86df171d6ad980c60ebba510b1b61f2b42 100644 GIT binary patch delta 982 zcmY+Dzi-n}5XTKwAcm@G>)6k!^Ag)h+z1ebp``&KQdJ0+B9DlrQ8z{;#t1R7*3#`& zg!luXT|g?L>p!{xqQAq?!A|z^eD}AX}Pzw*n@%Xzq%gT z$KQ4a_9}mbJ*D8?Y~}R9_Rh!Izo&9s!Pjb~bg=zk?KLcTP4M0Ch2H{?6qme~DE8C^ z;{i|A4aRuzBOjz%!NsnF)P4UZQ#jo0I5q}_mSs)Ay6?iF-{RlD)W~+Jb}hG6@L7|~ zR!v-(nw%3VYm@Bp+{(Dmx17Me+2>v$K3PDr-Jr)Z9wc=cq?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seJ.vcxproj.filters index 380ac77..5bb53f7 100644 --- a/msvc/WiiUseJ.vcxproj.filters +++ b/msvc/WiiUseJ.vcxproj.filters @@ -18,19 +18,10 @@ Header Files - - Header Files - Source Files - - Source Files - - - Source Files - \ No newline at end of file diff --git a/wiiusej_Calibration.c b/wiiusej_Calibration.c deleted file mode 100644 index 2456fee..0000000 --- a/wiiusej_Calibration.c +++ /dev/null @@ -1,21 +0,0 @@ -#include "wiiusej_WiiUseApi.h" -#include "wiiuse.h" - -static wiimote** wiimotes; -static int nbMaxWiimotes; - - -JNIEXPORT jshortArray JNICALL Java_wiiusej_WiiUseApi_getCalibration -(JNIEnv *env, jobject obj, jint id) { - struct wiimote_t* wm = wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id); - const accel_t* accel = &wm->accel_calib; - const vec3b_t* zero = &accel->cal_zero; - const vec3b_t* g = &accel->cal_g; - short calibration[] = { - zero->x, zero->y, zero->z, - g->x, g->y, g->z}; - int size = 6; - jshortArray jShorts = (*env)->NewShortArray(env, size); - (*env)->SetShortArrayRegion(env, jShorts, 0, size, calibration); - return jShorts; -} \ No newline at end of file diff --git a/wiiusej_Speaker.c b/wiiusej_Speaker.c deleted file mode 100644 index c795649..0000000 --- a/wiiusej_Speaker.c +++ /dev/null @@ -1,68 +0,0 @@ -#include "wiiusej_WiiUseApi.h" -#include "speaker.h" -#include "wiiuse.h" - -static wiimote** wiimotes; -static int nbMaxWiimotes; - -/* -void test(struct wiimote_t* wm) { - int i; - byte data[20] = { - 0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3, - 0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3}; - wiiuse_speaker_activate(wm); - for (i = 0; i < 50; ++i) { - wiiuse_speaker_data(wm, data); - } - wiiuse_speaker_deactivate(wm); -}*/ - -JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_activateSpeaker -(JNIEnv *env, jobject obj, jint id) { - wiiuse_speaker_activate(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id)); -} - -JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_deactivateSpeaker -(JNIEnv *env, jobject obj, jint id) { - wiiuse_speaker_deactivate(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id)); -} -/* -void testen(struct wiimote_t* wm, unsigned short freq) { - if (freq > 0x0000) { - cfg[2] = freq & 0x00ff; - cfg[3] = (freq & 0xff00) >> 8; - } - printf("unaangepast %d\n", freq); - printf("speaker 0x%02x%02x\n", cfg[2], cfg[3]); - fflush(stdout); - wiiuse_write_data(wm, WM_REG_SPEAKER, cfg, 9); -}*/ - - -JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setSpeakerFrequency -(JNIEnv *env, jobject obj, jint id, jint freq) { - wiiuse_speaker_frequency(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), (unsigned short) freq); - //short a = ((short) freq) & 0xffff; - //printf("jni %d %d\n", freq, a); - //fflush(stdout); - //testen(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), (unsigned short) freq); -} - -JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setSpeakerVolume -(JNIEnv *env, jobject obj, jint id, jshort vol) { - wiiuse_speaker_frequency(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), vol); -} - - -JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_streamSpeakerData -(JNIEnv *env, jobject obj, jint id, jshortArray sArray) { - int i = 0; - jshort *jShorts = (*env)->GetShortArrayElements(env, sArray, JNI_FALSE); - byte data[sizeof(jShorts)]; - for (i = 0; i < sizeof(jShorts); ++i) { - data[i] = (byte) jShorts[i]; - } - wiiuse_speaker_data(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), data); - (*env)->ReleaseShortArrayElements(env, sArray, jShorts, JNI_FALSE); -} \ No newline at end of file diff --git a/wiiusej_WiiUseApi.c b/wiiusej_WiiUseApi.c index d5215ae..9c2913e 100644 --- a/wiiusej_WiiUseApi.c +++ b/wiiusej_WiiUseApi.c @@ -401,7 +401,6 @@ JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_windowsSetBluetoothStack */ JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_specialPoll (JNIEnv *env, jobject obj, jobject gath) { - /* Variables Declarations */ int i, a; short leds = 0; @@ -410,6 +409,7 @@ JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_specialPoll struct nunchuk_t* nc; struct guitar_hero_3_t* gh; struct classic_ctrl_t* cl; + //printf("avant poll, nbMaxwiimotes : %i \n",nbMaxWiimotes); if (wiiuse_poll(wiimotes, nbMaxWiimotes)) { /* @@ -668,4 +668,81 @@ JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_specialPoll } } } +} + +JNIEXPORT jshortArray JNICALL Java_wiiusej_WiiUseApi_getCalibration +(JNIEnv *env, jobject obj, jint id) { + struct wiimote_t wm = *wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id); + jshort calibration[6] = { + wm.accel_calib.cal_zero.x, + wm.accel_calib.cal_zero.y, + wm.accel_calib.cal_zero.z, + wm.accel_calib.cal_g.x, + wm.accel_calib.cal_g.y, + wm.accel_calib.cal_g.z}; + jshortArray jShorts = (*env)->NewShortArray(env, 6); + (*env)->SetShortArrayRegion(env, jShorts, 0, 6, calibration); + return jShorts; +} + +#include "speaker.h" +/* +void test(struct wiimote_t* wm) { + int i; + byte data[20] = { + 0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3, + 0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3}; + wiiuse_speaker_activate(wm); + for (i = 0; i < 50; ++i) { + wiiuse_speaker_data(wm, data); + } + wiiuse_speaker_deactivate(wm); +}*/ + +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_activateSpeaker +(JNIEnv *env, jobject obj, jint id) { + wiiuse_speaker_activate(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id)); +} + +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_deactivateSpeaker +(JNIEnv *env, jobject obj, jint id) { + wiiuse_speaker_deactivate(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id)); +} +/* +void testen(struct wiimote_t* wm, unsigned short freq) { + if (freq > 0x0000) { + cfg[2] = freq & 0x00ff; + cfg[3] = (freq & 0xff00) >> 8; + } + printf("unaangepast %d\n", freq); + printf("speaker 0x%02x%02x\n", cfg[2], cfg[3]); + fflush(stdout); + wiiuse_write_data(wm, WM_REG_SPEAKER, cfg, 9); +}*/ + + +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setSpeakerFrequency +(JNIEnv *env, jobject obj, jint id, jint freq) { + wiiuse_speaker_frequency(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), (unsigned short) freq); + //short a = ((short) freq) & 0xffff; + //printf("jni %d %d\n", freq, a); + //fflush(stdout); + //testen(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), (unsigned short) freq); +} + +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setSpeakerVolume +(JNIEnv *env, jobject obj, jint id, jshort vol) { + wiiuse_speaker_frequency(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), vol); +} + +JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_streamSpeakerData +(JNIEnv *env, jobject obj, jint id, jshortArray sArray) { + int i = 0; + jshort *jShorts = (*env)->GetShortArrayElements(env, sArray, JNI_FALSE); + byte data[sizeof(jShorts)]; + for (i = 0; i < sizeof(jShorts); ++i) { + data[i] = (byte) jShorts[i]; + } + wiiuse_speaker_data(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), data); + (*env)->ReleaseShortArrayElements(env, sArray, jShorts, JNI_FALSE); } \ No newline at end of file From 29a329af78657fbc30c6759a5b02d3c90cb28f72 Mon Sep 17 00:00:00 2001 From: Rik Veenboer Date: Tue, 15 Feb 2011 19:13:46 +0000 Subject: [PATCH 05/36] Enkele aanpassingen in WiiuseJ gemaakt. --- wiiusej_WiiUseApi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wiiusej_WiiUseApi.c b/wiiusej_WiiUseApi.c index 9c2913e..8d28964 100644 --- a/wiiusej_WiiUseApi.c +++ b/wiiusej_WiiUseApi.c @@ -670,6 +670,7 @@ JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_specialPoll } } +/* Calibration */ JNIEXPORT jshortArray JNICALL Java_wiiusej_WiiUseApi_getCalibration (JNIEnv *env, jobject obj, jint id) { struct wiimote_t wm = *wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id); @@ -685,6 +686,7 @@ JNIEXPORT jshortArray JNICALL Java_wiiusej_WiiUseApi_getCalibration return jShorts; } +/* Speaker */ #include "speaker.h" /* void test(struct wiimote_t* wm) { From 3e8adaeb8a8d5622e2ec955655def963b6c48829 Mon Sep 17 00:00:00 2001 From: Rik Veenboer Date: Fri, 18 Feb 2011 12:36:26 +0000 Subject: [PATCH 06/36] JavaWinampApi project omgezet naar devc++. --- lib/wiiuse.lib | Bin 10344 -> 10344 bytes msvc/WiiUseJ.suo | Bin 20992 -> 29696 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/lib/wiiuse.lib b/lib/wiiuse.lib index f477ac86df171d6ad980c60ebba510b1b61f2b42..e6d010ed778ae680bb24bf039841138423bd336d 100644 GIT binary patch delta 1057 zcmY+DziSg=7{^aSYmaKv_Hy@Ldb!+t*W@lJl2Tei711aT4#is?q=8Ny9o#D7AdW_! zKfoZkD_wL5ZJ}$2f(}lKpmvdtMR4$W-#5>b%a%O(e1AOe`{p!1&HJ_Kjm}zUbq#v9 z|KYl{M_>1P_8s~R2SUL9V!3qm;?ds8;`xQKM8MBVc?##7AEE6<;Jd$yKL(x=UGriV z9f&K+2%d`#LTU78Jjz1>S6hxIANn_lRO44o$5x5bvaAwp`7ZqM69T?hjeDoMP9xR+ zTWGA_RN0Ei%S%l58%F$O=@yBJ`aPzKeh&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qs_q6hoDCDe;c0f~m%GPZS&c{~_8?*XgJ=jryl zf}Wv4%}}=&|44+U!4aQt7Z&q8s1~X;8$so&!y}l5p>mas?9z5Qf9F6}j gnc|oGKfQbMzjYY;IUmeTZ@`-!Avo4C{0L&r?;ktoNdN!< delta 989 zcmYk5OH5Ny5Qfi`ODW|MAb<@b6ckhnrBqN_3l>X!0Ls&dQX_;^K~xl5DOGGuOmu~M zM+_^2i3?XKoSiW~A{veHv2x|YxN>O>B*H@c50=EmcjrClX3m+|4~jjY$5V#HKPxLM ze`eeJN!L!NPs^V#t3JG^1R+GMLPoSFL?Ny*+9=F@#?8^yWE7MjUJ5RPTVN|tF&kt# zr~p-Q-&&0m_BK!rYQT1|1JnW+aD$z|1L{CM*af_x0qhonlak&!ZbMf+MtFiZ*h6#Os<{ytINa= z&BXJrY~Avk{Bp^1ohXN|HjHAl_q*1!bzM4peO*am;ln8WJf3GO92P+l5Oy(u&PLEH z`c+JHe=@@od_Av-A68rR{4ll1vHVM9EQ7nz%*z`hWam&plq%(7K{N5MV^(x;k=30i z3^cWR;ImE-PjqMSfY*WRPLt0Mrx1-Gw0Ew=tMSM4#r$^Yo?iBXJG#%wFa9i|iT?^~ zx#0MWj8%k9hLeJqYu<2H$z@EK@CQTq|Duwe{N2~Zk#$xzQ;{b+#jptR^NnFHv^`BA z(TI^g;%Iqp;-o6l-T9ijSGKw>MQe{nNgY83N}q(ht8_l%j&iMg(`>Isx@Vq9zV;Lo z+d6VEXHBoRN^5;@0=g%er_o*A7rJC*Rr0he-*F~%+8-PVogMP``wtHe9=Z@{@{bM< zhAsq79q&9B=o<=**jFp!AKtZNn+83C0rc> Date: Fri, 25 Feb 2011 18:46:48 +0000 Subject: [PATCH 07/36] --- include/classfile_constants.h | 523 +++++++ include/jawt.h | 278 ++++ include/jdwpTransport.h | 237 ++++ include/jni.h | 1944 +++++++++++++++++++++++++ include/jvmti.h | 2504 +++++++++++++++++++++++++++++++++ include/win32/jawt_md.h | 41 + include/win32/jni_md.h | 19 + msvc/WiiUseJ.suo | Bin 29696 -> 29696 bytes msvc/WiiUseJ.vcxproj | 2 +- 9 files changed, 5547 insertions(+), 1 deletion(-) create mode 100644 include/classfile_constants.h create mode 100644 include/jawt.h create mode 100644 include/jdwpTransport.h create mode 100644 include/jni.h create mode 100644 include/jvmti.h create mode 100644 include/win32/jawt_md.h create mode 100644 include/win32/jni_md.h diff --git a/include/classfile_constants.h b/include/classfile_constants.h new file mode 100644 index 0000000..30e839e --- /dev/null +++ b/include/classfile_constants.h @@ -0,0 +1,523 @@ +/* + * %W% %E% + * + * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + * + */ + +#ifndef CLASSFILE_CONSTANTS_H +#define CLASSFILE_CONSTANTS_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Flags */ + +enum { + JVM_ACC_PUBLIC = 0x0001, + JVM_ACC_PRIVATE = 0x0002, + JVM_ACC_PROTECTED = 0x0004, + JVM_ACC_STATIC = 0x0008, + JVM_ACC_FINAL = 0x0010, + JVM_ACC_SYNCHRONIZED = 0x0020, + JVM_ACC_SUPER = 0x0020, + JVM_ACC_VOLATILE = 0x0040, + JVM_ACC_BRIDGE = 0x0040, + JVM_ACC_TRANSIENT = 0x0080, + JVM_ACC_VARARGS = 0x0080, + JVM_ACC_NATIVE = 0x0100, + JVM_ACC_INTERFACE = 0x0200, + JVM_ACC_ABSTRACT = 0x0400, + JVM_ACC_STRICT = 0x0800, + JVM_ACC_SYNTHETIC = 0x1000, + JVM_ACC_ANNOTATION = 0x2000, + JVM_ACC_ENUM = 0x4000 +}; + +/* Used in newarray instruction. */ + +enum { + JVM_T_BOOLEAN = 4, + JVM_T_CHAR = 5, + JVM_T_FLOAT = 6, + JVM_T_DOUBLE = 7, + JVM_T_BYTE = 8, + JVM_T_SHORT = 9, + JVM_T_INT = 10, + JVM_T_LONG = 11 +}; + +/* Constant Pool Entries */ + +enum { + JVM_CONSTANT_Utf8 = 1, + JVM_CONSTANT_Unicode = 2, /* unused */ + JVM_CONSTANT_Integer = 3, + JVM_CONSTANT_Float = 4, + JVM_CONSTANT_Long = 5, + JVM_CONSTANT_Double = 6, + JVM_CONSTANT_Class = 7, + JVM_CONSTANT_String = 8, + JVM_CONSTANT_Fieldref = 9, + JVM_CONSTANT_Methodref = 10, + JVM_CONSTANT_InterfaceMethodref = 11, + JVM_CONSTANT_NameAndType = 12 +}; + +/* StackMapTable type item numbers */ + +enum { + JVM_ITEM_Top = 0, + JVM_ITEM_Integer = 1, + JVM_ITEM_Float = 2, + JVM_ITEM_Double = 3, + JVM_ITEM_Long = 4, + JVM_ITEM_Null = 5, + JVM_ITEM_UninitializedThis = 6, + JVM_ITEM_Object = 7, + JVM_ITEM_Uninitialized = 8 +}; + +/* Type signatures */ + +enum { + JVM_SIGNATURE_ARRAY = '[', + JVM_SIGNATURE_BYTE = 'B', + JVM_SIGNATURE_CHAR = 'C', + JVM_SIGNATURE_CLASS = 'L', + JVM_SIGNATURE_ENDCLASS = ';', + JVM_SIGNATURE_ENUM = 'E', + JVM_SIGNATURE_FLOAT = 'F', + JVM_SIGNATURE_DOUBLE = 'D', + JVM_SIGNATURE_FUNC = '(', + JVM_SIGNATURE_ENDFUNC = ')', + JVM_SIGNATURE_INT = 'I', + JVM_SIGNATURE_LONG = 'J', + JVM_SIGNATURE_SHORT = 'S', + JVM_SIGNATURE_VOID = 'V', + JVM_SIGNATURE_BOOLEAN = 'Z' +}; + +/* Opcodes */ + +enum { + JVM_OPC_nop = 0, + JVM_OPC_aconst_null = 1, + JVM_OPC_iconst_m1 = 2, + JVM_OPC_iconst_0 = 3, + JVM_OPC_iconst_1 = 4, + JVM_OPC_iconst_2 = 5, + JVM_OPC_iconst_3 = 6, + JVM_OPC_iconst_4 = 7, + JVM_OPC_iconst_5 = 8, + JVM_OPC_lconst_0 = 9, + JVM_OPC_lconst_1 = 10, + JVM_OPC_fconst_0 = 11, + JVM_OPC_fconst_1 = 12, + JVM_OPC_fconst_2 = 13, + JVM_OPC_dconst_0 = 14, + JVM_OPC_dconst_1 = 15, + JVM_OPC_bipush = 16, + JVM_OPC_sipush = 17, + JVM_OPC_ldc = 18, + JVM_OPC_ldc_w = 19, + JVM_OPC_ldc2_w = 20, + JVM_OPC_iload = 21, + JVM_OPC_lload = 22, + JVM_OPC_fload = 23, + JVM_OPC_dload = 24, + JVM_OPC_aload = 25, + JVM_OPC_iload_0 = 26, + JVM_OPC_iload_1 = 27, + JVM_OPC_iload_2 = 28, + JVM_OPC_iload_3 = 29, + JVM_OPC_lload_0 = 30, + JVM_OPC_lload_1 = 31, + JVM_OPC_lload_2 = 32, + JVM_OPC_lload_3 = 33, + JVM_OPC_fload_0 = 34, + JVM_OPC_fload_1 = 35, + JVM_OPC_fload_2 = 36, + JVM_OPC_fload_3 = 37, + JVM_OPC_dload_0 = 38, + JVM_OPC_dload_1 = 39, + JVM_OPC_dload_2 = 40, + JVM_OPC_dload_3 = 41, + JVM_OPC_aload_0 = 42, + JVM_OPC_aload_1 = 43, + JVM_OPC_aload_2 = 44, + JVM_OPC_aload_3 = 45, + JVM_OPC_iaload = 46, + JVM_OPC_laload = 47, + JVM_OPC_faload = 48, + JVM_OPC_daload = 49, + JVM_OPC_aaload = 50, + JVM_OPC_baload = 51, + JVM_OPC_caload = 52, + JVM_OPC_saload = 53, + JVM_OPC_istore = 54, + JVM_OPC_lstore = 55, + JVM_OPC_fstore = 56, + JVM_OPC_dstore = 57, + JVM_OPC_astore = 58, + JVM_OPC_istore_0 = 59, + JVM_OPC_istore_1 = 60, + JVM_OPC_istore_2 = 61, + JVM_OPC_istore_3 = 62, + JVM_OPC_lstore_0 = 63, + JVM_OPC_lstore_1 = 64, + JVM_OPC_lstore_2 = 65, + JVM_OPC_lstore_3 = 66, + JVM_OPC_fstore_0 = 67, + JVM_OPC_fstore_1 = 68, + JVM_OPC_fstore_2 = 69, + JVM_OPC_fstore_3 = 70, + JVM_OPC_dstore_0 = 71, + JVM_OPC_dstore_1 = 72, + JVM_OPC_dstore_2 = 73, + JVM_OPC_dstore_3 = 74, + JVM_OPC_astore_0 = 75, + JVM_OPC_astore_1 = 76, + JVM_OPC_astore_2 = 77, + JVM_OPC_astore_3 = 78, + JVM_OPC_iastore = 79, + JVM_OPC_lastore = 80, + JVM_OPC_fastore = 81, + JVM_OPC_dastore = 82, + JVM_OPC_aastore = 83, + JVM_OPC_bastore = 84, + JVM_OPC_castore = 85, + JVM_OPC_sastore = 86, + JVM_OPC_pop = 87, + JVM_OPC_pop2 = 88, + JVM_OPC_dup = 89, + JVM_OPC_dup_x1 = 90, + JVM_OPC_dup_x2 = 91, + JVM_OPC_dup2 = 92, + JVM_OPC_dup2_x1 = 93, + JVM_OPC_dup2_x2 = 94, + JVM_OPC_swap = 95, + JVM_OPC_iadd = 96, + JVM_OPC_ladd = 97, + JVM_OPC_fadd = 98, + JVM_OPC_dadd = 99, + JVM_OPC_isub = 100, + JVM_OPC_lsub = 101, + JVM_OPC_fsub = 102, + JVM_OPC_dsub = 103, + JVM_OPC_imul = 104, + JVM_OPC_lmul = 105, + JVM_OPC_fmul = 106, + JVM_OPC_dmul = 107, + JVM_OPC_idiv = 108, + JVM_OPC_ldiv = 109, + JVM_OPC_fdiv = 110, + JVM_OPC_ddiv = 111, + JVM_OPC_irem = 112, + JVM_OPC_lrem = 113, + JVM_OPC_frem = 114, + JVM_OPC_drem = 115, + JVM_OPC_ineg = 116, + JVM_OPC_lneg = 117, + JVM_OPC_fneg = 118, + JVM_OPC_dneg = 119, + JVM_OPC_ishl = 120, + JVM_OPC_lshl = 121, + JVM_OPC_ishr = 122, + JVM_OPC_lshr = 123, + JVM_OPC_iushr = 124, + JVM_OPC_lushr = 125, + JVM_OPC_iand = 126, + JVM_OPC_land = 127, + JVM_OPC_ior = 128, + JVM_OPC_lor = 129, + JVM_OPC_ixor = 130, + JVM_OPC_lxor = 131, + JVM_OPC_iinc = 132, + JVM_OPC_i2l = 133, + JVM_OPC_i2f = 134, + JVM_OPC_i2d = 135, + JVM_OPC_l2i = 136, + JVM_OPC_l2f = 137, + JVM_OPC_l2d = 138, + JVM_OPC_f2i = 139, + JVM_OPC_f2l = 140, + JVM_OPC_f2d = 141, + JVM_OPC_d2i = 142, + JVM_OPC_d2l = 143, + JVM_OPC_d2f = 144, + JVM_OPC_i2b = 145, + JVM_OPC_i2c = 146, + JVM_OPC_i2s = 147, + JVM_OPC_lcmp = 148, + JVM_OPC_fcmpl = 149, + JVM_OPC_fcmpg = 150, + JVM_OPC_dcmpl = 151, + JVM_OPC_dcmpg = 152, + JVM_OPC_ifeq = 153, + JVM_OPC_ifne = 154, + JVM_OPC_iflt = 155, + JVM_OPC_ifge = 156, + JVM_OPC_ifgt = 157, + JVM_OPC_ifle = 158, + JVM_OPC_if_icmpeq = 159, + JVM_OPC_if_icmpne = 160, + JVM_OPC_if_icmplt = 161, + JVM_OPC_if_icmpge = 162, + JVM_OPC_if_icmpgt = 163, + JVM_OPC_if_icmple = 164, + JVM_OPC_if_acmpeq = 165, + JVM_OPC_if_acmpne = 166, + JVM_OPC_goto = 167, + JVM_OPC_jsr = 168, + JVM_OPC_ret = 169, + JVM_OPC_tableswitch = 170, + JVM_OPC_lookupswitch = 171, + JVM_OPC_ireturn = 172, + JVM_OPC_lreturn = 173, + JVM_OPC_freturn = 174, + JVM_OPC_dreturn = 175, + JVM_OPC_areturn = 176, + JVM_OPC_return = 177, + JVM_OPC_getstatic = 178, + JVM_OPC_putstatic = 179, + JVM_OPC_getfield = 180, + JVM_OPC_putfield = 181, + JVM_OPC_invokevirtual = 182, + JVM_OPC_invokespecial = 183, + JVM_OPC_invokestatic = 184, + JVM_OPC_invokeinterface = 185, + JVM_OPC_xxxunusedxxx = 186, + JVM_OPC_new = 187, + JVM_OPC_newarray = 188, + JVM_OPC_anewarray = 189, + JVM_OPC_arraylength = 190, + JVM_OPC_athrow = 191, + JVM_OPC_checkcast = 192, + JVM_OPC_instanceof = 193, + JVM_OPC_monitorenter = 194, + JVM_OPC_monitorexit = 195, + JVM_OPC_wide = 196, + JVM_OPC_multianewarray = 197, + JVM_OPC_ifnull = 198, + JVM_OPC_ifnonnull = 199, + JVM_OPC_goto_w = 200, + JVM_OPC_jsr_w = 201, + JVM_OPC_MAX = 201 +}; + +/* Opcode length initializer, use with something like: + * unsigned char opcode_length[JVM_OPC_MAX+1] = JVM_OPCODE_LENGTH_INITIALIZER; + */ +#define JVM_OPCODE_LENGTH_INITIALIZER { \ + 1, /* nop */ \ + 1, /* aconst_null */ \ + 1, /* iconst_m1 */ \ + 1, /* iconst_0 */ \ + 1, /* iconst_1 */ \ + 1, /* iconst_2 */ \ + 1, /* iconst_3 */ \ + 1, /* iconst_4 */ \ + 1, /* iconst_5 */ \ + 1, /* lconst_0 */ \ + 1, /* lconst_1 */ \ + 1, /* fconst_0 */ \ + 1, /* fconst_1 */ \ + 1, /* fconst_2 */ \ + 1, /* dconst_0 */ \ + 1, /* dconst_1 */ \ + 2, /* bipush */ \ + 3, /* sipush */ \ + 2, /* ldc */ \ + 3, /* ldc_w */ \ + 3, /* ldc2_w */ \ + 2, /* iload */ \ + 2, /* lload */ \ + 2, /* fload */ \ + 2, /* dload */ \ + 2, /* aload */ \ + 1, /* iload_0 */ \ + 1, /* iload_1 */ \ + 1, /* iload_2 */ \ + 1, /* iload_3 */ \ + 1, /* lload_0 */ \ + 1, /* lload_1 */ \ + 1, /* lload_2 */ \ + 1, /* lload_3 */ \ + 1, /* fload_0 */ \ + 1, /* fload_1 */ \ + 1, /* fload_2 */ \ + 1, /* fload_3 */ \ + 1, /* dload_0 */ \ + 1, /* dload_1 */ \ + 1, /* dload_2 */ \ + 1, /* dload_3 */ \ + 1, /* aload_0 */ \ + 1, /* aload_1 */ \ + 1, /* aload_2 */ \ + 1, /* aload_3 */ \ + 1, /* iaload */ \ + 1, /* laload */ \ + 1, /* faload */ \ + 1, /* daload */ \ + 1, /* aaload */ \ + 1, /* baload */ \ + 1, /* caload */ \ + 1, /* saload */ \ + 2, /* istore */ \ + 2, /* lstore */ \ + 2, /* fstore */ \ + 2, /* dstore */ \ + 2, /* astore */ \ + 1, /* istore_0 */ \ + 1, /* istore_1 */ \ + 1, /* istore_2 */ \ + 1, /* istore_3 */ \ + 1, /* lstore_0 */ \ + 1, /* lstore_1 */ \ + 1, /* lstore_2 */ \ + 1, /* lstore_3 */ \ + 1, /* fstore_0 */ \ + 1, /* fstore_1 */ \ + 1, /* fstore_2 */ \ + 1, /* fstore_3 */ \ + 1, /* dstore_0 */ \ + 1, /* dstore_1 */ \ + 1, /* dstore_2 */ \ + 1, /* dstore_3 */ \ + 1, /* astore_0 */ \ + 1, /* astore_1 */ \ + 1, /* astore_2 */ \ + 1, /* astore_3 */ \ + 1, /* iastore */ \ + 1, /* lastore */ \ + 1, /* fastore */ \ + 1, /* dastore */ \ + 1, /* aastore */ \ + 1, /* bastore */ \ + 1, /* castore */ \ + 1, /* sastore */ \ + 1, /* pop */ \ + 1, /* pop2 */ \ + 1, /* dup */ \ + 1, /* dup_x1 */ \ + 1, /* dup_x2 */ \ + 1, /* dup2 */ \ + 1, /* dup2_x1 */ \ + 1, /* dup2_x2 */ \ + 1, /* swap */ \ + 1, /* iadd */ \ + 1, /* ladd */ \ + 1, /* fadd */ \ + 1, /* dadd */ \ + 1, /* isub */ \ + 1, /* lsub */ \ + 1, /* fsub */ \ + 1, /* dsub */ \ + 1, /* imul */ \ + 1, /* lmul */ \ + 1, /* fmul */ \ + 1, /* dmul */ \ + 1, /* idiv */ \ + 1, /* ldiv */ \ + 1, /* fdiv */ \ + 1, /* ddiv */ \ + 1, /* irem */ \ + 1, /* lrem */ \ + 1, /* frem */ \ + 1, /* drem */ \ + 1, /* ineg */ \ + 1, /* lneg */ \ + 1, /* fneg */ \ + 1, /* dneg */ \ + 1, /* ishl */ \ + 1, /* lshl */ \ + 1, /* ishr */ \ + 1, /* lshr */ \ + 1, /* iushr */ \ + 1, /* lushr */ \ + 1, /* iand */ \ + 1, /* land */ \ + 1, /* ior */ \ + 1, /* lor */ \ + 1, /* ixor */ \ + 1, /* lxor */ \ + 3, /* iinc */ \ + 1, /* i2l */ \ + 1, /* i2f */ \ + 1, /* i2d */ \ + 1, /* l2i */ \ + 1, /* l2f */ \ + 1, /* l2d */ \ + 1, /* f2i */ \ + 1, /* f2l */ \ + 1, /* f2d */ \ + 1, /* d2i */ \ + 1, /* d2l */ \ + 1, /* d2f */ \ + 1, /* i2b */ \ + 1, /* i2c */ \ + 1, /* i2s */ \ + 1, /* lcmp */ \ + 1, /* fcmpl */ \ + 1, /* fcmpg */ \ + 1, /* dcmpl */ \ + 1, /* dcmpg */ \ + 3, /* ifeq */ \ + 3, /* ifne */ \ + 3, /* iflt */ \ + 3, /* ifge */ \ + 3, /* ifgt */ \ + 3, /* ifle */ \ + 3, /* if_icmpeq */ \ + 3, /* if_icmpne */ \ + 3, /* if_icmplt */ \ + 3, /* if_icmpge */ \ + 3, /* if_icmpgt */ \ + 3, /* if_icmple */ \ + 3, /* if_acmpeq */ \ + 3, /* if_acmpne */ \ + 3, /* goto */ \ + 3, /* jsr */ \ + 2, /* ret */ \ + 99, /* tableswitch */ \ + 99, /* lookupswitch */ \ + 1, /* ireturn */ \ + 1, /* lreturn */ \ + 1, /* freturn */ \ + 1, /* dreturn */ \ + 1, /* areturn */ \ + 1, /* return */ \ + 3, /* getstatic */ \ + 3, /* putstatic */ \ + 3, /* getfield */ \ + 3, /* putfield */ \ + 3, /* invokevirtual */ \ + 3, /* invokespecial */ \ + 3, /* invokestatic */ \ + 5, /* invokeinterface */ \ + 0, /* xxxunusedxxx */ \ + 3, /* new */ \ + 2, /* newarray */ \ + 3, /* anewarray */ \ + 1, /* arraylength */ \ + 1, /* athrow */ \ + 3, /* checkcast */ \ + 3, /* instanceof */ \ + 1, /* monitorenter */ \ + 1, /* monitorexit */ \ + 0, /* wide */ \ + 4, /* multianewarray */ \ + 3, /* ifnull */ \ + 3, /* ifnonnull */ \ + 5, /* goto_w */ \ + 5 /* jsr_w */ \ +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* CLASSFILE_CONSTANTS */ diff --git a/include/jawt.h b/include/jawt.h new file mode 100644 index 0000000..87e0b18 --- /dev/null +++ b/include/jawt.h @@ -0,0 +1,278 @@ +/* + * %W% %E% + * + * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +#ifndef _JAVASOFT_JAWT_H_ +#define _JAVASOFT_JAWT_H_ + +#include "jni.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * AWT native interface (new in JDK 1.3) + * + * The AWT native interface allows a native C or C++ application a means + * by which to access native structures in AWT. This is to facilitate moving + * legacy C and C++ applications to Java and to target the needs of the + * community who, at present, wish to do their own native rendering to canvases + * for performance reasons. Standard extensions such as Java3D also require a + * means to access the underlying native data structures of AWT. + * + * There may be future extensions to this API depending on demand. + * + * A VM does not have to implement this API in order to pass the JCK. + * It is recommended, however, that this API is implemented on VMs that support + * standard extensions, such as Java3D. + * + * Since this is a native API, any program which uses it cannot be considered + * 100% pure java. + */ + +/* + * AWT Native Drawing Surface (JAWT_DrawingSurface). + * + * For each platform, there is a native drawing surface structure. This + * platform-specific structure can be found in jawt_md.h. It is recommended + * that additional platforms follow the same model. It is also recommended + * that VMs on Win32 and Solaris support the existing structures in jawt_md.h. + * + ******************* + * EXAMPLE OF USAGE: + ******************* + * + * In Win32, a programmer wishes to access the HWND of a canvas to perform + * native rendering into it. The programmer has declared the paint() method + * for their canvas subclass to be native: + * + * + * MyCanvas.java: + * + * import java.awt.*; + * + * public class MyCanvas extends Canvas { + * + * static { + * System.loadLibrary("mylib"); + * } + * + * public native void paint(Graphics g); + * } + * + * + * myfile.c: + * + * #include "jawt_md.h" + * #include + * + * JNIEXPORT void JNICALL + * Java_MyCanvas_paint(JNIEnv* env, jobject canvas, jobject graphics) + * { + * JAWT awt; + * JAWT_DrawingSurface* ds; + * JAWT_DrawingSurfaceInfo* dsi; + * JAWT_Win32DrawingSurfaceInfo* dsi_win; + * jboolean result; + * jint lock; + * + * // Get the AWT + * awt.version = JAWT_VERSION_1_3; + * result = JAWT_GetAWT(env, &awt); + * assert(result != JNI_FALSE); + * + * // Get the drawing surface + * ds = awt.GetDrawingSurface(env, canvas); + * assert(ds != NULL); + * + * // Lock the drawing surface + * lock = ds->Lock(ds); + * assert((lock & JAWT_LOCK_ERROR) == 0); + * + * // Get the drawing surface info + * dsi = ds->GetDrawingSurfaceInfo(ds); + * + * // Get the platform-specific drawing info + * dsi_win = (JAWT_Win32DrawingSurfaceInfo*)dsi->platformInfo; + * + * ////////////////////////////// + * // !!! DO PAINTING HERE !!! // + * ////////////////////////////// + * + * // Free the drawing surface info + * ds->FreeDrawingSurfaceInfo(dsi); + * + * // Unlock the drawing surface + * ds->Unlock(ds); + * + * // Free the drawing surface + * awt.FreeDrawingSurface(ds); + * } + * + */ + +/* + * JAWT_Rectangle + * Structure for a native rectangle. + */ +typedef struct jawt_Rectangle { + jint x; + jint y; + jint width; + jint height; +} JAWT_Rectangle; + +struct jawt_DrawingSurface; + +/* + * JAWT_DrawingSurfaceInfo + * Structure for containing the underlying drawing information of a component. + */ +typedef struct jawt_DrawingSurfaceInfo { + /* + * Pointer to the platform-specific information. This can be safely + * cast to a JAWT_Win32DrawingSurfaceInfo on Windows or a + * JAWT_X11DrawingSurfaceInfo on Solaris. See jawt_md.h for details. + */ + void* platformInfo; + /* Cached pointer to the underlying drawing surface */ + struct jawt_DrawingSurface* ds; + /* Bounding rectangle of the drawing surface */ + JAWT_Rectangle bounds; + /* Number of rectangles in the clip */ + jint clipSize; + /* Clip rectangle array */ + JAWT_Rectangle* clip; +} JAWT_DrawingSurfaceInfo; + +#define JAWT_LOCK_ERROR 0x00000001 +#define JAWT_LOCK_CLIP_CHANGED 0x00000002 +#define JAWT_LOCK_BOUNDS_CHANGED 0x00000004 +#define JAWT_LOCK_SURFACE_CHANGED 0x00000008 + +/* + * JAWT_DrawingSurface + * Structure for containing the underlying drawing information of a component. + * All operations on a JAWT_DrawingSurface MUST be performed from the same + * thread as the call to GetDrawingSurface. + */ +typedef struct jawt_DrawingSurface { + /* + * Cached reference to the Java environment of the calling thread. + * If Lock(), Unlock(), GetDrawingSurfaceInfo() or + * FreeDrawingSurfaceInfo() are called from a different thread, + * this data member should be set before calling those functions. + */ + JNIEnv* env; + /* Cached reference to the target object */ + jobject target; + /* + * Lock the surface of the target component for native rendering. + * When finished drawing, the surface must be unlocked with + * Unlock(). This function returns a bitmask with one or more of the + * following values: + * + * JAWT_LOCK_ERROR - When an error has occurred and the surface could not + * be locked. + * + * JAWT_LOCK_CLIP_CHANGED - When the clip region has changed. + * + * JAWT_LOCK_BOUNDS_CHANGED - When the bounds of the surface have changed. + * + * JAWT_LOCK_SURFACE_CHANGED - When the surface itself has changed + */ + jint (JNICALL *Lock) + (struct jawt_DrawingSurface* ds); + /* + * Get the drawing surface info. + * The value returned may be cached, but the values may change if + * additional calls to Lock() or Unlock() are made. + * Lock() must be called before this can return a valid value. + * Returns NULL if an error has occurred. + * When finished with the returned value, FreeDrawingSurfaceInfo must be + * called. + */ + JAWT_DrawingSurfaceInfo* (JNICALL *GetDrawingSurfaceInfo) + (struct jawt_DrawingSurface* ds); + /* + * Free the drawing surface info. + */ + void (JNICALL *FreeDrawingSurfaceInfo) + (JAWT_DrawingSurfaceInfo* dsi); + /* + * Unlock the drawing surface of the target component for native rendering. + */ + void (JNICALL *Unlock) + (struct jawt_DrawingSurface* ds); +} JAWT_DrawingSurface; + +/* + * JAWT + * Structure for containing native AWT functions. + */ +typedef struct jawt { + /* + * Version of this structure. This must always be set before + * calling JAWT_GetAWT() + */ + jint version; + /* + * Return a drawing surface from a target jobject. This value + * may be cached. + * Returns NULL if an error has occurred. + * Target must be a java.awt.Component (should be a Canvas + * or Window for native rendering). + * FreeDrawingSurface() must be called when finished with the + * returned JAWT_DrawingSurface. + */ + JAWT_DrawingSurface* (JNICALL *GetDrawingSurface) + (JNIEnv* env, jobject target); + /* + * Free the drawing surface allocated in GetDrawingSurface. + */ + void (JNICALL *FreeDrawingSurface) + (JAWT_DrawingSurface* ds); + /* + * Since 1.4 + * Locks the entire AWT for synchronization purposes + */ + void (JNICALL *Lock)(JNIEnv* env); + /* + * Since 1.4 + * Unlocks the entire AWT for synchronization purposes + */ + void (JNICALL *Unlock)(JNIEnv* env); + /* + * Since 1.4 + * Returns a reference to a java.awt.Component from a native + * platform handle. On Windows, this corresponds to an HWND; + * on Solaris and Linux, this is a Drawable. For other platforms, + * see the appropriate machine-dependent header file for a description. + * The reference returned by this function is a local + * reference that is only valid in this environment. + * This function returns a NULL reference if no component could be + * found with matching platform information. + */ + jobject (JNICALL *GetComponent)(JNIEnv* env, void* platformInfo); + +} JAWT; + +/* + * Get the AWT native structure. This function returns JNI_FALSE if + * an error occurs. + */ +_JNI_IMPORT_OR_EXPORT_ +jboolean JNICALL JAWT_GetAWT(JNIEnv* env, JAWT* awt); + +#define JAWT_VERSION_1_3 0x00010003 +#define JAWT_VERSION_1_4 0x00010004 + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !_JAVASOFT_JAWT_H_ */ diff --git a/include/jdwpTransport.h b/include/jdwpTransport.h new file mode 100644 index 0000000..eae435a --- /dev/null +++ b/include/jdwpTransport.h @@ -0,0 +1,237 @@ +/* + * %W% %E% + * + * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +/* + * Java Debug Wire Protocol Transport Service Provider Interface. + */ + +#ifndef JDWPTRANSPORT_H +#define JDWPTRANSPORT_H + +#include "jni.h" + +enum { + JDWPTRANSPORT_VERSION_1_0 = 0x00010000 +}; + +#ifdef __cplusplus +extern "C" { +#endif + +struct jdwpTransportNativeInterface_; + +struct _jdwpTransportEnv; + +#ifdef __cplusplus +typedef _jdwpTransportEnv jdwpTransportEnv; +#else +typedef const struct jdwpTransportNativeInterface_ *jdwpTransportEnv; +#endif /* __cplusplus */ + +/* + * Errors. Universal errors with JVMTI/JVMDI equivalents keep the + * values the same. + */ +typedef enum { + JDWPTRANSPORT_ERROR_NONE = 0, + JDWPTRANSPORT_ERROR_ILLEGAL_ARGUMENT = 103, + JDWPTRANSPORT_ERROR_OUT_OF_MEMORY = 110, + JDWPTRANSPORT_ERROR_INTERNAL = 113, + JDWPTRANSPORT_ERROR_ILLEGAL_STATE = 201, + JDWPTRANSPORT_ERROR_IO_ERROR = 202, + JDWPTRANSPORT_ERROR_TIMEOUT = 203, + JDWPTRANSPORT_ERROR_MSG_NOT_AVAILABLE = 204 +} jdwpTransportError; + + +/* + * Structure to define capabilities + */ +typedef struct { + unsigned int can_timeout_attach :1; + unsigned int can_timeout_accept :1; + unsigned int can_timeout_handshake :1; + unsigned int reserved3 :1; + unsigned int reserved4 :1; + unsigned int reserved5 :1; + unsigned int reserved6 :1; + unsigned int reserved7 :1; + unsigned int reserved8 :1; + unsigned int reserved9 :1; + unsigned int reserved10 :1; + unsigned int reserved11 :1; + unsigned int reserved12 :1; + unsigned int reserved13 :1; + unsigned int reserved14 :1; + unsigned int reserved15 :1; +} JDWPTransportCapabilities; + + +/* + * Structures to define packet layout. + * + * See: http://java.sun.com/j2se/1.5/docs/guide/jpda/jdwp-spec.html + */ + +enum { + JDWPTRANSPORT_FLAGS_NONE = 0x0, + JDWPTRANSPORT_FLAGS_REPLY = 0x80 +}; + +typedef struct { + jint len; + jint id; + jbyte flags; + jbyte cmdSet; + jbyte cmd; + jbyte *data; +} jdwpCmdPacket; + +typedef struct { + jint len; + jint id; + jbyte flags; + jshort errorCode; + jbyte *data; +} jdwpReplyPacket; + +typedef struct { + union { + jdwpCmdPacket cmd; + jdwpReplyPacket reply; + } type; +} jdwpPacket; + +/* + * JDWP functions called by the transport. + */ +typedef struct jdwpTransportCallback { + void *(*alloc)(jint numBytes); /* Call this for all allocations */ + void (*free)(void *buffer); /* Call this for all deallocations */ +} jdwpTransportCallback; + +typedef jint (JNICALL *jdwpTransport_OnLoad_t)(JavaVM *jvm, + jdwpTransportCallback *callback, + jint version, + jdwpTransportEnv** env); + + + +/* Function Interface */ + +struct jdwpTransportNativeInterface_ { + /* 1 : RESERVED */ + void *reserved1; + + /* 2 : Get Capabilities */ + jdwpTransportError (JNICALL *GetCapabilities)(jdwpTransportEnv* env, + JDWPTransportCapabilities *capabilities_ptr); + + /* 3 : Attach */ + jdwpTransportError (JNICALL *Attach)(jdwpTransportEnv* env, + const char* address, + jlong attach_timeout, + jlong handshake_timeout); + + /* 4: StartListening */ + jdwpTransportError (JNICALL *StartListening)(jdwpTransportEnv* env, + const char* address, + char** actual_address); + + /* 5: StopListening */ + jdwpTransportError (JNICALL *StopListening)(jdwpTransportEnv* env); + + /* 6: Accept */ + jdwpTransportError (JNICALL *Accept)(jdwpTransportEnv* env, + jlong accept_timeout, + jlong handshake_timeout); + + /* 7: IsOpen */ + jboolean (JNICALL *IsOpen)(jdwpTransportEnv* env); + + /* 8: Close */ + jdwpTransportError (JNICALL *Close)(jdwpTransportEnv* env); + + /* 9: ReadPacket */ + jdwpTransportError (JNICALL *ReadPacket)(jdwpTransportEnv* env, + jdwpPacket *pkt); + + /* 10: Write Packet */ + jdwpTransportError (JNICALL *WritePacket)(jdwpTransportEnv* env, + const jdwpPacket* pkt); + + /* 11: GetLastError */ + jdwpTransportError (JNICALL *GetLastError)(jdwpTransportEnv* env, + char** error); + +}; + + +/* + * Use inlined functions so that C++ code can use syntax such as + * env->Attach("mymachine:5000", 10*1000, 0); + * + * rather than using C's :- + * + * (*env)->Attach(env, "mymachine:5000", 10*1000, 0); + */ +struct _jdwpTransportEnv { + const struct jdwpTransportNativeInterface_ *functions; +#ifdef __cplusplus + + jdwpTransportError GetCapabilities(JDWPTransportCapabilities *capabilities_ptr) { + return functions->GetCapabilities(this, capabilities_ptr); + } + + jdwpTransportError Attach(const char* address, jlong attach_timeout, + jlong handshake_timeout) { + return functions->Attach(this, address, attach_timeout, handshake_timeout); + } + + jdwpTransportError StartListening(const char* address, + char** actual_address) { + return functions->StartListening(this, address, actual_address); + } + + jdwpTransportError StopListening(void) { + return functions->StopListening(this); + } + + jdwpTransportError Accept(jlong accept_timeout, jlong handshake_timeout) { + return functions->Accept(this, accept_timeout, handshake_timeout); + } + + jboolean IsOpen(void) { + return functions->IsOpen(this); + } + + jdwpTransportError Close(void) { + return functions->Close(this); + } + + jdwpTransportError ReadPacket(jdwpPacket *pkt) { + return functions->ReadPacket(this, pkt); + } + + jdwpTransportError WritePacket(const jdwpPacket* pkt) { + return functions->WritePacket(this, pkt); + } + + jdwpTransportError GetLastError(char** error) { + return functions->GetLastError(this, error); + } + + +#endif /* __cplusplus */ +}; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* JDWPTRANSPORT_H */ + diff --git a/include/jni.h b/include/jni.h new file mode 100644 index 0000000..8ed7366 --- /dev/null +++ b/include/jni.h @@ -0,0 +1,1944 @@ +/* + * %W% %E% + * + * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +/* + * We used part of Netscape's Java Runtime Interface (JRI) as the starting + * point of our design and implementation. + */ + +/****************************************************************************** + * Java Runtime Interface + * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved. + *****************************************************************************/ + +#ifndef _JAVASOFT_JNI_H_ +#define _JAVASOFT_JNI_H_ + +#include +#include + +/* jni_md.h contains the machine-dependent typedefs for jbyte, jint + and jlong */ + +#include "jni_md.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * JNI Types + */ + +#ifndef JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H + +typedef unsigned char jboolean; +typedef unsigned short jchar; +typedef short jshort; +typedef float jfloat; +typedef double jdouble; + +typedef jint jsize; + +#ifdef __cplusplus + +class _jobject {}; +class _jclass : public _jobject {}; +class _jthrowable : public _jobject {}; +class _jstring : public _jobject {}; +class _jarray : public _jobject {}; +class _jbooleanArray : public _jarray {}; +class _jbyteArray : public _jarray {}; +class _jcharArray : public _jarray {}; +class _jshortArray : public _jarray {}; +class _jintArray : public _jarray {}; +class _jlongArray : public _jarray {}; +class _jfloatArray : public _jarray {}; +class _jdoubleArray : public _jarray {}; +class _jobjectArray : public _jarray {}; + +typedef _jobject *jobject; +typedef _jclass *jclass; +typedef _jthrowable *jthrowable; +typedef _jstring *jstring; +typedef _jarray *jarray; +typedef _jbooleanArray *jbooleanArray; +typedef _jbyteArray *jbyteArray; +typedef _jcharArray *jcharArray; +typedef _jshortArray *jshortArray; +typedef _jintArray *jintArray; +typedef _jlongArray *jlongArray; +typedef _jfloatArray *jfloatArray; +typedef _jdoubleArray *jdoubleArray; +typedef _jobjectArray *jobjectArray; + +#else + +struct _jobject; + +typedef struct _jobject *jobject; +typedef jobject jclass; +typedef jobject jthrowable; +typedef jobject jstring; +typedef jobject jarray; +typedef jarray jbooleanArray; +typedef jarray jbyteArray; +typedef jarray jcharArray; +typedef jarray jshortArray; +typedef jarray jintArray; +typedef jarray jlongArray; +typedef jarray jfloatArray; +typedef jarray jdoubleArray; +typedef jarray jobjectArray; + +#endif + +typedef jobject jweak; + +typedef union jvalue { + jboolean z; + jbyte b; + jchar c; + jshort s; + jint i; + jlong j; + jfloat f; + jdouble d; + jobject l; +} jvalue; + +struct _jfieldID; +typedef struct _jfieldID *jfieldID; + +struct _jmethodID; +typedef struct _jmethodID *jmethodID; + +/* Return values from jobjectRefType */ +typedef enum _jobjectType { + JNIInvalidRefType = 0, + JNILocalRefType = 1, + JNIGlobalRefType = 2, + JNIWeakGlobalRefType = 3 +} jobjectRefType; + + +#endif /* JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H */ + +/* + * jboolean constants + */ + +#define JNI_FALSE 0 +#define JNI_TRUE 1 + +/* + * possible return values for JNI functions. + */ + +#define JNI_OK 0 /* success */ +#define JNI_ERR (-1) /* unknown error */ +#define JNI_EDETACHED (-2) /* thread detached from the VM */ +#define JNI_EVERSION (-3) /* JNI version error */ +#define JNI_ENOMEM (-4) /* not enough memory */ +#define JNI_EEXIST (-5) /* VM already created */ +#define JNI_EINVAL (-6) /* invalid arguments */ + +/* + * used in ReleaseScalarArrayElements + */ + +#define JNI_COMMIT 1 +#define JNI_ABORT 2 + +/* + * used in RegisterNatives to describe native method name, signature, + * and function pointer. + */ + +typedef struct { + char *name; + char *signature; + void *fnPtr; +} JNINativeMethod; + +/* + * JNI Native Method Interface. + */ + +struct JNINativeInterface_; + +struct JNIEnv_; + +#ifdef __cplusplus +typedef JNIEnv_ JNIEnv; +#else +typedef const struct JNINativeInterface_ *JNIEnv; +#endif + +/* + * JNI Invocation Interface. + */ + +struct JNIInvokeInterface_; + +struct JavaVM_; + +#ifdef __cplusplus +typedef JavaVM_ JavaVM; +#else +typedef const struct JNIInvokeInterface_ *JavaVM; +#endif + +struct JNINativeInterface_ { + void *reserved0; + void *reserved1; + void *reserved2; + + void *reserved3; + jint (JNICALL *GetVersion)(JNIEnv *env); + + jclass (JNICALL *DefineClass) + (JNIEnv *env, const char *name, jobject loader, const jbyte *buf, + jsize len); + jclass (JNICALL *FindClass) + (JNIEnv *env, const char *name); + + jmethodID (JNICALL *FromReflectedMethod) + (JNIEnv *env, jobject method); + jfieldID (JNICALL *FromReflectedField) + (JNIEnv *env, jobject field); + + jobject (JNICALL *ToReflectedMethod) + (JNIEnv *env, jclass cls, jmethodID methodID, jboolean isStatic); + + jclass (JNICALL *GetSuperclass) + (JNIEnv *env, jclass sub); + jboolean (JNICALL *IsAssignableFrom) + (JNIEnv *env, jclass sub, jclass sup); + + jobject (JNICALL *ToReflectedField) + (JNIEnv *env, jclass cls, jfieldID fieldID, jboolean isStatic); + + jint (JNICALL *Throw) + (JNIEnv *env, jthrowable obj); + jint (JNICALL *ThrowNew) + (JNIEnv *env, jclass clazz, const char *msg); + jthrowable (JNICALL *ExceptionOccurred) + (JNIEnv *env); + void (JNICALL *ExceptionDescribe) + (JNIEnv *env); + void (JNICALL *ExceptionClear) + (JNIEnv *env); + void (JNICALL *FatalError) + (JNIEnv *env, const char *msg); + + jint (JNICALL *PushLocalFrame) + (JNIEnv *env, jint capacity); + jobject (JNICALL *PopLocalFrame) + (JNIEnv *env, jobject result); + + jobject (JNICALL *NewGlobalRef) + (JNIEnv *env, jobject lobj); + void (JNICALL *DeleteGlobalRef) + (JNIEnv *env, jobject gref); + void (JNICALL *DeleteLocalRef) + (JNIEnv *env, jobject obj); + jboolean (JNICALL *IsSameObject) + (JNIEnv *env, jobject obj1, jobject obj2); + jobject (JNICALL *NewLocalRef) + (JNIEnv *env, jobject ref); + jint (JNICALL *EnsureLocalCapacity) + (JNIEnv *env, jint capacity); + + jobject (JNICALL *AllocObject) + (JNIEnv *env, jclass clazz); + jobject (JNICALL *NewObject) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jobject (JNICALL *NewObjectV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jobject (JNICALL *NewObjectA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jclass (JNICALL *GetObjectClass) + (JNIEnv *env, jobject obj); + jboolean (JNICALL *IsInstanceOf) + (JNIEnv *env, jobject obj, jclass clazz); + + jmethodID (JNICALL *GetMethodID) + (JNIEnv *env, jclass clazz, const char *name, const char *sig); + + jobject (JNICALL *CallObjectMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jobject (JNICALL *CallObjectMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jobject (JNICALL *CallObjectMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args); + + jboolean (JNICALL *CallBooleanMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jboolean (JNICALL *CallBooleanMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jboolean (JNICALL *CallBooleanMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args); + + jbyte (JNICALL *CallByteMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jbyte (JNICALL *CallByteMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jbyte (JNICALL *CallByteMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); + + jchar (JNICALL *CallCharMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jchar (JNICALL *CallCharMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jchar (JNICALL *CallCharMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); + + jshort (JNICALL *CallShortMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jshort (JNICALL *CallShortMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jshort (JNICALL *CallShortMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); + + jint (JNICALL *CallIntMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jint (JNICALL *CallIntMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jint (JNICALL *CallIntMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); + + jlong (JNICALL *CallLongMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jlong (JNICALL *CallLongMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jlong (JNICALL *CallLongMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); + + jfloat (JNICALL *CallFloatMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jfloat (JNICALL *CallFloatMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jfloat (JNICALL *CallFloatMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); + + jdouble (JNICALL *CallDoubleMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jdouble (JNICALL *CallDoubleMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jdouble (JNICALL *CallDoubleMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); + + void (JNICALL *CallVoidMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + void (JNICALL *CallVoidMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + void (JNICALL *CallVoidMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args); + + jobject (JNICALL *CallNonvirtualObjectMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jobject (JNICALL *CallNonvirtualObjectMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jobject (JNICALL *CallNonvirtualObjectMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue * args); + + jboolean (JNICALL *CallNonvirtualBooleanMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jboolean (JNICALL *CallNonvirtualBooleanMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jboolean (JNICALL *CallNonvirtualBooleanMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue * args); + + jbyte (JNICALL *CallNonvirtualByteMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jbyte (JNICALL *CallNonvirtualByteMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jbyte (JNICALL *CallNonvirtualByteMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue *args); + + jchar (JNICALL *CallNonvirtualCharMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jchar (JNICALL *CallNonvirtualCharMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jchar (JNICALL *CallNonvirtualCharMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue *args); + + jshort (JNICALL *CallNonvirtualShortMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jshort (JNICALL *CallNonvirtualShortMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jshort (JNICALL *CallNonvirtualShortMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue *args); + + jint (JNICALL *CallNonvirtualIntMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jint (JNICALL *CallNonvirtualIntMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jint (JNICALL *CallNonvirtualIntMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue *args); + + jlong (JNICALL *CallNonvirtualLongMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jlong (JNICALL *CallNonvirtualLongMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jlong (JNICALL *CallNonvirtualLongMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue *args); + + jfloat (JNICALL *CallNonvirtualFloatMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jfloat (JNICALL *CallNonvirtualFloatMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jfloat (JNICALL *CallNonvirtualFloatMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue *args); + + jdouble (JNICALL *CallNonvirtualDoubleMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jdouble (JNICALL *CallNonvirtualDoubleMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jdouble (JNICALL *CallNonvirtualDoubleMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue *args); + + void (JNICALL *CallNonvirtualVoidMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + void (JNICALL *CallNonvirtualVoidMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + void (JNICALL *CallNonvirtualVoidMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue * args); + + jfieldID (JNICALL *GetFieldID) + (JNIEnv *env, jclass clazz, const char *name, const char *sig); + + jobject (JNICALL *GetObjectField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jboolean (JNICALL *GetBooleanField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jbyte (JNICALL *GetByteField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jchar (JNICALL *GetCharField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jshort (JNICALL *GetShortField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jint (JNICALL *GetIntField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jlong (JNICALL *GetLongField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jfloat (JNICALL *GetFloatField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jdouble (JNICALL *GetDoubleField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + + void (JNICALL *SetObjectField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jobject val); + void (JNICALL *SetBooleanField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jboolean val); + void (JNICALL *SetByteField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jbyte val); + void (JNICALL *SetCharField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jchar val); + void (JNICALL *SetShortField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jshort val); + void (JNICALL *SetIntField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jint val); + void (JNICALL *SetLongField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jlong val); + void (JNICALL *SetFloatField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jfloat val); + void (JNICALL *SetDoubleField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jdouble val); + + jmethodID (JNICALL *GetStaticMethodID) + (JNIEnv *env, jclass clazz, const char *name, const char *sig); + + jobject (JNICALL *CallStaticObjectMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jobject (JNICALL *CallStaticObjectMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jobject (JNICALL *CallStaticObjectMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jboolean (JNICALL *CallStaticBooleanMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jboolean (JNICALL *CallStaticBooleanMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jboolean (JNICALL *CallStaticBooleanMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jbyte (JNICALL *CallStaticByteMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jbyte (JNICALL *CallStaticByteMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jbyte (JNICALL *CallStaticByteMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jchar (JNICALL *CallStaticCharMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jchar (JNICALL *CallStaticCharMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jchar (JNICALL *CallStaticCharMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jshort (JNICALL *CallStaticShortMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jshort (JNICALL *CallStaticShortMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jshort (JNICALL *CallStaticShortMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jint (JNICALL *CallStaticIntMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jint (JNICALL *CallStaticIntMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jint (JNICALL *CallStaticIntMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jlong (JNICALL *CallStaticLongMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jlong (JNICALL *CallStaticLongMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jlong (JNICALL *CallStaticLongMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jfloat (JNICALL *CallStaticFloatMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jfloat (JNICALL *CallStaticFloatMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jfloat (JNICALL *CallStaticFloatMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jdouble (JNICALL *CallStaticDoubleMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jdouble (JNICALL *CallStaticDoubleMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jdouble (JNICALL *CallStaticDoubleMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + void (JNICALL *CallStaticVoidMethod) + (JNIEnv *env, jclass cls, jmethodID methodID, ...); + void (JNICALL *CallStaticVoidMethodV) + (JNIEnv *env, jclass cls, jmethodID methodID, va_list args); + void (JNICALL *CallStaticVoidMethodA) + (JNIEnv *env, jclass cls, jmethodID methodID, const jvalue * args); + + jfieldID (JNICALL *GetStaticFieldID) + (JNIEnv *env, jclass clazz, const char *name, const char *sig); + jobject (JNICALL *GetStaticObjectField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jboolean (JNICALL *GetStaticBooleanField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jbyte (JNICALL *GetStaticByteField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jchar (JNICALL *GetStaticCharField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jshort (JNICALL *GetStaticShortField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jint (JNICALL *GetStaticIntField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jlong (JNICALL *GetStaticLongField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jfloat (JNICALL *GetStaticFloatField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jdouble (JNICALL *GetStaticDoubleField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + + void (JNICALL *SetStaticObjectField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value); + void (JNICALL *SetStaticBooleanField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value); + void (JNICALL *SetStaticByteField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jbyte value); + void (JNICALL *SetStaticCharField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jchar value); + void (JNICALL *SetStaticShortField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value); + void (JNICALL *SetStaticIntField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jint value); + void (JNICALL *SetStaticLongField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jlong value); + void (JNICALL *SetStaticFloatField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value); + void (JNICALL *SetStaticDoubleField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value); + + jstring (JNICALL *NewString) + (JNIEnv *env, const jchar *unicode, jsize len); + jsize (JNICALL *GetStringLength) + (JNIEnv *env, jstring str); + const jchar *(JNICALL *GetStringChars) + (JNIEnv *env, jstring str, jboolean *isCopy); + void (JNICALL *ReleaseStringChars) + (JNIEnv *env, jstring str, const jchar *chars); + + jstring (JNICALL *NewStringUTF) + (JNIEnv *env, const char *utf); + jsize (JNICALL *GetStringUTFLength) + (JNIEnv *env, jstring str); + const char* (JNICALL *GetStringUTFChars) + (JNIEnv *env, jstring str, jboolean *isCopy); + void (JNICALL *ReleaseStringUTFChars) + (JNIEnv *env, jstring str, const char* chars); + + + jsize (JNICALL *GetArrayLength) + (JNIEnv *env, jarray array); + + jobjectArray (JNICALL *NewObjectArray) + (JNIEnv *env, jsize len, jclass clazz, jobject init); + jobject (JNICALL *GetObjectArrayElement) + (JNIEnv *env, jobjectArray array, jsize index); + void (JNICALL *SetObjectArrayElement) + (JNIEnv *env, jobjectArray array, jsize index, jobject val); + + jbooleanArray (JNICALL *NewBooleanArray) + (JNIEnv *env, jsize len); + jbyteArray (JNICALL *NewByteArray) + (JNIEnv *env, jsize len); + jcharArray (JNICALL *NewCharArray) + (JNIEnv *env, jsize len); + jshortArray (JNICALL *NewShortArray) + (JNIEnv *env, jsize len); + jintArray (JNICALL *NewIntArray) + (JNIEnv *env, jsize len); + jlongArray (JNICALL *NewLongArray) + (JNIEnv *env, jsize len); + jfloatArray (JNICALL *NewFloatArray) + (JNIEnv *env, jsize len); + jdoubleArray (JNICALL *NewDoubleArray) + (JNIEnv *env, jsize len); + + jboolean * (JNICALL *GetBooleanArrayElements) + (JNIEnv *env, jbooleanArray array, jboolean *isCopy); + jbyte * (JNICALL *GetByteArrayElements) + (JNIEnv *env, jbyteArray array, jboolean *isCopy); + jchar * (JNICALL *GetCharArrayElements) + (JNIEnv *env, jcharArray array, jboolean *isCopy); + jshort * (JNICALL *GetShortArrayElements) + (JNIEnv *env, jshortArray array, jboolean *isCopy); + jint * (JNICALL *GetIntArrayElements) + (JNIEnv *env, jintArray array, jboolean *isCopy); + jlong * (JNICALL *GetLongArrayElements) + (JNIEnv *env, jlongArray array, jboolean *isCopy); + jfloat * (JNICALL *GetFloatArrayElements) + (JNIEnv *env, jfloatArray array, jboolean *isCopy); + jdouble * (JNICALL *GetDoubleArrayElements) + (JNIEnv *env, jdoubleArray array, jboolean *isCopy); + + void (JNICALL *ReleaseBooleanArrayElements) + (JNIEnv *env, jbooleanArray array, jboolean *elems, jint mode); + void (JNICALL *ReleaseByteArrayElements) + (JNIEnv *env, jbyteArray array, jbyte *elems, jint mode); + void (JNICALL *ReleaseCharArrayElements) + (JNIEnv *env, jcharArray array, jchar *elems, jint mode); + void (JNICALL *ReleaseShortArrayElements) + (JNIEnv *env, jshortArray array, jshort *elems, jint mode); + void (JNICALL *ReleaseIntArrayElements) + (JNIEnv *env, jintArray array, jint *elems, jint mode); + void (JNICALL *ReleaseLongArrayElements) + (JNIEnv *env, jlongArray array, jlong *elems, jint mode); + void (JNICALL *ReleaseFloatArrayElements) + (JNIEnv *env, jfloatArray array, jfloat *elems, jint mode); + void (JNICALL *ReleaseDoubleArrayElements) + (JNIEnv *env, jdoubleArray array, jdouble *elems, jint mode); + + void (JNICALL *GetBooleanArrayRegion) + (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf); + void (JNICALL *GetByteArrayRegion) + (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf); + void (JNICALL *GetCharArrayRegion) + (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf); + void (JNICALL *GetShortArrayRegion) + (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf); + void (JNICALL *GetIntArrayRegion) + (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf); + void (JNICALL *GetLongArrayRegion) + (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf); + void (JNICALL *GetFloatArrayRegion) + (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf); + void (JNICALL *GetDoubleArrayRegion) + (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf); + + void (JNICALL *SetBooleanArrayRegion) + (JNIEnv *env, jbooleanArray array, jsize start, jsize l, const jboolean *buf); + void (JNICALL *SetByteArrayRegion) + (JNIEnv *env, jbyteArray array, jsize start, jsize len, const jbyte *buf); + void (JNICALL *SetCharArrayRegion) + (JNIEnv *env, jcharArray array, jsize start, jsize len, const jchar *buf); + void (JNICALL *SetShortArrayRegion) + (JNIEnv *env, jshortArray array, jsize start, jsize len, const jshort *buf); + void (JNICALL *SetIntArrayRegion) + (JNIEnv *env, jintArray array, jsize start, jsize len, const jint *buf); + void (JNICALL *SetLongArrayRegion) + (JNIEnv *env, jlongArray array, jsize start, jsize len, const jlong *buf); + void (JNICALL *SetFloatArrayRegion) + (JNIEnv *env, jfloatArray array, jsize start, jsize len, const jfloat *buf); + void (JNICALL *SetDoubleArrayRegion) + (JNIEnv *env, jdoubleArray array, jsize start, jsize len, const jdouble *buf); + + jint (JNICALL *RegisterNatives) + (JNIEnv *env, jclass clazz, const JNINativeMethod *methods, + jint nMethods); + jint (JNICALL *UnregisterNatives) + (JNIEnv *env, jclass clazz); + + jint (JNICALL *MonitorEnter) + (JNIEnv *env, jobject obj); + jint (JNICALL *MonitorExit) + (JNIEnv *env, jobject obj); + + jint (JNICALL *GetJavaVM) + (JNIEnv *env, JavaVM **vm); + + void (JNICALL *GetStringRegion) + (JNIEnv *env, jstring str, jsize start, jsize len, jchar *buf); + void (JNICALL *GetStringUTFRegion) + (JNIEnv *env, jstring str, jsize start, jsize len, char *buf); + + void * (JNICALL *GetPrimitiveArrayCritical) + (JNIEnv *env, jarray array, jboolean *isCopy); + void (JNICALL *ReleasePrimitiveArrayCritical) + (JNIEnv *env, jarray array, void *carray, jint mode); + + const jchar * (JNICALL *GetStringCritical) + (JNIEnv *env, jstring string, jboolean *isCopy); + void (JNICALL *ReleaseStringCritical) + (JNIEnv *env, jstring string, const jchar *cstring); + + jweak (JNICALL *NewWeakGlobalRef) + (JNIEnv *env, jobject obj); + void (JNICALL *DeleteWeakGlobalRef) + (JNIEnv *env, jweak ref); + + jboolean (JNICALL *ExceptionCheck) + (JNIEnv *env); + + jobject (JNICALL *NewDirectByteBuffer) + (JNIEnv* env, void* address, jlong capacity); + void* (JNICALL *GetDirectBufferAddress) + (JNIEnv* env, jobject buf); + jlong (JNICALL *GetDirectBufferCapacity) + (JNIEnv* env, jobject buf); + + /* New JNI 1.6 Features */ + + jobjectRefType (JNICALL *GetObjectRefType) + (JNIEnv* env, jobject obj); +}; + +/* + * We use inlined functions for C++ so that programmers can write: + * + * env->FindClass("java/lang/String") + * + * in C++ rather than: + * + * (*env)->FindClass(env, "java/lang/String") + * + * in C. + */ + +struct JNIEnv_ { + const struct JNINativeInterface_ *functions; +#ifdef __cplusplus + + jint GetVersion() { + return functions->GetVersion(this); + } + jclass DefineClass(const char *name, jobject loader, const jbyte *buf, + jsize len) { + return functions->DefineClass(this, name, loader, buf, len); + } + jclass FindClass(const char *name) { + return functions->FindClass(this, name); + } + jmethodID FromReflectedMethod(jobject method) { + return functions->FromReflectedMethod(this,method); + } + jfieldID FromReflectedField(jobject field) { + return functions->FromReflectedField(this,field); + } + + jobject ToReflectedMethod(jclass cls, jmethodID methodID, jboolean isStatic) { + return functions->ToReflectedMethod(this, cls, methodID, isStatic); + } + + jclass GetSuperclass(jclass sub) { + return functions->GetSuperclass(this, sub); + } + jboolean IsAssignableFrom(jclass sub, jclass sup) { + return functions->IsAssignableFrom(this, sub, sup); + } + + jobject ToReflectedField(jclass cls, jfieldID fieldID, jboolean isStatic) { + return functions->ToReflectedField(this,cls,fieldID,isStatic); + } + + jint Throw(jthrowable obj) { + return functions->Throw(this, obj); + } + jint ThrowNew(jclass clazz, const char *msg) { + return functions->ThrowNew(this, clazz, msg); + } + jthrowable ExceptionOccurred() { + return functions->ExceptionOccurred(this); + } + void ExceptionDescribe() { + functions->ExceptionDescribe(this); + } + void ExceptionClear() { + functions->ExceptionClear(this); + } + void FatalError(const char *msg) { + functions->FatalError(this, msg); + } + + jint PushLocalFrame(jint capacity) { + return functions->PushLocalFrame(this,capacity); + } + jobject PopLocalFrame(jobject result) { + return functions->PopLocalFrame(this,result); + } + + jobject NewGlobalRef(jobject lobj) { + return functions->NewGlobalRef(this,lobj); + } + void DeleteGlobalRef(jobject gref) { + functions->DeleteGlobalRef(this,gref); + } + void DeleteLocalRef(jobject obj) { + functions->DeleteLocalRef(this, obj); + } + + jboolean IsSameObject(jobject obj1, jobject obj2) { + return functions->IsSameObject(this,obj1,obj2); + } + + jobject NewLocalRef(jobject ref) { + return functions->NewLocalRef(this,ref); + } + jint EnsureLocalCapacity(jint capacity) { + return functions->EnsureLocalCapacity(this,capacity); + } + + jobject AllocObject(jclass clazz) { + return functions->AllocObject(this,clazz); + } + jobject NewObject(jclass clazz, jmethodID methodID, ...) { + va_list args; + jobject result; + va_start(args, methodID); + result = functions->NewObjectV(this,clazz,methodID,args); + va_end(args); + return result; + } + jobject NewObjectV(jclass clazz, jmethodID methodID, + va_list args) { + return functions->NewObjectV(this,clazz,methodID,args); + } + jobject NewObjectA(jclass clazz, jmethodID methodID, + const jvalue *args) { + return functions->NewObjectA(this,clazz,methodID,args); + } + + jclass GetObjectClass(jobject obj) { + return functions->GetObjectClass(this,obj); + } + jboolean IsInstanceOf(jobject obj, jclass clazz) { + return functions->IsInstanceOf(this,obj,clazz); + } + + jmethodID GetMethodID(jclass clazz, const char *name, + const char *sig) { + return functions->GetMethodID(this,clazz,name,sig); + } + + jobject CallObjectMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jobject result; + va_start(args,methodID); + result = functions->CallObjectMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jobject CallObjectMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallObjectMethodV(this,obj,methodID,args); + } + jobject CallObjectMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallObjectMethodA(this,obj,methodID,args); + } + + jboolean CallBooleanMethod(jobject obj, + jmethodID methodID, ...) { + va_list args; + jboolean result; + va_start(args,methodID); + result = functions->CallBooleanMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jboolean CallBooleanMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallBooleanMethodV(this,obj,methodID,args); + } + jboolean CallBooleanMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallBooleanMethodA(this,obj,methodID, args); + } + + jbyte CallByteMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jbyte result; + va_start(args,methodID); + result = functions->CallByteMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jbyte CallByteMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallByteMethodV(this,obj,methodID,args); + } + jbyte CallByteMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallByteMethodA(this,obj,methodID,args); + } + + jchar CallCharMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jchar result; + va_start(args,methodID); + result = functions->CallCharMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jchar CallCharMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallCharMethodV(this,obj,methodID,args); + } + jchar CallCharMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallCharMethodA(this,obj,methodID,args); + } + + jshort CallShortMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jshort result; + va_start(args,methodID); + result = functions->CallShortMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jshort CallShortMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallShortMethodV(this,obj,methodID,args); + } + jshort CallShortMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallShortMethodA(this,obj,methodID,args); + } + + jint CallIntMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jint result; + va_start(args,methodID); + result = functions->CallIntMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jint CallIntMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallIntMethodV(this,obj,methodID,args); + } + jint CallIntMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallIntMethodA(this,obj,methodID,args); + } + + jlong CallLongMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jlong result; + va_start(args,methodID); + result = functions->CallLongMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jlong CallLongMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallLongMethodV(this,obj,methodID,args); + } + jlong CallLongMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallLongMethodA(this,obj,methodID,args); + } + + jfloat CallFloatMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jfloat result; + va_start(args,methodID); + result = functions->CallFloatMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jfloat CallFloatMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallFloatMethodV(this,obj,methodID,args); + } + jfloat CallFloatMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallFloatMethodA(this,obj,methodID,args); + } + + jdouble CallDoubleMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jdouble result; + va_start(args,methodID); + result = functions->CallDoubleMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jdouble CallDoubleMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallDoubleMethodV(this,obj,methodID,args); + } + jdouble CallDoubleMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallDoubleMethodA(this,obj,methodID,args); + } + + void CallVoidMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + va_start(args,methodID); + functions->CallVoidMethodV(this,obj,methodID,args); + va_end(args); + } + void CallVoidMethodV(jobject obj, jmethodID methodID, + va_list args) { + functions->CallVoidMethodV(this,obj,methodID,args); + } + void CallVoidMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + functions->CallVoidMethodA(this,obj,methodID,args); + } + + jobject CallNonvirtualObjectMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jobject result; + va_start(args,methodID); + result = functions->CallNonvirtualObjectMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jobject CallNonvirtualObjectMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualObjectMethodV(this,obj,clazz, + methodID,args); + } + jobject CallNonvirtualObjectMethodA(jobject obj, jclass clazz, + jmethodID methodID, const jvalue * args) { + return functions->CallNonvirtualObjectMethodA(this,obj,clazz, + methodID,args); + } + + jboolean CallNonvirtualBooleanMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jboolean result; + va_start(args,methodID); + result = functions->CallNonvirtualBooleanMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jboolean CallNonvirtualBooleanMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualBooleanMethodV(this,obj,clazz, + methodID,args); + } + jboolean CallNonvirtualBooleanMethodA(jobject obj, jclass clazz, + jmethodID methodID, const jvalue * args) { + return functions->CallNonvirtualBooleanMethodA(this,obj,clazz, + methodID, args); + } + + jbyte CallNonvirtualByteMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jbyte result; + va_start(args,methodID); + result = functions->CallNonvirtualByteMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jbyte CallNonvirtualByteMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualByteMethodV(this,obj,clazz, + methodID,args); + } + jbyte CallNonvirtualByteMethodA(jobject obj, jclass clazz, + jmethodID methodID, const jvalue * args) { + return functions->CallNonvirtualByteMethodA(this,obj,clazz, + methodID,args); + } + + jchar CallNonvirtualCharMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jchar result; + va_start(args,methodID); + result = functions->CallNonvirtualCharMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jchar CallNonvirtualCharMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualCharMethodV(this,obj,clazz, + methodID,args); + } + jchar CallNonvirtualCharMethodA(jobject obj, jclass clazz, + jmethodID methodID, const jvalue * args) { + return functions->CallNonvirtualCharMethodA(this,obj,clazz, + methodID,args); + } + + jshort CallNonvirtualShortMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jshort result; + va_start(args,methodID); + result = functions->CallNonvirtualShortMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jshort CallNonvirtualShortMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualShortMethodV(this,obj,clazz, + methodID,args); + } + jshort CallNonvirtualShortMethodA(jobject obj, jclass clazz, + jmethodID methodID, const jvalue * args) { + return functions->CallNonvirtualShortMethodA(this,obj,clazz, + methodID,args); + } + + jint CallNonvirtualIntMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jint result; + va_start(args,methodID); + result = functions->CallNonvirtualIntMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jint CallNonvirtualIntMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualIntMethodV(this,obj,clazz, + methodID,args); + } + jint CallNonvirtualIntMethodA(jobject obj, jclass clazz, + jmethodID methodID, const jvalue * args) { + return functions->CallNonvirtualIntMethodA(this,obj,clazz, + methodID,args); + } + + jlong CallNonvirtualLongMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jlong result; + va_start(args,methodID); + result = functions->CallNonvirtualLongMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jlong CallNonvirtualLongMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualLongMethodV(this,obj,clazz, + methodID,args); + } + jlong CallNonvirtualLongMethodA(jobject obj, jclass clazz, + jmethodID methodID, const jvalue * args) { + return functions->CallNonvirtualLongMethodA(this,obj,clazz, + methodID,args); + } + + jfloat CallNonvirtualFloatMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jfloat result; + va_start(args,methodID); + result = functions->CallNonvirtualFloatMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jfloat CallNonvirtualFloatMethodV(jobject obj, jclass clazz, + jmethodID methodID, + va_list args) { + return functions->CallNonvirtualFloatMethodV(this,obj,clazz, + methodID,args); + } + jfloat CallNonvirtualFloatMethodA(jobject obj, jclass clazz, + jmethodID methodID, + const jvalue * args) { + return functions->CallNonvirtualFloatMethodA(this,obj,clazz, + methodID,args); + } + + jdouble CallNonvirtualDoubleMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jdouble result; + va_start(args,methodID); + result = functions->CallNonvirtualDoubleMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jdouble CallNonvirtualDoubleMethodV(jobject obj, jclass clazz, + jmethodID methodID, + va_list args) { + return functions->CallNonvirtualDoubleMethodV(this,obj,clazz, + methodID,args); + } + jdouble CallNonvirtualDoubleMethodA(jobject obj, jclass clazz, + jmethodID methodID, + const jvalue * args) { + return functions->CallNonvirtualDoubleMethodA(this,obj,clazz, + methodID,args); + } + + void CallNonvirtualVoidMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + va_start(args,methodID); + functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args); + va_end(args); + } + void CallNonvirtualVoidMethodV(jobject obj, jclass clazz, + jmethodID methodID, + va_list args) { + functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args); + } + void CallNonvirtualVoidMethodA(jobject obj, jclass clazz, + jmethodID methodID, + const jvalue * args) { + functions->CallNonvirtualVoidMethodA(this,obj,clazz,methodID,args); + } + + jfieldID GetFieldID(jclass clazz, const char *name, + const char *sig) { + return functions->GetFieldID(this,clazz,name,sig); + } + + jobject GetObjectField(jobject obj, jfieldID fieldID) { + return functions->GetObjectField(this,obj,fieldID); + } + jboolean GetBooleanField(jobject obj, jfieldID fieldID) { + return functions->GetBooleanField(this,obj,fieldID); + } + jbyte GetByteField(jobject obj, jfieldID fieldID) { + return functions->GetByteField(this,obj,fieldID); + } + jchar GetCharField(jobject obj, jfieldID fieldID) { + return functions->GetCharField(this,obj,fieldID); + } + jshort GetShortField(jobject obj, jfieldID fieldID) { + return functions->GetShortField(this,obj,fieldID); + } + jint GetIntField(jobject obj, jfieldID fieldID) { + return functions->GetIntField(this,obj,fieldID); + } + jlong GetLongField(jobject obj, jfieldID fieldID) { + return functions->GetLongField(this,obj,fieldID); + } + jfloat GetFloatField(jobject obj, jfieldID fieldID) { + return functions->GetFloatField(this,obj,fieldID); + } + jdouble GetDoubleField(jobject obj, jfieldID fieldID) { + return functions->GetDoubleField(this,obj,fieldID); + } + + void SetObjectField(jobject obj, jfieldID fieldID, jobject val) { + functions->SetObjectField(this,obj,fieldID,val); + } + void SetBooleanField(jobject obj, jfieldID fieldID, + jboolean val) { + functions->SetBooleanField(this,obj,fieldID,val); + } + void SetByteField(jobject obj, jfieldID fieldID, + jbyte val) { + functions->SetByteField(this,obj,fieldID,val); + } + void SetCharField(jobject obj, jfieldID fieldID, + jchar val) { + functions->SetCharField(this,obj,fieldID,val); + } + void SetShortField(jobject obj, jfieldID fieldID, + jshort val) { + functions->SetShortField(this,obj,fieldID,val); + } + void SetIntField(jobject obj, jfieldID fieldID, + jint val) { + functions->SetIntField(this,obj,fieldID,val); + } + void SetLongField(jobject obj, jfieldID fieldID, + jlong val) { + functions->SetLongField(this,obj,fieldID,val); + } + void SetFloatField(jobject obj, jfieldID fieldID, + jfloat val) { + functions->SetFloatField(this,obj,fieldID,val); + } + void SetDoubleField(jobject obj, jfieldID fieldID, + jdouble val) { + functions->SetDoubleField(this,obj,fieldID,val); + } + + jmethodID GetStaticMethodID(jclass clazz, const char *name, + const char *sig) { + return functions->GetStaticMethodID(this,clazz,name,sig); + } + + jobject CallStaticObjectMethod(jclass clazz, jmethodID methodID, + ...) { + va_list args; + jobject result; + va_start(args,methodID); + result = functions->CallStaticObjectMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jobject CallStaticObjectMethodV(jclass clazz, jmethodID methodID, + va_list args) { + return functions->CallStaticObjectMethodV(this,clazz,methodID,args); + } + jobject CallStaticObjectMethodA(jclass clazz, jmethodID methodID, + const jvalue *args) { + return functions->CallStaticObjectMethodA(this,clazz,methodID,args); + } + + jboolean CallStaticBooleanMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jboolean result; + va_start(args,methodID); + result = functions->CallStaticBooleanMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jboolean CallStaticBooleanMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticBooleanMethodV(this,clazz,methodID,args); + } + jboolean CallStaticBooleanMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticBooleanMethodA(this,clazz,methodID,args); + } + + jbyte CallStaticByteMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jbyte result; + va_start(args,methodID); + result = functions->CallStaticByteMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jbyte CallStaticByteMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticByteMethodV(this,clazz,methodID,args); + } + jbyte CallStaticByteMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticByteMethodA(this,clazz,methodID,args); + } + + jchar CallStaticCharMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jchar result; + va_start(args,methodID); + result = functions->CallStaticCharMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jchar CallStaticCharMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticCharMethodV(this,clazz,methodID,args); + } + jchar CallStaticCharMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticCharMethodA(this,clazz,methodID,args); + } + + jshort CallStaticShortMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jshort result; + va_start(args,methodID); + result = functions->CallStaticShortMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jshort CallStaticShortMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticShortMethodV(this,clazz,methodID,args); + } + jshort CallStaticShortMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticShortMethodA(this,clazz,methodID,args); + } + + jint CallStaticIntMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jint result; + va_start(args,methodID); + result = functions->CallStaticIntMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jint CallStaticIntMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticIntMethodV(this,clazz,methodID,args); + } + jint CallStaticIntMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticIntMethodA(this,clazz,methodID,args); + } + + jlong CallStaticLongMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jlong result; + va_start(args,methodID); + result = functions->CallStaticLongMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jlong CallStaticLongMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticLongMethodV(this,clazz,methodID,args); + } + jlong CallStaticLongMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticLongMethodA(this,clazz,methodID,args); + } + + jfloat CallStaticFloatMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jfloat result; + va_start(args,methodID); + result = functions->CallStaticFloatMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jfloat CallStaticFloatMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticFloatMethodV(this,clazz,methodID,args); + } + jfloat CallStaticFloatMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticFloatMethodA(this,clazz,methodID,args); + } + + jdouble CallStaticDoubleMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jdouble result; + va_start(args,methodID); + result = functions->CallStaticDoubleMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jdouble CallStaticDoubleMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticDoubleMethodV(this,clazz,methodID,args); + } + jdouble CallStaticDoubleMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticDoubleMethodA(this,clazz,methodID,args); + } + + void CallStaticVoidMethod(jclass cls, jmethodID methodID, ...) { + va_list args; + va_start(args,methodID); + functions->CallStaticVoidMethodV(this,cls,methodID,args); + va_end(args); + } + void CallStaticVoidMethodV(jclass cls, jmethodID methodID, + va_list args) { + functions->CallStaticVoidMethodV(this,cls,methodID,args); + } + void CallStaticVoidMethodA(jclass cls, jmethodID methodID, + const jvalue * args) { + functions->CallStaticVoidMethodA(this,cls,methodID,args); + } + + jfieldID GetStaticFieldID(jclass clazz, const char *name, + const char *sig) { + return functions->GetStaticFieldID(this,clazz,name,sig); + } + jobject GetStaticObjectField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticObjectField(this,clazz,fieldID); + } + jboolean GetStaticBooleanField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticBooleanField(this,clazz,fieldID); + } + jbyte GetStaticByteField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticByteField(this,clazz,fieldID); + } + jchar GetStaticCharField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticCharField(this,clazz,fieldID); + } + jshort GetStaticShortField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticShortField(this,clazz,fieldID); + } + jint GetStaticIntField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticIntField(this,clazz,fieldID); + } + jlong GetStaticLongField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticLongField(this,clazz,fieldID); + } + jfloat GetStaticFloatField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticFloatField(this,clazz,fieldID); + } + jdouble GetStaticDoubleField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticDoubleField(this,clazz,fieldID); + } + + void SetStaticObjectField(jclass clazz, jfieldID fieldID, + jobject value) { + functions->SetStaticObjectField(this,clazz,fieldID,value); + } + void SetStaticBooleanField(jclass clazz, jfieldID fieldID, + jboolean value) { + functions->SetStaticBooleanField(this,clazz,fieldID,value); + } + void SetStaticByteField(jclass clazz, jfieldID fieldID, + jbyte value) { + functions->SetStaticByteField(this,clazz,fieldID,value); + } + void SetStaticCharField(jclass clazz, jfieldID fieldID, + jchar value) { + functions->SetStaticCharField(this,clazz,fieldID,value); + } + void SetStaticShortField(jclass clazz, jfieldID fieldID, + jshort value) { + functions->SetStaticShortField(this,clazz,fieldID,value); + } + void SetStaticIntField(jclass clazz, jfieldID fieldID, + jint value) { + functions->SetStaticIntField(this,clazz,fieldID,value); + } + void SetStaticLongField(jclass clazz, jfieldID fieldID, + jlong value) { + functions->SetStaticLongField(this,clazz,fieldID,value); + } + void SetStaticFloatField(jclass clazz, jfieldID fieldID, + jfloat value) { + functions->SetStaticFloatField(this,clazz,fieldID,value); + } + void SetStaticDoubleField(jclass clazz, jfieldID fieldID, + jdouble value) { + functions->SetStaticDoubleField(this,clazz,fieldID,value); + } + + jstring NewString(const jchar *unicode, jsize len) { + return functions->NewString(this,unicode,len); + } + jsize GetStringLength(jstring str) { + return functions->GetStringLength(this,str); + } + const jchar *GetStringChars(jstring str, jboolean *isCopy) { + return functions->GetStringChars(this,str,isCopy); + } + void ReleaseStringChars(jstring str, const jchar *chars) { + functions->ReleaseStringChars(this,str,chars); + } + + jstring NewStringUTF(const char *utf) { + return functions->NewStringUTF(this,utf); + } + jsize GetStringUTFLength(jstring str) { + return functions->GetStringUTFLength(this,str); + } + const char* GetStringUTFChars(jstring str, jboolean *isCopy) { + return functions->GetStringUTFChars(this,str,isCopy); + } + void ReleaseStringUTFChars(jstring str, const char* chars) { + functions->ReleaseStringUTFChars(this,str,chars); + } + + jsize GetArrayLength(jarray array) { + return functions->GetArrayLength(this,array); + } + + jobjectArray NewObjectArray(jsize len, jclass clazz, + jobject init) { + return functions->NewObjectArray(this,len,clazz,init); + } + jobject GetObjectArrayElement(jobjectArray array, jsize index) { + return functions->GetObjectArrayElement(this,array,index); + } + void SetObjectArrayElement(jobjectArray array, jsize index, + jobject val) { + functions->SetObjectArrayElement(this,array,index,val); + } + + jbooleanArray NewBooleanArray(jsize len) { + return functions->NewBooleanArray(this,len); + } + jbyteArray NewByteArray(jsize len) { + return functions->NewByteArray(this,len); + } + jcharArray NewCharArray(jsize len) { + return functions->NewCharArray(this,len); + } + jshortArray NewShortArray(jsize len) { + return functions->NewShortArray(this,len); + } + jintArray NewIntArray(jsize len) { + return functions->NewIntArray(this,len); + } + jlongArray NewLongArray(jsize len) { + return functions->NewLongArray(this,len); + } + jfloatArray NewFloatArray(jsize len) { + return functions->NewFloatArray(this,len); + } + jdoubleArray NewDoubleArray(jsize len) { + return functions->NewDoubleArray(this,len); + } + + jboolean * GetBooleanArrayElements(jbooleanArray array, jboolean *isCopy) { + return functions->GetBooleanArrayElements(this,array,isCopy); + } + jbyte * GetByteArrayElements(jbyteArray array, jboolean *isCopy) { + return functions->GetByteArrayElements(this,array,isCopy); + } + jchar * GetCharArrayElements(jcharArray array, jboolean *isCopy) { + return functions->GetCharArrayElements(this,array,isCopy); + } + jshort * GetShortArrayElements(jshortArray array, jboolean *isCopy) { + return functions->GetShortArrayElements(this,array,isCopy); + } + jint * GetIntArrayElements(jintArray array, jboolean *isCopy) { + return functions->GetIntArrayElements(this,array,isCopy); + } + jlong * GetLongArrayElements(jlongArray array, jboolean *isCopy) { + return functions->GetLongArrayElements(this,array,isCopy); + } + jfloat * GetFloatArrayElements(jfloatArray array, jboolean *isCopy) { + return functions->GetFloatArrayElements(this,array,isCopy); + } + jdouble * GetDoubleArrayElements(jdoubleArray array, jboolean *isCopy) { + return functions->GetDoubleArrayElements(this,array,isCopy); + } + + void ReleaseBooleanArrayElements(jbooleanArray array, + jboolean *elems, + jint mode) { + functions->ReleaseBooleanArrayElements(this,array,elems,mode); + } + void ReleaseByteArrayElements(jbyteArray array, + jbyte *elems, + jint mode) { + functions->ReleaseByteArrayElements(this,array,elems,mode); + } + void ReleaseCharArrayElements(jcharArray array, + jchar *elems, + jint mode) { + functions->ReleaseCharArrayElements(this,array,elems,mode); + } + void ReleaseShortArrayElements(jshortArray array, + jshort *elems, + jint mode) { + functions->ReleaseShortArrayElements(this,array,elems,mode); + } + void ReleaseIntArrayElements(jintArray array, + jint *elems, + jint mode) { + functions->ReleaseIntArrayElements(this,array,elems,mode); + } + void ReleaseLongArrayElements(jlongArray array, + jlong *elems, + jint mode) { + functions->ReleaseLongArrayElements(this,array,elems,mode); + } + void ReleaseFloatArrayElements(jfloatArray array, + jfloat *elems, + jint mode) { + functions->ReleaseFloatArrayElements(this,array,elems,mode); + } + void ReleaseDoubleArrayElements(jdoubleArray array, + jdouble *elems, + jint mode) { + functions->ReleaseDoubleArrayElements(this,array,elems,mode); + } + + void GetBooleanArrayRegion(jbooleanArray array, + jsize start, jsize len, jboolean *buf) { + functions->GetBooleanArrayRegion(this,array,start,len,buf); + } + void GetByteArrayRegion(jbyteArray array, + jsize start, jsize len, jbyte *buf) { + functions->GetByteArrayRegion(this,array,start,len,buf); + } + void GetCharArrayRegion(jcharArray array, + jsize start, jsize len, jchar *buf) { + functions->GetCharArrayRegion(this,array,start,len,buf); + } + void GetShortArrayRegion(jshortArray array, + jsize start, jsize len, jshort *buf) { + functions->GetShortArrayRegion(this,array,start,len,buf); + } + void GetIntArrayRegion(jintArray array, + jsize start, jsize len, jint *buf) { + functions->GetIntArrayRegion(this,array,start,len,buf); + } + void GetLongArrayRegion(jlongArray array, + jsize start, jsize len, jlong *buf) { + functions->GetLongArrayRegion(this,array,start,len,buf); + } + void GetFloatArrayRegion(jfloatArray array, + jsize start, jsize len, jfloat *buf) { + functions->GetFloatArrayRegion(this,array,start,len,buf); + } + void GetDoubleArrayRegion(jdoubleArray array, + jsize start, jsize len, jdouble *buf) { + functions->GetDoubleArrayRegion(this,array,start,len,buf); + } + + void SetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len, + const jboolean *buf) { + functions->SetBooleanArrayRegion(this,array,start,len,buf); + } + void SetByteArrayRegion(jbyteArray array, jsize start, jsize len, + const jbyte *buf) { + functions->SetByteArrayRegion(this,array,start,len,buf); + } + void SetCharArrayRegion(jcharArray array, jsize start, jsize len, + const jchar *buf) { + functions->SetCharArrayRegion(this,array,start,len,buf); + } + void SetShortArrayRegion(jshortArray array, jsize start, jsize len, + const jshort *buf) { + functions->SetShortArrayRegion(this,array,start,len,buf); + } + void SetIntArrayRegion(jintArray array, jsize start, jsize len, + const jint *buf) { + functions->SetIntArrayRegion(this,array,start,len,buf); + } + void SetLongArrayRegion(jlongArray array, jsize start, jsize len, + const jlong *buf) { + functions->SetLongArrayRegion(this,array,start,len,buf); + } + void SetFloatArrayRegion(jfloatArray array, jsize start, jsize len, + const jfloat *buf) { + functions->SetFloatArrayRegion(this,array,start,len,buf); + } + void SetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len, + const jdouble *buf) { + functions->SetDoubleArrayRegion(this,array,start,len,buf); + } + + jint RegisterNatives(jclass clazz, const JNINativeMethod *methods, + jint nMethods) { + return functions->RegisterNatives(this,clazz,methods,nMethods); + } + jint UnregisterNatives(jclass clazz) { + return functions->UnregisterNatives(this,clazz); + } + + jint MonitorEnter(jobject obj) { + return functions->MonitorEnter(this,obj); + } + jint MonitorExit(jobject obj) { + return functions->MonitorExit(this,obj); + } + + jint GetJavaVM(JavaVM **vm) { + return functions->GetJavaVM(this,vm); + } + + void GetStringRegion(jstring str, jsize start, jsize len, jchar *buf) { + functions->GetStringRegion(this,str,start,len,buf); + } + void GetStringUTFRegion(jstring str, jsize start, jsize len, char *buf) { + functions->GetStringUTFRegion(this,str,start,len,buf); + } + + void * GetPrimitiveArrayCritical(jarray array, jboolean *isCopy) { + return functions->GetPrimitiveArrayCritical(this,array,isCopy); + } + void ReleasePrimitiveArrayCritical(jarray array, void *carray, jint mode) { + functions->ReleasePrimitiveArrayCritical(this,array,carray,mode); + } + + const jchar * GetStringCritical(jstring string, jboolean *isCopy) { + return functions->GetStringCritical(this,string,isCopy); + } + void ReleaseStringCritical(jstring string, const jchar *cstring) { + functions->ReleaseStringCritical(this,string,cstring); + } + + jweak NewWeakGlobalRef(jobject obj) { + return functions->NewWeakGlobalRef(this,obj); + } + void DeleteWeakGlobalRef(jweak ref) { + functions->DeleteWeakGlobalRef(this,ref); + } + + jboolean ExceptionCheck() { + return functions->ExceptionCheck(this); + } + + jobject NewDirectByteBuffer(void* address, jlong capacity) { + return functions->NewDirectByteBuffer(this, address, capacity); + } + void* GetDirectBufferAddress(jobject buf) { + return functions->GetDirectBufferAddress(this, buf); + } + jlong GetDirectBufferCapacity(jobject buf) { + return functions->GetDirectBufferCapacity(this, buf); + } + jobjectRefType GetObjectRefType(jobject obj) { + return functions->GetObjectRefType(this, obj); + } + +#endif /* __cplusplus */ +}; + +typedef struct JavaVMOption { + char *optionString; + void *extraInfo; +} JavaVMOption; + +typedef struct JavaVMInitArgs { + jint version; + + jint nOptions; + JavaVMOption *options; + jboolean ignoreUnrecognized; +} JavaVMInitArgs; + +typedef struct JavaVMAttachArgs { + jint version; + + char *name; + jobject group; +} JavaVMAttachArgs; + +/* These will be VM-specific. */ + +#define JDK1_2 +#define JDK1_4 + +/* End VM-specific. */ + +struct JNIInvokeInterface_ { + void *reserved0; + void *reserved1; + void *reserved2; + + jint (JNICALL *DestroyJavaVM)(JavaVM *vm); + + jint (JNICALL *AttachCurrentThread)(JavaVM *vm, void **penv, void *args); + + jint (JNICALL *DetachCurrentThread)(JavaVM *vm); + + jint (JNICALL *GetEnv)(JavaVM *vm, void **penv, jint version); + + jint (JNICALL *AttachCurrentThreadAsDaemon)(JavaVM *vm, void **penv, void *args); +}; + +struct JavaVM_ { + const struct JNIInvokeInterface_ *functions; +#ifdef __cplusplus + + jint DestroyJavaVM() { + return functions->DestroyJavaVM(this); + } + jint AttachCurrentThread(void **penv, void *args) { + return functions->AttachCurrentThread(this, penv, args); + } + jint DetachCurrentThread() { + return functions->DetachCurrentThread(this); + } + + jint GetEnv(void **penv, jint version) { + return functions->GetEnv(this, penv, version); + } + jint AttachCurrentThreadAsDaemon(void **penv, void *args) { + return functions->AttachCurrentThreadAsDaemon(this, penv, args); + } +#endif +}; + +#ifdef _JNI_IMPLEMENTATION_ +#define _JNI_IMPORT_OR_EXPORT_ JNIEXPORT +#else +#define _JNI_IMPORT_OR_EXPORT_ JNIIMPORT +#endif +_JNI_IMPORT_OR_EXPORT_ jint JNICALL +JNI_GetDefaultJavaVMInitArgs(void *args); + +_JNI_IMPORT_OR_EXPORT_ jint JNICALL +JNI_CreateJavaVM(JavaVM **pvm, void **penv, void *args); + +_JNI_IMPORT_OR_EXPORT_ jint JNICALL +JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *); + +/* Defined by native libraries. */ +JNIEXPORT jint JNICALL +JNI_OnLoad(JavaVM *vm, void *reserved); + +JNIEXPORT void JNICALL +JNI_OnUnload(JavaVM *vm, void *reserved); + +#define JNI_VERSION_1_1 0x00010001 +#define JNI_VERSION_1_2 0x00010002 +#define JNI_VERSION_1_4 0x00010004 +#define JNI_VERSION_1_6 0x00010006 + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* !_JAVASOFT_JNI_H_ */ + + + diff --git a/include/jvmti.h b/include/jvmti.h new file mode 100644 index 0000000..865f21e --- /dev/null +++ b/include/jvmti.h @@ -0,0 +1,2504 @@ +#ifdef USE_PRAGMA_IDENT_HDR +#pragma ident "@(#)jvmtiLib.xsl 1.38 06/08/02 23:22:31 JVM" +#endif +/* + * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + + /* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */ + + + /* Include file for the Java(tm) Virtual Machine Tool Interface */ + +#ifndef _JAVA_JVMTI_H_ +#define _JAVA_JVMTI_H_ + +#include "jni.h" + +#ifdef __cplusplus +extern "C" { +#endif + +enum { + JVMTI_VERSION_1 = 0x30010000, + JVMTI_VERSION_1_0 = 0x30010000, + JVMTI_VERSION_1_1 = 0x30010100, + + JVMTI_VERSION = 0x30000000 + (1 * 0x10000) + (1 * 0x100) + 102 /* version: 1.1.102 */ +}; + +JNIEXPORT jint JNICALL +Agent_OnLoad(JavaVM *vm, char *options, void *reserved); + +JNIEXPORT jint JNICALL +Agent_OnAttach(JavaVM* vm, char* options, void* reserved); + +JNIEXPORT void JNICALL +Agent_OnUnload(JavaVM *vm); + + /* Forward declaration of the environment */ + +struct _jvmtiEnv; + +struct jvmtiInterface_1_; + +#ifdef __cplusplus +typedef _jvmtiEnv jvmtiEnv; +#else +typedef const struct jvmtiInterface_1_ *jvmtiEnv; +#endif /* __cplusplus */ + +/* Derived Base Types */ + +typedef jobject jthread; +typedef jobject jthreadGroup; +typedef jlong jlocation; +struct _jrawMonitorID; +typedef struct _jrawMonitorID *jrawMonitorID; +typedef struct JNINativeInterface_ jniNativeInterface; + + /* Constants */ + + + /* Thread State Flags */ + +enum { + JVMTI_THREAD_STATE_ALIVE = 0x0001, + JVMTI_THREAD_STATE_TERMINATED = 0x0002, + JVMTI_THREAD_STATE_RUNNABLE = 0x0004, + JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER = 0x0400, + JVMTI_THREAD_STATE_WAITING = 0x0080, + JVMTI_THREAD_STATE_WAITING_INDEFINITELY = 0x0010, + JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT = 0x0020, + JVMTI_THREAD_STATE_SLEEPING = 0x0040, + JVMTI_THREAD_STATE_IN_OBJECT_WAIT = 0x0100, + JVMTI_THREAD_STATE_PARKED = 0x0200, + JVMTI_THREAD_STATE_SUSPENDED = 0x100000, + JVMTI_THREAD_STATE_INTERRUPTED = 0x200000, + JVMTI_THREAD_STATE_IN_NATIVE = 0x400000, + JVMTI_THREAD_STATE_VENDOR_1 = 0x10000000, + JVMTI_THREAD_STATE_VENDOR_2 = 0x20000000, + JVMTI_THREAD_STATE_VENDOR_3 = 0x40000000 +}; + + /* java.lang.Thread.State Conversion Masks */ + +enum { + JVMTI_JAVA_LANG_THREAD_STATE_MASK = JVMTI_THREAD_STATE_TERMINATED | JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_RUNNABLE | JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_INDEFINITELY | JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT, + JVMTI_JAVA_LANG_THREAD_STATE_NEW = 0, + JVMTI_JAVA_LANG_THREAD_STATE_TERMINATED = JVMTI_THREAD_STATE_TERMINATED, + JVMTI_JAVA_LANG_THREAD_STATE_RUNNABLE = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_RUNNABLE, + JVMTI_JAVA_LANG_THREAD_STATE_BLOCKED = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER, + JVMTI_JAVA_LANG_THREAD_STATE_WAITING = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_INDEFINITELY, + JVMTI_JAVA_LANG_THREAD_STATE_TIMED_WAITING = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT +}; + + /* Thread Priority Constants */ + +enum { + JVMTI_THREAD_MIN_PRIORITY = 1, + JVMTI_THREAD_NORM_PRIORITY = 5, + JVMTI_THREAD_MAX_PRIORITY = 10 +}; + + /* Heap Filter Flags */ + +enum { + JVMTI_HEAP_FILTER_TAGGED = 0x4, + JVMTI_HEAP_FILTER_UNTAGGED = 0x8, + JVMTI_HEAP_FILTER_CLASS_TAGGED = 0x10, + JVMTI_HEAP_FILTER_CLASS_UNTAGGED = 0x20 +}; + + /* Heap Visit Control Flags */ + +enum { + JVMTI_VISIT_OBJECTS = 0x100, + JVMTI_VISIT_ABORT = 0x8000 +}; + + /* Heap Reference Enumeration */ + +typedef enum { + JVMTI_HEAP_REFERENCE_CLASS = 1, + JVMTI_HEAP_REFERENCE_FIELD = 2, + JVMTI_HEAP_REFERENCE_ARRAY_ELEMENT = 3, + JVMTI_HEAP_REFERENCE_CLASS_LOADER = 4, + JVMTI_HEAP_REFERENCE_SIGNERS = 5, + JVMTI_HEAP_REFERENCE_PROTECTION_DOMAIN = 6, + JVMTI_HEAP_REFERENCE_INTERFACE = 7, + JVMTI_HEAP_REFERENCE_STATIC_FIELD = 8, + JVMTI_HEAP_REFERENCE_CONSTANT_POOL = 9, + JVMTI_HEAP_REFERENCE_SUPERCLASS = 10, + JVMTI_HEAP_REFERENCE_JNI_GLOBAL = 21, + JVMTI_HEAP_REFERENCE_SYSTEM_CLASS = 22, + JVMTI_HEAP_REFERENCE_MONITOR = 23, + JVMTI_HEAP_REFERENCE_STACK_LOCAL = 24, + JVMTI_HEAP_REFERENCE_JNI_LOCAL = 25, + JVMTI_HEAP_REFERENCE_THREAD = 26, + JVMTI_HEAP_REFERENCE_OTHER = 27 +} jvmtiHeapReferenceKind; + + /* Primitive Type Enumeration */ + +typedef enum { + JVMTI_PRIMITIVE_TYPE_BOOLEAN = 90, + JVMTI_PRIMITIVE_TYPE_BYTE = 66, + JVMTI_PRIMITIVE_TYPE_CHAR = 67, + JVMTI_PRIMITIVE_TYPE_SHORT = 83, + JVMTI_PRIMITIVE_TYPE_INT = 73, + JVMTI_PRIMITIVE_TYPE_LONG = 74, + JVMTI_PRIMITIVE_TYPE_FLOAT = 70, + JVMTI_PRIMITIVE_TYPE_DOUBLE = 68 +} jvmtiPrimitiveType; + + /* Heap Object Filter Enumeration */ + +typedef enum { + JVMTI_HEAP_OBJECT_TAGGED = 1, + JVMTI_HEAP_OBJECT_UNTAGGED = 2, + JVMTI_HEAP_OBJECT_EITHER = 3 +} jvmtiHeapObjectFilter; + + /* Heap Root Kind Enumeration */ + +typedef enum { + JVMTI_HEAP_ROOT_JNI_GLOBAL = 1, + JVMTI_HEAP_ROOT_SYSTEM_CLASS = 2, + JVMTI_HEAP_ROOT_MONITOR = 3, + JVMTI_HEAP_ROOT_STACK_LOCAL = 4, + JVMTI_HEAP_ROOT_JNI_LOCAL = 5, + JVMTI_HEAP_ROOT_THREAD = 6, + JVMTI_HEAP_ROOT_OTHER = 7 +} jvmtiHeapRootKind; + + /* Object Reference Enumeration */ + +typedef enum { + JVMTI_REFERENCE_CLASS = 1, + JVMTI_REFERENCE_FIELD = 2, + JVMTI_REFERENCE_ARRAY_ELEMENT = 3, + JVMTI_REFERENCE_CLASS_LOADER = 4, + JVMTI_REFERENCE_SIGNERS = 5, + JVMTI_REFERENCE_PROTECTION_DOMAIN = 6, + JVMTI_REFERENCE_INTERFACE = 7, + JVMTI_REFERENCE_STATIC_FIELD = 8, + JVMTI_REFERENCE_CONSTANT_POOL = 9 +} jvmtiObjectReferenceKind; + + /* Iteration Control Enumeration */ + +typedef enum { + JVMTI_ITERATION_CONTINUE = 1, + JVMTI_ITERATION_IGNORE = 2, + JVMTI_ITERATION_ABORT = 0 +} jvmtiIterationControl; + + /* Class Status Flags */ + +enum { + JVMTI_CLASS_STATUS_VERIFIED = 1, + JVMTI_CLASS_STATUS_PREPARED = 2, + JVMTI_CLASS_STATUS_INITIALIZED = 4, + JVMTI_CLASS_STATUS_ERROR = 8, + JVMTI_CLASS_STATUS_ARRAY = 16, + JVMTI_CLASS_STATUS_PRIMITIVE = 32 +}; + + /* Event Enable/Disable */ + +typedef enum { + JVMTI_ENABLE = 1, + JVMTI_DISABLE = 0 +} jvmtiEventMode; + + /* Extension Function/Event Parameter Types */ + +typedef enum { + JVMTI_TYPE_JBYTE = 101, + JVMTI_TYPE_JCHAR = 102, + JVMTI_TYPE_JSHORT = 103, + JVMTI_TYPE_JINT = 104, + JVMTI_TYPE_JLONG = 105, + JVMTI_TYPE_JFLOAT = 106, + JVMTI_TYPE_JDOUBLE = 107, + JVMTI_TYPE_JBOOLEAN = 108, + JVMTI_TYPE_JOBJECT = 109, + JVMTI_TYPE_JTHREAD = 110, + JVMTI_TYPE_JCLASS = 111, + JVMTI_TYPE_JVALUE = 112, + JVMTI_TYPE_JFIELDID = 113, + JVMTI_TYPE_JMETHODID = 114, + JVMTI_TYPE_CCHAR = 115, + JVMTI_TYPE_CVOID = 116, + JVMTI_TYPE_JNIENV = 117 +} jvmtiParamTypes; + + /* Extension Function/Event Parameter Kinds */ + +typedef enum { + JVMTI_KIND_IN = 91, + JVMTI_KIND_IN_PTR = 92, + JVMTI_KIND_IN_BUF = 93, + JVMTI_KIND_ALLOC_BUF = 94, + JVMTI_KIND_ALLOC_ALLOC_BUF = 95, + JVMTI_KIND_OUT = 96, + JVMTI_KIND_OUT_BUF = 97 +} jvmtiParamKind; + + /* Timer Kinds */ + +typedef enum { + JVMTI_TIMER_USER_CPU = 30, + JVMTI_TIMER_TOTAL_CPU = 31, + JVMTI_TIMER_ELAPSED = 32 +} jvmtiTimerKind; + + /* Phases of execution */ + +typedef enum { + JVMTI_PHASE_ONLOAD = 1, + JVMTI_PHASE_PRIMORDIAL = 2, + JVMTI_PHASE_START = 6, + JVMTI_PHASE_LIVE = 4, + JVMTI_PHASE_DEAD = 8 +} jvmtiPhase; + + /* Version Interface Types */ + +enum { + JVMTI_VERSION_INTERFACE_JNI = 0x00000000, + JVMTI_VERSION_INTERFACE_JVMTI = 0x30000000 +}; + + /* Version Masks */ + +enum { + JVMTI_VERSION_MASK_INTERFACE_TYPE = 0x70000000, + JVMTI_VERSION_MASK_MAJOR = 0x0FFF0000, + JVMTI_VERSION_MASK_MINOR = 0x0000FF00, + JVMTI_VERSION_MASK_MICRO = 0x000000FF +}; + + /* Version Shifts */ + +enum { + JVMTI_VERSION_SHIFT_MAJOR = 16, + JVMTI_VERSION_SHIFT_MINOR = 8, + JVMTI_VERSION_SHIFT_MICRO = 0 +}; + + /* Verbose Flag Enumeration */ + +typedef enum { + JVMTI_VERBOSE_OTHER = 0, + JVMTI_VERBOSE_GC = 1, + JVMTI_VERBOSE_CLASS = 2, + JVMTI_VERBOSE_JNI = 4 +} jvmtiVerboseFlag; + + /* JLocation Format Enumeration */ + +typedef enum { + JVMTI_JLOCATION_JVMBCI = 1, + JVMTI_JLOCATION_MACHINEPC = 2, + JVMTI_JLOCATION_OTHER = 0 +} jvmtiJlocationFormat; + + /* Resource Exhaustion Flags */ + +enum { + JVMTI_RESOURCE_EXHAUSTED_OOM_ERROR = 0x0001, + JVMTI_RESOURCE_EXHAUSTED_JAVA_HEAP = 0x0002, + JVMTI_RESOURCE_EXHAUSTED_THREADS = 0x0004 +}; + + /* Errors */ + +typedef enum { + JVMTI_ERROR_NONE = 0, + JVMTI_ERROR_INVALID_THREAD = 10, + JVMTI_ERROR_INVALID_THREAD_GROUP = 11, + JVMTI_ERROR_INVALID_PRIORITY = 12, + JVMTI_ERROR_THREAD_NOT_SUSPENDED = 13, + JVMTI_ERROR_THREAD_SUSPENDED = 14, + JVMTI_ERROR_THREAD_NOT_ALIVE = 15, + JVMTI_ERROR_INVALID_OBJECT = 20, + JVMTI_ERROR_INVALID_CLASS = 21, + JVMTI_ERROR_CLASS_NOT_PREPARED = 22, + JVMTI_ERROR_INVALID_METHODID = 23, + JVMTI_ERROR_INVALID_LOCATION = 24, + JVMTI_ERROR_INVALID_FIELDID = 25, + JVMTI_ERROR_NO_MORE_FRAMES = 31, + JVMTI_ERROR_OPAQUE_FRAME = 32, + JVMTI_ERROR_TYPE_MISMATCH = 34, + JVMTI_ERROR_INVALID_SLOT = 35, + JVMTI_ERROR_DUPLICATE = 40, + JVMTI_ERROR_NOT_FOUND = 41, + JVMTI_ERROR_INVALID_MONITOR = 50, + JVMTI_ERROR_NOT_MONITOR_OWNER = 51, + JVMTI_ERROR_INTERRUPT = 52, + JVMTI_ERROR_INVALID_CLASS_FORMAT = 60, + JVMTI_ERROR_CIRCULAR_CLASS_DEFINITION = 61, + JVMTI_ERROR_FAILS_VERIFICATION = 62, + JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_ADDED = 63, + JVMTI_ERROR_UNSUPPORTED_REDEFINITION_SCHEMA_CHANGED = 64, + JVMTI_ERROR_INVALID_TYPESTATE = 65, + JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED = 66, + JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_DELETED = 67, + JVMTI_ERROR_UNSUPPORTED_VERSION = 68, + JVMTI_ERROR_NAMES_DONT_MATCH = 69, + JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED = 70, + JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_MODIFIERS_CHANGED = 71, + JVMTI_ERROR_UNMODIFIABLE_CLASS = 79, + JVMTI_ERROR_NOT_AVAILABLE = 98, + JVMTI_ERROR_MUST_POSSESS_CAPABILITY = 99, + JVMTI_ERROR_NULL_POINTER = 100, + JVMTI_ERROR_ABSENT_INFORMATION = 101, + JVMTI_ERROR_INVALID_EVENT_TYPE = 102, + JVMTI_ERROR_ILLEGAL_ARGUMENT = 103, + JVMTI_ERROR_NATIVE_METHOD = 104, + JVMTI_ERROR_CLASS_LOADER_UNSUPPORTED = 106, + JVMTI_ERROR_OUT_OF_MEMORY = 110, + JVMTI_ERROR_ACCESS_DENIED = 111, + JVMTI_ERROR_WRONG_PHASE = 112, + JVMTI_ERROR_INTERNAL = 113, + JVMTI_ERROR_UNATTACHED_THREAD = 115, + JVMTI_ERROR_INVALID_ENVIRONMENT = 116, + JVMTI_ERROR_MAX = 116 +} jvmtiError; + + /* Event IDs */ + +typedef enum { + JVMTI_MIN_EVENT_TYPE_VAL = 50, + JVMTI_EVENT_VM_INIT = 50, + JVMTI_EVENT_VM_DEATH = 51, + JVMTI_EVENT_THREAD_START = 52, + JVMTI_EVENT_THREAD_END = 53, + JVMTI_EVENT_CLASS_FILE_LOAD_HOOK = 54, + JVMTI_EVENT_CLASS_LOAD = 55, + JVMTI_EVENT_CLASS_PREPARE = 56, + JVMTI_EVENT_VM_START = 57, + JVMTI_EVENT_EXCEPTION = 58, + JVMTI_EVENT_EXCEPTION_CATCH = 59, + JVMTI_EVENT_SINGLE_STEP = 60, + JVMTI_EVENT_FRAME_POP = 61, + JVMTI_EVENT_BREAKPOINT = 62, + JVMTI_EVENT_FIELD_ACCESS = 63, + JVMTI_EVENT_FIELD_MODIFICATION = 64, + JVMTI_EVENT_METHOD_ENTRY = 65, + JVMTI_EVENT_METHOD_EXIT = 66, + JVMTI_EVENT_NATIVE_METHOD_BIND = 67, + JVMTI_EVENT_COMPILED_METHOD_LOAD = 68, + JVMTI_EVENT_COMPILED_METHOD_UNLOAD = 69, + JVMTI_EVENT_DYNAMIC_CODE_GENERATED = 70, + JVMTI_EVENT_DATA_DUMP_REQUEST = 71, + JVMTI_EVENT_MONITOR_WAIT = 73, + JVMTI_EVENT_MONITOR_WAITED = 74, + JVMTI_EVENT_MONITOR_CONTENDED_ENTER = 75, + JVMTI_EVENT_MONITOR_CONTENDED_ENTERED = 76, + JVMTI_EVENT_RESOURCE_EXHAUSTED = 80, + JVMTI_EVENT_GARBAGE_COLLECTION_START = 81, + JVMTI_EVENT_GARBAGE_COLLECTION_FINISH = 82, + JVMTI_EVENT_OBJECT_FREE = 83, + JVMTI_EVENT_VM_OBJECT_ALLOC = 84, + JVMTI_MAX_EVENT_TYPE_VAL = 84 +} jvmtiEvent; + + + /* Pre-Declarations */ +struct _jvmtiThreadInfo; +typedef struct _jvmtiThreadInfo jvmtiThreadInfo; +struct _jvmtiMonitorStackDepthInfo; +typedef struct _jvmtiMonitorStackDepthInfo jvmtiMonitorStackDepthInfo; +struct _jvmtiThreadGroupInfo; +typedef struct _jvmtiThreadGroupInfo jvmtiThreadGroupInfo; +struct _jvmtiFrameInfo; +typedef struct _jvmtiFrameInfo jvmtiFrameInfo; +struct _jvmtiStackInfo; +typedef struct _jvmtiStackInfo jvmtiStackInfo; +struct _jvmtiHeapReferenceInfoField; +typedef struct _jvmtiHeapReferenceInfoField jvmtiHeapReferenceInfoField; +struct _jvmtiHeapReferenceInfoArray; +typedef struct _jvmtiHeapReferenceInfoArray jvmtiHeapReferenceInfoArray; +struct _jvmtiHeapReferenceInfoConstantPool; +typedef struct _jvmtiHeapReferenceInfoConstantPool jvmtiHeapReferenceInfoConstantPool; +struct _jvmtiHeapReferenceInfoStackLocal; +typedef struct _jvmtiHeapReferenceInfoStackLocal jvmtiHeapReferenceInfoStackLocal; +struct _jvmtiHeapReferenceInfoJniLocal; +typedef struct _jvmtiHeapReferenceInfoJniLocal jvmtiHeapReferenceInfoJniLocal; +struct _jvmtiHeapReferenceInfoReserved; +typedef struct _jvmtiHeapReferenceInfoReserved jvmtiHeapReferenceInfoReserved; +union _jvmtiHeapReferenceInfo; +typedef union _jvmtiHeapReferenceInfo jvmtiHeapReferenceInfo; +struct _jvmtiHeapCallbacks; +typedef struct _jvmtiHeapCallbacks jvmtiHeapCallbacks; +struct _jvmtiClassDefinition; +typedef struct _jvmtiClassDefinition jvmtiClassDefinition; +struct _jvmtiMonitorUsage; +typedef struct _jvmtiMonitorUsage jvmtiMonitorUsage; +struct _jvmtiLineNumberEntry; +typedef struct _jvmtiLineNumberEntry jvmtiLineNumberEntry; +struct _jvmtiLocalVariableEntry; +typedef struct _jvmtiLocalVariableEntry jvmtiLocalVariableEntry; +struct _jvmtiParamInfo; +typedef struct _jvmtiParamInfo jvmtiParamInfo; +struct _jvmtiExtensionFunctionInfo; +typedef struct _jvmtiExtensionFunctionInfo jvmtiExtensionFunctionInfo; +struct _jvmtiExtensionEventInfo; +typedef struct _jvmtiExtensionEventInfo jvmtiExtensionEventInfo; +struct _jvmtiTimerInfo; +typedef struct _jvmtiTimerInfo jvmtiTimerInfo; +struct _jvmtiAddrLocationMap; +typedef struct _jvmtiAddrLocationMap jvmtiAddrLocationMap; + + /* Function Types */ + +typedef void (JNICALL *jvmtiStartFunction) + (jvmtiEnv* jvmti_env, JNIEnv* jni_env, void* arg); + +typedef jint (JNICALL *jvmtiHeapIterationCallback) + (jlong class_tag, jlong size, jlong* tag_ptr, jint length, void* user_data); + +typedef jint (JNICALL *jvmtiHeapReferenceCallback) + (jvmtiHeapReferenceKind reference_kind, const jvmtiHeapReferenceInfo* reference_info, jlong class_tag, jlong referrer_class_tag, jlong size, jlong* tag_ptr, jlong* referrer_tag_ptr, jint length, void* user_data); + +typedef jint (JNICALL *jvmtiPrimitiveFieldCallback) + (jvmtiHeapReferenceKind kind, const jvmtiHeapReferenceInfo* info, jlong object_class_tag, jlong* object_tag_ptr, jvalue value, jvmtiPrimitiveType value_type, void* user_data); + +typedef jint (JNICALL *jvmtiArrayPrimitiveValueCallback) + (jlong class_tag, jlong size, jlong* tag_ptr, jint element_count, jvmtiPrimitiveType element_type, const void* elements, void* user_data); + +typedef jint (JNICALL *jvmtiStringPrimitiveValueCallback) + (jlong class_tag, jlong size, jlong* tag_ptr, const jchar* value, jint value_length, void* user_data); + +typedef jint (JNICALL *jvmtiReservedCallback) + (); + +typedef jvmtiIterationControl (JNICALL *jvmtiHeapObjectCallback) + (jlong class_tag, jlong size, jlong* tag_ptr, void* user_data); + +typedef jvmtiIterationControl (JNICALL *jvmtiHeapRootCallback) + (jvmtiHeapRootKind root_kind, jlong class_tag, jlong size, jlong* tag_ptr, void* user_data); + +typedef jvmtiIterationControl (JNICALL *jvmtiStackReferenceCallback) + (jvmtiHeapRootKind root_kind, jlong class_tag, jlong size, jlong* tag_ptr, jlong thread_tag, jint depth, jmethodID method, jint slot, void* user_data); + +typedef jvmtiIterationControl (JNICALL *jvmtiObjectReferenceCallback) + (jvmtiObjectReferenceKind reference_kind, jlong class_tag, jlong size, jlong* tag_ptr, jlong referrer_tag, jint referrer_index, void* user_data); + +typedef jvmtiError (JNICALL *jvmtiExtensionFunction) + (jvmtiEnv* jvmti_env, ...); + +typedef void (JNICALL *jvmtiExtensionEvent) + (jvmtiEnv* jvmti_env, ...); + + + /* Structure Types */ +struct _jvmtiThreadInfo { + char* name; + jint priority; + jboolean is_daemon; + jthreadGroup thread_group; + jobject context_class_loader; +}; +struct _jvmtiMonitorStackDepthInfo { + jobject monitor; + jint stack_depth; +}; +struct _jvmtiThreadGroupInfo { + jthreadGroup parent; + char* name; + jint max_priority; + jboolean is_daemon; +}; +struct _jvmtiFrameInfo { + jmethodID method; + jlocation location; +}; +struct _jvmtiStackInfo { + jthread thread; + jint state; + jvmtiFrameInfo* frame_buffer; + jint frame_count; +}; +struct _jvmtiHeapReferenceInfoField { + jint index; +}; +struct _jvmtiHeapReferenceInfoArray { + jint index; +}; +struct _jvmtiHeapReferenceInfoConstantPool { + jint index; +}; +struct _jvmtiHeapReferenceInfoStackLocal { + jlong thread_tag; + jlong thread_id; + jint depth; + jmethodID method; + jlocation location; + jint slot; +}; +struct _jvmtiHeapReferenceInfoJniLocal { + jlong thread_tag; + jlong thread_id; + jint depth; + jmethodID method; +}; +struct _jvmtiHeapReferenceInfoReserved { + jlong reserved1; + jlong reserved2; + jlong reserved3; + jlong reserved4; + jlong reserved5; + jlong reserved6; + jlong reserved7; + jlong reserved8; +}; +union _jvmtiHeapReferenceInfo { + jvmtiHeapReferenceInfoField field; + jvmtiHeapReferenceInfoArray array; + jvmtiHeapReferenceInfoConstantPool constant_pool; + jvmtiHeapReferenceInfoStackLocal stack_local; + jvmtiHeapReferenceInfoJniLocal jni_local; + jvmtiHeapReferenceInfoReserved other; +}; +struct _jvmtiHeapCallbacks { + jvmtiHeapIterationCallback heap_iteration_callback; + jvmtiHeapReferenceCallback heap_reference_callback; + jvmtiPrimitiveFieldCallback primitive_field_callback; + jvmtiArrayPrimitiveValueCallback array_primitive_value_callback; + jvmtiStringPrimitiveValueCallback string_primitive_value_callback; + jvmtiReservedCallback reserved5; + jvmtiReservedCallback reserved6; + jvmtiReservedCallback reserved7; + jvmtiReservedCallback reserved8; + jvmtiReservedCallback reserved9; + jvmtiReservedCallback reserved10; + jvmtiReservedCallback reserved11; + jvmtiReservedCallback reserved12; + jvmtiReservedCallback reserved13; + jvmtiReservedCallback reserved14; + jvmtiReservedCallback reserved15; +}; +struct _jvmtiClassDefinition { + jclass klass; + jint class_byte_count; + const unsigned char* class_bytes; +}; +struct _jvmtiMonitorUsage { + jthread owner; + jint entry_count; + jint waiter_count; + jthread* waiters; + jint notify_waiter_count; + jthread* notify_waiters; +}; +struct _jvmtiLineNumberEntry { + jlocation start_location; + jint line_number; +}; +struct _jvmtiLocalVariableEntry { + jlocation start_location; + jint length; + char* name; + char* signature; + char* generic_signature; + jint slot; +}; +struct _jvmtiParamInfo { + char* name; + jvmtiParamKind kind; + jvmtiParamTypes base_type; + jboolean null_ok; +}; +struct _jvmtiExtensionFunctionInfo { + jvmtiExtensionFunction func; + char* id; + char* short_description; + jint param_count; + jvmtiParamInfo* params; + jint error_count; + jvmtiError* errors; +}; +struct _jvmtiExtensionEventInfo { + jint extension_event_index; + char* id; + char* short_description; + jint param_count; + jvmtiParamInfo* params; +}; +struct _jvmtiTimerInfo { + jlong max_value; + jboolean may_skip_forward; + jboolean may_skip_backward; + jvmtiTimerKind kind; + jlong reserved1; + jlong reserved2; +}; +struct _jvmtiAddrLocationMap { + const void* start_address; + jlocation location; +}; + +typedef struct { + unsigned int can_tag_objects : 1; + unsigned int can_generate_field_modification_events : 1; + unsigned int can_generate_field_access_events : 1; + unsigned int can_get_bytecodes : 1; + unsigned int can_get_synthetic_attribute : 1; + unsigned int can_get_owned_monitor_info : 1; + unsigned int can_get_current_contended_monitor : 1; + unsigned int can_get_monitor_info : 1; + unsigned int can_pop_frame : 1; + unsigned int can_redefine_classes : 1; + unsigned int can_signal_thread : 1; + unsigned int can_get_source_file_name : 1; + unsigned int can_get_line_numbers : 1; + unsigned int can_get_source_debug_extension : 1; + unsigned int can_access_local_variables : 1; + unsigned int can_maintain_original_method_order : 1; + unsigned int can_generate_single_step_events : 1; + unsigned int can_generate_exception_events : 1; + unsigned int can_generate_frame_pop_events : 1; + unsigned int can_generate_breakpoint_events : 1; + unsigned int can_suspend : 1; + unsigned int can_redefine_any_class : 1; + unsigned int can_get_current_thread_cpu_time : 1; + unsigned int can_get_thread_cpu_time : 1; + unsigned int can_generate_method_entry_events : 1; + unsigned int can_generate_method_exit_events : 1; + unsigned int can_generate_all_class_hook_events : 1; + unsigned int can_generate_compiled_method_load_events : 1; + unsigned int can_generate_monitor_events : 1; + unsigned int can_generate_vm_object_alloc_events : 1; + unsigned int can_generate_native_method_bind_events : 1; + unsigned int can_generate_garbage_collection_events : 1; + unsigned int can_generate_object_free_events : 1; + unsigned int can_force_early_return : 1; + unsigned int can_get_owned_monitor_stack_depth_info : 1; + unsigned int can_get_constant_pool : 1; + unsigned int can_set_native_method_prefix : 1; + unsigned int can_retransform_classes : 1; + unsigned int can_retransform_any_class : 1; + unsigned int can_generate_resource_exhaustion_heap_events : 1; + unsigned int can_generate_resource_exhaustion_threads_events : 1; + unsigned int : 7; + unsigned int : 16; + unsigned int : 16; + unsigned int : 16; + unsigned int : 16; + unsigned int : 16; +} jvmtiCapabilities; + + + /* Event Definitions */ + +typedef void (JNICALL *jvmtiEventReserved)(void); + + +typedef void (JNICALL *jvmtiEventBreakpoint) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jmethodID method, + jlocation location); + +typedef void (JNICALL *jvmtiEventClassFileLoadHook) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jclass class_being_redefined, + jobject loader, + const char* name, + jobject protection_domain, + jint class_data_len, + const unsigned char* class_data, + jint* new_class_data_len, + unsigned char** new_class_data); + +typedef void (JNICALL *jvmtiEventClassLoad) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jclass klass); + +typedef void (JNICALL *jvmtiEventClassPrepare) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jclass klass); + +typedef void (JNICALL *jvmtiEventCompiledMethodLoad) + (jvmtiEnv *jvmti_env, + jmethodID method, + jint code_size, + const void* code_addr, + jint map_length, + const jvmtiAddrLocationMap* map, + const void* compile_info); + +typedef void (JNICALL *jvmtiEventCompiledMethodUnload) + (jvmtiEnv *jvmti_env, + jmethodID method, + const void* code_addr); + +typedef void (JNICALL *jvmtiEventDataDumpRequest) + (jvmtiEnv *jvmti_env); + +typedef void (JNICALL *jvmtiEventDynamicCodeGenerated) + (jvmtiEnv *jvmti_env, + const char* name, + const void* address, + jint length); + +typedef void (JNICALL *jvmtiEventException) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jmethodID method, + jlocation location, + jobject exception, + jmethodID catch_method, + jlocation catch_location); + +typedef void (JNICALL *jvmtiEventExceptionCatch) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jmethodID method, + jlocation location, + jobject exception); + +typedef void (JNICALL *jvmtiEventFieldAccess) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jmethodID method, + jlocation location, + jclass field_klass, + jobject object, + jfieldID field); + +typedef void (JNICALL *jvmtiEventFieldModification) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jmethodID method, + jlocation location, + jclass field_klass, + jobject object, + jfieldID field, + char signature_type, + jvalue new_value); + +typedef void (JNICALL *jvmtiEventFramePop) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jmethodID method, + jboolean was_popped_by_exception); + +typedef void (JNICALL *jvmtiEventGarbageCollectionFinish) + (jvmtiEnv *jvmti_env); + +typedef void (JNICALL *jvmtiEventGarbageCollectionStart) + (jvmtiEnv *jvmti_env); + +typedef void (JNICALL *jvmtiEventMethodEntry) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jmethodID method); + +typedef void (JNICALL *jvmtiEventMethodExit) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jmethodID method, + jboolean was_popped_by_exception, + jvalue return_value); + +typedef void (JNICALL *jvmtiEventMonitorContendedEnter) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jobject object); + +typedef void (JNICALL *jvmtiEventMonitorContendedEntered) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jobject object); + +typedef void (JNICALL *jvmtiEventMonitorWait) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jobject object, + jlong timeout); + +typedef void (JNICALL *jvmtiEventMonitorWaited) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jobject object, + jboolean timed_out); + +typedef void (JNICALL *jvmtiEventNativeMethodBind) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jmethodID method, + void* address, + void** new_address_ptr); + +typedef void (JNICALL *jvmtiEventObjectFree) + (jvmtiEnv *jvmti_env, + jlong tag); + +typedef void (JNICALL *jvmtiEventResourceExhausted) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jint flags, + const void* reserved, + const char* description); + +typedef void (JNICALL *jvmtiEventSingleStep) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jmethodID method, + jlocation location); + +typedef void (JNICALL *jvmtiEventThreadEnd) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread); + +typedef void (JNICALL *jvmtiEventThreadStart) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread); + +typedef void (JNICALL *jvmtiEventVMDeath) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env); + +typedef void (JNICALL *jvmtiEventVMInit) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread); + +typedef void (JNICALL *jvmtiEventVMObjectAlloc) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env, + jthread thread, + jobject object, + jclass object_klass, + jlong size); + +typedef void (JNICALL *jvmtiEventVMStart) + (jvmtiEnv *jvmti_env, + JNIEnv* jni_env); + + /* Event Callback Structure */ + +typedef struct { + /* 50 : VM Initialization Event */ + jvmtiEventVMInit VMInit; + /* 51 : VM Death Event */ + jvmtiEventVMDeath VMDeath; + /* 52 : Thread Start */ + jvmtiEventThreadStart ThreadStart; + /* 53 : Thread End */ + jvmtiEventThreadEnd ThreadEnd; + /* 54 : Class File Load Hook */ + jvmtiEventClassFileLoadHook ClassFileLoadHook; + /* 55 : Class Load */ + jvmtiEventClassLoad ClassLoad; + /* 56 : Class Prepare */ + jvmtiEventClassPrepare ClassPrepare; + /* 57 : VM Start Event */ + jvmtiEventVMStart VMStart; + /* 58 : Exception */ + jvmtiEventException Exception; + /* 59 : Exception Catch */ + jvmtiEventExceptionCatch ExceptionCatch; + /* 60 : Single Step */ + jvmtiEventSingleStep SingleStep; + /* 61 : Frame Pop */ + jvmtiEventFramePop FramePop; + /* 62 : Breakpoint */ + jvmtiEventBreakpoint Breakpoint; + /* 63 : Field Access */ + jvmtiEventFieldAccess FieldAccess; + /* 64 : Field Modification */ + jvmtiEventFieldModification FieldModification; + /* 65 : Method Entry */ + jvmtiEventMethodEntry MethodEntry; + /* 66 : Method Exit */ + jvmtiEventMethodExit MethodExit; + /* 67 : Native Method Bind */ + jvmtiEventNativeMethodBind NativeMethodBind; + /* 68 : Compiled Method Load */ + jvmtiEventCompiledMethodLoad CompiledMethodLoad; + /* 69 : Compiled Method Unload */ + jvmtiEventCompiledMethodUnload CompiledMethodUnload; + /* 70 : Dynamic Code Generated */ + jvmtiEventDynamicCodeGenerated DynamicCodeGenerated; + /* 71 : Data Dump Request */ + jvmtiEventDataDumpRequest DataDumpRequest; + /* 72 */ + jvmtiEventReserved reserved72; + /* 73 : Monitor Wait */ + jvmtiEventMonitorWait MonitorWait; + /* 74 : Monitor Waited */ + jvmtiEventMonitorWaited MonitorWaited; + /* 75 : Monitor Contended Enter */ + jvmtiEventMonitorContendedEnter MonitorContendedEnter; + /* 76 : Monitor Contended Entered */ + jvmtiEventMonitorContendedEntered MonitorContendedEntered; + /* 77 */ + jvmtiEventReserved reserved77; + /* 78 */ + jvmtiEventReserved reserved78; + /* 79 */ + jvmtiEventReserved reserved79; + /* 80 : Resource Exhausted */ + jvmtiEventResourceExhausted ResourceExhausted; + /* 81 : Garbage Collection Start */ + jvmtiEventGarbageCollectionStart GarbageCollectionStart; + /* 82 : Garbage Collection Finish */ + jvmtiEventGarbageCollectionFinish GarbageCollectionFinish; + /* 83 : Object Free */ + jvmtiEventObjectFree ObjectFree; + /* 84 : VM Object Allocation */ + jvmtiEventVMObjectAlloc VMObjectAlloc; +} jvmtiEventCallbacks; + + + /* Function Interface */ + +typedef struct jvmtiInterface_1_ { + + /* 1 : RESERVED */ + void *reserved1; + + /* 2 : Set Event Notification Mode */ + jvmtiError (JNICALL *SetEventNotificationMode) (jvmtiEnv* env, + jvmtiEventMode mode, + jvmtiEvent event_type, + jthread event_thread, + ...); + + /* 3 : RESERVED */ + void *reserved3; + + /* 4 : Get All Threads */ + jvmtiError (JNICALL *GetAllThreads) (jvmtiEnv* env, + jint* threads_count_ptr, + jthread** threads_ptr); + + /* 5 : Suspend Thread */ + jvmtiError (JNICALL *SuspendThread) (jvmtiEnv* env, + jthread thread); + + /* 6 : Resume Thread */ + jvmtiError (JNICALL *ResumeThread) (jvmtiEnv* env, + jthread thread); + + /* 7 : Stop Thread */ + jvmtiError (JNICALL *StopThread) (jvmtiEnv* env, + jthread thread, + jobject exception); + + /* 8 : Interrupt Thread */ + jvmtiError (JNICALL *InterruptThread) (jvmtiEnv* env, + jthread thread); + + /* 9 : Get Thread Info */ + jvmtiError (JNICALL *GetThreadInfo) (jvmtiEnv* env, + jthread thread, + jvmtiThreadInfo* info_ptr); + + /* 10 : Get Owned Monitor Info */ + jvmtiError (JNICALL *GetOwnedMonitorInfo) (jvmtiEnv* env, + jthread thread, + jint* owned_monitor_count_ptr, + jobject** owned_monitors_ptr); + + /* 11 : Get Current Contended Monitor */ + jvmtiError (JNICALL *GetCurrentContendedMonitor) (jvmtiEnv* env, + jthread thread, + jobject* monitor_ptr); + + /* 12 : Run Agent Thread */ + jvmtiError (JNICALL *RunAgentThread) (jvmtiEnv* env, + jthread thread, + jvmtiStartFunction proc, + const void* arg, + jint priority); + + /* 13 : Get Top Thread Groups */ + jvmtiError (JNICALL *GetTopThreadGroups) (jvmtiEnv* env, + jint* group_count_ptr, + jthreadGroup** groups_ptr); + + /* 14 : Get Thread Group Info */ + jvmtiError (JNICALL *GetThreadGroupInfo) (jvmtiEnv* env, + jthreadGroup group, + jvmtiThreadGroupInfo* info_ptr); + + /* 15 : Get Thread Group Children */ + jvmtiError (JNICALL *GetThreadGroupChildren) (jvmtiEnv* env, + jthreadGroup group, + jint* thread_count_ptr, + jthread** threads_ptr, + jint* group_count_ptr, + jthreadGroup** groups_ptr); + + /* 16 : Get Frame Count */ + jvmtiError (JNICALL *GetFrameCount) (jvmtiEnv* env, + jthread thread, + jint* count_ptr); + + /* 17 : Get Thread State */ + jvmtiError (JNICALL *GetThreadState) (jvmtiEnv* env, + jthread thread, + jint* thread_state_ptr); + + /* 18 : Get Current Thread */ + jvmtiError (JNICALL *GetCurrentThread) (jvmtiEnv* env, + jthread* thread_ptr); + + /* 19 : Get Frame Location */ + jvmtiError (JNICALL *GetFrameLocation) (jvmtiEnv* env, + jthread thread, + jint depth, + jmethodID* method_ptr, + jlocation* location_ptr); + + /* 20 : Notify Frame Pop */ + jvmtiError (JNICALL *NotifyFramePop) (jvmtiEnv* env, + jthread thread, + jint depth); + + /* 21 : Get Local Variable - Object */ + jvmtiError (JNICALL *GetLocalObject) (jvmtiEnv* env, + jthread thread, + jint depth, + jint slot, + jobject* value_ptr); + + /* 22 : Get Local Variable - Int */ + jvmtiError (JNICALL *GetLocalInt) (jvmtiEnv* env, + jthread thread, + jint depth, + jint slot, + jint* value_ptr); + + /* 23 : Get Local Variable - Long */ + jvmtiError (JNICALL *GetLocalLong) (jvmtiEnv* env, + jthread thread, + jint depth, + jint slot, + jlong* value_ptr); + + /* 24 : Get Local Variable - Float */ + jvmtiError (JNICALL *GetLocalFloat) (jvmtiEnv* env, + jthread thread, + jint depth, + jint slot, + jfloat* value_ptr); + + /* 25 : Get Local Variable - Double */ + jvmtiError (JNICALL *GetLocalDouble) (jvmtiEnv* env, + jthread thread, + jint depth, + jint slot, + jdouble* value_ptr); + + /* 26 : Set Local Variable - Object */ + jvmtiError (JNICALL *SetLocalObject) (jvmtiEnv* env, + jthread thread, + jint depth, + jint slot, + jobject value); + + /* 27 : Set Local Variable - Int */ + jvmtiError (JNICALL *SetLocalInt) (jvmtiEnv* env, + jthread thread, + jint depth, + jint slot, + jint value); + + /* 28 : Set Local Variable - Long */ + jvmtiError (JNICALL *SetLocalLong) (jvmtiEnv* env, + jthread thread, + jint depth, + jint slot, + jlong value); + + /* 29 : Set Local Variable - Float */ + jvmtiError (JNICALL *SetLocalFloat) (jvmtiEnv* env, + jthread thread, + jint depth, + jint slot, + jfloat value); + + /* 30 : Set Local Variable - Double */ + jvmtiError (JNICALL *SetLocalDouble) (jvmtiEnv* env, + jthread thread, + jint depth, + jint slot, + jdouble value); + + /* 31 : Create Raw Monitor */ + jvmtiError (JNICALL *CreateRawMonitor) (jvmtiEnv* env, + const char* name, + jrawMonitorID* monitor_ptr); + + /* 32 : Destroy Raw Monitor */ + jvmtiError (JNICALL *DestroyRawMonitor) (jvmtiEnv* env, + jrawMonitorID monitor); + + /* 33 : Raw Monitor Enter */ + jvmtiError (JNICALL *RawMonitorEnter) (jvmtiEnv* env, + jrawMonitorID monitor); + + /* 34 : Raw Monitor Exit */ + jvmtiError (JNICALL *RawMonitorExit) (jvmtiEnv* env, + jrawMonitorID monitor); + + /* 35 : Raw Monitor Wait */ + jvmtiError (JNICALL *RawMonitorWait) (jvmtiEnv* env, + jrawMonitorID monitor, + jlong millis); + + /* 36 : Raw Monitor Notify */ + jvmtiError (JNICALL *RawMonitorNotify) (jvmtiEnv* env, + jrawMonitorID monitor); + + /* 37 : Raw Monitor Notify All */ + jvmtiError (JNICALL *RawMonitorNotifyAll) (jvmtiEnv* env, + jrawMonitorID monitor); + + /* 38 : Set Breakpoint */ + jvmtiError (JNICALL *SetBreakpoint) (jvmtiEnv* env, + jmethodID method, + jlocation location); + + /* 39 : Clear Breakpoint */ + jvmtiError (JNICALL *ClearBreakpoint) (jvmtiEnv* env, + jmethodID method, + jlocation location); + + /* 40 : RESERVED */ + void *reserved40; + + /* 41 : Set Field Access Watch */ + jvmtiError (JNICALL *SetFieldAccessWatch) (jvmtiEnv* env, + jclass klass, + jfieldID field); + + /* 42 : Clear Field Access Watch */ + jvmtiError (JNICALL *ClearFieldAccessWatch) (jvmtiEnv* env, + jclass klass, + jfieldID field); + + /* 43 : Set Field Modification Watch */ + jvmtiError (JNICALL *SetFieldModificationWatch) (jvmtiEnv* env, + jclass klass, + jfieldID field); + + /* 44 : Clear Field Modification Watch */ + jvmtiError (JNICALL *ClearFieldModificationWatch) (jvmtiEnv* env, + jclass klass, + jfieldID field); + + /* 45 : Is Modifiable Class */ + jvmtiError (JNICALL *IsModifiableClass) (jvmtiEnv* env, + jclass klass, + jboolean* is_modifiable_class_ptr); + + /* 46 : Allocate */ + jvmtiError (JNICALL *Allocate) (jvmtiEnv* env, + jlong size, + unsigned char** mem_ptr); + + /* 47 : Deallocate */ + jvmtiError (JNICALL *Deallocate) (jvmtiEnv* env, + unsigned char* mem); + + /* 48 : Get Class Signature */ + jvmtiError (JNICALL *GetClassSignature) (jvmtiEnv* env, + jclass klass, + char** signature_ptr, + char** generic_ptr); + + /* 49 : Get Class Status */ + jvmtiError (JNICALL *GetClassStatus) (jvmtiEnv* env, + jclass klass, + jint* status_ptr); + + /* 50 : Get Source File Name */ + jvmtiError (JNICALL *GetSourceFileName) (jvmtiEnv* env, + jclass klass, + char** source_name_ptr); + + /* 51 : Get Class Modifiers */ + jvmtiError (JNICALL *GetClassModifiers) (jvmtiEnv* env, + jclass klass, + jint* modifiers_ptr); + + /* 52 : Get Class Methods */ + jvmtiError (JNICALL *GetClassMethods) (jvmtiEnv* env, + jclass klass, + jint* method_count_ptr, + jmethodID** methods_ptr); + + /* 53 : Get Class Fields */ + jvmtiError (JNICALL *GetClassFields) (jvmtiEnv* env, + jclass klass, + jint* field_count_ptr, + jfieldID** fields_ptr); + + /* 54 : Get Implemented Interfaces */ + jvmtiError (JNICALL *GetImplementedInterfaces) (jvmtiEnv* env, + jclass klass, + jint* interface_count_ptr, + jclass** interfaces_ptr); + + /* 55 : Is Interface */ + jvmtiError (JNICALL *IsInterface) (jvmtiEnv* env, + jclass klass, + jboolean* is_interface_ptr); + + /* 56 : Is Array Class */ + jvmtiError (JNICALL *IsArrayClass) (jvmtiEnv* env, + jclass klass, + jboolean* is_array_class_ptr); + + /* 57 : Get Class Loader */ + jvmtiError (JNICALL *GetClassLoader) (jvmtiEnv* env, + jclass klass, + jobject* classloader_ptr); + + /* 58 : Get Object Hash Code */ + jvmtiError (JNICALL *GetObjectHashCode) (jvmtiEnv* env, + jobject object, + jint* hash_code_ptr); + + /* 59 : Get Object Monitor Usage */ + jvmtiError (JNICALL *GetObjectMonitorUsage) (jvmtiEnv* env, + jobject object, + jvmtiMonitorUsage* info_ptr); + + /* 60 : Get Field Name (and Signature) */ + jvmtiError (JNICALL *GetFieldName) (jvmtiEnv* env, + jclass klass, + jfieldID field, + char** name_ptr, + char** signature_ptr, + char** generic_ptr); + + /* 61 : Get Field Declaring Class */ + jvmtiError (JNICALL *GetFieldDeclaringClass) (jvmtiEnv* env, + jclass klass, + jfieldID field, + jclass* declaring_class_ptr); + + /* 62 : Get Field Modifiers */ + jvmtiError (JNICALL *GetFieldModifiers) (jvmtiEnv* env, + jclass klass, + jfieldID field, + jint* modifiers_ptr); + + /* 63 : Is Field Synthetic */ + jvmtiError (JNICALL *IsFieldSynthetic) (jvmtiEnv* env, + jclass klass, + jfieldID field, + jboolean* is_synthetic_ptr); + + /* 64 : Get Method Name (and Signature) */ + jvmtiError (JNICALL *GetMethodName) (jvmtiEnv* env, + jmethodID method, + char** name_ptr, + char** signature_ptr, + char** generic_ptr); + + /* 65 : Get Method Declaring Class */ + jvmtiError (JNICALL *GetMethodDeclaringClass) (jvmtiEnv* env, + jmethodID method, + jclass* declaring_class_ptr); + + /* 66 : Get Method Modifiers */ + jvmtiError (JNICALL *GetMethodModifiers) (jvmtiEnv* env, + jmethodID method, + jint* modifiers_ptr); + + /* 67 : RESERVED */ + void *reserved67; + + /* 68 : Get Max Locals */ + jvmtiError (JNICALL *GetMaxLocals) (jvmtiEnv* env, + jmethodID method, + jint* max_ptr); + + /* 69 : Get Arguments Size */ + jvmtiError (JNICALL *GetArgumentsSize) (jvmtiEnv* env, + jmethodID method, + jint* size_ptr); + + /* 70 : Get Line Number Table */ + jvmtiError (JNICALL *GetLineNumberTable) (jvmtiEnv* env, + jmethodID method, + jint* entry_count_ptr, + jvmtiLineNumberEntry** table_ptr); + + /* 71 : Get Method Location */ + jvmtiError (JNICALL *GetMethodLocation) (jvmtiEnv* env, + jmethodID method, + jlocation* start_location_ptr, + jlocation* end_location_ptr); + + /* 72 : Get Local Variable Table */ + jvmtiError (JNICALL *GetLocalVariableTable) (jvmtiEnv* env, + jmethodID method, + jint* entry_count_ptr, + jvmtiLocalVariableEntry** table_ptr); + + /* 73 : Set Native Method Prefix */ + jvmtiError (JNICALL *SetNativeMethodPrefix) (jvmtiEnv* env, + const char* prefix); + + /* 74 : Set Native Method Prefixes */ + jvmtiError (JNICALL *SetNativeMethodPrefixes) (jvmtiEnv* env, + jint prefix_count, + char** prefixes); + + /* 75 : Get Bytecodes */ + jvmtiError (JNICALL *GetBytecodes) (jvmtiEnv* env, + jmethodID method, + jint* bytecode_count_ptr, + unsigned char** bytecodes_ptr); + + /* 76 : Is Method Native */ + jvmtiError (JNICALL *IsMethodNative) (jvmtiEnv* env, + jmethodID method, + jboolean* is_native_ptr); + + /* 77 : Is Method Synthetic */ + jvmtiError (JNICALL *IsMethodSynthetic) (jvmtiEnv* env, + jmethodID method, + jboolean* is_synthetic_ptr); + + /* 78 : Get Loaded Classes */ + jvmtiError (JNICALL *GetLoadedClasses) (jvmtiEnv* env, + jint* class_count_ptr, + jclass** classes_ptr); + + /* 79 : Get Classloader Classes */ + jvmtiError (JNICALL *GetClassLoaderClasses) (jvmtiEnv* env, + jobject initiating_loader, + jint* class_count_ptr, + jclass** classes_ptr); + + /* 80 : Pop Frame */ + jvmtiError (JNICALL *PopFrame) (jvmtiEnv* env, + jthread thread); + + /* 81 : Force Early Return - Object */ + jvmtiError (JNICALL *ForceEarlyReturnObject) (jvmtiEnv* env, + jthread thread, + jobject value); + + /* 82 : Force Early Return - Int */ + jvmtiError (JNICALL *ForceEarlyReturnInt) (jvmtiEnv* env, + jthread thread, + jint value); + + /* 83 : Force Early Return - Long */ + jvmtiError (JNICALL *ForceEarlyReturnLong) (jvmtiEnv* env, + jthread thread, + jlong value); + + /* 84 : Force Early Return - Float */ + jvmtiError (JNICALL *ForceEarlyReturnFloat) (jvmtiEnv* env, + jthread thread, + jfloat value); + + /* 85 : Force Early Return - Double */ + jvmtiError (JNICALL *ForceEarlyReturnDouble) (jvmtiEnv* env, + jthread thread, + jdouble value); + + /* 86 : Force Early Return - Void */ + jvmtiError (JNICALL *ForceEarlyReturnVoid) (jvmtiEnv* env, + jthread thread); + + /* 87 : Redefine Classes */ + jvmtiError (JNICALL *RedefineClasses) (jvmtiEnv* env, + jint class_count, + const jvmtiClassDefinition* class_definitions); + + /* 88 : Get Version Number */ + jvmtiError (JNICALL *GetVersionNumber) (jvmtiEnv* env, + jint* version_ptr); + + /* 89 : Get Capabilities */ + jvmtiError (JNICALL *GetCapabilities) (jvmtiEnv* env, + jvmtiCapabilities* capabilities_ptr); + + /* 90 : Get Source Debug Extension */ + jvmtiError (JNICALL *GetSourceDebugExtension) (jvmtiEnv* env, + jclass klass, + char** source_debug_extension_ptr); + + /* 91 : Is Method Obsolete */ + jvmtiError (JNICALL *IsMethodObsolete) (jvmtiEnv* env, + jmethodID method, + jboolean* is_obsolete_ptr); + + /* 92 : Suspend Thread List */ + jvmtiError (JNICALL *SuspendThreadList) (jvmtiEnv* env, + jint request_count, + const jthread* request_list, + jvmtiError* results); + + /* 93 : Resume Thread List */ + jvmtiError (JNICALL *ResumeThreadList) (jvmtiEnv* env, + jint request_count, + const jthread* request_list, + jvmtiError* results); + + /* 94 : RESERVED */ + void *reserved94; + + /* 95 : RESERVED */ + void *reserved95; + + /* 96 : RESERVED */ + void *reserved96; + + /* 97 : RESERVED */ + void *reserved97; + + /* 98 : RESERVED */ + void *reserved98; + + /* 99 : RESERVED */ + void *reserved99; + + /* 100 : Get All Stack Traces */ + jvmtiError (JNICALL *GetAllStackTraces) (jvmtiEnv* env, + jint max_frame_count, + jvmtiStackInfo** stack_info_ptr, + jint* thread_count_ptr); + + /* 101 : Get Thread List Stack Traces */ + jvmtiError (JNICALL *GetThreadListStackTraces) (jvmtiEnv* env, + jint thread_count, + const jthread* thread_list, + jint max_frame_count, + jvmtiStackInfo** stack_info_ptr); + + /* 102 : Get Thread Local Storage */ + jvmtiError (JNICALL *GetThreadLocalStorage) (jvmtiEnv* env, + jthread thread, + void** data_ptr); + + /* 103 : Set Thread Local Storage */ + jvmtiError (JNICALL *SetThreadLocalStorage) (jvmtiEnv* env, + jthread thread, + const void* data); + + /* 104 : Get Stack Trace */ + jvmtiError (JNICALL *GetStackTrace) (jvmtiEnv* env, + jthread thread, + jint start_depth, + jint max_frame_count, + jvmtiFrameInfo* frame_buffer, + jint* count_ptr); + + /* 105 : RESERVED */ + void *reserved105; + + /* 106 : Get Tag */ + jvmtiError (JNICALL *GetTag) (jvmtiEnv* env, + jobject object, + jlong* tag_ptr); + + /* 107 : Set Tag */ + jvmtiError (JNICALL *SetTag) (jvmtiEnv* env, + jobject object, + jlong tag); + + /* 108 : Force Garbage Collection */ + jvmtiError (JNICALL *ForceGarbageCollection) (jvmtiEnv* env); + + /* 109 : Iterate Over Objects Reachable From Object */ + jvmtiError (JNICALL *IterateOverObjectsReachableFromObject) (jvmtiEnv* env, + jobject object, + jvmtiObjectReferenceCallback object_reference_callback, + const void* user_data); + + /* 110 : Iterate Over Reachable Objects */ + jvmtiError (JNICALL *IterateOverReachableObjects) (jvmtiEnv* env, + jvmtiHeapRootCallback heap_root_callback, + jvmtiStackReferenceCallback stack_ref_callback, + jvmtiObjectReferenceCallback object_ref_callback, + const void* user_data); + + /* 111 : Iterate Over Heap */ + jvmtiError (JNICALL *IterateOverHeap) (jvmtiEnv* env, + jvmtiHeapObjectFilter object_filter, + jvmtiHeapObjectCallback heap_object_callback, + const void* user_data); + + /* 112 : Iterate Over Instances Of Class */ + jvmtiError (JNICALL *IterateOverInstancesOfClass) (jvmtiEnv* env, + jclass klass, + jvmtiHeapObjectFilter object_filter, + jvmtiHeapObjectCallback heap_object_callback, + const void* user_data); + + /* 113 : RESERVED */ + void *reserved113; + + /* 114 : Get Objects With Tags */ + jvmtiError (JNICALL *GetObjectsWithTags) (jvmtiEnv* env, + jint tag_count, + const jlong* tags, + jint* count_ptr, + jobject** object_result_ptr, + jlong** tag_result_ptr); + + /* 115 : Follow References */ + jvmtiError (JNICALL *FollowReferences) (jvmtiEnv* env, + jint heap_filter, + jclass klass, + jobject initial_object, + const jvmtiHeapCallbacks* callbacks, + const void* user_data); + + /* 116 : Iterate Through Heap */ + jvmtiError (JNICALL *IterateThroughHeap) (jvmtiEnv* env, + jint heap_filter, + jclass klass, + const jvmtiHeapCallbacks* callbacks, + const void* user_data); + + /* 117 : RESERVED */ + void *reserved117; + + /* 118 : RESERVED */ + void *reserved118; + + /* 119 : RESERVED */ + void *reserved119; + + /* 120 : Set JNI Function Table */ + jvmtiError (JNICALL *SetJNIFunctionTable) (jvmtiEnv* env, + const jniNativeInterface* function_table); + + /* 121 : Get JNI Function Table */ + jvmtiError (JNICALL *GetJNIFunctionTable) (jvmtiEnv* env, + jniNativeInterface** function_table); + + /* 122 : Set Event Callbacks */ + jvmtiError (JNICALL *SetEventCallbacks) (jvmtiEnv* env, + const jvmtiEventCallbacks* callbacks, + jint size_of_callbacks); + + /* 123 : Generate Events */ + jvmtiError (JNICALL *GenerateEvents) (jvmtiEnv* env, + jvmtiEvent event_type); + + /* 124 : Get Extension Functions */ + jvmtiError (JNICALL *GetExtensionFunctions) (jvmtiEnv* env, + jint* extension_count_ptr, + jvmtiExtensionFunctionInfo** extensions); + + /* 125 : Get Extension Events */ + jvmtiError (JNICALL *GetExtensionEvents) (jvmtiEnv* env, + jint* extension_count_ptr, + jvmtiExtensionEventInfo** extensions); + + /* 126 : Set Extension Event Callback */ + jvmtiError (JNICALL *SetExtensionEventCallback) (jvmtiEnv* env, + jint extension_event_index, + jvmtiExtensionEvent callback); + + /* 127 : Dispose Environment */ + jvmtiError (JNICALL *DisposeEnvironment) (jvmtiEnv* env); + + /* 128 : Get Error Name */ + jvmtiError (JNICALL *GetErrorName) (jvmtiEnv* env, + jvmtiError error, + char** name_ptr); + + /* 129 : Get JLocation Format */ + jvmtiError (JNICALL *GetJLocationFormat) (jvmtiEnv* env, + jvmtiJlocationFormat* format_ptr); + + /* 130 : Get System Properties */ + jvmtiError (JNICALL *GetSystemProperties) (jvmtiEnv* env, + jint* count_ptr, + char*** property_ptr); + + /* 131 : Get System Property */ + jvmtiError (JNICALL *GetSystemProperty) (jvmtiEnv* env, + const char* property, + char** value_ptr); + + /* 132 : Set System Property */ + jvmtiError (JNICALL *SetSystemProperty) (jvmtiEnv* env, + const char* property, + const char* value); + + /* 133 : Get Phase */ + jvmtiError (JNICALL *GetPhase) (jvmtiEnv* env, + jvmtiPhase* phase_ptr); + + /* 134 : Get Current Thread CPU Timer Information */ + jvmtiError (JNICALL *GetCurrentThreadCpuTimerInfo) (jvmtiEnv* env, + jvmtiTimerInfo* info_ptr); + + /* 135 : Get Current Thread CPU Time */ + jvmtiError (JNICALL *GetCurrentThreadCpuTime) (jvmtiEnv* env, + jlong* nanos_ptr); + + /* 136 : Get Thread CPU Timer Information */ + jvmtiError (JNICALL *GetThreadCpuTimerInfo) (jvmtiEnv* env, + jvmtiTimerInfo* info_ptr); + + /* 137 : Get Thread CPU Time */ + jvmtiError (JNICALL *GetThreadCpuTime) (jvmtiEnv* env, + jthread thread, + jlong* nanos_ptr); + + /* 138 : Get Timer Information */ + jvmtiError (JNICALL *GetTimerInfo) (jvmtiEnv* env, + jvmtiTimerInfo* info_ptr); + + /* 139 : Get Time */ + jvmtiError (JNICALL *GetTime) (jvmtiEnv* env, + jlong* nanos_ptr); + + /* 140 : Get Potential Capabilities */ + jvmtiError (JNICALL *GetPotentialCapabilities) (jvmtiEnv* env, + jvmtiCapabilities* capabilities_ptr); + + /* 141 : RESERVED */ + void *reserved141; + + /* 142 : Add Capabilities */ + jvmtiError (JNICALL *AddCapabilities) (jvmtiEnv* env, + const jvmtiCapabilities* capabilities_ptr); + + /* 143 : Relinquish Capabilities */ + jvmtiError (JNICALL *RelinquishCapabilities) (jvmtiEnv* env, + const jvmtiCapabilities* capabilities_ptr); + + /* 144 : Get Available Processors */ + jvmtiError (JNICALL *GetAvailableProcessors) (jvmtiEnv* env, + jint* processor_count_ptr); + + /* 145 : Get Class Version Numbers */ + jvmtiError (JNICALL *GetClassVersionNumbers) (jvmtiEnv* env, + jclass klass, + jint* minor_version_ptr, + jint* major_version_ptr); + + /* 146 : Get Constant Pool */ + jvmtiError (JNICALL *GetConstantPool) (jvmtiEnv* env, + jclass klass, + jint* constant_pool_count_ptr, + jint* constant_pool_byte_count_ptr, + unsigned char** constant_pool_bytes_ptr); + + /* 147 : Get Environment Local Storage */ + jvmtiError (JNICALL *GetEnvironmentLocalStorage) (jvmtiEnv* env, + void** data_ptr); + + /* 148 : Set Environment Local Storage */ + jvmtiError (JNICALL *SetEnvironmentLocalStorage) (jvmtiEnv* env, + const void* data); + + /* 149 : Add To Bootstrap Class Loader Search */ + jvmtiError (JNICALL *AddToBootstrapClassLoaderSearch) (jvmtiEnv* env, + const char* segment); + + /* 150 : Set Verbose Flag */ + jvmtiError (JNICALL *SetVerboseFlag) (jvmtiEnv* env, + jvmtiVerboseFlag flag, + jboolean value); + + /* 151 : Add To System Class Loader Search */ + jvmtiError (JNICALL *AddToSystemClassLoaderSearch) (jvmtiEnv* env, + const char* segment); + + /* 152 : Retransform Classes */ + jvmtiError (JNICALL *RetransformClasses) (jvmtiEnv* env, + jint class_count, + const jclass* classes); + + /* 153 : Get Owned Monitor Stack Depth Info */ + jvmtiError (JNICALL *GetOwnedMonitorStackDepthInfo) (jvmtiEnv* env, + jthread thread, + jint* monitor_info_count_ptr, + jvmtiMonitorStackDepthInfo** monitor_info_ptr); + + /* 154 : Get Object Size */ + jvmtiError (JNICALL *GetObjectSize) (jvmtiEnv* env, + jobject object, + jlong* size_ptr); + +} jvmtiInterface_1; + +struct _jvmtiEnv { + const struct jvmtiInterface_1_ *functions; +#ifdef __cplusplus + + + jvmtiError Allocate(jlong size, + unsigned char** mem_ptr) { + return functions->Allocate(this, size, mem_ptr); + } + + jvmtiError Deallocate(unsigned char* mem) { + return functions->Deallocate(this, mem); + } + + jvmtiError GetThreadState(jthread thread, + jint* thread_state_ptr) { + return functions->GetThreadState(this, thread, thread_state_ptr); + } + + jvmtiError GetCurrentThread(jthread* thread_ptr) { + return functions->GetCurrentThread(this, thread_ptr); + } + + jvmtiError GetAllThreads(jint* threads_count_ptr, + jthread** threads_ptr) { + return functions->GetAllThreads(this, threads_count_ptr, threads_ptr); + } + + jvmtiError SuspendThread(jthread thread) { + return functions->SuspendThread(this, thread); + } + + jvmtiError SuspendThreadList(jint request_count, + const jthread* request_list, + jvmtiError* results) { + return functions->SuspendThreadList(this, request_count, request_list, results); + } + + jvmtiError ResumeThread(jthread thread) { + return functions->ResumeThread(this, thread); + } + + jvmtiError ResumeThreadList(jint request_count, + const jthread* request_list, + jvmtiError* results) { + return functions->ResumeThreadList(this, request_count, request_list, results); + } + + jvmtiError StopThread(jthread thread, + jobject exception) { + return functions->StopThread(this, thread, exception); + } + + jvmtiError InterruptThread(jthread thread) { + return functions->InterruptThread(this, thread); + } + + jvmtiError GetThreadInfo(jthread thread, + jvmtiThreadInfo* info_ptr) { + return functions->GetThreadInfo(this, thread, info_ptr); + } + + jvmtiError GetOwnedMonitorInfo(jthread thread, + jint* owned_monitor_count_ptr, + jobject** owned_monitors_ptr) { + return functions->GetOwnedMonitorInfo(this, thread, owned_monitor_count_ptr, owned_monitors_ptr); + } + + jvmtiError GetOwnedMonitorStackDepthInfo(jthread thread, + jint* monitor_info_count_ptr, + jvmtiMonitorStackDepthInfo** monitor_info_ptr) { + return functions->GetOwnedMonitorStackDepthInfo(this, thread, monitor_info_count_ptr, monitor_info_ptr); + } + + jvmtiError GetCurrentContendedMonitor(jthread thread, + jobject* monitor_ptr) { + return functions->GetCurrentContendedMonitor(this, thread, monitor_ptr); + } + + jvmtiError RunAgentThread(jthread thread, + jvmtiStartFunction proc, + const void* arg, + jint priority) { + return functions->RunAgentThread(this, thread, proc, arg, priority); + } + + jvmtiError SetThreadLocalStorage(jthread thread, + const void* data) { + return functions->SetThreadLocalStorage(this, thread, data); + } + + jvmtiError GetThreadLocalStorage(jthread thread, + void** data_ptr) { + return functions->GetThreadLocalStorage(this, thread, data_ptr); + } + + jvmtiError GetTopThreadGroups(jint* group_count_ptr, + jthreadGroup** groups_ptr) { + return functions->GetTopThreadGroups(this, group_count_ptr, groups_ptr); + } + + jvmtiError GetThreadGroupInfo(jthreadGroup group, + jvmtiThreadGroupInfo* info_ptr) { + return functions->GetThreadGroupInfo(this, group, info_ptr); + } + + jvmtiError GetThreadGroupChildren(jthreadGroup group, + jint* thread_count_ptr, + jthread** threads_ptr, + jint* group_count_ptr, + jthreadGroup** groups_ptr) { + return functions->GetThreadGroupChildren(this, group, thread_count_ptr, threads_ptr, group_count_ptr, groups_ptr); + } + + jvmtiError GetStackTrace(jthread thread, + jint start_depth, + jint max_frame_count, + jvmtiFrameInfo* frame_buffer, + jint* count_ptr) { + return functions->GetStackTrace(this, thread, start_depth, max_frame_count, frame_buffer, count_ptr); + } + + jvmtiError GetAllStackTraces(jint max_frame_count, + jvmtiStackInfo** stack_info_ptr, + jint* thread_count_ptr) { + return functions->GetAllStackTraces(this, max_frame_count, stack_info_ptr, thread_count_ptr); + } + + jvmtiError GetThreadListStackTraces(jint thread_count, + const jthread* thread_list, + jint max_frame_count, + jvmtiStackInfo** stack_info_ptr) { + return functions->GetThreadListStackTraces(this, thread_count, thread_list, max_frame_count, stack_info_ptr); + } + + jvmtiError GetFrameCount(jthread thread, + jint* count_ptr) { + return functions->GetFrameCount(this, thread, count_ptr); + } + + jvmtiError PopFrame(jthread thread) { + return functions->PopFrame(this, thread); + } + + jvmtiError GetFrameLocation(jthread thread, + jint depth, + jmethodID* method_ptr, + jlocation* location_ptr) { + return functions->GetFrameLocation(this, thread, depth, method_ptr, location_ptr); + } + + jvmtiError NotifyFramePop(jthread thread, + jint depth) { + return functions->NotifyFramePop(this, thread, depth); + } + + jvmtiError ForceEarlyReturnObject(jthread thread, + jobject value) { + return functions->ForceEarlyReturnObject(this, thread, value); + } + + jvmtiError ForceEarlyReturnInt(jthread thread, + jint value) { + return functions->ForceEarlyReturnInt(this, thread, value); + } + + jvmtiError ForceEarlyReturnLong(jthread thread, + jlong value) { + return functions->ForceEarlyReturnLong(this, thread, value); + } + + jvmtiError ForceEarlyReturnFloat(jthread thread, + jfloat value) { + return functions->ForceEarlyReturnFloat(this, thread, value); + } + + jvmtiError ForceEarlyReturnDouble(jthread thread, + jdouble value) { + return functions->ForceEarlyReturnDouble(this, thread, value); + } + + jvmtiError ForceEarlyReturnVoid(jthread thread) { + return functions->ForceEarlyReturnVoid(this, thread); + } + + jvmtiError FollowReferences(jint heap_filter, + jclass klass, + jobject initial_object, + const jvmtiHeapCallbacks* callbacks, + const void* user_data) { + return functions->FollowReferences(this, heap_filter, klass, initial_object, callbacks, user_data); + } + + jvmtiError IterateThroughHeap(jint heap_filter, + jclass klass, + const jvmtiHeapCallbacks* callbacks, + const void* user_data) { + return functions->IterateThroughHeap(this, heap_filter, klass, callbacks, user_data); + } + + jvmtiError GetTag(jobject object, + jlong* tag_ptr) { + return functions->GetTag(this, object, tag_ptr); + } + + jvmtiError SetTag(jobject object, + jlong tag) { + return functions->SetTag(this, object, tag); + } + + jvmtiError GetObjectsWithTags(jint tag_count, + const jlong* tags, + jint* count_ptr, + jobject** object_result_ptr, + jlong** tag_result_ptr) { + return functions->GetObjectsWithTags(this, tag_count, tags, count_ptr, object_result_ptr, tag_result_ptr); + } + + jvmtiError ForceGarbageCollection() { + return functions->ForceGarbageCollection(this); + } + + jvmtiError IterateOverObjectsReachableFromObject(jobject object, + jvmtiObjectReferenceCallback object_reference_callback, + const void* user_data) { + return functions->IterateOverObjectsReachableFromObject(this, object, object_reference_callback, user_data); + } + + jvmtiError IterateOverReachableObjects(jvmtiHeapRootCallback heap_root_callback, + jvmtiStackReferenceCallback stack_ref_callback, + jvmtiObjectReferenceCallback object_ref_callback, + const void* user_data) { + return functions->IterateOverReachableObjects(this, heap_root_callback, stack_ref_callback, object_ref_callback, user_data); + } + + jvmtiError IterateOverHeap(jvmtiHeapObjectFilter object_filter, + jvmtiHeapObjectCallback heap_object_callback, + const void* user_data) { + return functions->IterateOverHeap(this, object_filter, heap_object_callback, user_data); + } + + jvmtiError IterateOverInstancesOfClass(jclass klass, + jvmtiHeapObjectFilter object_filter, + jvmtiHeapObjectCallback heap_object_callback, + const void* user_data) { + return functions->IterateOverInstancesOfClass(this, klass, object_filter, heap_object_callback, user_data); + } + + jvmtiError GetLocalObject(jthread thread, + jint depth, + jint slot, + jobject* value_ptr) { + return functions->GetLocalObject(this, thread, depth, slot, value_ptr); + } + + jvmtiError GetLocalInt(jthread thread, + jint depth, + jint slot, + jint* value_ptr) { + return functions->GetLocalInt(this, thread, depth, slot, value_ptr); + } + + jvmtiError GetLocalLong(jthread thread, + jint depth, + jint slot, + jlong* value_ptr) { + return functions->GetLocalLong(this, thread, depth, slot, value_ptr); + } + + jvmtiError GetLocalFloat(jthread thread, + jint depth, + jint slot, + jfloat* value_ptr) { + return functions->GetLocalFloat(this, thread, depth, slot, value_ptr); + } + + jvmtiError GetLocalDouble(jthread thread, + jint depth, + jint slot, + jdouble* value_ptr) { + return functions->GetLocalDouble(this, thread, depth, slot, value_ptr); + } + + jvmtiError SetLocalObject(jthread thread, + jint depth, + jint slot, + jobject value) { + return functions->SetLocalObject(this, thread, depth, slot, value); + } + + jvmtiError SetLocalInt(jthread thread, + jint depth, + jint slot, + jint value) { + return functions->SetLocalInt(this, thread, depth, slot, value); + } + + jvmtiError SetLocalLong(jthread thread, + jint depth, + jint slot, + jlong value) { + return functions->SetLocalLong(this, thread, depth, slot, value); + } + + jvmtiError SetLocalFloat(jthread thread, + jint depth, + jint slot, + jfloat value) { + return functions->SetLocalFloat(this, thread, depth, slot, value); + } + + jvmtiError SetLocalDouble(jthread thread, + jint depth, + jint slot, + jdouble value) { + return functions->SetLocalDouble(this, thread, depth, slot, value); + } + + jvmtiError SetBreakpoint(jmethodID method, + jlocation location) { + return functions->SetBreakpoint(this, method, location); + } + + jvmtiError ClearBreakpoint(jmethodID method, + jlocation location) { + return functions->ClearBreakpoint(this, method, location); + } + + jvmtiError SetFieldAccessWatch(jclass klass, + jfieldID field) { + return functions->SetFieldAccessWatch(this, klass, field); + } + + jvmtiError ClearFieldAccessWatch(jclass klass, + jfieldID field) { + return functions->ClearFieldAccessWatch(this, klass, field); + } + + jvmtiError SetFieldModificationWatch(jclass klass, + jfieldID field) { + return functions->SetFieldModificationWatch(this, klass, field); + } + + jvmtiError ClearFieldModificationWatch(jclass klass, + jfieldID field) { + return functions->ClearFieldModificationWatch(this, klass, field); + } + + jvmtiError GetLoadedClasses(jint* class_count_ptr, + jclass** classes_ptr) { + return functions->GetLoadedClasses(this, class_count_ptr, classes_ptr); + } + + jvmtiError GetClassLoaderClasses(jobject initiating_loader, + jint* class_count_ptr, + jclass** classes_ptr) { + return functions->GetClassLoaderClasses(this, initiating_loader, class_count_ptr, classes_ptr); + } + + jvmtiError GetClassSignature(jclass klass, + char** signature_ptr, + char** generic_ptr) { + return functions->GetClassSignature(this, klass, signature_ptr, generic_ptr); + } + + jvmtiError GetClassStatus(jclass klass, + jint* status_ptr) { + return functions->GetClassStatus(this, klass, status_ptr); + } + + jvmtiError GetSourceFileName(jclass klass, + char** source_name_ptr) { + return functions->GetSourceFileName(this, klass, source_name_ptr); + } + + jvmtiError GetClassModifiers(jclass klass, + jint* modifiers_ptr) { + return functions->GetClassModifiers(this, klass, modifiers_ptr); + } + + jvmtiError GetClassMethods(jclass klass, + jint* method_count_ptr, + jmethodID** methods_ptr) { + return functions->GetClassMethods(this, klass, method_count_ptr, methods_ptr); + } + + jvmtiError GetClassFields(jclass klass, + jint* field_count_ptr, + jfieldID** fields_ptr) { + return functions->GetClassFields(this, klass, field_count_ptr, fields_ptr); + } + + jvmtiError GetImplementedInterfaces(jclass klass, + jint* interface_count_ptr, + jclass** interfaces_ptr) { + return functions->GetImplementedInterfaces(this, klass, interface_count_ptr, interfaces_ptr); + } + + jvmtiError GetClassVersionNumbers(jclass klass, + jint* minor_version_ptr, + jint* major_version_ptr) { + return functions->GetClassVersionNumbers(this, klass, minor_version_ptr, major_version_ptr); + } + + jvmtiError GetConstantPool(jclass klass, + jint* constant_pool_count_ptr, + jint* constant_pool_byte_count_ptr, + unsigned char** constant_pool_bytes_ptr) { + return functions->GetConstantPool(this, klass, constant_pool_count_ptr, constant_pool_byte_count_ptr, constant_pool_bytes_ptr); + } + + jvmtiError IsInterface(jclass klass, + jboolean* is_interface_ptr) { + return functions->IsInterface(this, klass, is_interface_ptr); + } + + jvmtiError IsArrayClass(jclass klass, + jboolean* is_array_class_ptr) { + return functions->IsArrayClass(this, klass, is_array_class_ptr); + } + + jvmtiError IsModifiableClass(jclass klass, + jboolean* is_modifiable_class_ptr) { + return functions->IsModifiableClass(this, klass, is_modifiable_class_ptr); + } + + jvmtiError GetClassLoader(jclass klass, + jobject* classloader_ptr) { + return functions->GetClassLoader(this, klass, classloader_ptr); + } + + jvmtiError GetSourceDebugExtension(jclass klass, + char** source_debug_extension_ptr) { + return functions->GetSourceDebugExtension(this, klass, source_debug_extension_ptr); + } + + jvmtiError RetransformClasses(jint class_count, + const jclass* classes) { + return functions->RetransformClasses(this, class_count, classes); + } + + jvmtiError RedefineClasses(jint class_count, + const jvmtiClassDefinition* class_definitions) { + return functions->RedefineClasses(this, class_count, class_definitions); + } + + jvmtiError GetObjectSize(jobject object, + jlong* size_ptr) { + return functions->GetObjectSize(this, object, size_ptr); + } + + jvmtiError GetObjectHashCode(jobject object, + jint* hash_code_ptr) { + return functions->GetObjectHashCode(this, object, hash_code_ptr); + } + + jvmtiError GetObjectMonitorUsage(jobject object, + jvmtiMonitorUsage* info_ptr) { + return functions->GetObjectMonitorUsage(this, object, info_ptr); + } + + jvmtiError GetFieldName(jclass klass, + jfieldID field, + char** name_ptr, + char** signature_ptr, + char** generic_ptr) { + return functions->GetFieldName(this, klass, field, name_ptr, signature_ptr, generic_ptr); + } + + jvmtiError GetFieldDeclaringClass(jclass klass, + jfieldID field, + jclass* declaring_class_ptr) { + return functions->GetFieldDeclaringClass(this, klass, field, declaring_class_ptr); + } + + jvmtiError GetFieldModifiers(jclass klass, + jfieldID field, + jint* modifiers_ptr) { + return functions->GetFieldModifiers(this, klass, field, modifiers_ptr); + } + + jvmtiError IsFieldSynthetic(jclass klass, + jfieldID field, + jboolean* is_synthetic_ptr) { + return functions->IsFieldSynthetic(this, klass, field, is_synthetic_ptr); + } + + jvmtiError GetMethodName(jmethodID method, + char** name_ptr, + char** signature_ptr, + char** generic_ptr) { + return functions->GetMethodName(this, method, name_ptr, signature_ptr, generic_ptr); + } + + jvmtiError GetMethodDeclaringClass(jmethodID method, + jclass* declaring_class_ptr) { + return functions->GetMethodDeclaringClass(this, method, declaring_class_ptr); + } + + jvmtiError GetMethodModifiers(jmethodID method, + jint* modifiers_ptr) { + return functions->GetMethodModifiers(this, method, modifiers_ptr); + } + + jvmtiError GetMaxLocals(jmethodID method, + jint* max_ptr) { + return functions->GetMaxLocals(this, method, max_ptr); + } + + jvmtiError GetArgumentsSize(jmethodID method, + jint* size_ptr) { + return functions->GetArgumentsSize(this, method, size_ptr); + } + + jvmtiError GetLineNumberTable(jmethodID method, + jint* entry_count_ptr, + jvmtiLineNumberEntry** table_ptr) { + return functions->GetLineNumberTable(this, method, entry_count_ptr, table_ptr); + } + + jvmtiError GetMethodLocation(jmethodID method, + jlocation* start_location_ptr, + jlocation* end_location_ptr) { + return functions->GetMethodLocation(this, method, start_location_ptr, end_location_ptr); + } + + jvmtiError GetLocalVariableTable(jmethodID method, + jint* entry_count_ptr, + jvmtiLocalVariableEntry** table_ptr) { + return functions->GetLocalVariableTable(this, method, entry_count_ptr, table_ptr); + } + + jvmtiError GetBytecodes(jmethodID method, + jint* bytecode_count_ptr, + unsigned char** bytecodes_ptr) { + return functions->GetBytecodes(this, method, bytecode_count_ptr, bytecodes_ptr); + } + + jvmtiError IsMethodNative(jmethodID method, + jboolean* is_native_ptr) { + return functions->IsMethodNative(this, method, is_native_ptr); + } + + jvmtiError IsMethodSynthetic(jmethodID method, + jboolean* is_synthetic_ptr) { + return functions->IsMethodSynthetic(this, method, is_synthetic_ptr); + } + + jvmtiError IsMethodObsolete(jmethodID method, + jboolean* is_obsolete_ptr) { + return functions->IsMethodObsolete(this, method, is_obsolete_ptr); + } + + jvmtiError SetNativeMethodPrefix(const char* prefix) { + return functions->SetNativeMethodPrefix(this, prefix); + } + + jvmtiError SetNativeMethodPrefixes(jint prefix_count, + char** prefixes) { + return functions->SetNativeMethodPrefixes(this, prefix_count, prefixes); + } + + jvmtiError CreateRawMonitor(const char* name, + jrawMonitorID* monitor_ptr) { + return functions->CreateRawMonitor(this, name, monitor_ptr); + } + + jvmtiError DestroyRawMonitor(jrawMonitorID monitor) { + return functions->DestroyRawMonitor(this, monitor); + } + + jvmtiError RawMonitorEnter(jrawMonitorID monitor) { + return functions->RawMonitorEnter(this, monitor); + } + + jvmtiError RawMonitorExit(jrawMonitorID monitor) { + return functions->RawMonitorExit(this, monitor); + } + + jvmtiError RawMonitorWait(jrawMonitorID monitor, + jlong millis) { + return functions->RawMonitorWait(this, monitor, millis); + } + + jvmtiError RawMonitorNotify(jrawMonitorID monitor) { + return functions->RawMonitorNotify(this, monitor); + } + + jvmtiError RawMonitorNotifyAll(jrawMonitorID monitor) { + return functions->RawMonitorNotifyAll(this, monitor); + } + + jvmtiError SetJNIFunctionTable(const jniNativeInterface* function_table) { + return functions->SetJNIFunctionTable(this, function_table); + } + + jvmtiError GetJNIFunctionTable(jniNativeInterface** function_table) { + return functions->GetJNIFunctionTable(this, function_table); + } + + jvmtiError SetEventCallbacks(const jvmtiEventCallbacks* callbacks, + jint size_of_callbacks) { + return functions->SetEventCallbacks(this, callbacks, size_of_callbacks); + } + + jvmtiError SetEventNotificationMode(jvmtiEventMode mode, + jvmtiEvent event_type, + jthread event_thread, + ...) { + return functions->SetEventNotificationMode(this, mode, event_type, event_thread); + } + + jvmtiError GenerateEvents(jvmtiEvent event_type) { + return functions->GenerateEvents(this, event_type); + } + + jvmtiError GetExtensionFunctions(jint* extension_count_ptr, + jvmtiExtensionFunctionInfo** extensions) { + return functions->GetExtensionFunctions(this, extension_count_ptr, extensions); + } + + jvmtiError GetExtensionEvents(jint* extension_count_ptr, + jvmtiExtensionEventInfo** extensions) { + return functions->GetExtensionEvents(this, extension_count_ptr, extensions); + } + + jvmtiError SetExtensionEventCallback(jint extension_event_index, + jvmtiExtensionEvent callback) { + return functions->SetExtensionEventCallback(this, extension_event_index, callback); + } + + jvmtiError GetPotentialCapabilities(jvmtiCapabilities* capabilities_ptr) { + return functions->GetPotentialCapabilities(this, capabilities_ptr); + } + + jvmtiError AddCapabilities(const jvmtiCapabilities* capabilities_ptr) { + return functions->AddCapabilities(this, capabilities_ptr); + } + + jvmtiError RelinquishCapabilities(const jvmtiCapabilities* capabilities_ptr) { + return functions->RelinquishCapabilities(this, capabilities_ptr); + } + + jvmtiError GetCapabilities(jvmtiCapabilities* capabilities_ptr) { + return functions->GetCapabilities(this, capabilities_ptr); + } + + jvmtiError GetCurrentThreadCpuTimerInfo(jvmtiTimerInfo* info_ptr) { + return functions->GetCurrentThreadCpuTimerInfo(this, info_ptr); + } + + jvmtiError GetCurrentThreadCpuTime(jlong* nanos_ptr) { + return functions->GetCurrentThreadCpuTime(this, nanos_ptr); + } + + jvmtiError GetThreadCpuTimerInfo(jvmtiTimerInfo* info_ptr) { + return functions->GetThreadCpuTimerInfo(this, info_ptr); + } + + jvmtiError GetThreadCpuTime(jthread thread, + jlong* nanos_ptr) { + return functions->GetThreadCpuTime(this, thread, nanos_ptr); + } + + jvmtiError GetTimerInfo(jvmtiTimerInfo* info_ptr) { + return functions->GetTimerInfo(this, info_ptr); + } + + jvmtiError GetTime(jlong* nanos_ptr) { + return functions->GetTime(this, nanos_ptr); + } + + jvmtiError GetAvailableProcessors(jint* processor_count_ptr) { + return functions->GetAvailableProcessors(this, processor_count_ptr); + } + + jvmtiError AddToBootstrapClassLoaderSearch(const char* segment) { + return functions->AddToBootstrapClassLoaderSearch(this, segment); + } + + jvmtiError AddToSystemClassLoaderSearch(const char* segment) { + return functions->AddToSystemClassLoaderSearch(this, segment); + } + + jvmtiError GetSystemProperties(jint* count_ptr, + char*** property_ptr) { + return functions->GetSystemProperties(this, count_ptr, property_ptr); + } + + jvmtiError GetSystemProperty(const char* property, + char** value_ptr) { + return functions->GetSystemProperty(this, property, value_ptr); + } + + jvmtiError SetSystemProperty(const char* property, + const char* value) { + return functions->SetSystemProperty(this, property, value); + } + + jvmtiError GetPhase(jvmtiPhase* phase_ptr) { + return functions->GetPhase(this, phase_ptr); + } + + jvmtiError DisposeEnvironment() { + return functions->DisposeEnvironment(this); + } + + jvmtiError SetEnvironmentLocalStorage(const void* data) { + return functions->SetEnvironmentLocalStorage(this, data); + } + + jvmtiError GetEnvironmentLocalStorage(void** data_ptr) { + return functions->GetEnvironmentLocalStorage(this, data_ptr); + } + + jvmtiError GetVersionNumber(jint* version_ptr) { + return functions->GetVersionNumber(this, version_ptr); + } + + jvmtiError GetErrorName(jvmtiError error, + char** name_ptr) { + return functions->GetErrorName(this, error, name_ptr); + } + + jvmtiError SetVerboseFlag(jvmtiVerboseFlag flag, + jboolean value) { + return functions->SetVerboseFlag(this, flag, value); + } + + jvmtiError GetJLocationFormat(jvmtiJlocationFormat* format_ptr) { + return functions->GetJLocationFormat(this, format_ptr); + } + +#endif /* __cplusplus */ +}; + + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* !_JAVA_JVMTI_H_ */ + diff --git a/include/win32/jawt_md.h b/include/win32/jawt_md.h new file mode 100644 index 0000000..82ba034 --- /dev/null +++ b/include/win32/jawt_md.h @@ -0,0 +1,41 @@ +/* + * %W% %E% + * + * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +#ifndef _JAVASOFT_JAWT_MD_H_ +#define _JAVASOFT_JAWT_MD_H_ + +#include +#include "jawt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Win32-specific declarations for AWT native interface. + * See notes in jawt.h for an example of use. + */ +typedef struct jawt_Win32DrawingSurfaceInfo { + /* Native window, DDB, or DIB handle */ + union { + HWND hwnd; + HBITMAP hbitmap; + void* pbits; + }; + /* + * This HDC should always be used instead of the HDC returned from + * BeginPaint() or any calls to GetDC(). + */ + HDC hdc; + HPALETTE hpalette; +} JAWT_Win32DrawingSurfaceInfo; + +#ifdef __cplusplus +} +#endif + +#endif /* !_JAVASOFT_JAWT_MD_H_ */ diff --git a/include/win32/jni_md.h b/include/win32/jni_md.h new file mode 100644 index 0000000..9ac4718 --- /dev/null +++ b/include/win32/jni_md.h @@ -0,0 +1,19 @@ +/* + * %W% %E% + * + * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +#ifndef _JAVASOFT_JNI_MD_H_ +#define _JAVASOFT_JNI_MD_H_ + +#define JNIEXPORT __declspec(dllexport) +#define JNIIMPORT __declspec(dllimport) +#define JNICALL __stdcall + +typedef long jint; +typedef __int64 jlong; +typedef signed char jbyte; + +#endif /* !_JAVASOFT_JNI_MD_H_ */ diff --git a/msvc/WiiUseJ.suo b/msvc/WiiUseJ.suo index 550b6e1426872afeadfd16cb85219474f9a73ef4..4b266710fbab61ad1041a77b232dd0d63e7e4616 100644 GIT binary patch delta 287 zcmZp8!PxMEaYGIZo5A(7f2FT(E@BDfn0#2!aPk+P01kBq1_pK@o;*=sV{-{_2r~;W zlsEZ{fIlarD3Heu6Dbk&pM03baPt?z045G|pePqyMkIiR55y7F)7kt*B!GSL5f+2Z zB{Bgb9Be>gHK@AHUkpN6SPbC0OhZ^i;8La`Vk|sxDW5AW#xSW8U!Z+PKprPd^tZ5`Pc~*$h5kKlw0^;pQ)b0Zd?>qHr0J01hJ{hX*RK`HM&ZJBK=u#|9HA zkqHpt5CQVkU?N`(LReV1puEW?rXiCB^>j9WF%1!8;f0I(TwyVXX(;gp+G`Btal%Bt f_^)H0tP)Z)c~S7Z$qO7EHvb7(CV(oC#=;8#Fm+KT diff --git a/msvc/WiiUseJ.vcxproj b/msvc/WiiUseJ.vcxproj index c53d198..0837c54 100644 --- a/msvc/WiiUseJ.vcxproj +++ b/msvc/WiiUseJ.vcxproj @@ -44,7 +44,7 @@ false - C:\Program Files (x86)\Java\jdk1.6.0_23\include;C:\Program Files (x86)\Java\jdk1.6.0_23\include\win32;$(IncludePath) + ..\include;..\include\win32;$(IncludePath) .\Release\ $(ExtensionsToDeleteOnClean) ..\lib;$(LibraryPath) From 819f75fd411b7b2019945f405b539660f50cc97b Mon Sep 17 00:00:00 2001 From: Rik Veenboer Date: Sun, 20 Mar 2011 18:34:14 +0000 Subject: [PATCH 08/36] --- dev/WiiUseJ.dev | 99 ++++++++++++++++++++++++++++++++++++++++++++ dev/copy.bat | 1 + dev/copy.mak | 2 + msvc/WiiUseJ.suo | Bin 29696 -> 28672 bytes speaker.h | 22 +++++----- wiiusej_WiiUseApi.c | 2 +- 6 files changed, 114 insertions(+), 12 deletions(-) create mode 100644 dev/WiiUseJ.dev create mode 100644 dev/copy.bat create mode 100644 dev/copy.mak diff --git a/dev/WiiUseJ.dev b/dev/WiiUseJ.dev new file mode 100644 index 0000000..f34b3da --- /dev/null +++ b/dev/WiiUseJ.dev @@ -0,0 +1,99 @@ +[Project] +FileName=WiiUseJ.dev +Name=WiiUseJ +UnitCount=5 +Type=3 +Ver=1 +ObjFiles= +Includes=..\include;..\include\win32 +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes=copy.mak +Compiler=-DBUILDING_DLL=1_@@_ +CppCompiler=-DBUILDING_DLL=1_@@_ +Linker=--no-export-all-symbols --add-stdcall-alias_@@_../lib/wiiuse.lib_@@_ +IsCpp=0 +Icon= +ExeOutput= +ObjectOutput= +OverrideOutput=0 +OverrideOutputName=WiiUseJ.dll +HostApplication= +Folders= +CommandLine= +UseCustomMakefile=0 +CustomMakefile= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000000000000000 + +[Unit1] +FileName=..\speaker.h +CompileCpp=0 +Folder=WiiUseJ +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit2] +FileName=..\wiiuse.h +CompileCpp=0 +Folder=WiiUseJ +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit3] +FileName=..\wiiusej_Speaker.h +CompileCpp=0 +Folder=WiiUseJ +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit4] +FileName=..\wiiusej_WiiUseApi.c +CompileCpp=0 +Folder=WiiUseJ +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit5] +FileName=..\wiiusej_WiiUseApi.h +CompileCpp=0 +Folder=WiiUseJ +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + diff --git a/dev/copy.bat b/dev/copy.bat new file mode 100644 index 0000000..cb938a8 --- /dev/null +++ b/dev/copy.bat @@ -0,0 +1 @@ +copy WiiUseJ.dll ..\..\..\java\native\ \ No newline at end of file diff --git a/dev/copy.mak b/dev/copy.mak new file mode 100644 index 0000000..5459618 --- /dev/null +++ b/dev/copy.mak @@ -0,0 +1,2 @@ +all-after: + copy.bat \ No newline at end of file diff --git a/msvc/WiiUseJ.suo b/msvc/WiiUseJ.suo index 4b266710fbab61ad1041a77b232dd0d63e7e4616..739ff4900f420fa7b805420dccf97e67fd294145 100644 GIT binary patch delta 1074 zcma)5OH30{6n(EVQ-)9Z)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bt_=&Xqs`0u+Ei^ z>^I_v&=KgTFOxI`txv;GF&kv8I+*G1rsN}sM+L`-$KCG` zgvjmAVdf<72#pFM2hWH2u#b;Mqv8ImrNDFPTq2sDP32CN5`M9eOJ#FnHa#Qe;9jgt zom))BXHr=xT6=u&KhgaGo+~|7cg_1$cHxa|e2%NF$Jv*?gWckId?_wwk~4yH(8<5* z>KD`ViP=IjC1&Pf{dg~Q^jg5Iv%&ASR`|`T-W&b|Ln2R(`G8Fw6fV4LGhU-H`SoV2 z9%@LD|DA{boC8`;LfjUzpT&}{H+^*)<#tpexBfa0x6dsIZkHo0l^qe9l_#G-YIkUh z|B+$z4Gp#i?m(Nab6+-xN{7A9;0U@8E zEZNSEsQIeSC1EzAJ46E8<;28!sF9zT}trz8{{c^?O imALej629wOuI=Sh`d=;Zs|McDj?}!$p8t-!8t0$J&br3{ diff --git a/speaker.h b/speaker.h index 8b8267d..aad8b4e 100644 --- a/speaker.h +++ b/speaker.h @@ -2,16 +2,16 @@ #define WIIMOTE_GET_RUMBLE(wm) (WIIMOTE_IS_SET(wm, WIIMOTE_STATE_RUMBLE) ? 0x01 : 0x00) -#define WM_CMD_SPEAKER_ENABLE 0x14 -#define WM_CMD_STREAM_DATA 0x18 -#define WM_CMD_SPEAKER_MUTE 0x19 - -#define WM_CTRL_STATUS_BYTE1_SPEAKER_MUTE 0x04 - -#define WM_REG_SPEAKER 0x04a20001 - -static byte cfg[9] = {0x00, 0x00, 0x00, 0xdd, 0x40, 0x00, 0x00, 0x01, 0x01}; - +#define WM_CMD_SPEAKER_ENABLE 0x14 +#define WM_CMD_STREAM_DATA 0x18 +#define WM_CMD_SPEAKER_MUTE 0x19 + +#define WM_CTRL_STATUS_BYTE1_SPEAKER_MUTE 0x04 + +#define WM_REG_SPEAKER 0x04a20001 + +static byte cfg[9] = {0x00, 0x00, 0x00, 0xdd, 0x40, 0x00, 0x00, 0x01, 0x01}; + WIIUSE_EXPORT extern void wiiuse_speaker_enable(struct wiimote_t* wm); WIIUSE_EXPORT extern void wiiuse_speaker_disable(struct wiimote_t* wm); WIIUSE_EXPORT extern void wiiuse_speaker_mute(struct wiimote_t* wm); @@ -20,4 +20,4 @@ WIIUSE_EXPORT extern void wiiuse_speaker_activate(struct wiimote_t* wm); WIIUSE_EXPORT extern void wiiuse_speaker_deactivate(struct wiimote_t* wm); WIIUSE_EXPORT extern void wiiuse_speaker_volume(struct wiimote_t* wm, byte vol); WIIUSE_EXPORT extern void wiiuse_speaker_frequency(struct wiimote_t* wm, unsigned short freq); -WIIUSE_EXPORT extern void wiiuse_speaker_data(struct wiimote_t* wm, byte* data); \ No newline at end of file +WIIUSE_EXPORT extern void wiiuse_speaker_data(struct wiimote_t* wm, byte* data); diff --git a/wiiusej_WiiUseApi.c b/wiiusej_WiiUseApi.c index 8d28964..aa190ca 100644 --- a/wiiusej_WiiUseApi.c +++ b/wiiusej_WiiUseApi.c @@ -747,4 +747,4 @@ JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_streamSpeakerData } wiiuse_speaker_data(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), data); (*env)->ReleaseShortArrayElements(env, sArray, jShorts, JNI_FALSE); -} \ No newline at end of file +} From 79bc4464e92f864cbcfa3fd9facadccfa03f31b0 Mon Sep 17 00:00:00 2001 From: Rik Veenboer Date: Thu, 2 Jun 2011 11:18:14 +0000 Subject: [PATCH 09/36] --- wiiusej_WiiUseApi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wiiusej_WiiUseApi.c b/wiiusej_WiiUseApi.c index aa190ca..a8dd30d 100644 --- a/wiiusej_WiiUseApi.c +++ b/wiiusej_WiiUseApi.c @@ -670,7 +670,7 @@ JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_specialPoll } } -/* Calibration */ +/* Calibration * JNIEXPORT jshortArray JNICALL Java_wiiusej_WiiUseApi_getCalibration (JNIEnv *env, jobject obj, jint id) { struct wiimote_t wm = *wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id); @@ -684,7 +684,7 @@ JNIEXPORT jshortArray JNICALL Java_wiiusej_WiiUseApi_getCalibration jshortArray jShorts = (*env)->NewShortArray(env, 6); (*env)->SetShortArrayRegion(env, jShorts, 0, 6, calibration); return jShorts; -} +}*/ /* Speaker */ #include "speaker.h" From 02e77f6cc67819d67641a4ce0358d9c0c9d7d4f3 Mon Sep 17 00:00:00 2001 From: Rik Veenboer Date: Wed, 20 Jul 2011 18:17:34 +0000 Subject: [PATCH 10/36] WiiuseJ omgezet naar Eclipse project. --- .cproject | 644 +++++ .project | 70 + .../org.eclipse.cdt.managedbuilder.core.prefs | 22 + Debug/copy.bat | 1 + Release/copy.bat | 1 + dev/WiiUseJ.dev | 99 - dev/copy.bat | 1 - dev/copy.mak | 2 - include/classfile_constants.h | 523 ---- include/jawt.h | 278 -- include/jdwpTransport.h | 237 -- include/jni.h | 1944 ------------- include/jvmti.h | 2504 ----------------- include/win32/jawt_md.h | 41 - include/win32/jni_md.h | 19 - lib/wiiuse.dll | Bin 0 -> 55364 bytes lib/wiiuse.lib | Bin 10344 -> 0 bytes msvc/WiiUseJ.sln | 20 - msvc/WiiUseJ.suo | Bin 28672 -> 0 bytes msvc/WiiUseJ.vcxproj | 99 - msvc/WiiUseJ.vcxproj.filters | 27 - msvc/WiiUseJ.vcxproj.user | 3 - msvc/copy.bat | 1 - speaker.h => src/speaker.h | 22 +- wiiuse.h => src/wiiuse.h | 0 src/wiiusej_Speaker.h | 53 + .../wiiusej_WiiUseApi.c | 1 + .../wiiusej_WiiUseApi.h | 0 wiiusej_Speaker.h | 317 --- 29 files changed, 803 insertions(+), 6126 deletions(-) create mode 100644 .cproject create mode 100644 .project create mode 100644 .settings/org.eclipse.cdt.managedbuilder.core.prefs create mode 100644 Debug/copy.bat create mode 100644 Release/copy.bat delete mode 100644 dev/WiiUseJ.dev delete mode 100644 dev/copy.bat delete mode 100644 dev/copy.mak delete mode 100644 include/classfile_constants.h delete mode 100644 include/jawt.h delete mode 100644 include/jdwpTransport.h delete mode 100644 include/jni.h delete mode 100644 include/jvmti.h delete mode 100644 include/win32/jawt_md.h delete mode 100644 include/win32/jni_md.h create mode 100644 lib/wiiuse.dll delete mode 100644 lib/wiiuse.lib delete mode 100644 msvc/WiiUseJ.sln delete mode 100644 msvc/WiiUseJ.suo delete mode 100644 msvc/WiiUseJ.vcxproj delete mode 100644 msvc/WiiUseJ.vcxproj.filters delete mode 100644 msvc/WiiUseJ.vcxproj.user delete mode 100644 msvc/copy.bat rename speaker.h => src/speaker.h (96%) rename wiiuse.h => src/wiiuse.h (100%) create mode 100644 src/wiiusej_Speaker.h rename wiiusej_WiiUseApi.c => src/wiiusej_WiiUseApi.c (97%) rename wiiusej_WiiUseApi.h => src/wiiusej_WiiUseApi.h (100%) delete mode 100644 wiiusej_Speaker.h diff --git a/.cproject b/.cproject new file mode 100644 index 0000000..e87ebf0 --- /dev/null +++ b/.cproject @@ -0,0 +1,644 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.project b/.project new file mode 100644 index 0000000..90c222a --- /dev/null +++ b/.project @@ -0,0 +1,70 @@ + + + WiiuseJ + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + ?name? + + + + org.eclipse.cdt.make.core.append_environment + true + + + org.eclipse.cdt.make.core.buildArguments + + + + org.eclipse.cdt.make.core.buildCommand + make + + + org.eclipse.cdt.make.core.buildLocation + ${workspace_loc:/WiiuseJ/Debug} + + + org.eclipse.cdt.make.core.contents + org.eclipse.cdt.make.core.activeConfigSettings + + + org.eclipse.cdt.make.core.enableAutoBuild + false + + + org.eclipse.cdt.make.core.enableCleanBuild + true + + + org.eclipse.cdt.make.core.enableFullBuild + true + + + org.eclipse.cdt.make.core.stopOnError + true + + + org.eclipse.cdt.make.core.useDefaultBuildCmd + true + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + diff --git a/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/.settings/org.eclipse.cdt.managedbuilder.core.prefs new file mode 100644 index 0000000..b9bffba --- /dev/null +++ b/.settings/org.eclipse.cdt.managedbuilder.core.prefs @@ -0,0 +1,22 @@ +#Wed Jul 20 00:04:50 CEST 2011 +eclipse.preferences.version=1 +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1519811348/CPATH/delimiter=; +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1519811348/CPATH/operation=remove +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1519811348/C_INCLUDE_PATH/delimiter=; +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1519811348/C_INCLUDE_PATH/operation=remove +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1519811348/append=true +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1519811348/appendContributed=true +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.905874158/CPATH/delimiter=; +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.905874158/CPATH/operation=remove +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.905874158/C_INCLUDE_PATH/delimiter=; +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.905874158/C_INCLUDE_PATH/operation=remove +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.905874158/append=true +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.905874158/appendContributed=true +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1519811348/LIBRARY_PATH/delimiter=; +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1519811348/LIBRARY_PATH/operation=remove +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1519811348/append=true +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1519811348/appendContributed=true +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.release.905874158/LIBRARY_PATH/delimiter=; +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.release.905874158/LIBRARY_PATH/operation=remove +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.release.905874158/append=true +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.release.905874158/appendContributed=true diff --git a/Debug/copy.bat b/Debug/copy.bat new file mode 100644 index 0000000..0e12087 --- /dev/null +++ b/Debug/copy.bat @@ -0,0 +1 @@ +copy wiiusej.dll ..\..\Mimis\wiiusej.dll \ No newline at end of file diff --git a/Release/copy.bat b/Release/copy.bat new file mode 100644 index 0000000..0e12087 --- /dev/null +++ b/Release/copy.bat @@ -0,0 +1 @@ +copy wiiusej.dll ..\..\Mimis\wiiusej.dll \ No newline at end of file diff --git a/dev/WiiUseJ.dev b/dev/WiiUseJ.dev deleted file mode 100644 index f34b3da..0000000 --- a/dev/WiiUseJ.dev +++ /dev/null @@ -1,99 +0,0 @@ -[Project] -FileName=WiiUseJ.dev -Name=WiiUseJ -UnitCount=5 -Type=3 -Ver=1 -ObjFiles= -Includes=..\include;..\include\win32 -Libs= -PrivateResource= -ResourceIncludes= -MakeIncludes=copy.mak -Compiler=-DBUILDING_DLL=1_@@_ -CppCompiler=-DBUILDING_DLL=1_@@_ -Linker=--no-export-all-symbols --add-stdcall-alias_@@_../lib/wiiuse.lib_@@_ -IsCpp=0 -Icon= -ExeOutput= -ObjectOutput= -OverrideOutput=0 -OverrideOutputName=WiiUseJ.dll -HostApplication= -Folders= -CommandLine= -UseCustomMakefile=0 -CustomMakefile= -IncludeVersionInfo=0 -SupportXPThemes=0 -CompilerSet=0 -CompilerSettings=0000000000000000000000 - -[Unit1] -FileName=..\speaker.h -CompileCpp=0 -Folder=WiiUseJ -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit2] -FileName=..\wiiuse.h -CompileCpp=0 -Folder=WiiUseJ -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit3] -FileName=..\wiiusej_Speaker.h -CompileCpp=0 -Folder=WiiUseJ -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit4] -FileName=..\wiiusej_WiiUseApi.c -CompileCpp=0 -Folder=WiiUseJ -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit5] -FileName=..\wiiusej_WiiUseApi.h -CompileCpp=0 -Folder=WiiUseJ -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[VersionInfo] -Major=0 -Minor=1 -Release=1 -Build=1 -LanguageID=1033 -CharsetID=1252 -CompanyName= -FileVersion= -FileDescription=Developed using the Dev-C++ IDE -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion= -AutoIncBuildNr=0 - diff --git a/dev/copy.bat b/dev/copy.bat deleted file mode 100644 index cb938a8..0000000 --- a/dev/copy.bat +++ /dev/null @@ -1 +0,0 @@ -copy WiiUseJ.dll ..\..\..\java\native\ \ No newline at end of file diff --git a/dev/copy.mak b/dev/copy.mak deleted file mode 100644 index 5459618..0000000 --- a/dev/copy.mak +++ /dev/null @@ -1,2 +0,0 @@ -all-after: - copy.bat \ No newline at end of file diff --git a/include/classfile_constants.h b/include/classfile_constants.h deleted file mode 100644 index 30e839e..0000000 --- a/include/classfile_constants.h +++ /dev/null @@ -1,523 +0,0 @@ -/* - * %W% %E% - * - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. - * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. - * - */ - -#ifndef CLASSFILE_CONSTANTS_H -#define CLASSFILE_CONSTANTS_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* Flags */ - -enum { - JVM_ACC_PUBLIC = 0x0001, - JVM_ACC_PRIVATE = 0x0002, - JVM_ACC_PROTECTED = 0x0004, - JVM_ACC_STATIC = 0x0008, - JVM_ACC_FINAL = 0x0010, - JVM_ACC_SYNCHRONIZED = 0x0020, - JVM_ACC_SUPER = 0x0020, - JVM_ACC_VOLATILE = 0x0040, - JVM_ACC_BRIDGE = 0x0040, - JVM_ACC_TRANSIENT = 0x0080, - JVM_ACC_VARARGS = 0x0080, - JVM_ACC_NATIVE = 0x0100, - JVM_ACC_INTERFACE = 0x0200, - JVM_ACC_ABSTRACT = 0x0400, - JVM_ACC_STRICT = 0x0800, - JVM_ACC_SYNTHETIC = 0x1000, - JVM_ACC_ANNOTATION = 0x2000, - JVM_ACC_ENUM = 0x4000 -}; - -/* Used in newarray instruction. */ - -enum { - JVM_T_BOOLEAN = 4, - JVM_T_CHAR = 5, - JVM_T_FLOAT = 6, - JVM_T_DOUBLE = 7, - JVM_T_BYTE = 8, - JVM_T_SHORT = 9, - JVM_T_INT = 10, - JVM_T_LONG = 11 -}; - -/* Constant Pool Entries */ - -enum { - JVM_CONSTANT_Utf8 = 1, - JVM_CONSTANT_Unicode = 2, /* unused */ - JVM_CONSTANT_Integer = 3, - JVM_CONSTANT_Float = 4, - JVM_CONSTANT_Long = 5, - JVM_CONSTANT_Double = 6, - JVM_CONSTANT_Class = 7, - JVM_CONSTANT_String = 8, - JVM_CONSTANT_Fieldref = 9, - JVM_CONSTANT_Methodref = 10, - JVM_CONSTANT_InterfaceMethodref = 11, - JVM_CONSTANT_NameAndType = 12 -}; - -/* StackMapTable type item numbers */ - -enum { - JVM_ITEM_Top = 0, - JVM_ITEM_Integer = 1, - JVM_ITEM_Float = 2, - JVM_ITEM_Double = 3, - JVM_ITEM_Long = 4, - JVM_ITEM_Null = 5, - JVM_ITEM_UninitializedThis = 6, - JVM_ITEM_Object = 7, - JVM_ITEM_Uninitialized = 8 -}; - -/* Type signatures */ - -enum { - JVM_SIGNATURE_ARRAY = '[', - JVM_SIGNATURE_BYTE = 'B', - JVM_SIGNATURE_CHAR = 'C', - JVM_SIGNATURE_CLASS = 'L', - JVM_SIGNATURE_ENDCLASS = ';', - JVM_SIGNATURE_ENUM = 'E', - JVM_SIGNATURE_FLOAT = 'F', - JVM_SIGNATURE_DOUBLE = 'D', - JVM_SIGNATURE_FUNC = '(', - JVM_SIGNATURE_ENDFUNC = ')', - JVM_SIGNATURE_INT = 'I', - JVM_SIGNATURE_LONG = 'J', - JVM_SIGNATURE_SHORT = 'S', - JVM_SIGNATURE_VOID = 'V', - JVM_SIGNATURE_BOOLEAN = 'Z' -}; - -/* Opcodes */ - -enum { - JVM_OPC_nop = 0, - JVM_OPC_aconst_null = 1, - JVM_OPC_iconst_m1 = 2, - JVM_OPC_iconst_0 = 3, - JVM_OPC_iconst_1 = 4, - JVM_OPC_iconst_2 = 5, - JVM_OPC_iconst_3 = 6, - JVM_OPC_iconst_4 = 7, - JVM_OPC_iconst_5 = 8, - JVM_OPC_lconst_0 = 9, - JVM_OPC_lconst_1 = 10, - JVM_OPC_fconst_0 = 11, - JVM_OPC_fconst_1 = 12, - JVM_OPC_fconst_2 = 13, - JVM_OPC_dconst_0 = 14, - JVM_OPC_dconst_1 = 15, - JVM_OPC_bipush = 16, - JVM_OPC_sipush = 17, - JVM_OPC_ldc = 18, - JVM_OPC_ldc_w = 19, - JVM_OPC_ldc2_w = 20, - JVM_OPC_iload = 21, - JVM_OPC_lload = 22, - JVM_OPC_fload = 23, - JVM_OPC_dload = 24, - JVM_OPC_aload = 25, - JVM_OPC_iload_0 = 26, - JVM_OPC_iload_1 = 27, - JVM_OPC_iload_2 = 28, - JVM_OPC_iload_3 = 29, - JVM_OPC_lload_0 = 30, - JVM_OPC_lload_1 = 31, - JVM_OPC_lload_2 = 32, - JVM_OPC_lload_3 = 33, - JVM_OPC_fload_0 = 34, - JVM_OPC_fload_1 = 35, - JVM_OPC_fload_2 = 36, - JVM_OPC_fload_3 = 37, - JVM_OPC_dload_0 = 38, - JVM_OPC_dload_1 = 39, - JVM_OPC_dload_2 = 40, - JVM_OPC_dload_3 = 41, - JVM_OPC_aload_0 = 42, - JVM_OPC_aload_1 = 43, - JVM_OPC_aload_2 = 44, - JVM_OPC_aload_3 = 45, - JVM_OPC_iaload = 46, - JVM_OPC_laload = 47, - JVM_OPC_faload = 48, - JVM_OPC_daload = 49, - JVM_OPC_aaload = 50, - JVM_OPC_baload = 51, - JVM_OPC_caload = 52, - JVM_OPC_saload = 53, - JVM_OPC_istore = 54, - JVM_OPC_lstore = 55, - JVM_OPC_fstore = 56, - JVM_OPC_dstore = 57, - JVM_OPC_astore = 58, - JVM_OPC_istore_0 = 59, - JVM_OPC_istore_1 = 60, - JVM_OPC_istore_2 = 61, - JVM_OPC_istore_3 = 62, - JVM_OPC_lstore_0 = 63, - JVM_OPC_lstore_1 = 64, - JVM_OPC_lstore_2 = 65, - JVM_OPC_lstore_3 = 66, - JVM_OPC_fstore_0 = 67, - JVM_OPC_fstore_1 = 68, - JVM_OPC_fstore_2 = 69, - JVM_OPC_fstore_3 = 70, - JVM_OPC_dstore_0 = 71, - JVM_OPC_dstore_1 = 72, - JVM_OPC_dstore_2 = 73, - JVM_OPC_dstore_3 = 74, - JVM_OPC_astore_0 = 75, - JVM_OPC_astore_1 = 76, - JVM_OPC_astore_2 = 77, - JVM_OPC_astore_3 = 78, - JVM_OPC_iastore = 79, - JVM_OPC_lastore = 80, - JVM_OPC_fastore = 81, - JVM_OPC_dastore = 82, - JVM_OPC_aastore = 83, - JVM_OPC_bastore = 84, - JVM_OPC_castore = 85, - JVM_OPC_sastore = 86, - JVM_OPC_pop = 87, - JVM_OPC_pop2 = 88, - JVM_OPC_dup = 89, - JVM_OPC_dup_x1 = 90, - JVM_OPC_dup_x2 = 91, - JVM_OPC_dup2 = 92, - JVM_OPC_dup2_x1 = 93, - JVM_OPC_dup2_x2 = 94, - JVM_OPC_swap = 95, - JVM_OPC_iadd = 96, - JVM_OPC_ladd = 97, - JVM_OPC_fadd = 98, - JVM_OPC_dadd = 99, - JVM_OPC_isub = 100, - JVM_OPC_lsub = 101, - JVM_OPC_fsub = 102, - JVM_OPC_dsub = 103, - JVM_OPC_imul = 104, - JVM_OPC_lmul = 105, - JVM_OPC_fmul = 106, - JVM_OPC_dmul = 107, - JVM_OPC_idiv = 108, - JVM_OPC_ldiv = 109, - JVM_OPC_fdiv = 110, - JVM_OPC_ddiv = 111, - JVM_OPC_irem = 112, - JVM_OPC_lrem = 113, - JVM_OPC_frem = 114, - JVM_OPC_drem = 115, - JVM_OPC_ineg = 116, - JVM_OPC_lneg = 117, - JVM_OPC_fneg = 118, - JVM_OPC_dneg = 119, - JVM_OPC_ishl = 120, - JVM_OPC_lshl = 121, - JVM_OPC_ishr = 122, - JVM_OPC_lshr = 123, - JVM_OPC_iushr = 124, - JVM_OPC_lushr = 125, - JVM_OPC_iand = 126, - JVM_OPC_land = 127, - JVM_OPC_ior = 128, - JVM_OPC_lor = 129, - JVM_OPC_ixor = 130, - JVM_OPC_lxor = 131, - JVM_OPC_iinc = 132, - JVM_OPC_i2l = 133, - JVM_OPC_i2f = 134, - JVM_OPC_i2d = 135, - JVM_OPC_l2i = 136, - JVM_OPC_l2f = 137, - JVM_OPC_l2d = 138, - JVM_OPC_f2i = 139, - JVM_OPC_f2l = 140, - JVM_OPC_f2d = 141, - JVM_OPC_d2i = 142, - JVM_OPC_d2l = 143, - JVM_OPC_d2f = 144, - JVM_OPC_i2b = 145, - JVM_OPC_i2c = 146, - JVM_OPC_i2s = 147, - JVM_OPC_lcmp = 148, - JVM_OPC_fcmpl = 149, - JVM_OPC_fcmpg = 150, - JVM_OPC_dcmpl = 151, - JVM_OPC_dcmpg = 152, - JVM_OPC_ifeq = 153, - JVM_OPC_ifne = 154, - JVM_OPC_iflt = 155, - JVM_OPC_ifge = 156, - JVM_OPC_ifgt = 157, - JVM_OPC_ifle = 158, - JVM_OPC_if_icmpeq = 159, - JVM_OPC_if_icmpne = 160, - JVM_OPC_if_icmplt = 161, - JVM_OPC_if_icmpge = 162, - JVM_OPC_if_icmpgt = 163, - JVM_OPC_if_icmple = 164, - JVM_OPC_if_acmpeq = 165, - JVM_OPC_if_acmpne = 166, - JVM_OPC_goto = 167, - JVM_OPC_jsr = 168, - JVM_OPC_ret = 169, - JVM_OPC_tableswitch = 170, - JVM_OPC_lookupswitch = 171, - JVM_OPC_ireturn = 172, - JVM_OPC_lreturn = 173, - JVM_OPC_freturn = 174, - JVM_OPC_dreturn = 175, - JVM_OPC_areturn = 176, - JVM_OPC_return = 177, - JVM_OPC_getstatic = 178, - JVM_OPC_putstatic = 179, - JVM_OPC_getfield = 180, - JVM_OPC_putfield = 181, - JVM_OPC_invokevirtual = 182, - JVM_OPC_invokespecial = 183, - JVM_OPC_invokestatic = 184, - JVM_OPC_invokeinterface = 185, - JVM_OPC_xxxunusedxxx = 186, - JVM_OPC_new = 187, - JVM_OPC_newarray = 188, - JVM_OPC_anewarray = 189, - JVM_OPC_arraylength = 190, - JVM_OPC_athrow = 191, - JVM_OPC_checkcast = 192, - JVM_OPC_instanceof = 193, - JVM_OPC_monitorenter = 194, - JVM_OPC_monitorexit = 195, - JVM_OPC_wide = 196, - JVM_OPC_multianewarray = 197, - JVM_OPC_ifnull = 198, - JVM_OPC_ifnonnull = 199, - JVM_OPC_goto_w = 200, - JVM_OPC_jsr_w = 201, - JVM_OPC_MAX = 201 -}; - -/* Opcode length initializer, use with something like: - * unsigned char opcode_length[JVM_OPC_MAX+1] = JVM_OPCODE_LENGTH_INITIALIZER; - */ -#define JVM_OPCODE_LENGTH_INITIALIZER { \ - 1, /* nop */ \ - 1, /* aconst_null */ \ - 1, /* iconst_m1 */ \ - 1, /* iconst_0 */ \ - 1, /* iconst_1 */ \ - 1, /* iconst_2 */ \ - 1, /* iconst_3 */ \ - 1, /* iconst_4 */ \ - 1, /* iconst_5 */ \ - 1, /* lconst_0 */ \ - 1, /* lconst_1 */ \ - 1, /* fconst_0 */ \ - 1, /* fconst_1 */ \ - 1, /* fconst_2 */ \ - 1, /* dconst_0 */ \ - 1, /* dconst_1 */ \ - 2, /* bipush */ \ - 3, /* sipush */ \ - 2, /* ldc */ \ - 3, /* ldc_w */ \ - 3, /* ldc2_w */ \ - 2, /* iload */ \ - 2, /* lload */ \ - 2, /* fload */ \ - 2, /* dload */ \ - 2, /* aload */ \ - 1, /* iload_0 */ \ - 1, /* iload_1 */ \ - 1, /* iload_2 */ \ - 1, /* iload_3 */ \ - 1, /* lload_0 */ \ - 1, /* lload_1 */ \ - 1, /* lload_2 */ \ - 1, /* lload_3 */ \ - 1, /* fload_0 */ \ - 1, /* fload_1 */ \ - 1, /* fload_2 */ \ - 1, /* fload_3 */ \ - 1, /* dload_0 */ \ - 1, /* dload_1 */ \ - 1, /* dload_2 */ \ - 1, /* dload_3 */ \ - 1, /* aload_0 */ \ - 1, /* aload_1 */ \ - 1, /* aload_2 */ \ - 1, /* aload_3 */ \ - 1, /* iaload */ \ - 1, /* laload */ \ - 1, /* faload */ \ - 1, /* daload */ \ - 1, /* aaload */ \ - 1, /* baload */ \ - 1, /* caload */ \ - 1, /* saload */ \ - 2, /* istore */ \ - 2, /* lstore */ \ - 2, /* fstore */ \ - 2, /* dstore */ \ - 2, /* astore */ \ - 1, /* istore_0 */ \ - 1, /* istore_1 */ \ - 1, /* istore_2 */ \ - 1, /* istore_3 */ \ - 1, /* lstore_0 */ \ - 1, /* lstore_1 */ \ - 1, /* lstore_2 */ \ - 1, /* lstore_3 */ \ - 1, /* fstore_0 */ \ - 1, /* fstore_1 */ \ - 1, /* fstore_2 */ \ - 1, /* fstore_3 */ \ - 1, /* dstore_0 */ \ - 1, /* dstore_1 */ \ - 1, /* dstore_2 */ \ - 1, /* dstore_3 */ \ - 1, /* astore_0 */ \ - 1, /* astore_1 */ \ - 1, /* astore_2 */ \ - 1, /* astore_3 */ \ - 1, /* iastore */ \ - 1, /* lastore */ \ - 1, /* fastore */ \ - 1, /* dastore */ \ - 1, /* aastore */ \ - 1, /* bastore */ \ - 1, /* castore */ \ - 1, /* sastore */ \ - 1, /* pop */ \ - 1, /* pop2 */ \ - 1, /* dup */ \ - 1, /* dup_x1 */ \ - 1, /* dup_x2 */ \ - 1, /* dup2 */ \ - 1, /* dup2_x1 */ \ - 1, /* dup2_x2 */ \ - 1, /* swap */ \ - 1, /* iadd */ \ - 1, /* ladd */ \ - 1, /* fadd */ \ - 1, /* dadd */ \ - 1, /* isub */ \ - 1, /* lsub */ \ - 1, /* fsub */ \ - 1, /* dsub */ \ - 1, /* imul */ \ - 1, /* lmul */ \ - 1, /* fmul */ \ - 1, /* dmul */ \ - 1, /* idiv */ \ - 1, /* ldiv */ \ - 1, /* fdiv */ \ - 1, /* ddiv */ \ - 1, /* irem */ \ - 1, /* lrem */ \ - 1, /* frem */ \ - 1, /* drem */ \ - 1, /* ineg */ \ - 1, /* lneg */ \ - 1, /* fneg */ \ - 1, /* dneg */ \ - 1, /* ishl */ \ - 1, /* lshl */ \ - 1, /* ishr */ \ - 1, /* lshr */ \ - 1, /* iushr */ \ - 1, /* lushr */ \ - 1, /* iand */ \ - 1, /* land */ \ - 1, /* ior */ \ - 1, /* lor */ \ - 1, /* ixor */ \ - 1, /* lxor */ \ - 3, /* iinc */ \ - 1, /* i2l */ \ - 1, /* i2f */ \ - 1, /* i2d */ \ - 1, /* l2i */ \ - 1, /* l2f */ \ - 1, /* l2d */ \ - 1, /* f2i */ \ - 1, /* f2l */ \ - 1, /* f2d */ \ - 1, /* d2i */ \ - 1, /* d2l */ \ - 1, /* d2f */ \ - 1, /* i2b */ \ - 1, /* i2c */ \ - 1, /* i2s */ \ - 1, /* lcmp */ \ - 1, /* fcmpl */ \ - 1, /* fcmpg */ \ - 1, /* dcmpl */ \ - 1, /* dcmpg */ \ - 3, /* ifeq */ \ - 3, /* ifne */ \ - 3, /* iflt */ \ - 3, /* ifge */ \ - 3, /* ifgt */ \ - 3, /* ifle */ \ - 3, /* if_icmpeq */ \ - 3, /* if_icmpne */ \ - 3, /* if_icmplt */ \ - 3, /* if_icmpge */ \ - 3, /* if_icmpgt */ \ - 3, /* if_icmple */ \ - 3, /* if_acmpeq */ \ - 3, /* if_acmpne */ \ - 3, /* goto */ \ - 3, /* jsr */ \ - 2, /* ret */ \ - 99, /* tableswitch */ \ - 99, /* lookupswitch */ \ - 1, /* ireturn */ \ - 1, /* lreturn */ \ - 1, /* freturn */ \ - 1, /* dreturn */ \ - 1, /* areturn */ \ - 1, /* return */ \ - 3, /* getstatic */ \ - 3, /* putstatic */ \ - 3, /* getfield */ \ - 3, /* putfield */ \ - 3, /* invokevirtual */ \ - 3, /* invokespecial */ \ - 3, /* invokestatic */ \ - 5, /* invokeinterface */ \ - 0, /* xxxunusedxxx */ \ - 3, /* new */ \ - 2, /* newarray */ \ - 3, /* anewarray */ \ - 1, /* arraylength */ \ - 1, /* athrow */ \ - 3, /* checkcast */ \ - 3, /* instanceof */ \ - 1, /* monitorenter */ \ - 1, /* monitorexit */ \ - 0, /* wide */ \ - 4, /* multianewarray */ \ - 3, /* ifnull */ \ - 3, /* ifnonnull */ \ - 5, /* goto_w */ \ - 5 /* jsr_w */ \ -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif /* __cplusplus */ - -#endif /* CLASSFILE_CONSTANTS */ diff --git a/include/jawt.h b/include/jawt.h deleted file mode 100644 index 87e0b18..0000000 --- a/include/jawt.h +++ /dev/null @@ -1,278 +0,0 @@ -/* - * %W% %E% - * - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. - * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. - */ - -#ifndef _JAVASOFT_JAWT_H_ -#define _JAVASOFT_JAWT_H_ - -#include "jni.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * AWT native interface (new in JDK 1.3) - * - * The AWT native interface allows a native C or C++ application a means - * by which to access native structures in AWT. This is to facilitate moving - * legacy C and C++ applications to Java and to target the needs of the - * community who, at present, wish to do their own native rendering to canvases - * for performance reasons. Standard extensions such as Java3D also require a - * means to access the underlying native data structures of AWT. - * - * There may be future extensions to this API depending on demand. - * - * A VM does not have to implement this API in order to pass the JCK. - * It is recommended, however, that this API is implemented on VMs that support - * standard extensions, such as Java3D. - * - * Since this is a native API, any program which uses it cannot be considered - * 100% pure java. - */ - -/* - * AWT Native Drawing Surface (JAWT_DrawingSurface). - * - * For each platform, there is a native drawing surface structure. This - * platform-specific structure can be found in jawt_md.h. It is recommended - * that additional platforms follow the same model. It is also recommended - * that VMs on Win32 and Solaris support the existing structures in jawt_md.h. - * - ******************* - * EXAMPLE OF USAGE: - ******************* - * - * In Win32, a programmer wishes to access the HWND of a canvas to perform - * native rendering into it. The programmer has declared the paint() method - * for their canvas subclass to be native: - * - * - * MyCanvas.java: - * - * import java.awt.*; - * - * public class MyCanvas extends Canvas { - * - * static { - * System.loadLibrary("mylib"); - * } - * - * public native void paint(Graphics g); - * } - * - * - * myfile.c: - * - * #include "jawt_md.h" - * #include - * - * JNIEXPORT void JNICALL - * Java_MyCanvas_paint(JNIEnv* env, jobject canvas, jobject graphics) - * { - * JAWT awt; - * JAWT_DrawingSurface* ds; - * JAWT_DrawingSurfaceInfo* dsi; - * JAWT_Win32DrawingSurfaceInfo* dsi_win; - * jboolean result; - * jint lock; - * - * // Get the AWT - * awt.version = JAWT_VERSION_1_3; - * result = JAWT_GetAWT(env, &awt); - * assert(result != JNI_FALSE); - * - * // Get the drawing surface - * ds = awt.GetDrawingSurface(env, canvas); - * assert(ds != NULL); - * - * // Lock the drawing surface - * lock = ds->Lock(ds); - * assert((lock & JAWT_LOCK_ERROR) == 0); - * - * // Get the drawing surface info - * dsi = ds->GetDrawingSurfaceInfo(ds); - * - * // Get the platform-specific drawing info - * dsi_win = (JAWT_Win32DrawingSurfaceInfo*)dsi->platformInfo; - * - * ////////////////////////////// - * // !!! DO PAINTING HERE !!! // - * ////////////////////////////// - * - * // Free the drawing surface info - * ds->FreeDrawingSurfaceInfo(dsi); - * - * // Unlock the drawing surface - * ds->Unlock(ds); - * - * // Free the drawing surface - * awt.FreeDrawingSurface(ds); - * } - * - */ - -/* - * JAWT_Rectangle - * Structure for a native rectangle. - */ -typedef struct jawt_Rectangle { - jint x; - jint y; - jint width; - jint height; -} JAWT_Rectangle; - -struct jawt_DrawingSurface; - -/* - * JAWT_DrawingSurfaceInfo - * Structure for containing the underlying drawing information of a component. - */ -typedef struct jawt_DrawingSurfaceInfo { - /* - * Pointer to the platform-specific information. This can be safely - * cast to a JAWT_Win32DrawingSurfaceInfo on Windows or a - * JAWT_X11DrawingSurfaceInfo on Solaris. See jawt_md.h for details. - */ - void* platformInfo; - /* Cached pointer to the underlying drawing surface */ - struct jawt_DrawingSurface* ds; - /* Bounding rectangle of the drawing surface */ - JAWT_Rectangle bounds; - /* Number of rectangles in the clip */ - jint clipSize; - /* Clip rectangle array */ - JAWT_Rectangle* clip; -} JAWT_DrawingSurfaceInfo; - -#define JAWT_LOCK_ERROR 0x00000001 -#define JAWT_LOCK_CLIP_CHANGED 0x00000002 -#define JAWT_LOCK_BOUNDS_CHANGED 0x00000004 -#define JAWT_LOCK_SURFACE_CHANGED 0x00000008 - -/* - * JAWT_DrawingSurface - * Structure for containing the underlying drawing information of a component. - * All operations on a JAWT_DrawingSurface MUST be performed from the same - * thread as the call to GetDrawingSurface. - */ -typedef struct jawt_DrawingSurface { - /* - * Cached reference to the Java environment of the calling thread. - * If Lock(), Unlock(), GetDrawingSurfaceInfo() or - * FreeDrawingSurfaceInfo() are called from a different thread, - * this data member should be set before calling those functions. - */ - JNIEnv* env; - /* Cached reference to the target object */ - jobject target; - /* - * Lock the surface of the target component for native rendering. - * When finished drawing, the surface must be unlocked with - * Unlock(). This function returns a bitmask with one or more of the - * following values: - * - * JAWT_LOCK_ERROR - When an error has occurred and the surface could not - * be locked. - * - * JAWT_LOCK_CLIP_CHANGED - When the clip region has changed. - * - * JAWT_LOCK_BOUNDS_CHANGED - When the bounds of the surface have changed. - * - * JAWT_LOCK_SURFACE_CHANGED - When the surface itself has changed - */ - jint (JNICALL *Lock) - (struct jawt_DrawingSurface* ds); - /* - * Get the drawing surface info. - * The value returned may be cached, but the values may change if - * additional calls to Lock() or Unlock() are made. - * Lock() must be called before this can return a valid value. - * Returns NULL if an error has occurred. - * When finished with the returned value, FreeDrawingSurfaceInfo must be - * called. - */ - JAWT_DrawingSurfaceInfo* (JNICALL *GetDrawingSurfaceInfo) - (struct jawt_DrawingSurface* ds); - /* - * Free the drawing surface info. - */ - void (JNICALL *FreeDrawingSurfaceInfo) - (JAWT_DrawingSurfaceInfo* dsi); - /* - * Unlock the drawing surface of the target component for native rendering. - */ - void (JNICALL *Unlock) - (struct jawt_DrawingSurface* ds); -} JAWT_DrawingSurface; - -/* - * JAWT - * Structure for containing native AWT functions. - */ -typedef struct jawt { - /* - * Version of this structure. This must always be set before - * calling JAWT_GetAWT() - */ - jint version; - /* - * Return a drawing surface from a target jobject. This value - * may be cached. - * Returns NULL if an error has occurred. - * Target must be a java.awt.Component (should be a Canvas - * or Window for native rendering). - * FreeDrawingSurface() must be called when finished with the - * returned JAWT_DrawingSurface. - */ - JAWT_DrawingSurface* (JNICALL *GetDrawingSurface) - (JNIEnv* env, jobject target); - /* - * Free the drawing surface allocated in GetDrawingSurface. - */ - void (JNICALL *FreeDrawingSurface) - (JAWT_DrawingSurface* ds); - /* - * Since 1.4 - * Locks the entire AWT for synchronization purposes - */ - void (JNICALL *Lock)(JNIEnv* env); - /* - * Since 1.4 - * Unlocks the entire AWT for synchronization purposes - */ - void (JNICALL *Unlock)(JNIEnv* env); - /* - * Since 1.4 - * Returns a reference to a java.awt.Component from a native - * platform handle. On Windows, this corresponds to an HWND; - * on Solaris and Linux, this is a Drawable. For other platforms, - * see the appropriate machine-dependent header file for a description. - * The reference returned by this function is a local - * reference that is only valid in this environment. - * This function returns a NULL reference if no component could be - * found with matching platform information. - */ - jobject (JNICALL *GetComponent)(JNIEnv* env, void* platformInfo); - -} JAWT; - -/* - * Get the AWT native structure. This function returns JNI_FALSE if - * an error occurs. - */ -_JNI_IMPORT_OR_EXPORT_ -jboolean JNICALL JAWT_GetAWT(JNIEnv* env, JAWT* awt); - -#define JAWT_VERSION_1_3 0x00010003 -#define JAWT_VERSION_1_4 0x00010004 - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* !_JAVASOFT_JAWT_H_ */ diff --git a/include/jdwpTransport.h b/include/jdwpTransport.h deleted file mode 100644 index eae435a..0000000 --- a/include/jdwpTransport.h +++ /dev/null @@ -1,237 +0,0 @@ -/* - * %W% %E% - * - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. - * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. - */ - -/* - * Java Debug Wire Protocol Transport Service Provider Interface. - */ - -#ifndef JDWPTRANSPORT_H -#define JDWPTRANSPORT_H - -#include "jni.h" - -enum { - JDWPTRANSPORT_VERSION_1_0 = 0x00010000 -}; - -#ifdef __cplusplus -extern "C" { -#endif - -struct jdwpTransportNativeInterface_; - -struct _jdwpTransportEnv; - -#ifdef __cplusplus -typedef _jdwpTransportEnv jdwpTransportEnv; -#else -typedef const struct jdwpTransportNativeInterface_ *jdwpTransportEnv; -#endif /* __cplusplus */ - -/* - * Errors. Universal errors with JVMTI/JVMDI equivalents keep the - * values the same. - */ -typedef enum { - JDWPTRANSPORT_ERROR_NONE = 0, - JDWPTRANSPORT_ERROR_ILLEGAL_ARGUMENT = 103, - JDWPTRANSPORT_ERROR_OUT_OF_MEMORY = 110, - JDWPTRANSPORT_ERROR_INTERNAL = 113, - JDWPTRANSPORT_ERROR_ILLEGAL_STATE = 201, - JDWPTRANSPORT_ERROR_IO_ERROR = 202, - JDWPTRANSPORT_ERROR_TIMEOUT = 203, - JDWPTRANSPORT_ERROR_MSG_NOT_AVAILABLE = 204 -} jdwpTransportError; - - -/* - * Structure to define capabilities - */ -typedef struct { - unsigned int can_timeout_attach :1; - unsigned int can_timeout_accept :1; - unsigned int can_timeout_handshake :1; - unsigned int reserved3 :1; - unsigned int reserved4 :1; - unsigned int reserved5 :1; - unsigned int reserved6 :1; - unsigned int reserved7 :1; - unsigned int reserved8 :1; - unsigned int reserved9 :1; - unsigned int reserved10 :1; - unsigned int reserved11 :1; - unsigned int reserved12 :1; - unsigned int reserved13 :1; - unsigned int reserved14 :1; - unsigned int reserved15 :1; -} JDWPTransportCapabilities; - - -/* - * Structures to define packet layout. - * - * See: http://java.sun.com/j2se/1.5/docs/guide/jpda/jdwp-spec.html - */ - -enum { - JDWPTRANSPORT_FLAGS_NONE = 0x0, - JDWPTRANSPORT_FLAGS_REPLY = 0x80 -}; - -typedef struct { - jint len; - jint id; - jbyte flags; - jbyte cmdSet; - jbyte cmd; - jbyte *data; -} jdwpCmdPacket; - -typedef struct { - jint len; - jint id; - jbyte flags; - jshort errorCode; - jbyte *data; -} jdwpReplyPacket; - -typedef struct { - union { - jdwpCmdPacket cmd; - jdwpReplyPacket reply; - } type; -} jdwpPacket; - -/* - * JDWP functions called by the transport. - */ -typedef struct jdwpTransportCallback { - void *(*alloc)(jint numBytes); /* Call this for all allocations */ - void (*free)(void *buffer); /* Call this for all deallocations */ -} jdwpTransportCallback; - -typedef jint (JNICALL *jdwpTransport_OnLoad_t)(JavaVM *jvm, - jdwpTransportCallback *callback, - jint version, - jdwpTransportEnv** env); - - - -/* Function Interface */ - -struct jdwpTransportNativeInterface_ { - /* 1 : RESERVED */ - void *reserved1; - - /* 2 : Get Capabilities */ - jdwpTransportError (JNICALL *GetCapabilities)(jdwpTransportEnv* env, - JDWPTransportCapabilities *capabilities_ptr); - - /* 3 : Attach */ - jdwpTransportError (JNICALL *Attach)(jdwpTransportEnv* env, - const char* address, - jlong attach_timeout, - jlong handshake_timeout); - - /* 4: StartListening */ - jdwpTransportError (JNICALL *StartListening)(jdwpTransportEnv* env, - const char* address, - char** actual_address); - - /* 5: StopListening */ - jdwpTransportError (JNICALL *StopListening)(jdwpTransportEnv* env); - - /* 6: Accept */ - jdwpTransportError (JNICALL *Accept)(jdwpTransportEnv* env, - jlong accept_timeout, - jlong handshake_timeout); - - /* 7: IsOpen */ - jboolean (JNICALL *IsOpen)(jdwpTransportEnv* env); - - /* 8: Close */ - jdwpTransportError (JNICALL *Close)(jdwpTransportEnv* env); - - /* 9: ReadPacket */ - jdwpTransportError (JNICALL *ReadPacket)(jdwpTransportEnv* env, - jdwpPacket *pkt); - - /* 10: Write Packet */ - jdwpTransportError (JNICALL *WritePacket)(jdwpTransportEnv* env, - const jdwpPacket* pkt); - - /* 11: GetLastError */ - jdwpTransportError (JNICALL *GetLastError)(jdwpTransportEnv* env, - char** error); - -}; - - -/* - * Use inlined functions so that C++ code can use syntax such as - * env->Attach("mymachine:5000", 10*1000, 0); - * - * rather than using C's :- - * - * (*env)->Attach(env, "mymachine:5000", 10*1000, 0); - */ -struct _jdwpTransportEnv { - const struct jdwpTransportNativeInterface_ *functions; -#ifdef __cplusplus - - jdwpTransportError GetCapabilities(JDWPTransportCapabilities *capabilities_ptr) { - return functions->GetCapabilities(this, capabilities_ptr); - } - - jdwpTransportError Attach(const char* address, jlong attach_timeout, - jlong handshake_timeout) { - return functions->Attach(this, address, attach_timeout, handshake_timeout); - } - - jdwpTransportError StartListening(const char* address, - char** actual_address) { - return functions->StartListening(this, address, actual_address); - } - - jdwpTransportError StopListening(void) { - return functions->StopListening(this); - } - - jdwpTransportError Accept(jlong accept_timeout, jlong handshake_timeout) { - return functions->Accept(this, accept_timeout, handshake_timeout); - } - - jboolean IsOpen(void) { - return functions->IsOpen(this); - } - - jdwpTransportError Close(void) { - return functions->Close(this); - } - - jdwpTransportError ReadPacket(jdwpPacket *pkt) { - return functions->ReadPacket(this, pkt); - } - - jdwpTransportError WritePacket(const jdwpPacket* pkt) { - return functions->WritePacket(this, pkt); - } - - jdwpTransportError GetLastError(char** error) { - return functions->GetLastError(this, error); - } - - -#endif /* __cplusplus */ -}; - -#ifdef __cplusplus -} /* extern "C" */ -#endif /* __cplusplus */ - -#endif /* JDWPTRANSPORT_H */ - diff --git a/include/jni.h b/include/jni.h deleted file mode 100644 index 8ed7366..0000000 --- a/include/jni.h +++ /dev/null @@ -1,1944 +0,0 @@ -/* - * %W% %E% - * - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. - * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. - */ - -/* - * We used part of Netscape's Java Runtime Interface (JRI) as the starting - * point of our design and implementation. - */ - -/****************************************************************************** - * Java Runtime Interface - * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved. - *****************************************************************************/ - -#ifndef _JAVASOFT_JNI_H_ -#define _JAVASOFT_JNI_H_ - -#include -#include - -/* jni_md.h contains the machine-dependent typedefs for jbyte, jint - and jlong */ - -#include "jni_md.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * JNI Types - */ - -#ifndef JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H - -typedef unsigned char jboolean; -typedef unsigned short jchar; -typedef short jshort; -typedef float jfloat; -typedef double jdouble; - -typedef jint jsize; - -#ifdef __cplusplus - -class _jobject {}; -class _jclass : public _jobject {}; -class _jthrowable : public _jobject {}; -class _jstring : public _jobject {}; -class _jarray : public _jobject {}; -class _jbooleanArray : public _jarray {}; -class _jbyteArray : public _jarray {}; -class _jcharArray : public _jarray {}; -class _jshortArray : public _jarray {}; -class _jintArray : public _jarray {}; -class _jlongArray : public _jarray {}; -class _jfloatArray : public _jarray {}; -class _jdoubleArray : public _jarray {}; -class _jobjectArray : public _jarray {}; - -typedef _jobject *jobject; -typedef _jclass *jclass; -typedef _jthrowable *jthrowable; -typedef _jstring *jstring; -typedef _jarray *jarray; -typedef _jbooleanArray *jbooleanArray; -typedef _jbyteArray *jbyteArray; -typedef _jcharArray *jcharArray; -typedef _jshortArray *jshortArray; -typedef _jintArray *jintArray; -typedef _jlongArray *jlongArray; -typedef _jfloatArray *jfloatArray; -typedef _jdoubleArray *jdoubleArray; -typedef _jobjectArray *jobjectArray; - -#else - -struct _jobject; - -typedef struct _jobject *jobject; -typedef jobject jclass; -typedef jobject jthrowable; -typedef jobject jstring; -typedef jobject jarray; -typedef jarray jbooleanArray; -typedef jarray jbyteArray; -typedef jarray jcharArray; -typedef jarray jshortArray; -typedef jarray jintArray; -typedef jarray jlongArray; -typedef jarray jfloatArray; -typedef jarray jdoubleArray; -typedef jarray jobjectArray; - -#endif - -typedef jobject jweak; - -typedef union jvalue { - jboolean z; - jbyte b; - jchar c; - jshort s; - jint i; - jlong j; - jfloat f; - jdouble d; - jobject l; -} jvalue; - -struct _jfieldID; -typedef struct _jfieldID *jfieldID; - -struct _jmethodID; -typedef struct _jmethodID *jmethodID; - -/* Return values from jobjectRefType */ -typedef enum _jobjectType { - JNIInvalidRefType = 0, - JNILocalRefType = 1, - JNIGlobalRefType = 2, - JNIWeakGlobalRefType = 3 -} jobjectRefType; - - -#endif /* JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H */ - -/* - * jboolean constants - */ - -#define JNI_FALSE 0 -#define JNI_TRUE 1 - -/* - * possible return values for JNI functions. - */ - -#define JNI_OK 0 /* success */ -#define JNI_ERR (-1) /* unknown error */ -#define JNI_EDETACHED (-2) /* thread detached from the VM */ -#define JNI_EVERSION (-3) /* JNI version error */ -#define JNI_ENOMEM (-4) /* not enough memory */ -#define JNI_EEXIST (-5) /* VM already created */ -#define JNI_EINVAL (-6) /* invalid arguments */ - -/* - * used in ReleaseScalarArrayElements - */ - -#define JNI_COMMIT 1 -#define JNI_ABORT 2 - -/* - * used in RegisterNatives to describe native method name, signature, - * and function pointer. - */ - -typedef struct { - char *name; - char *signature; - void *fnPtr; -} JNINativeMethod; - -/* - * JNI Native Method Interface. - */ - -struct JNINativeInterface_; - -struct JNIEnv_; - -#ifdef __cplusplus -typedef JNIEnv_ JNIEnv; -#else -typedef const struct JNINativeInterface_ *JNIEnv; -#endif - -/* - * JNI Invocation Interface. - */ - -struct JNIInvokeInterface_; - -struct JavaVM_; - -#ifdef __cplusplus -typedef JavaVM_ JavaVM; -#else -typedef const struct JNIInvokeInterface_ *JavaVM; -#endif - -struct JNINativeInterface_ { - void *reserved0; - void *reserved1; - void *reserved2; - - void *reserved3; - jint (JNICALL *GetVersion)(JNIEnv *env); - - jclass (JNICALL *DefineClass) - (JNIEnv *env, const char *name, jobject loader, const jbyte *buf, - jsize len); - jclass (JNICALL *FindClass) - (JNIEnv *env, const char *name); - - jmethodID (JNICALL *FromReflectedMethod) - (JNIEnv *env, jobject method); - jfieldID (JNICALL *FromReflectedField) - (JNIEnv *env, jobject field); - - jobject (JNICALL *ToReflectedMethod) - (JNIEnv *env, jclass cls, jmethodID methodID, jboolean isStatic); - - jclass (JNICALL *GetSuperclass) - (JNIEnv *env, jclass sub); - jboolean (JNICALL *IsAssignableFrom) - (JNIEnv *env, jclass sub, jclass sup); - - jobject (JNICALL *ToReflectedField) - (JNIEnv *env, jclass cls, jfieldID fieldID, jboolean isStatic); - - jint (JNICALL *Throw) - (JNIEnv *env, jthrowable obj); - jint (JNICALL *ThrowNew) - (JNIEnv *env, jclass clazz, const char *msg); - jthrowable (JNICALL *ExceptionOccurred) - (JNIEnv *env); - void (JNICALL *ExceptionDescribe) - (JNIEnv *env); - void (JNICALL *ExceptionClear) - (JNIEnv *env); - void (JNICALL *FatalError) - (JNIEnv *env, const char *msg); - - jint (JNICALL *PushLocalFrame) - (JNIEnv *env, jint capacity); - jobject (JNICALL *PopLocalFrame) - (JNIEnv *env, jobject result); - - jobject (JNICALL *NewGlobalRef) - (JNIEnv *env, jobject lobj); - void (JNICALL *DeleteGlobalRef) - (JNIEnv *env, jobject gref); - void (JNICALL *DeleteLocalRef) - (JNIEnv *env, jobject obj); - jboolean (JNICALL *IsSameObject) - (JNIEnv *env, jobject obj1, jobject obj2); - jobject (JNICALL *NewLocalRef) - (JNIEnv *env, jobject ref); - jint (JNICALL *EnsureLocalCapacity) - (JNIEnv *env, jint capacity); - - jobject (JNICALL *AllocObject) - (JNIEnv *env, jclass clazz); - jobject (JNICALL *NewObject) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jobject (JNICALL *NewObjectV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jobject (JNICALL *NewObjectA) - (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); - - jclass (JNICALL *GetObjectClass) - (JNIEnv *env, jobject obj); - jboolean (JNICALL *IsInstanceOf) - (JNIEnv *env, jobject obj, jclass clazz); - - jmethodID (JNICALL *GetMethodID) - (JNIEnv *env, jclass clazz, const char *name, const char *sig); - - jobject (JNICALL *CallObjectMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jobject (JNICALL *CallObjectMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jobject (JNICALL *CallObjectMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args); - - jboolean (JNICALL *CallBooleanMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jboolean (JNICALL *CallBooleanMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jboolean (JNICALL *CallBooleanMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args); - - jbyte (JNICALL *CallByteMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jbyte (JNICALL *CallByteMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jbyte (JNICALL *CallByteMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); - - jchar (JNICALL *CallCharMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jchar (JNICALL *CallCharMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jchar (JNICALL *CallCharMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); - - jshort (JNICALL *CallShortMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jshort (JNICALL *CallShortMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jshort (JNICALL *CallShortMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); - - jint (JNICALL *CallIntMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jint (JNICALL *CallIntMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jint (JNICALL *CallIntMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); - - jlong (JNICALL *CallLongMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jlong (JNICALL *CallLongMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jlong (JNICALL *CallLongMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); - - jfloat (JNICALL *CallFloatMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jfloat (JNICALL *CallFloatMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jfloat (JNICALL *CallFloatMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); - - jdouble (JNICALL *CallDoubleMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jdouble (JNICALL *CallDoubleMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jdouble (JNICALL *CallDoubleMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); - - void (JNICALL *CallVoidMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - void (JNICALL *CallVoidMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - void (JNICALL *CallVoidMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args); - - jobject (JNICALL *CallNonvirtualObjectMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jobject (JNICALL *CallNonvirtualObjectMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jobject (JNICALL *CallNonvirtualObjectMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - const jvalue * args); - - jboolean (JNICALL *CallNonvirtualBooleanMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jboolean (JNICALL *CallNonvirtualBooleanMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jboolean (JNICALL *CallNonvirtualBooleanMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - const jvalue * args); - - jbyte (JNICALL *CallNonvirtualByteMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jbyte (JNICALL *CallNonvirtualByteMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jbyte (JNICALL *CallNonvirtualByteMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - const jvalue *args); - - jchar (JNICALL *CallNonvirtualCharMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jchar (JNICALL *CallNonvirtualCharMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jchar (JNICALL *CallNonvirtualCharMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - const jvalue *args); - - jshort (JNICALL *CallNonvirtualShortMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jshort (JNICALL *CallNonvirtualShortMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jshort (JNICALL *CallNonvirtualShortMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - const jvalue *args); - - jint (JNICALL *CallNonvirtualIntMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jint (JNICALL *CallNonvirtualIntMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jint (JNICALL *CallNonvirtualIntMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - const jvalue *args); - - jlong (JNICALL *CallNonvirtualLongMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jlong (JNICALL *CallNonvirtualLongMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jlong (JNICALL *CallNonvirtualLongMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - const jvalue *args); - - jfloat (JNICALL *CallNonvirtualFloatMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jfloat (JNICALL *CallNonvirtualFloatMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jfloat (JNICALL *CallNonvirtualFloatMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - const jvalue *args); - - jdouble (JNICALL *CallNonvirtualDoubleMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jdouble (JNICALL *CallNonvirtualDoubleMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jdouble (JNICALL *CallNonvirtualDoubleMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - const jvalue *args); - - void (JNICALL *CallNonvirtualVoidMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - void (JNICALL *CallNonvirtualVoidMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - void (JNICALL *CallNonvirtualVoidMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - const jvalue * args); - - jfieldID (JNICALL *GetFieldID) - (JNIEnv *env, jclass clazz, const char *name, const char *sig); - - jobject (JNICALL *GetObjectField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jboolean (JNICALL *GetBooleanField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jbyte (JNICALL *GetByteField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jchar (JNICALL *GetCharField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jshort (JNICALL *GetShortField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jint (JNICALL *GetIntField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jlong (JNICALL *GetLongField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jfloat (JNICALL *GetFloatField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jdouble (JNICALL *GetDoubleField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - - void (JNICALL *SetObjectField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jobject val); - void (JNICALL *SetBooleanField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jboolean val); - void (JNICALL *SetByteField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jbyte val); - void (JNICALL *SetCharField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jchar val); - void (JNICALL *SetShortField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jshort val); - void (JNICALL *SetIntField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jint val); - void (JNICALL *SetLongField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jlong val); - void (JNICALL *SetFloatField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jfloat val); - void (JNICALL *SetDoubleField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jdouble val); - - jmethodID (JNICALL *GetStaticMethodID) - (JNIEnv *env, jclass clazz, const char *name, const char *sig); - - jobject (JNICALL *CallStaticObjectMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jobject (JNICALL *CallStaticObjectMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jobject (JNICALL *CallStaticObjectMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); - - jboolean (JNICALL *CallStaticBooleanMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jboolean (JNICALL *CallStaticBooleanMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jboolean (JNICALL *CallStaticBooleanMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); - - jbyte (JNICALL *CallStaticByteMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jbyte (JNICALL *CallStaticByteMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jbyte (JNICALL *CallStaticByteMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); - - jchar (JNICALL *CallStaticCharMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jchar (JNICALL *CallStaticCharMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jchar (JNICALL *CallStaticCharMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); - - jshort (JNICALL *CallStaticShortMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jshort (JNICALL *CallStaticShortMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jshort (JNICALL *CallStaticShortMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); - - jint (JNICALL *CallStaticIntMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jint (JNICALL *CallStaticIntMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jint (JNICALL *CallStaticIntMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); - - jlong (JNICALL *CallStaticLongMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jlong (JNICALL *CallStaticLongMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jlong (JNICALL *CallStaticLongMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); - - jfloat (JNICALL *CallStaticFloatMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jfloat (JNICALL *CallStaticFloatMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jfloat (JNICALL *CallStaticFloatMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); - - jdouble (JNICALL *CallStaticDoubleMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jdouble (JNICALL *CallStaticDoubleMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jdouble (JNICALL *CallStaticDoubleMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); - - void (JNICALL *CallStaticVoidMethod) - (JNIEnv *env, jclass cls, jmethodID methodID, ...); - void (JNICALL *CallStaticVoidMethodV) - (JNIEnv *env, jclass cls, jmethodID methodID, va_list args); - void (JNICALL *CallStaticVoidMethodA) - (JNIEnv *env, jclass cls, jmethodID methodID, const jvalue * args); - - jfieldID (JNICALL *GetStaticFieldID) - (JNIEnv *env, jclass clazz, const char *name, const char *sig); - jobject (JNICALL *GetStaticObjectField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jboolean (JNICALL *GetStaticBooleanField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jbyte (JNICALL *GetStaticByteField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jchar (JNICALL *GetStaticCharField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jshort (JNICALL *GetStaticShortField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jint (JNICALL *GetStaticIntField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jlong (JNICALL *GetStaticLongField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jfloat (JNICALL *GetStaticFloatField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jdouble (JNICALL *GetStaticDoubleField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - - void (JNICALL *SetStaticObjectField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value); - void (JNICALL *SetStaticBooleanField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value); - void (JNICALL *SetStaticByteField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jbyte value); - void (JNICALL *SetStaticCharField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jchar value); - void (JNICALL *SetStaticShortField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value); - void (JNICALL *SetStaticIntField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jint value); - void (JNICALL *SetStaticLongField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jlong value); - void (JNICALL *SetStaticFloatField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value); - void (JNICALL *SetStaticDoubleField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value); - - jstring (JNICALL *NewString) - (JNIEnv *env, const jchar *unicode, jsize len); - jsize (JNICALL *GetStringLength) - (JNIEnv *env, jstring str); - const jchar *(JNICALL *GetStringChars) - (JNIEnv *env, jstring str, jboolean *isCopy); - void (JNICALL *ReleaseStringChars) - (JNIEnv *env, jstring str, const jchar *chars); - - jstring (JNICALL *NewStringUTF) - (JNIEnv *env, const char *utf); - jsize (JNICALL *GetStringUTFLength) - (JNIEnv *env, jstring str); - const char* (JNICALL *GetStringUTFChars) - (JNIEnv *env, jstring str, jboolean *isCopy); - void (JNICALL *ReleaseStringUTFChars) - (JNIEnv *env, jstring str, const char* chars); - - - jsize (JNICALL *GetArrayLength) - (JNIEnv *env, jarray array); - - jobjectArray (JNICALL *NewObjectArray) - (JNIEnv *env, jsize len, jclass clazz, jobject init); - jobject (JNICALL *GetObjectArrayElement) - (JNIEnv *env, jobjectArray array, jsize index); - void (JNICALL *SetObjectArrayElement) - (JNIEnv *env, jobjectArray array, jsize index, jobject val); - - jbooleanArray (JNICALL *NewBooleanArray) - (JNIEnv *env, jsize len); - jbyteArray (JNICALL *NewByteArray) - (JNIEnv *env, jsize len); - jcharArray (JNICALL *NewCharArray) - (JNIEnv *env, jsize len); - jshortArray (JNICALL *NewShortArray) - (JNIEnv *env, jsize len); - jintArray (JNICALL *NewIntArray) - (JNIEnv *env, jsize len); - jlongArray (JNICALL *NewLongArray) - (JNIEnv *env, jsize len); - jfloatArray (JNICALL *NewFloatArray) - (JNIEnv *env, jsize len); - jdoubleArray (JNICALL *NewDoubleArray) - (JNIEnv *env, jsize len); - - jboolean * (JNICALL *GetBooleanArrayElements) - (JNIEnv *env, jbooleanArray array, jboolean *isCopy); - jbyte * (JNICALL *GetByteArrayElements) - (JNIEnv *env, jbyteArray array, jboolean *isCopy); - jchar * (JNICALL *GetCharArrayElements) - (JNIEnv *env, jcharArray array, jboolean *isCopy); - jshort * (JNICALL *GetShortArrayElements) - (JNIEnv *env, jshortArray array, jboolean *isCopy); - jint * (JNICALL *GetIntArrayElements) - (JNIEnv *env, jintArray array, jboolean *isCopy); - jlong * (JNICALL *GetLongArrayElements) - (JNIEnv *env, jlongArray array, jboolean *isCopy); - jfloat * (JNICALL *GetFloatArrayElements) - (JNIEnv *env, jfloatArray array, jboolean *isCopy); - jdouble * (JNICALL *GetDoubleArrayElements) - (JNIEnv *env, jdoubleArray array, jboolean *isCopy); - - void (JNICALL *ReleaseBooleanArrayElements) - (JNIEnv *env, jbooleanArray array, jboolean *elems, jint mode); - void (JNICALL *ReleaseByteArrayElements) - (JNIEnv *env, jbyteArray array, jbyte *elems, jint mode); - void (JNICALL *ReleaseCharArrayElements) - (JNIEnv *env, jcharArray array, jchar *elems, jint mode); - void (JNICALL *ReleaseShortArrayElements) - (JNIEnv *env, jshortArray array, jshort *elems, jint mode); - void (JNICALL *ReleaseIntArrayElements) - (JNIEnv *env, jintArray array, jint *elems, jint mode); - void (JNICALL *ReleaseLongArrayElements) - (JNIEnv *env, jlongArray array, jlong *elems, jint mode); - void (JNICALL *ReleaseFloatArrayElements) - (JNIEnv *env, jfloatArray array, jfloat *elems, jint mode); - void (JNICALL *ReleaseDoubleArrayElements) - (JNIEnv *env, jdoubleArray array, jdouble *elems, jint mode); - - void (JNICALL *GetBooleanArrayRegion) - (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf); - void (JNICALL *GetByteArrayRegion) - (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf); - void (JNICALL *GetCharArrayRegion) - (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf); - void (JNICALL *GetShortArrayRegion) - (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf); - void (JNICALL *GetIntArrayRegion) - (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf); - void (JNICALL *GetLongArrayRegion) - (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf); - void (JNICALL *GetFloatArrayRegion) - (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf); - void (JNICALL *GetDoubleArrayRegion) - (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf); - - void (JNICALL *SetBooleanArrayRegion) - (JNIEnv *env, jbooleanArray array, jsize start, jsize l, const jboolean *buf); - void (JNICALL *SetByteArrayRegion) - (JNIEnv *env, jbyteArray array, jsize start, jsize len, const jbyte *buf); - void (JNICALL *SetCharArrayRegion) - (JNIEnv *env, jcharArray array, jsize start, jsize len, const jchar *buf); - void (JNICALL *SetShortArrayRegion) - (JNIEnv *env, jshortArray array, jsize start, jsize len, const jshort *buf); - void (JNICALL *SetIntArrayRegion) - (JNIEnv *env, jintArray array, jsize start, jsize len, const jint *buf); - void (JNICALL *SetLongArrayRegion) - (JNIEnv *env, jlongArray array, jsize start, jsize len, const jlong *buf); - void (JNICALL *SetFloatArrayRegion) - (JNIEnv *env, jfloatArray array, jsize start, jsize len, const jfloat *buf); - void (JNICALL *SetDoubleArrayRegion) - (JNIEnv *env, jdoubleArray array, jsize start, jsize len, const jdouble *buf); - - jint (JNICALL *RegisterNatives) - (JNIEnv *env, jclass clazz, const JNINativeMethod *methods, - jint nMethods); - jint (JNICALL *UnregisterNatives) - (JNIEnv *env, jclass clazz); - - jint (JNICALL *MonitorEnter) - (JNIEnv *env, jobject obj); - jint (JNICALL *MonitorExit) - (JNIEnv *env, jobject obj); - - jint (JNICALL *GetJavaVM) - (JNIEnv *env, JavaVM **vm); - - void (JNICALL *GetStringRegion) - (JNIEnv *env, jstring str, jsize start, jsize len, jchar *buf); - void (JNICALL *GetStringUTFRegion) - (JNIEnv *env, jstring str, jsize start, jsize len, char *buf); - - void * (JNICALL *GetPrimitiveArrayCritical) - (JNIEnv *env, jarray array, jboolean *isCopy); - void (JNICALL *ReleasePrimitiveArrayCritical) - (JNIEnv *env, jarray array, void *carray, jint mode); - - const jchar * (JNICALL *GetStringCritical) - (JNIEnv *env, jstring string, jboolean *isCopy); - void (JNICALL *ReleaseStringCritical) - (JNIEnv *env, jstring string, const jchar *cstring); - - jweak (JNICALL *NewWeakGlobalRef) - (JNIEnv *env, jobject obj); - void (JNICALL *DeleteWeakGlobalRef) - (JNIEnv *env, jweak ref); - - jboolean (JNICALL *ExceptionCheck) - (JNIEnv *env); - - jobject (JNICALL *NewDirectByteBuffer) - (JNIEnv* env, void* address, jlong capacity); - void* (JNICALL *GetDirectBufferAddress) - (JNIEnv* env, jobject buf); - jlong (JNICALL *GetDirectBufferCapacity) - (JNIEnv* env, jobject buf); - - /* New JNI 1.6 Features */ - - jobjectRefType (JNICALL *GetObjectRefType) - (JNIEnv* env, jobject obj); -}; - -/* - * We use inlined functions for C++ so that programmers can write: - * - * env->FindClass("java/lang/String") - * - * in C++ rather than: - * - * (*env)->FindClass(env, "java/lang/String") - * - * in C. - */ - -struct JNIEnv_ { - const struct JNINativeInterface_ *functions; -#ifdef __cplusplus - - jint GetVersion() { - return functions->GetVersion(this); - } - jclass DefineClass(const char *name, jobject loader, const jbyte *buf, - jsize len) { - return functions->DefineClass(this, name, loader, buf, len); - } - jclass FindClass(const char *name) { - return functions->FindClass(this, name); - } - jmethodID FromReflectedMethod(jobject method) { - return functions->FromReflectedMethod(this,method); - } - jfieldID FromReflectedField(jobject field) { - return functions->FromReflectedField(this,field); - } - - jobject ToReflectedMethod(jclass cls, jmethodID methodID, jboolean isStatic) { - return functions->ToReflectedMethod(this, cls, methodID, isStatic); - } - - jclass GetSuperclass(jclass sub) { - return functions->GetSuperclass(this, sub); - } - jboolean IsAssignableFrom(jclass sub, jclass sup) { - return functions->IsAssignableFrom(this, sub, sup); - } - - jobject ToReflectedField(jclass cls, jfieldID fieldID, jboolean isStatic) { - return functions->ToReflectedField(this,cls,fieldID,isStatic); - } - - jint Throw(jthrowable obj) { - return functions->Throw(this, obj); - } - jint ThrowNew(jclass clazz, const char *msg) { - return functions->ThrowNew(this, clazz, msg); - } - jthrowable ExceptionOccurred() { - return functions->ExceptionOccurred(this); - } - void ExceptionDescribe() { - functions->ExceptionDescribe(this); - } - void ExceptionClear() { - functions->ExceptionClear(this); - } - void FatalError(const char *msg) { - functions->FatalError(this, msg); - } - - jint PushLocalFrame(jint capacity) { - return functions->PushLocalFrame(this,capacity); - } - jobject PopLocalFrame(jobject result) { - return functions->PopLocalFrame(this,result); - } - - jobject NewGlobalRef(jobject lobj) { - return functions->NewGlobalRef(this,lobj); - } - void DeleteGlobalRef(jobject gref) { - functions->DeleteGlobalRef(this,gref); - } - void DeleteLocalRef(jobject obj) { - functions->DeleteLocalRef(this, obj); - } - - jboolean IsSameObject(jobject obj1, jobject obj2) { - return functions->IsSameObject(this,obj1,obj2); - } - - jobject NewLocalRef(jobject ref) { - return functions->NewLocalRef(this,ref); - } - jint EnsureLocalCapacity(jint capacity) { - return functions->EnsureLocalCapacity(this,capacity); - } - - jobject AllocObject(jclass clazz) { - return functions->AllocObject(this,clazz); - } - jobject NewObject(jclass clazz, jmethodID methodID, ...) { - va_list args; - jobject result; - va_start(args, methodID); - result = functions->NewObjectV(this,clazz,methodID,args); - va_end(args); - return result; - } - jobject NewObjectV(jclass clazz, jmethodID methodID, - va_list args) { - return functions->NewObjectV(this,clazz,methodID,args); - } - jobject NewObjectA(jclass clazz, jmethodID methodID, - const jvalue *args) { - return functions->NewObjectA(this,clazz,methodID,args); - } - - jclass GetObjectClass(jobject obj) { - return functions->GetObjectClass(this,obj); - } - jboolean IsInstanceOf(jobject obj, jclass clazz) { - return functions->IsInstanceOf(this,obj,clazz); - } - - jmethodID GetMethodID(jclass clazz, const char *name, - const char *sig) { - return functions->GetMethodID(this,clazz,name,sig); - } - - jobject CallObjectMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jobject result; - va_start(args,methodID); - result = functions->CallObjectMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jobject CallObjectMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallObjectMethodV(this,obj,methodID,args); - } - jobject CallObjectMethodA(jobject obj, jmethodID methodID, - const jvalue * args) { - return functions->CallObjectMethodA(this,obj,methodID,args); - } - - jboolean CallBooleanMethod(jobject obj, - jmethodID methodID, ...) { - va_list args; - jboolean result; - va_start(args,methodID); - result = functions->CallBooleanMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jboolean CallBooleanMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallBooleanMethodV(this,obj,methodID,args); - } - jboolean CallBooleanMethodA(jobject obj, jmethodID methodID, - const jvalue * args) { - return functions->CallBooleanMethodA(this,obj,methodID, args); - } - - jbyte CallByteMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jbyte result; - va_start(args,methodID); - result = functions->CallByteMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jbyte CallByteMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallByteMethodV(this,obj,methodID,args); - } - jbyte CallByteMethodA(jobject obj, jmethodID methodID, - const jvalue * args) { - return functions->CallByteMethodA(this,obj,methodID,args); - } - - jchar CallCharMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jchar result; - va_start(args,methodID); - result = functions->CallCharMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jchar CallCharMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallCharMethodV(this,obj,methodID,args); - } - jchar CallCharMethodA(jobject obj, jmethodID methodID, - const jvalue * args) { - return functions->CallCharMethodA(this,obj,methodID,args); - } - - jshort CallShortMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jshort result; - va_start(args,methodID); - result = functions->CallShortMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jshort CallShortMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallShortMethodV(this,obj,methodID,args); - } - jshort CallShortMethodA(jobject obj, jmethodID methodID, - const jvalue * args) { - return functions->CallShortMethodA(this,obj,methodID,args); - } - - jint CallIntMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jint result; - va_start(args,methodID); - result = functions->CallIntMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jint CallIntMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallIntMethodV(this,obj,methodID,args); - } - jint CallIntMethodA(jobject obj, jmethodID methodID, - const jvalue * args) { - return functions->CallIntMethodA(this,obj,methodID,args); - } - - jlong CallLongMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jlong result; - va_start(args,methodID); - result = functions->CallLongMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jlong CallLongMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallLongMethodV(this,obj,methodID,args); - } - jlong CallLongMethodA(jobject obj, jmethodID methodID, - const jvalue * args) { - return functions->CallLongMethodA(this,obj,methodID,args); - } - - jfloat CallFloatMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jfloat result; - va_start(args,methodID); - result = functions->CallFloatMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jfloat CallFloatMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallFloatMethodV(this,obj,methodID,args); - } - jfloat CallFloatMethodA(jobject obj, jmethodID methodID, - const jvalue * args) { - return functions->CallFloatMethodA(this,obj,methodID,args); - } - - jdouble CallDoubleMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jdouble result; - va_start(args,methodID); - result = functions->CallDoubleMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jdouble CallDoubleMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallDoubleMethodV(this,obj,methodID,args); - } - jdouble CallDoubleMethodA(jobject obj, jmethodID methodID, - const jvalue * args) { - return functions->CallDoubleMethodA(this,obj,methodID,args); - } - - void CallVoidMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - va_start(args,methodID); - functions->CallVoidMethodV(this,obj,methodID,args); - va_end(args); - } - void CallVoidMethodV(jobject obj, jmethodID methodID, - va_list args) { - functions->CallVoidMethodV(this,obj,methodID,args); - } - void CallVoidMethodA(jobject obj, jmethodID methodID, - const jvalue * args) { - functions->CallVoidMethodA(this,obj,methodID,args); - } - - jobject CallNonvirtualObjectMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jobject result; - va_start(args,methodID); - result = functions->CallNonvirtualObjectMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jobject CallNonvirtualObjectMethodV(jobject obj, jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallNonvirtualObjectMethodV(this,obj,clazz, - methodID,args); - } - jobject CallNonvirtualObjectMethodA(jobject obj, jclass clazz, - jmethodID methodID, const jvalue * args) { - return functions->CallNonvirtualObjectMethodA(this,obj,clazz, - methodID,args); - } - - jboolean CallNonvirtualBooleanMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jboolean result; - va_start(args,methodID); - result = functions->CallNonvirtualBooleanMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jboolean CallNonvirtualBooleanMethodV(jobject obj, jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallNonvirtualBooleanMethodV(this,obj,clazz, - methodID,args); - } - jboolean CallNonvirtualBooleanMethodA(jobject obj, jclass clazz, - jmethodID methodID, const jvalue * args) { - return functions->CallNonvirtualBooleanMethodA(this,obj,clazz, - methodID, args); - } - - jbyte CallNonvirtualByteMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jbyte result; - va_start(args,methodID); - result = functions->CallNonvirtualByteMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jbyte CallNonvirtualByteMethodV(jobject obj, jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallNonvirtualByteMethodV(this,obj,clazz, - methodID,args); - } - jbyte CallNonvirtualByteMethodA(jobject obj, jclass clazz, - jmethodID methodID, const jvalue * args) { - return functions->CallNonvirtualByteMethodA(this,obj,clazz, - methodID,args); - } - - jchar CallNonvirtualCharMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jchar result; - va_start(args,methodID); - result = functions->CallNonvirtualCharMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jchar CallNonvirtualCharMethodV(jobject obj, jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallNonvirtualCharMethodV(this,obj,clazz, - methodID,args); - } - jchar CallNonvirtualCharMethodA(jobject obj, jclass clazz, - jmethodID methodID, const jvalue * args) { - return functions->CallNonvirtualCharMethodA(this,obj,clazz, - methodID,args); - } - - jshort CallNonvirtualShortMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jshort result; - va_start(args,methodID); - result = functions->CallNonvirtualShortMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jshort CallNonvirtualShortMethodV(jobject obj, jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallNonvirtualShortMethodV(this,obj,clazz, - methodID,args); - } - jshort CallNonvirtualShortMethodA(jobject obj, jclass clazz, - jmethodID methodID, const jvalue * args) { - return functions->CallNonvirtualShortMethodA(this,obj,clazz, - methodID,args); - } - - jint CallNonvirtualIntMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jint result; - va_start(args,methodID); - result = functions->CallNonvirtualIntMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jint CallNonvirtualIntMethodV(jobject obj, jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallNonvirtualIntMethodV(this,obj,clazz, - methodID,args); - } - jint CallNonvirtualIntMethodA(jobject obj, jclass clazz, - jmethodID methodID, const jvalue * args) { - return functions->CallNonvirtualIntMethodA(this,obj,clazz, - methodID,args); - } - - jlong CallNonvirtualLongMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jlong result; - va_start(args,methodID); - result = functions->CallNonvirtualLongMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jlong CallNonvirtualLongMethodV(jobject obj, jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallNonvirtualLongMethodV(this,obj,clazz, - methodID,args); - } - jlong CallNonvirtualLongMethodA(jobject obj, jclass clazz, - jmethodID methodID, const jvalue * args) { - return functions->CallNonvirtualLongMethodA(this,obj,clazz, - methodID,args); - } - - jfloat CallNonvirtualFloatMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jfloat result; - va_start(args,methodID); - result = functions->CallNonvirtualFloatMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jfloat CallNonvirtualFloatMethodV(jobject obj, jclass clazz, - jmethodID methodID, - va_list args) { - return functions->CallNonvirtualFloatMethodV(this,obj,clazz, - methodID,args); - } - jfloat CallNonvirtualFloatMethodA(jobject obj, jclass clazz, - jmethodID methodID, - const jvalue * args) { - return functions->CallNonvirtualFloatMethodA(this,obj,clazz, - methodID,args); - } - - jdouble CallNonvirtualDoubleMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jdouble result; - va_start(args,methodID); - result = functions->CallNonvirtualDoubleMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jdouble CallNonvirtualDoubleMethodV(jobject obj, jclass clazz, - jmethodID methodID, - va_list args) { - return functions->CallNonvirtualDoubleMethodV(this,obj,clazz, - methodID,args); - } - jdouble CallNonvirtualDoubleMethodA(jobject obj, jclass clazz, - jmethodID methodID, - const jvalue * args) { - return functions->CallNonvirtualDoubleMethodA(this,obj,clazz, - methodID,args); - } - - void CallNonvirtualVoidMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - va_start(args,methodID); - functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args); - va_end(args); - } - void CallNonvirtualVoidMethodV(jobject obj, jclass clazz, - jmethodID methodID, - va_list args) { - functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args); - } - void CallNonvirtualVoidMethodA(jobject obj, jclass clazz, - jmethodID methodID, - const jvalue * args) { - functions->CallNonvirtualVoidMethodA(this,obj,clazz,methodID,args); - } - - jfieldID GetFieldID(jclass clazz, const char *name, - const char *sig) { - return functions->GetFieldID(this,clazz,name,sig); - } - - jobject GetObjectField(jobject obj, jfieldID fieldID) { - return functions->GetObjectField(this,obj,fieldID); - } - jboolean GetBooleanField(jobject obj, jfieldID fieldID) { - return functions->GetBooleanField(this,obj,fieldID); - } - jbyte GetByteField(jobject obj, jfieldID fieldID) { - return functions->GetByteField(this,obj,fieldID); - } - jchar GetCharField(jobject obj, jfieldID fieldID) { - return functions->GetCharField(this,obj,fieldID); - } - jshort GetShortField(jobject obj, jfieldID fieldID) { - return functions->GetShortField(this,obj,fieldID); - } - jint GetIntField(jobject obj, jfieldID fieldID) { - return functions->GetIntField(this,obj,fieldID); - } - jlong GetLongField(jobject obj, jfieldID fieldID) { - return functions->GetLongField(this,obj,fieldID); - } - jfloat GetFloatField(jobject obj, jfieldID fieldID) { - return functions->GetFloatField(this,obj,fieldID); - } - jdouble GetDoubleField(jobject obj, jfieldID fieldID) { - return functions->GetDoubleField(this,obj,fieldID); - } - - void SetObjectField(jobject obj, jfieldID fieldID, jobject val) { - functions->SetObjectField(this,obj,fieldID,val); - } - void SetBooleanField(jobject obj, jfieldID fieldID, - jboolean val) { - functions->SetBooleanField(this,obj,fieldID,val); - } - void SetByteField(jobject obj, jfieldID fieldID, - jbyte val) { - functions->SetByteField(this,obj,fieldID,val); - } - void SetCharField(jobject obj, jfieldID fieldID, - jchar val) { - functions->SetCharField(this,obj,fieldID,val); - } - void SetShortField(jobject obj, jfieldID fieldID, - jshort val) { - functions->SetShortField(this,obj,fieldID,val); - } - void SetIntField(jobject obj, jfieldID fieldID, - jint val) { - functions->SetIntField(this,obj,fieldID,val); - } - void SetLongField(jobject obj, jfieldID fieldID, - jlong val) { - functions->SetLongField(this,obj,fieldID,val); - } - void SetFloatField(jobject obj, jfieldID fieldID, - jfloat val) { - functions->SetFloatField(this,obj,fieldID,val); - } - void SetDoubleField(jobject obj, jfieldID fieldID, - jdouble val) { - functions->SetDoubleField(this,obj,fieldID,val); - } - - jmethodID GetStaticMethodID(jclass clazz, const char *name, - const char *sig) { - return functions->GetStaticMethodID(this,clazz,name,sig); - } - - jobject CallStaticObjectMethod(jclass clazz, jmethodID methodID, - ...) { - va_list args; - jobject result; - va_start(args,methodID); - result = functions->CallStaticObjectMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jobject CallStaticObjectMethodV(jclass clazz, jmethodID methodID, - va_list args) { - return functions->CallStaticObjectMethodV(this,clazz,methodID,args); - } - jobject CallStaticObjectMethodA(jclass clazz, jmethodID methodID, - const jvalue *args) { - return functions->CallStaticObjectMethodA(this,clazz,methodID,args); - } - - jboolean CallStaticBooleanMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jboolean result; - va_start(args,methodID); - result = functions->CallStaticBooleanMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jboolean CallStaticBooleanMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticBooleanMethodV(this,clazz,methodID,args); - } - jboolean CallStaticBooleanMethodA(jclass clazz, - jmethodID methodID, const jvalue *args) { - return functions->CallStaticBooleanMethodA(this,clazz,methodID,args); - } - - jbyte CallStaticByteMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jbyte result; - va_start(args,methodID); - result = functions->CallStaticByteMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jbyte CallStaticByteMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticByteMethodV(this,clazz,methodID,args); - } - jbyte CallStaticByteMethodA(jclass clazz, - jmethodID methodID, const jvalue *args) { - return functions->CallStaticByteMethodA(this,clazz,methodID,args); - } - - jchar CallStaticCharMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jchar result; - va_start(args,methodID); - result = functions->CallStaticCharMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jchar CallStaticCharMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticCharMethodV(this,clazz,methodID,args); - } - jchar CallStaticCharMethodA(jclass clazz, - jmethodID methodID, const jvalue *args) { - return functions->CallStaticCharMethodA(this,clazz,methodID,args); - } - - jshort CallStaticShortMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jshort result; - va_start(args,methodID); - result = functions->CallStaticShortMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jshort CallStaticShortMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticShortMethodV(this,clazz,methodID,args); - } - jshort CallStaticShortMethodA(jclass clazz, - jmethodID methodID, const jvalue *args) { - return functions->CallStaticShortMethodA(this,clazz,methodID,args); - } - - jint CallStaticIntMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jint result; - va_start(args,methodID); - result = functions->CallStaticIntMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jint CallStaticIntMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticIntMethodV(this,clazz,methodID,args); - } - jint CallStaticIntMethodA(jclass clazz, - jmethodID methodID, const jvalue *args) { - return functions->CallStaticIntMethodA(this,clazz,methodID,args); - } - - jlong CallStaticLongMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jlong result; - va_start(args,methodID); - result = functions->CallStaticLongMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jlong CallStaticLongMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticLongMethodV(this,clazz,methodID,args); - } - jlong CallStaticLongMethodA(jclass clazz, - jmethodID methodID, const jvalue *args) { - return functions->CallStaticLongMethodA(this,clazz,methodID,args); - } - - jfloat CallStaticFloatMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jfloat result; - va_start(args,methodID); - result = functions->CallStaticFloatMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jfloat CallStaticFloatMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticFloatMethodV(this,clazz,methodID,args); - } - jfloat CallStaticFloatMethodA(jclass clazz, - jmethodID methodID, const jvalue *args) { - return functions->CallStaticFloatMethodA(this,clazz,methodID,args); - } - - jdouble CallStaticDoubleMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jdouble result; - va_start(args,methodID); - result = functions->CallStaticDoubleMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jdouble CallStaticDoubleMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticDoubleMethodV(this,clazz,methodID,args); - } - jdouble CallStaticDoubleMethodA(jclass clazz, - jmethodID methodID, const jvalue *args) { - return functions->CallStaticDoubleMethodA(this,clazz,methodID,args); - } - - void CallStaticVoidMethod(jclass cls, jmethodID methodID, ...) { - va_list args; - va_start(args,methodID); - functions->CallStaticVoidMethodV(this,cls,methodID,args); - va_end(args); - } - void CallStaticVoidMethodV(jclass cls, jmethodID methodID, - va_list args) { - functions->CallStaticVoidMethodV(this,cls,methodID,args); - } - void CallStaticVoidMethodA(jclass cls, jmethodID methodID, - const jvalue * args) { - functions->CallStaticVoidMethodA(this,cls,methodID,args); - } - - jfieldID GetStaticFieldID(jclass clazz, const char *name, - const char *sig) { - return functions->GetStaticFieldID(this,clazz,name,sig); - } - jobject GetStaticObjectField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticObjectField(this,clazz,fieldID); - } - jboolean GetStaticBooleanField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticBooleanField(this,clazz,fieldID); - } - jbyte GetStaticByteField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticByteField(this,clazz,fieldID); - } - jchar GetStaticCharField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticCharField(this,clazz,fieldID); - } - jshort GetStaticShortField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticShortField(this,clazz,fieldID); - } - jint GetStaticIntField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticIntField(this,clazz,fieldID); - } - jlong GetStaticLongField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticLongField(this,clazz,fieldID); - } - jfloat GetStaticFloatField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticFloatField(this,clazz,fieldID); - } - jdouble GetStaticDoubleField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticDoubleField(this,clazz,fieldID); - } - - void SetStaticObjectField(jclass clazz, jfieldID fieldID, - jobject value) { - functions->SetStaticObjectField(this,clazz,fieldID,value); - } - void SetStaticBooleanField(jclass clazz, jfieldID fieldID, - jboolean value) { - functions->SetStaticBooleanField(this,clazz,fieldID,value); - } - void SetStaticByteField(jclass clazz, jfieldID fieldID, - jbyte value) { - functions->SetStaticByteField(this,clazz,fieldID,value); - } - void SetStaticCharField(jclass clazz, jfieldID fieldID, - jchar value) { - functions->SetStaticCharField(this,clazz,fieldID,value); - } - void SetStaticShortField(jclass clazz, jfieldID fieldID, - jshort value) { - functions->SetStaticShortField(this,clazz,fieldID,value); - } - void SetStaticIntField(jclass clazz, jfieldID fieldID, - jint value) { - functions->SetStaticIntField(this,clazz,fieldID,value); - } - void SetStaticLongField(jclass clazz, jfieldID fieldID, - jlong value) { - functions->SetStaticLongField(this,clazz,fieldID,value); - } - void SetStaticFloatField(jclass clazz, jfieldID fieldID, - jfloat value) { - functions->SetStaticFloatField(this,clazz,fieldID,value); - } - void SetStaticDoubleField(jclass clazz, jfieldID fieldID, - jdouble value) { - functions->SetStaticDoubleField(this,clazz,fieldID,value); - } - - jstring NewString(const jchar *unicode, jsize len) { - return functions->NewString(this,unicode,len); - } - jsize GetStringLength(jstring str) { - return functions->GetStringLength(this,str); - } - const jchar *GetStringChars(jstring str, jboolean *isCopy) { - return functions->GetStringChars(this,str,isCopy); - } - void ReleaseStringChars(jstring str, const jchar *chars) { - functions->ReleaseStringChars(this,str,chars); - } - - jstring NewStringUTF(const char *utf) { - return functions->NewStringUTF(this,utf); - } - jsize GetStringUTFLength(jstring str) { - return functions->GetStringUTFLength(this,str); - } - const char* GetStringUTFChars(jstring str, jboolean *isCopy) { - return functions->GetStringUTFChars(this,str,isCopy); - } - void ReleaseStringUTFChars(jstring str, const char* chars) { - functions->ReleaseStringUTFChars(this,str,chars); - } - - jsize GetArrayLength(jarray array) { - return functions->GetArrayLength(this,array); - } - - jobjectArray NewObjectArray(jsize len, jclass clazz, - jobject init) { - return functions->NewObjectArray(this,len,clazz,init); - } - jobject GetObjectArrayElement(jobjectArray array, jsize index) { - return functions->GetObjectArrayElement(this,array,index); - } - void SetObjectArrayElement(jobjectArray array, jsize index, - jobject val) { - functions->SetObjectArrayElement(this,array,index,val); - } - - jbooleanArray NewBooleanArray(jsize len) { - return functions->NewBooleanArray(this,len); - } - jbyteArray NewByteArray(jsize len) { - return functions->NewByteArray(this,len); - } - jcharArray NewCharArray(jsize len) { - return functions->NewCharArray(this,len); - } - jshortArray NewShortArray(jsize len) { - return functions->NewShortArray(this,len); - } - jintArray NewIntArray(jsize len) { - return functions->NewIntArray(this,len); - } - jlongArray NewLongArray(jsize len) { - return functions->NewLongArray(this,len); - } - jfloatArray NewFloatArray(jsize len) { - return functions->NewFloatArray(this,len); - } - jdoubleArray NewDoubleArray(jsize len) { - return functions->NewDoubleArray(this,len); - } - - jboolean * GetBooleanArrayElements(jbooleanArray array, jboolean *isCopy) { - return functions->GetBooleanArrayElements(this,array,isCopy); - } - jbyte * GetByteArrayElements(jbyteArray array, jboolean *isCopy) { - return functions->GetByteArrayElements(this,array,isCopy); - } - jchar * GetCharArrayElements(jcharArray array, jboolean *isCopy) { - return functions->GetCharArrayElements(this,array,isCopy); - } - jshort * GetShortArrayElements(jshortArray array, jboolean *isCopy) { - return functions->GetShortArrayElements(this,array,isCopy); - } - jint * GetIntArrayElements(jintArray array, jboolean *isCopy) { - return functions->GetIntArrayElements(this,array,isCopy); - } - jlong * GetLongArrayElements(jlongArray array, jboolean *isCopy) { - return functions->GetLongArrayElements(this,array,isCopy); - } - jfloat * GetFloatArrayElements(jfloatArray array, jboolean *isCopy) { - return functions->GetFloatArrayElements(this,array,isCopy); - } - jdouble * GetDoubleArrayElements(jdoubleArray array, jboolean *isCopy) { - return functions->GetDoubleArrayElements(this,array,isCopy); - } - - void ReleaseBooleanArrayElements(jbooleanArray array, - jboolean *elems, - jint mode) { - functions->ReleaseBooleanArrayElements(this,array,elems,mode); - } - void ReleaseByteArrayElements(jbyteArray array, - jbyte *elems, - jint mode) { - functions->ReleaseByteArrayElements(this,array,elems,mode); - } - void ReleaseCharArrayElements(jcharArray array, - jchar *elems, - jint mode) { - functions->ReleaseCharArrayElements(this,array,elems,mode); - } - void ReleaseShortArrayElements(jshortArray array, - jshort *elems, - jint mode) { - functions->ReleaseShortArrayElements(this,array,elems,mode); - } - void ReleaseIntArrayElements(jintArray array, - jint *elems, - jint mode) { - functions->ReleaseIntArrayElements(this,array,elems,mode); - } - void ReleaseLongArrayElements(jlongArray array, - jlong *elems, - jint mode) { - functions->ReleaseLongArrayElements(this,array,elems,mode); - } - void ReleaseFloatArrayElements(jfloatArray array, - jfloat *elems, - jint mode) { - functions->ReleaseFloatArrayElements(this,array,elems,mode); - } - void ReleaseDoubleArrayElements(jdoubleArray array, - jdouble *elems, - jint mode) { - functions->ReleaseDoubleArrayElements(this,array,elems,mode); - } - - void GetBooleanArrayRegion(jbooleanArray array, - jsize start, jsize len, jboolean *buf) { - functions->GetBooleanArrayRegion(this,array,start,len,buf); - } - void GetByteArrayRegion(jbyteArray array, - jsize start, jsize len, jbyte *buf) { - functions->GetByteArrayRegion(this,array,start,len,buf); - } - void GetCharArrayRegion(jcharArray array, - jsize start, jsize len, jchar *buf) { - functions->GetCharArrayRegion(this,array,start,len,buf); - } - void GetShortArrayRegion(jshortArray array, - jsize start, jsize len, jshort *buf) { - functions->GetShortArrayRegion(this,array,start,len,buf); - } - void GetIntArrayRegion(jintArray array, - jsize start, jsize len, jint *buf) { - functions->GetIntArrayRegion(this,array,start,len,buf); - } - void GetLongArrayRegion(jlongArray array, - jsize start, jsize len, jlong *buf) { - functions->GetLongArrayRegion(this,array,start,len,buf); - } - void GetFloatArrayRegion(jfloatArray array, - jsize start, jsize len, jfloat *buf) { - functions->GetFloatArrayRegion(this,array,start,len,buf); - } - void GetDoubleArrayRegion(jdoubleArray array, - jsize start, jsize len, jdouble *buf) { - functions->GetDoubleArrayRegion(this,array,start,len,buf); - } - - void SetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len, - const jboolean *buf) { - functions->SetBooleanArrayRegion(this,array,start,len,buf); - } - void SetByteArrayRegion(jbyteArray array, jsize start, jsize len, - const jbyte *buf) { - functions->SetByteArrayRegion(this,array,start,len,buf); - } - void SetCharArrayRegion(jcharArray array, jsize start, jsize len, - const jchar *buf) { - functions->SetCharArrayRegion(this,array,start,len,buf); - } - void SetShortArrayRegion(jshortArray array, jsize start, jsize len, - const jshort *buf) { - functions->SetShortArrayRegion(this,array,start,len,buf); - } - void SetIntArrayRegion(jintArray array, jsize start, jsize len, - const jint *buf) { - functions->SetIntArrayRegion(this,array,start,len,buf); - } - void SetLongArrayRegion(jlongArray array, jsize start, jsize len, - const jlong *buf) { - functions->SetLongArrayRegion(this,array,start,len,buf); - } - void SetFloatArrayRegion(jfloatArray array, jsize start, jsize len, - const jfloat *buf) { - functions->SetFloatArrayRegion(this,array,start,len,buf); - } - void SetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len, - const jdouble *buf) { - functions->SetDoubleArrayRegion(this,array,start,len,buf); - } - - jint RegisterNatives(jclass clazz, const JNINativeMethod *methods, - jint nMethods) { - return functions->RegisterNatives(this,clazz,methods,nMethods); - } - jint UnregisterNatives(jclass clazz) { - return functions->UnregisterNatives(this,clazz); - } - - jint MonitorEnter(jobject obj) { - return functions->MonitorEnter(this,obj); - } - jint MonitorExit(jobject obj) { - return functions->MonitorExit(this,obj); - } - - jint GetJavaVM(JavaVM **vm) { - return functions->GetJavaVM(this,vm); - } - - void GetStringRegion(jstring str, jsize start, jsize len, jchar *buf) { - functions->GetStringRegion(this,str,start,len,buf); - } - void GetStringUTFRegion(jstring str, jsize start, jsize len, char *buf) { - functions->GetStringUTFRegion(this,str,start,len,buf); - } - - void * GetPrimitiveArrayCritical(jarray array, jboolean *isCopy) { - return functions->GetPrimitiveArrayCritical(this,array,isCopy); - } - void ReleasePrimitiveArrayCritical(jarray array, void *carray, jint mode) { - functions->ReleasePrimitiveArrayCritical(this,array,carray,mode); - } - - const jchar * GetStringCritical(jstring string, jboolean *isCopy) { - return functions->GetStringCritical(this,string,isCopy); - } - void ReleaseStringCritical(jstring string, const jchar *cstring) { - functions->ReleaseStringCritical(this,string,cstring); - } - - jweak NewWeakGlobalRef(jobject obj) { - return functions->NewWeakGlobalRef(this,obj); - } - void DeleteWeakGlobalRef(jweak ref) { - functions->DeleteWeakGlobalRef(this,ref); - } - - jboolean ExceptionCheck() { - return functions->ExceptionCheck(this); - } - - jobject NewDirectByteBuffer(void* address, jlong capacity) { - return functions->NewDirectByteBuffer(this, address, capacity); - } - void* GetDirectBufferAddress(jobject buf) { - return functions->GetDirectBufferAddress(this, buf); - } - jlong GetDirectBufferCapacity(jobject buf) { - return functions->GetDirectBufferCapacity(this, buf); - } - jobjectRefType GetObjectRefType(jobject obj) { - return functions->GetObjectRefType(this, obj); - } - -#endif /* __cplusplus */ -}; - -typedef struct JavaVMOption { - char *optionString; - void *extraInfo; -} JavaVMOption; - -typedef struct JavaVMInitArgs { - jint version; - - jint nOptions; - JavaVMOption *options; - jboolean ignoreUnrecognized; -} JavaVMInitArgs; - -typedef struct JavaVMAttachArgs { - jint version; - - char *name; - jobject group; -} JavaVMAttachArgs; - -/* These will be VM-specific. */ - -#define JDK1_2 -#define JDK1_4 - -/* End VM-specific. */ - -struct JNIInvokeInterface_ { - void *reserved0; - void *reserved1; - void *reserved2; - - jint (JNICALL *DestroyJavaVM)(JavaVM *vm); - - jint (JNICALL *AttachCurrentThread)(JavaVM *vm, void **penv, void *args); - - jint (JNICALL *DetachCurrentThread)(JavaVM *vm); - - jint (JNICALL *GetEnv)(JavaVM *vm, void **penv, jint version); - - jint (JNICALL *AttachCurrentThreadAsDaemon)(JavaVM *vm, void **penv, void *args); -}; - -struct JavaVM_ { - const struct JNIInvokeInterface_ *functions; -#ifdef __cplusplus - - jint DestroyJavaVM() { - return functions->DestroyJavaVM(this); - } - jint AttachCurrentThread(void **penv, void *args) { - return functions->AttachCurrentThread(this, penv, args); - } - jint DetachCurrentThread() { - return functions->DetachCurrentThread(this); - } - - jint GetEnv(void **penv, jint version) { - return functions->GetEnv(this, penv, version); - } - jint AttachCurrentThreadAsDaemon(void **penv, void *args) { - return functions->AttachCurrentThreadAsDaemon(this, penv, args); - } -#endif -}; - -#ifdef _JNI_IMPLEMENTATION_ -#define _JNI_IMPORT_OR_EXPORT_ JNIEXPORT -#else -#define _JNI_IMPORT_OR_EXPORT_ JNIIMPORT -#endif -_JNI_IMPORT_OR_EXPORT_ jint JNICALL -JNI_GetDefaultJavaVMInitArgs(void *args); - -_JNI_IMPORT_OR_EXPORT_ jint JNICALL -JNI_CreateJavaVM(JavaVM **pvm, void **penv, void *args); - -_JNI_IMPORT_OR_EXPORT_ jint JNICALL -JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *); - -/* Defined by native libraries. */ -JNIEXPORT jint JNICALL -JNI_OnLoad(JavaVM *vm, void *reserved); - -JNIEXPORT void JNICALL -JNI_OnUnload(JavaVM *vm, void *reserved); - -#define JNI_VERSION_1_1 0x00010001 -#define JNI_VERSION_1_2 0x00010002 -#define JNI_VERSION_1_4 0x00010004 -#define JNI_VERSION_1_6 0x00010006 - -#ifdef __cplusplus -} /* extern "C" */ -#endif /* __cplusplus */ - -#endif /* !_JAVASOFT_JNI_H_ */ - - - diff --git a/include/jvmti.h b/include/jvmti.h deleted file mode 100644 index 865f21e..0000000 --- a/include/jvmti.h +++ /dev/null @@ -1,2504 +0,0 @@ -#ifdef USE_PRAGMA_IDENT_HDR -#pragma ident "@(#)jvmtiLib.xsl 1.38 06/08/02 23:22:31 JVM" -#endif -/* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. - * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. - */ - - /* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */ - - - /* Include file for the Java(tm) Virtual Machine Tool Interface */ - -#ifndef _JAVA_JVMTI_H_ -#define _JAVA_JVMTI_H_ - -#include "jni.h" - -#ifdef __cplusplus -extern "C" { -#endif - -enum { - JVMTI_VERSION_1 = 0x30010000, - JVMTI_VERSION_1_0 = 0x30010000, - JVMTI_VERSION_1_1 = 0x30010100, - - JVMTI_VERSION = 0x30000000 + (1 * 0x10000) + (1 * 0x100) + 102 /* version: 1.1.102 */ -}; - -JNIEXPORT jint JNICALL -Agent_OnLoad(JavaVM *vm, char *options, void *reserved); - -JNIEXPORT jint JNICALL -Agent_OnAttach(JavaVM* vm, char* options, void* reserved); - -JNIEXPORT void JNICALL -Agent_OnUnload(JavaVM *vm); - - /* Forward declaration of the environment */ - -struct _jvmtiEnv; - -struct jvmtiInterface_1_; - -#ifdef __cplusplus -typedef _jvmtiEnv jvmtiEnv; -#else -typedef const struct jvmtiInterface_1_ *jvmtiEnv; -#endif /* __cplusplus */ - -/* Derived Base Types */ - -typedef jobject jthread; -typedef jobject jthreadGroup; -typedef jlong jlocation; -struct _jrawMonitorID; -typedef struct _jrawMonitorID *jrawMonitorID; -typedef struct JNINativeInterface_ jniNativeInterface; - - /* Constants */ - - - /* Thread State Flags */ - -enum { - JVMTI_THREAD_STATE_ALIVE = 0x0001, - JVMTI_THREAD_STATE_TERMINATED = 0x0002, - JVMTI_THREAD_STATE_RUNNABLE = 0x0004, - JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER = 0x0400, - JVMTI_THREAD_STATE_WAITING = 0x0080, - JVMTI_THREAD_STATE_WAITING_INDEFINITELY = 0x0010, - JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT = 0x0020, - JVMTI_THREAD_STATE_SLEEPING = 0x0040, - JVMTI_THREAD_STATE_IN_OBJECT_WAIT = 0x0100, - JVMTI_THREAD_STATE_PARKED = 0x0200, - JVMTI_THREAD_STATE_SUSPENDED = 0x100000, - JVMTI_THREAD_STATE_INTERRUPTED = 0x200000, - JVMTI_THREAD_STATE_IN_NATIVE = 0x400000, - JVMTI_THREAD_STATE_VENDOR_1 = 0x10000000, - JVMTI_THREAD_STATE_VENDOR_2 = 0x20000000, - JVMTI_THREAD_STATE_VENDOR_3 = 0x40000000 -}; - - /* java.lang.Thread.State Conversion Masks */ - -enum { - JVMTI_JAVA_LANG_THREAD_STATE_MASK = JVMTI_THREAD_STATE_TERMINATED | JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_RUNNABLE | JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_INDEFINITELY | JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT, - JVMTI_JAVA_LANG_THREAD_STATE_NEW = 0, - JVMTI_JAVA_LANG_THREAD_STATE_TERMINATED = JVMTI_THREAD_STATE_TERMINATED, - JVMTI_JAVA_LANG_THREAD_STATE_RUNNABLE = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_RUNNABLE, - JVMTI_JAVA_LANG_THREAD_STATE_BLOCKED = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER, - JVMTI_JAVA_LANG_THREAD_STATE_WAITING = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_INDEFINITELY, - JVMTI_JAVA_LANG_THREAD_STATE_TIMED_WAITING = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT -}; - - /* Thread Priority Constants */ - -enum { - JVMTI_THREAD_MIN_PRIORITY = 1, - JVMTI_THREAD_NORM_PRIORITY = 5, - JVMTI_THREAD_MAX_PRIORITY = 10 -}; - - /* Heap Filter Flags */ - -enum { - JVMTI_HEAP_FILTER_TAGGED = 0x4, - JVMTI_HEAP_FILTER_UNTAGGED = 0x8, - JVMTI_HEAP_FILTER_CLASS_TAGGED = 0x10, - JVMTI_HEAP_FILTER_CLASS_UNTAGGED = 0x20 -}; - - /* Heap Visit Control Flags */ - -enum { - JVMTI_VISIT_OBJECTS = 0x100, - JVMTI_VISIT_ABORT = 0x8000 -}; - - /* Heap Reference Enumeration */ - -typedef enum { - JVMTI_HEAP_REFERENCE_CLASS = 1, - JVMTI_HEAP_REFERENCE_FIELD = 2, - JVMTI_HEAP_REFERENCE_ARRAY_ELEMENT = 3, - JVMTI_HEAP_REFERENCE_CLASS_LOADER = 4, - JVMTI_HEAP_REFERENCE_SIGNERS = 5, - JVMTI_HEAP_REFERENCE_PROTECTION_DOMAIN = 6, - JVMTI_HEAP_REFERENCE_INTERFACE = 7, - JVMTI_HEAP_REFERENCE_STATIC_FIELD = 8, - JVMTI_HEAP_REFERENCE_CONSTANT_POOL = 9, - JVMTI_HEAP_REFERENCE_SUPERCLASS = 10, - JVMTI_HEAP_REFERENCE_JNI_GLOBAL = 21, - JVMTI_HEAP_REFERENCE_SYSTEM_CLASS = 22, - JVMTI_HEAP_REFERENCE_MONITOR = 23, - JVMTI_HEAP_REFERENCE_STACK_LOCAL = 24, - JVMTI_HEAP_REFERENCE_JNI_LOCAL = 25, - JVMTI_HEAP_REFERENCE_THREAD = 26, - JVMTI_HEAP_REFERENCE_OTHER = 27 -} jvmtiHeapReferenceKind; - - /* Primitive Type Enumeration */ - -typedef enum { - JVMTI_PRIMITIVE_TYPE_BOOLEAN = 90, - JVMTI_PRIMITIVE_TYPE_BYTE = 66, - JVMTI_PRIMITIVE_TYPE_CHAR = 67, - JVMTI_PRIMITIVE_TYPE_SHORT = 83, - JVMTI_PRIMITIVE_TYPE_INT = 73, - JVMTI_PRIMITIVE_TYPE_LONG = 74, - JVMTI_PRIMITIVE_TYPE_FLOAT = 70, - JVMTI_PRIMITIVE_TYPE_DOUBLE = 68 -} jvmtiPrimitiveType; - - /* Heap Object Filter Enumeration */ - -typedef enum { - JVMTI_HEAP_OBJECT_TAGGED = 1, - JVMTI_HEAP_OBJECT_UNTAGGED = 2, - JVMTI_HEAP_OBJECT_EITHER = 3 -} jvmtiHeapObjectFilter; - - /* Heap Root Kind Enumeration */ - -typedef enum { - JVMTI_HEAP_ROOT_JNI_GLOBAL = 1, - JVMTI_HEAP_ROOT_SYSTEM_CLASS = 2, - JVMTI_HEAP_ROOT_MONITOR = 3, - JVMTI_HEAP_ROOT_STACK_LOCAL = 4, - JVMTI_HEAP_ROOT_JNI_LOCAL = 5, - JVMTI_HEAP_ROOT_THREAD = 6, - JVMTI_HEAP_ROOT_OTHER = 7 -} jvmtiHeapRootKind; - - /* Object Reference Enumeration */ - -typedef enum { - JVMTI_REFERENCE_CLASS = 1, - JVMTI_REFERENCE_FIELD = 2, - JVMTI_REFERENCE_ARRAY_ELEMENT = 3, - JVMTI_REFERENCE_CLASS_LOADER = 4, - JVMTI_REFERENCE_SIGNERS = 5, - JVMTI_REFERENCE_PROTECTION_DOMAIN = 6, - JVMTI_REFERENCE_INTERFACE = 7, - JVMTI_REFERENCE_STATIC_FIELD = 8, - JVMTI_REFERENCE_CONSTANT_POOL = 9 -} jvmtiObjectReferenceKind; - - /* Iteration Control Enumeration */ - -typedef enum { - JVMTI_ITERATION_CONTINUE = 1, - JVMTI_ITERATION_IGNORE = 2, - JVMTI_ITERATION_ABORT = 0 -} jvmtiIterationControl; - - /* Class Status Flags */ - -enum { - JVMTI_CLASS_STATUS_VERIFIED = 1, - JVMTI_CLASS_STATUS_PREPARED = 2, - JVMTI_CLASS_STATUS_INITIALIZED = 4, - JVMTI_CLASS_STATUS_ERROR = 8, - JVMTI_CLASS_STATUS_ARRAY = 16, - JVMTI_CLASS_STATUS_PRIMITIVE = 32 -}; - - /* Event Enable/Disable */ - -typedef enum { - JVMTI_ENABLE = 1, - JVMTI_DISABLE = 0 -} jvmtiEventMode; - - /* Extension Function/Event Parameter Types */ - -typedef enum { - JVMTI_TYPE_JBYTE = 101, - JVMTI_TYPE_JCHAR = 102, - JVMTI_TYPE_JSHORT = 103, - JVMTI_TYPE_JINT = 104, - JVMTI_TYPE_JLONG = 105, - JVMTI_TYPE_JFLOAT = 106, - JVMTI_TYPE_JDOUBLE = 107, - JVMTI_TYPE_JBOOLEAN = 108, - JVMTI_TYPE_JOBJECT = 109, - JVMTI_TYPE_JTHREAD = 110, - JVMTI_TYPE_JCLASS = 111, - JVMTI_TYPE_JVALUE = 112, - JVMTI_TYPE_JFIELDID = 113, - JVMTI_TYPE_JMETHODID = 114, - JVMTI_TYPE_CCHAR = 115, - JVMTI_TYPE_CVOID = 116, - JVMTI_TYPE_JNIENV = 117 -} jvmtiParamTypes; - - /* Extension Function/Event Parameter Kinds */ - -typedef enum { - JVMTI_KIND_IN = 91, - JVMTI_KIND_IN_PTR = 92, - JVMTI_KIND_IN_BUF = 93, - JVMTI_KIND_ALLOC_BUF = 94, - JVMTI_KIND_ALLOC_ALLOC_BUF = 95, - JVMTI_KIND_OUT = 96, - JVMTI_KIND_OUT_BUF = 97 -} jvmtiParamKind; - - /* Timer Kinds */ - -typedef enum { - JVMTI_TIMER_USER_CPU = 30, - JVMTI_TIMER_TOTAL_CPU = 31, - JVMTI_TIMER_ELAPSED = 32 -} jvmtiTimerKind; - - /* Phases of execution */ - -typedef enum { - JVMTI_PHASE_ONLOAD = 1, - JVMTI_PHASE_PRIMORDIAL = 2, - JVMTI_PHASE_START = 6, - JVMTI_PHASE_LIVE = 4, - JVMTI_PHASE_DEAD = 8 -} jvmtiPhase; - - /* Version Interface Types */ - -enum { - JVMTI_VERSION_INTERFACE_JNI = 0x00000000, - JVMTI_VERSION_INTERFACE_JVMTI = 0x30000000 -}; - - /* Version Masks */ - -enum { - JVMTI_VERSION_MASK_INTERFACE_TYPE = 0x70000000, - JVMTI_VERSION_MASK_MAJOR = 0x0FFF0000, - JVMTI_VERSION_MASK_MINOR = 0x0000FF00, - JVMTI_VERSION_MASK_MICRO = 0x000000FF -}; - - /* Version Shifts */ - -enum { - JVMTI_VERSION_SHIFT_MAJOR = 16, - JVMTI_VERSION_SHIFT_MINOR = 8, - JVMTI_VERSION_SHIFT_MICRO = 0 -}; - - /* Verbose Flag Enumeration */ - -typedef enum { - JVMTI_VERBOSE_OTHER = 0, - JVMTI_VERBOSE_GC = 1, - JVMTI_VERBOSE_CLASS = 2, - JVMTI_VERBOSE_JNI = 4 -} jvmtiVerboseFlag; - - /* JLocation Format Enumeration */ - -typedef enum { - JVMTI_JLOCATION_JVMBCI = 1, - JVMTI_JLOCATION_MACHINEPC = 2, - JVMTI_JLOCATION_OTHER = 0 -} jvmtiJlocationFormat; - - /* Resource Exhaustion Flags */ - -enum { - JVMTI_RESOURCE_EXHAUSTED_OOM_ERROR = 0x0001, - JVMTI_RESOURCE_EXHAUSTED_JAVA_HEAP = 0x0002, - JVMTI_RESOURCE_EXHAUSTED_THREADS = 0x0004 -}; - - /* Errors */ - -typedef enum { - JVMTI_ERROR_NONE = 0, - JVMTI_ERROR_INVALID_THREAD = 10, - JVMTI_ERROR_INVALID_THREAD_GROUP = 11, - JVMTI_ERROR_INVALID_PRIORITY = 12, - JVMTI_ERROR_THREAD_NOT_SUSPENDED = 13, - JVMTI_ERROR_THREAD_SUSPENDED = 14, - JVMTI_ERROR_THREAD_NOT_ALIVE = 15, - JVMTI_ERROR_INVALID_OBJECT = 20, - JVMTI_ERROR_INVALID_CLASS = 21, - JVMTI_ERROR_CLASS_NOT_PREPARED = 22, - JVMTI_ERROR_INVALID_METHODID = 23, - JVMTI_ERROR_INVALID_LOCATION = 24, - JVMTI_ERROR_INVALID_FIELDID = 25, - JVMTI_ERROR_NO_MORE_FRAMES = 31, - JVMTI_ERROR_OPAQUE_FRAME = 32, - JVMTI_ERROR_TYPE_MISMATCH = 34, - JVMTI_ERROR_INVALID_SLOT = 35, - JVMTI_ERROR_DUPLICATE = 40, - JVMTI_ERROR_NOT_FOUND = 41, - JVMTI_ERROR_INVALID_MONITOR = 50, - JVMTI_ERROR_NOT_MONITOR_OWNER = 51, - JVMTI_ERROR_INTERRUPT = 52, - JVMTI_ERROR_INVALID_CLASS_FORMAT = 60, - JVMTI_ERROR_CIRCULAR_CLASS_DEFINITION = 61, - JVMTI_ERROR_FAILS_VERIFICATION = 62, - JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_ADDED = 63, - JVMTI_ERROR_UNSUPPORTED_REDEFINITION_SCHEMA_CHANGED = 64, - JVMTI_ERROR_INVALID_TYPESTATE = 65, - JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED = 66, - JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_DELETED = 67, - JVMTI_ERROR_UNSUPPORTED_VERSION = 68, - JVMTI_ERROR_NAMES_DONT_MATCH = 69, - JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED = 70, - JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_MODIFIERS_CHANGED = 71, - JVMTI_ERROR_UNMODIFIABLE_CLASS = 79, - JVMTI_ERROR_NOT_AVAILABLE = 98, - JVMTI_ERROR_MUST_POSSESS_CAPABILITY = 99, - JVMTI_ERROR_NULL_POINTER = 100, - JVMTI_ERROR_ABSENT_INFORMATION = 101, - JVMTI_ERROR_INVALID_EVENT_TYPE = 102, - JVMTI_ERROR_ILLEGAL_ARGUMENT = 103, - JVMTI_ERROR_NATIVE_METHOD = 104, - JVMTI_ERROR_CLASS_LOADER_UNSUPPORTED = 106, - JVMTI_ERROR_OUT_OF_MEMORY = 110, - JVMTI_ERROR_ACCESS_DENIED = 111, - JVMTI_ERROR_WRONG_PHASE = 112, - JVMTI_ERROR_INTERNAL = 113, - JVMTI_ERROR_UNATTACHED_THREAD = 115, - JVMTI_ERROR_INVALID_ENVIRONMENT = 116, - JVMTI_ERROR_MAX = 116 -} jvmtiError; - - /* Event IDs */ - -typedef enum { - JVMTI_MIN_EVENT_TYPE_VAL = 50, - JVMTI_EVENT_VM_INIT = 50, - JVMTI_EVENT_VM_DEATH = 51, - JVMTI_EVENT_THREAD_START = 52, - JVMTI_EVENT_THREAD_END = 53, - JVMTI_EVENT_CLASS_FILE_LOAD_HOOK = 54, - JVMTI_EVENT_CLASS_LOAD = 55, - JVMTI_EVENT_CLASS_PREPARE = 56, - JVMTI_EVENT_VM_START = 57, - JVMTI_EVENT_EXCEPTION = 58, - JVMTI_EVENT_EXCEPTION_CATCH = 59, - JVMTI_EVENT_SINGLE_STEP = 60, - JVMTI_EVENT_FRAME_POP = 61, - JVMTI_EVENT_BREAKPOINT = 62, - JVMTI_EVENT_FIELD_ACCESS = 63, - JVMTI_EVENT_FIELD_MODIFICATION = 64, - JVMTI_EVENT_METHOD_ENTRY = 65, - JVMTI_EVENT_METHOD_EXIT = 66, - JVMTI_EVENT_NATIVE_METHOD_BIND = 67, - JVMTI_EVENT_COMPILED_METHOD_LOAD = 68, - JVMTI_EVENT_COMPILED_METHOD_UNLOAD = 69, - JVMTI_EVENT_DYNAMIC_CODE_GENERATED = 70, - JVMTI_EVENT_DATA_DUMP_REQUEST = 71, - JVMTI_EVENT_MONITOR_WAIT = 73, - JVMTI_EVENT_MONITOR_WAITED = 74, - JVMTI_EVENT_MONITOR_CONTENDED_ENTER = 75, - JVMTI_EVENT_MONITOR_CONTENDED_ENTERED = 76, - JVMTI_EVENT_RESOURCE_EXHAUSTED = 80, - JVMTI_EVENT_GARBAGE_COLLECTION_START = 81, - JVMTI_EVENT_GARBAGE_COLLECTION_FINISH = 82, - JVMTI_EVENT_OBJECT_FREE = 83, - JVMTI_EVENT_VM_OBJECT_ALLOC = 84, - JVMTI_MAX_EVENT_TYPE_VAL = 84 -} jvmtiEvent; - - - /* Pre-Declarations */ -struct _jvmtiThreadInfo; -typedef struct _jvmtiThreadInfo jvmtiThreadInfo; -struct _jvmtiMonitorStackDepthInfo; -typedef struct _jvmtiMonitorStackDepthInfo jvmtiMonitorStackDepthInfo; -struct _jvmtiThreadGroupInfo; -typedef struct _jvmtiThreadGroupInfo jvmtiThreadGroupInfo; -struct _jvmtiFrameInfo; -typedef struct _jvmtiFrameInfo jvmtiFrameInfo; -struct _jvmtiStackInfo; -typedef struct _jvmtiStackInfo jvmtiStackInfo; -struct _jvmtiHeapReferenceInfoField; -typedef struct _jvmtiHeapReferenceInfoField jvmtiHeapReferenceInfoField; -struct _jvmtiHeapReferenceInfoArray; -typedef struct _jvmtiHeapReferenceInfoArray jvmtiHeapReferenceInfoArray; -struct _jvmtiHeapReferenceInfoConstantPool; -typedef struct _jvmtiHeapReferenceInfoConstantPool jvmtiHeapReferenceInfoConstantPool; -struct _jvmtiHeapReferenceInfoStackLocal; -typedef struct _jvmtiHeapReferenceInfoStackLocal jvmtiHeapReferenceInfoStackLocal; -struct _jvmtiHeapReferenceInfoJniLocal; -typedef struct _jvmtiHeapReferenceInfoJniLocal jvmtiHeapReferenceInfoJniLocal; -struct _jvmtiHeapReferenceInfoReserved; -typedef struct _jvmtiHeapReferenceInfoReserved jvmtiHeapReferenceInfoReserved; -union _jvmtiHeapReferenceInfo; -typedef union _jvmtiHeapReferenceInfo jvmtiHeapReferenceInfo; -struct _jvmtiHeapCallbacks; -typedef struct _jvmtiHeapCallbacks jvmtiHeapCallbacks; -struct _jvmtiClassDefinition; -typedef struct _jvmtiClassDefinition jvmtiClassDefinition; -struct _jvmtiMonitorUsage; -typedef struct _jvmtiMonitorUsage jvmtiMonitorUsage; -struct _jvmtiLineNumberEntry; -typedef struct _jvmtiLineNumberEntry jvmtiLineNumberEntry; -struct _jvmtiLocalVariableEntry; -typedef struct _jvmtiLocalVariableEntry jvmtiLocalVariableEntry; -struct _jvmtiParamInfo; -typedef struct _jvmtiParamInfo jvmtiParamInfo; -struct _jvmtiExtensionFunctionInfo; -typedef struct _jvmtiExtensionFunctionInfo jvmtiExtensionFunctionInfo; -struct _jvmtiExtensionEventInfo; -typedef struct _jvmtiExtensionEventInfo jvmtiExtensionEventInfo; -struct _jvmtiTimerInfo; -typedef struct _jvmtiTimerInfo jvmtiTimerInfo; -struct _jvmtiAddrLocationMap; -typedef struct _jvmtiAddrLocationMap jvmtiAddrLocationMap; - - /* Function Types */ - -typedef void (JNICALL *jvmtiStartFunction) - (jvmtiEnv* jvmti_env, JNIEnv* jni_env, void* arg); - -typedef jint (JNICALL *jvmtiHeapIterationCallback) - (jlong class_tag, jlong size, jlong* tag_ptr, jint length, void* user_data); - -typedef jint (JNICALL *jvmtiHeapReferenceCallback) - (jvmtiHeapReferenceKind reference_kind, const jvmtiHeapReferenceInfo* reference_info, jlong class_tag, jlong referrer_class_tag, jlong size, jlong* tag_ptr, jlong* referrer_tag_ptr, jint length, void* user_data); - -typedef jint (JNICALL *jvmtiPrimitiveFieldCallback) - (jvmtiHeapReferenceKind kind, const jvmtiHeapReferenceInfo* info, jlong object_class_tag, jlong* object_tag_ptr, jvalue value, jvmtiPrimitiveType value_type, void* user_data); - -typedef jint (JNICALL *jvmtiArrayPrimitiveValueCallback) - (jlong class_tag, jlong size, jlong* tag_ptr, jint element_count, jvmtiPrimitiveType element_type, const void* elements, void* user_data); - -typedef jint (JNICALL *jvmtiStringPrimitiveValueCallback) - (jlong class_tag, jlong size, jlong* tag_ptr, const jchar* value, jint value_length, void* user_data); - -typedef jint (JNICALL *jvmtiReservedCallback) - (); - -typedef jvmtiIterationControl (JNICALL *jvmtiHeapObjectCallback) - (jlong class_tag, jlong size, jlong* tag_ptr, void* user_data); - -typedef jvmtiIterationControl (JNICALL *jvmtiHeapRootCallback) - (jvmtiHeapRootKind root_kind, jlong class_tag, jlong size, jlong* tag_ptr, void* user_data); - -typedef jvmtiIterationControl (JNICALL *jvmtiStackReferenceCallback) - (jvmtiHeapRootKind root_kind, jlong class_tag, jlong size, jlong* tag_ptr, jlong thread_tag, jint depth, jmethodID method, jint slot, void* user_data); - -typedef jvmtiIterationControl (JNICALL *jvmtiObjectReferenceCallback) - (jvmtiObjectReferenceKind reference_kind, jlong class_tag, jlong size, jlong* tag_ptr, jlong referrer_tag, jint referrer_index, void* user_data); - -typedef jvmtiError (JNICALL *jvmtiExtensionFunction) - (jvmtiEnv* jvmti_env, ...); - -typedef void (JNICALL *jvmtiExtensionEvent) - (jvmtiEnv* jvmti_env, ...); - - - /* Structure Types */ -struct _jvmtiThreadInfo { - char* name; - jint priority; - jboolean is_daemon; - jthreadGroup thread_group; - jobject context_class_loader; -}; -struct _jvmtiMonitorStackDepthInfo { - jobject monitor; - jint stack_depth; -}; -struct _jvmtiThreadGroupInfo { - jthreadGroup parent; - char* name; - jint max_priority; - jboolean is_daemon; -}; -struct _jvmtiFrameInfo { - jmethodID method; - jlocation location; -}; -struct _jvmtiStackInfo { - jthread thread; - jint state; - jvmtiFrameInfo* frame_buffer; - jint frame_count; -}; -struct _jvmtiHeapReferenceInfoField { - jint index; -}; -struct _jvmtiHeapReferenceInfoArray { - jint index; -}; -struct _jvmtiHeapReferenceInfoConstantPool { - jint index; -}; -struct _jvmtiHeapReferenceInfoStackLocal { - jlong thread_tag; - jlong thread_id; - jint depth; - jmethodID method; - jlocation location; - jint slot; -}; -struct _jvmtiHeapReferenceInfoJniLocal { - jlong thread_tag; - jlong thread_id; - jint depth; - jmethodID method; -}; -struct _jvmtiHeapReferenceInfoReserved { - jlong reserved1; - jlong reserved2; - jlong reserved3; - jlong reserved4; - jlong reserved5; - jlong reserved6; - jlong reserved7; - jlong reserved8; -}; -union _jvmtiHeapReferenceInfo { - jvmtiHeapReferenceInfoField field; - jvmtiHeapReferenceInfoArray array; - jvmtiHeapReferenceInfoConstantPool constant_pool; - jvmtiHeapReferenceInfoStackLocal stack_local; - jvmtiHeapReferenceInfoJniLocal jni_local; - jvmtiHeapReferenceInfoReserved other; -}; -struct _jvmtiHeapCallbacks { - jvmtiHeapIterationCallback heap_iteration_callback; - jvmtiHeapReferenceCallback heap_reference_callback; - jvmtiPrimitiveFieldCallback primitive_field_callback; - jvmtiArrayPrimitiveValueCallback array_primitive_value_callback; - jvmtiStringPrimitiveValueCallback string_primitive_value_callback; - jvmtiReservedCallback reserved5; - jvmtiReservedCallback reserved6; - jvmtiReservedCallback reserved7; - jvmtiReservedCallback reserved8; - jvmtiReservedCallback reserved9; - jvmtiReservedCallback reserved10; - jvmtiReservedCallback reserved11; - jvmtiReservedCallback reserved12; - jvmtiReservedCallback reserved13; - jvmtiReservedCallback reserved14; - jvmtiReservedCallback reserved15; -}; -struct _jvmtiClassDefinition { - jclass klass; - jint class_byte_count; - const unsigned char* class_bytes; -}; -struct _jvmtiMonitorUsage { - jthread owner; - jint entry_count; - jint waiter_count; - jthread* waiters; - jint notify_waiter_count; - jthread* notify_waiters; -}; -struct _jvmtiLineNumberEntry { - jlocation start_location; - jint line_number; -}; -struct _jvmtiLocalVariableEntry { - jlocation start_location; - jint length; - char* name; - char* signature; - char* generic_signature; - jint slot; -}; -struct _jvmtiParamInfo { - char* name; - jvmtiParamKind kind; - jvmtiParamTypes base_type; - jboolean null_ok; -}; -struct _jvmtiExtensionFunctionInfo { - jvmtiExtensionFunction func; - char* id; - char* short_description; - jint param_count; - jvmtiParamInfo* params; - jint error_count; - jvmtiError* errors; -}; -struct _jvmtiExtensionEventInfo { - jint extension_event_index; - char* id; - char* short_description; - jint param_count; - jvmtiParamInfo* params; -}; -struct _jvmtiTimerInfo { - jlong max_value; - jboolean may_skip_forward; - jboolean may_skip_backward; - jvmtiTimerKind kind; - jlong reserved1; - jlong reserved2; -}; -struct _jvmtiAddrLocationMap { - const void* start_address; - jlocation location; -}; - -typedef struct { - unsigned int can_tag_objects : 1; - unsigned int can_generate_field_modification_events : 1; - unsigned int can_generate_field_access_events : 1; - unsigned int can_get_bytecodes : 1; - unsigned int can_get_synthetic_attribute : 1; - unsigned int can_get_owned_monitor_info : 1; - unsigned int can_get_current_contended_monitor : 1; - unsigned int can_get_monitor_info : 1; - unsigned int can_pop_frame : 1; - unsigned int can_redefine_classes : 1; - unsigned int can_signal_thread : 1; - unsigned int can_get_source_file_name : 1; - unsigned int can_get_line_numbers : 1; - unsigned int can_get_source_debug_extension : 1; - unsigned int can_access_local_variables : 1; - unsigned int can_maintain_original_method_order : 1; - unsigned int can_generate_single_step_events : 1; - unsigned int can_generate_exception_events : 1; - unsigned int can_generate_frame_pop_events : 1; - unsigned int can_generate_breakpoint_events : 1; - unsigned int can_suspend : 1; - unsigned int can_redefine_any_class : 1; - unsigned int can_get_current_thread_cpu_time : 1; - unsigned int can_get_thread_cpu_time : 1; - unsigned int can_generate_method_entry_events : 1; - unsigned int can_generate_method_exit_events : 1; - unsigned int can_generate_all_class_hook_events : 1; - unsigned int can_generate_compiled_method_load_events : 1; - unsigned int can_generate_monitor_events : 1; - unsigned int can_generate_vm_object_alloc_events : 1; - unsigned int can_generate_native_method_bind_events : 1; - unsigned int can_generate_garbage_collection_events : 1; - unsigned int can_generate_object_free_events : 1; - unsigned int can_force_early_return : 1; - unsigned int can_get_owned_monitor_stack_depth_info : 1; - unsigned int can_get_constant_pool : 1; - unsigned int can_set_native_method_prefix : 1; - unsigned int can_retransform_classes : 1; - unsigned int can_retransform_any_class : 1; - unsigned int can_generate_resource_exhaustion_heap_events : 1; - unsigned int can_generate_resource_exhaustion_threads_events : 1; - unsigned int : 7; - unsigned int : 16; - unsigned int : 16; - unsigned int : 16; - unsigned int : 16; - unsigned int : 16; -} jvmtiCapabilities; - - - /* Event Definitions */ - -typedef void (JNICALL *jvmtiEventReserved)(void); - - -typedef void (JNICALL *jvmtiEventBreakpoint) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jmethodID method, - jlocation location); - -typedef void (JNICALL *jvmtiEventClassFileLoadHook) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jclass class_being_redefined, - jobject loader, - const char* name, - jobject protection_domain, - jint class_data_len, - const unsigned char* class_data, - jint* new_class_data_len, - unsigned char** new_class_data); - -typedef void (JNICALL *jvmtiEventClassLoad) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jclass klass); - -typedef void (JNICALL *jvmtiEventClassPrepare) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jclass klass); - -typedef void (JNICALL *jvmtiEventCompiledMethodLoad) - (jvmtiEnv *jvmti_env, - jmethodID method, - jint code_size, - const void* code_addr, - jint map_length, - const jvmtiAddrLocationMap* map, - const void* compile_info); - -typedef void (JNICALL *jvmtiEventCompiledMethodUnload) - (jvmtiEnv *jvmti_env, - jmethodID method, - const void* code_addr); - -typedef void (JNICALL *jvmtiEventDataDumpRequest) - (jvmtiEnv *jvmti_env); - -typedef void (JNICALL *jvmtiEventDynamicCodeGenerated) - (jvmtiEnv *jvmti_env, - const char* name, - const void* address, - jint length); - -typedef void (JNICALL *jvmtiEventException) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jmethodID method, - jlocation location, - jobject exception, - jmethodID catch_method, - jlocation catch_location); - -typedef void (JNICALL *jvmtiEventExceptionCatch) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jmethodID method, - jlocation location, - jobject exception); - -typedef void (JNICALL *jvmtiEventFieldAccess) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jmethodID method, - jlocation location, - jclass field_klass, - jobject object, - jfieldID field); - -typedef void (JNICALL *jvmtiEventFieldModification) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jmethodID method, - jlocation location, - jclass field_klass, - jobject object, - jfieldID field, - char signature_type, - jvalue new_value); - -typedef void (JNICALL *jvmtiEventFramePop) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jmethodID method, - jboolean was_popped_by_exception); - -typedef void (JNICALL *jvmtiEventGarbageCollectionFinish) - (jvmtiEnv *jvmti_env); - -typedef void (JNICALL *jvmtiEventGarbageCollectionStart) - (jvmtiEnv *jvmti_env); - -typedef void (JNICALL *jvmtiEventMethodEntry) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jmethodID method); - -typedef void (JNICALL *jvmtiEventMethodExit) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jmethodID method, - jboolean was_popped_by_exception, - jvalue return_value); - -typedef void (JNICALL *jvmtiEventMonitorContendedEnter) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jobject object); - -typedef void (JNICALL *jvmtiEventMonitorContendedEntered) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jobject object); - -typedef void (JNICALL *jvmtiEventMonitorWait) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jobject object, - jlong timeout); - -typedef void (JNICALL *jvmtiEventMonitorWaited) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jobject object, - jboolean timed_out); - -typedef void (JNICALL *jvmtiEventNativeMethodBind) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jmethodID method, - void* address, - void** new_address_ptr); - -typedef void (JNICALL *jvmtiEventObjectFree) - (jvmtiEnv *jvmti_env, - jlong tag); - -typedef void (JNICALL *jvmtiEventResourceExhausted) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jint flags, - const void* reserved, - const char* description); - -typedef void (JNICALL *jvmtiEventSingleStep) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jmethodID method, - jlocation location); - -typedef void (JNICALL *jvmtiEventThreadEnd) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread); - -typedef void (JNICALL *jvmtiEventThreadStart) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread); - -typedef void (JNICALL *jvmtiEventVMDeath) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env); - -typedef void (JNICALL *jvmtiEventVMInit) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread); - -typedef void (JNICALL *jvmtiEventVMObjectAlloc) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jobject object, - jclass object_klass, - jlong size); - -typedef void (JNICALL *jvmtiEventVMStart) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env); - - /* Event Callback Structure */ - -typedef struct { - /* 50 : VM Initialization Event */ - jvmtiEventVMInit VMInit; - /* 51 : VM Death Event */ - jvmtiEventVMDeath VMDeath; - /* 52 : Thread Start */ - jvmtiEventThreadStart ThreadStart; - /* 53 : Thread End */ - jvmtiEventThreadEnd ThreadEnd; - /* 54 : Class File Load Hook */ - jvmtiEventClassFileLoadHook ClassFileLoadHook; - /* 55 : Class Load */ - jvmtiEventClassLoad ClassLoad; - /* 56 : Class Prepare */ - jvmtiEventClassPrepare ClassPrepare; - /* 57 : VM Start Event */ - jvmtiEventVMStart VMStart; - /* 58 : Exception */ - jvmtiEventException Exception; - /* 59 : Exception Catch */ - jvmtiEventExceptionCatch ExceptionCatch; - /* 60 : Single Step */ - jvmtiEventSingleStep SingleStep; - /* 61 : Frame Pop */ - jvmtiEventFramePop FramePop; - /* 62 : Breakpoint */ - jvmtiEventBreakpoint Breakpoint; - /* 63 : Field Access */ - jvmtiEventFieldAccess FieldAccess; - /* 64 : Field Modification */ - jvmtiEventFieldModification FieldModification; - /* 65 : Method Entry */ - jvmtiEventMethodEntry MethodEntry; - /* 66 : Method Exit */ - jvmtiEventMethodExit MethodExit; - /* 67 : Native Method Bind */ - jvmtiEventNativeMethodBind NativeMethodBind; - /* 68 : Compiled Method Load */ - jvmtiEventCompiledMethodLoad CompiledMethodLoad; - /* 69 : Compiled Method Unload */ - jvmtiEventCompiledMethodUnload CompiledMethodUnload; - /* 70 : Dynamic Code Generated */ - jvmtiEventDynamicCodeGenerated DynamicCodeGenerated; - /* 71 : Data Dump Request */ - jvmtiEventDataDumpRequest DataDumpRequest; - /* 72 */ - jvmtiEventReserved reserved72; - /* 73 : Monitor Wait */ - jvmtiEventMonitorWait MonitorWait; - /* 74 : Monitor Waited */ - jvmtiEventMonitorWaited MonitorWaited; - /* 75 : Monitor Contended Enter */ - jvmtiEventMonitorContendedEnter MonitorContendedEnter; - /* 76 : Monitor Contended Entered */ - jvmtiEventMonitorContendedEntered MonitorContendedEntered; - /* 77 */ - jvmtiEventReserved reserved77; - /* 78 */ - jvmtiEventReserved reserved78; - /* 79 */ - jvmtiEventReserved reserved79; - /* 80 : Resource Exhausted */ - jvmtiEventResourceExhausted ResourceExhausted; - /* 81 : Garbage Collection Start */ - jvmtiEventGarbageCollectionStart GarbageCollectionStart; - /* 82 : Garbage Collection Finish */ - jvmtiEventGarbageCollectionFinish GarbageCollectionFinish; - /* 83 : Object Free */ - jvmtiEventObjectFree ObjectFree; - /* 84 : VM Object Allocation */ - jvmtiEventVMObjectAlloc VMObjectAlloc; -} jvmtiEventCallbacks; - - - /* Function Interface */ - -typedef struct jvmtiInterface_1_ { - - /* 1 : RESERVED */ - void *reserved1; - - /* 2 : Set Event Notification Mode */ - jvmtiError (JNICALL *SetEventNotificationMode) (jvmtiEnv* env, - jvmtiEventMode mode, - jvmtiEvent event_type, - jthread event_thread, - ...); - - /* 3 : RESERVED */ - void *reserved3; - - /* 4 : Get All Threads */ - jvmtiError (JNICALL *GetAllThreads) (jvmtiEnv* env, - jint* threads_count_ptr, - jthread** threads_ptr); - - /* 5 : Suspend Thread */ - jvmtiError (JNICALL *SuspendThread) (jvmtiEnv* env, - jthread thread); - - /* 6 : Resume Thread */ - jvmtiError (JNICALL *ResumeThread) (jvmtiEnv* env, - jthread thread); - - /* 7 : Stop Thread */ - jvmtiError (JNICALL *StopThread) (jvmtiEnv* env, - jthread thread, - jobject exception); - - /* 8 : Interrupt Thread */ - jvmtiError (JNICALL *InterruptThread) (jvmtiEnv* env, - jthread thread); - - /* 9 : Get Thread Info */ - jvmtiError (JNICALL *GetThreadInfo) (jvmtiEnv* env, - jthread thread, - jvmtiThreadInfo* info_ptr); - - /* 10 : Get Owned Monitor Info */ - jvmtiError (JNICALL *GetOwnedMonitorInfo) (jvmtiEnv* env, - jthread thread, - jint* owned_monitor_count_ptr, - jobject** owned_monitors_ptr); - - /* 11 : Get Current Contended Monitor */ - jvmtiError (JNICALL *GetCurrentContendedMonitor) (jvmtiEnv* env, - jthread thread, - jobject* monitor_ptr); - - /* 12 : Run Agent Thread */ - jvmtiError (JNICALL *RunAgentThread) (jvmtiEnv* env, - jthread thread, - jvmtiStartFunction proc, - const void* arg, - jint priority); - - /* 13 : Get Top Thread Groups */ - jvmtiError (JNICALL *GetTopThreadGroups) (jvmtiEnv* env, - jint* group_count_ptr, - jthreadGroup** groups_ptr); - - /* 14 : Get Thread Group Info */ - jvmtiError (JNICALL *GetThreadGroupInfo) (jvmtiEnv* env, - jthreadGroup group, - jvmtiThreadGroupInfo* info_ptr); - - /* 15 : Get Thread Group Children */ - jvmtiError (JNICALL *GetThreadGroupChildren) (jvmtiEnv* env, - jthreadGroup group, - jint* thread_count_ptr, - jthread** threads_ptr, - jint* group_count_ptr, - jthreadGroup** groups_ptr); - - /* 16 : Get Frame Count */ - jvmtiError (JNICALL *GetFrameCount) (jvmtiEnv* env, - jthread thread, - jint* count_ptr); - - /* 17 : Get Thread State */ - jvmtiError (JNICALL *GetThreadState) (jvmtiEnv* env, - jthread thread, - jint* thread_state_ptr); - - /* 18 : Get Current Thread */ - jvmtiError (JNICALL *GetCurrentThread) (jvmtiEnv* env, - jthread* thread_ptr); - - /* 19 : Get Frame Location */ - jvmtiError (JNICALL *GetFrameLocation) (jvmtiEnv* env, - jthread thread, - jint depth, - jmethodID* method_ptr, - jlocation* location_ptr); - - /* 20 : Notify Frame Pop */ - jvmtiError (JNICALL *NotifyFramePop) (jvmtiEnv* env, - jthread thread, - jint depth); - - /* 21 : Get Local Variable - Object */ - jvmtiError (JNICALL *GetLocalObject) (jvmtiEnv* env, - jthread thread, - jint depth, - jint slot, - jobject* value_ptr); - - /* 22 : Get Local Variable - Int */ - jvmtiError (JNICALL *GetLocalInt) (jvmtiEnv* env, - jthread thread, - jint depth, - jint slot, - jint* value_ptr); - - /* 23 : Get Local Variable - Long */ - jvmtiError (JNICALL *GetLocalLong) (jvmtiEnv* env, - jthread thread, - jint depth, - jint slot, - jlong* value_ptr); - - /* 24 : Get Local Variable - Float */ - jvmtiError (JNICALL *GetLocalFloat) (jvmtiEnv* env, - jthread thread, - jint depth, - jint slot, - jfloat* value_ptr); - - /* 25 : Get Local Variable - Double */ - jvmtiError (JNICALL *GetLocalDouble) (jvmtiEnv* env, - jthread thread, - jint depth, - jint slot, - jdouble* value_ptr); - - /* 26 : Set Local Variable - Object */ - jvmtiError (JNICALL *SetLocalObject) (jvmtiEnv* env, - jthread thread, - jint depth, - jint slot, - jobject value); - - /* 27 : Set Local Variable - Int */ - jvmtiError (JNICALL *SetLocalInt) (jvmtiEnv* env, - jthread thread, - jint depth, - jint slot, - jint value); - - /* 28 : Set Local Variable - Long */ - jvmtiError (JNICALL *SetLocalLong) (jvmtiEnv* env, - jthread thread, - jint depth, - jint slot, - jlong value); - - /* 29 : Set Local Variable - Float */ - jvmtiError (JNICALL *SetLocalFloat) (jvmtiEnv* env, - jthread thread, - jint depth, - jint slot, - jfloat value); - - /* 30 : Set Local Variable - Double */ - jvmtiError (JNICALL *SetLocalDouble) (jvmtiEnv* env, - jthread thread, - jint depth, - jint slot, - jdouble value); - - /* 31 : Create Raw Monitor */ - jvmtiError (JNICALL *CreateRawMonitor) (jvmtiEnv* env, - const char* name, - jrawMonitorID* monitor_ptr); - - /* 32 : Destroy Raw Monitor */ - jvmtiError (JNICALL *DestroyRawMonitor) (jvmtiEnv* env, - jrawMonitorID monitor); - - /* 33 : Raw Monitor Enter */ - jvmtiError (JNICALL *RawMonitorEnter) (jvmtiEnv* env, - jrawMonitorID monitor); - - /* 34 : Raw Monitor Exit */ - jvmtiError (JNICALL *RawMonitorExit) (jvmtiEnv* env, - jrawMonitorID monitor); - - /* 35 : Raw Monitor Wait */ - jvmtiError (JNICALL *RawMonitorWait) (jvmtiEnv* env, - jrawMonitorID monitor, - jlong millis); - - /* 36 : Raw Monitor Notify */ - jvmtiError (JNICALL *RawMonitorNotify) (jvmtiEnv* env, - jrawMonitorID monitor); - - /* 37 : Raw Monitor Notify All */ - jvmtiError (JNICALL *RawMonitorNotifyAll) (jvmtiEnv* env, - jrawMonitorID monitor); - - /* 38 : Set Breakpoint */ - jvmtiError (JNICALL *SetBreakpoint) (jvmtiEnv* env, - jmethodID method, - jlocation location); - - /* 39 : Clear Breakpoint */ - jvmtiError (JNICALL *ClearBreakpoint) (jvmtiEnv* env, - jmethodID method, - jlocation location); - - /* 40 : RESERVED */ - void *reserved40; - - /* 41 : Set Field Access Watch */ - jvmtiError (JNICALL *SetFieldAccessWatch) (jvmtiEnv* env, - jclass klass, - jfieldID field); - - /* 42 : Clear Field Access Watch */ - jvmtiError (JNICALL *ClearFieldAccessWatch) (jvmtiEnv* env, - jclass klass, - jfieldID field); - - /* 43 : Set Field Modification Watch */ - jvmtiError (JNICALL *SetFieldModificationWatch) (jvmtiEnv* env, - jclass klass, - jfieldID field); - - /* 44 : Clear Field Modification Watch */ - jvmtiError (JNICALL *ClearFieldModificationWatch) (jvmtiEnv* env, - jclass klass, - jfieldID field); - - /* 45 : Is Modifiable Class */ - jvmtiError (JNICALL *IsModifiableClass) (jvmtiEnv* env, - jclass klass, - jboolean* is_modifiable_class_ptr); - - /* 46 : Allocate */ - jvmtiError (JNICALL *Allocate) (jvmtiEnv* env, - jlong size, - unsigned char** mem_ptr); - - /* 47 : Deallocate */ - jvmtiError (JNICALL *Deallocate) (jvmtiEnv* env, - unsigned char* mem); - - /* 48 : Get Class Signature */ - jvmtiError (JNICALL *GetClassSignature) (jvmtiEnv* env, - jclass klass, - char** signature_ptr, - char** generic_ptr); - - /* 49 : Get Class Status */ - jvmtiError (JNICALL *GetClassStatus) (jvmtiEnv* env, - jclass klass, - jint* status_ptr); - - /* 50 : Get Source File Name */ - jvmtiError (JNICALL *GetSourceFileName) (jvmtiEnv* env, - jclass klass, - char** source_name_ptr); - - /* 51 : Get Class Modifiers */ - jvmtiError (JNICALL *GetClassModifiers) (jvmtiEnv* env, - jclass klass, - jint* modifiers_ptr); - - /* 52 : Get Class Methods */ - jvmtiError (JNICALL *GetClassMethods) (jvmtiEnv* env, - jclass klass, - jint* method_count_ptr, - jmethodID** methods_ptr); - - /* 53 : Get Class Fields */ - jvmtiError (JNICALL *GetClassFields) (jvmtiEnv* env, - jclass klass, - jint* field_count_ptr, - jfieldID** fields_ptr); - - /* 54 : Get Implemented Interfaces */ - jvmtiError (JNICALL *GetImplementedInterfaces) (jvmtiEnv* env, - jclass klass, - jint* interface_count_ptr, - jclass** interfaces_ptr); - - /* 55 : Is Interface */ - jvmtiError (JNICALL *IsInterface) (jvmtiEnv* env, - jclass klass, - jboolean* is_interface_ptr); - - /* 56 : Is Array Class */ - jvmtiError (JNICALL *IsArrayClass) (jvmtiEnv* env, - jclass klass, - jboolean* is_array_class_ptr); - - /* 57 : Get Class Loader */ - jvmtiError (JNICALL *GetClassLoader) (jvmtiEnv* env, - jclass klass, - jobject* classloader_ptr); - - /* 58 : Get Object Hash Code */ - jvmtiError (JNICALL *GetObjectHashCode) (jvmtiEnv* env, - jobject object, - jint* hash_code_ptr); - - /* 59 : Get Object Monitor Usage */ - jvmtiError (JNICALL *GetObjectMonitorUsage) (jvmtiEnv* env, - jobject object, - jvmtiMonitorUsage* info_ptr); - - /* 60 : Get Field Name (and Signature) */ - jvmtiError (JNICALL *GetFieldName) (jvmtiEnv* env, - jclass klass, - jfieldID field, - char** name_ptr, - char** signature_ptr, - char** generic_ptr); - - /* 61 : Get Field Declaring Class */ - jvmtiError (JNICALL *GetFieldDeclaringClass) (jvmtiEnv* env, - jclass klass, - jfieldID field, - jclass* declaring_class_ptr); - - /* 62 : Get Field Modifiers */ - jvmtiError (JNICALL *GetFieldModifiers) (jvmtiEnv* env, - jclass klass, - jfieldID field, - jint* modifiers_ptr); - - /* 63 : Is Field Synthetic */ - jvmtiError (JNICALL *IsFieldSynthetic) (jvmtiEnv* env, - jclass klass, - jfieldID field, - jboolean* is_synthetic_ptr); - - /* 64 : Get Method Name (and Signature) */ - jvmtiError (JNICALL *GetMethodName) (jvmtiEnv* env, - jmethodID method, - char** name_ptr, - char** signature_ptr, - char** generic_ptr); - - /* 65 : Get Method Declaring Class */ - jvmtiError (JNICALL *GetMethodDeclaringClass) (jvmtiEnv* env, - jmethodID method, - jclass* declaring_class_ptr); - - /* 66 : Get Method Modifiers */ - jvmtiError (JNICALL *GetMethodModifiers) (jvmtiEnv* env, - jmethodID method, - jint* modifiers_ptr); - - /* 67 : RESERVED */ - void *reserved67; - - /* 68 : Get Max Locals */ - jvmtiError (JNICALL *GetMaxLocals) (jvmtiEnv* env, - jmethodID method, - jint* max_ptr); - - /* 69 : Get Arguments Size */ - jvmtiError (JNICALL *GetArgumentsSize) (jvmtiEnv* env, - jmethodID method, - jint* size_ptr); - - /* 70 : Get Line Number Table */ - jvmtiError (JNICALL *GetLineNumberTable) (jvmtiEnv* env, - jmethodID method, - jint* entry_count_ptr, - jvmtiLineNumberEntry** table_ptr); - - /* 71 : Get Method Location */ - jvmtiError (JNICALL *GetMethodLocation) (jvmtiEnv* env, - jmethodID method, - jlocation* start_location_ptr, - jlocation* end_location_ptr); - - /* 72 : Get Local Variable Table */ - jvmtiError (JNICALL *GetLocalVariableTable) (jvmtiEnv* env, - jmethodID method, - jint* entry_count_ptr, - jvmtiLocalVariableEntry** table_ptr); - - /* 73 : Set Native Method Prefix */ - jvmtiError (JNICALL *SetNativeMethodPrefix) (jvmtiEnv* env, - const char* prefix); - - /* 74 : Set Native Method Prefixes */ - jvmtiError (JNICALL *SetNativeMethodPrefixes) (jvmtiEnv* env, - jint prefix_count, - char** prefixes); - - /* 75 : Get Bytecodes */ - jvmtiError (JNICALL *GetBytecodes) (jvmtiEnv* env, - jmethodID method, - jint* bytecode_count_ptr, - unsigned char** bytecodes_ptr); - - /* 76 : Is Method Native */ - jvmtiError (JNICALL *IsMethodNative) (jvmtiEnv* env, - jmethodID method, - jboolean* is_native_ptr); - - /* 77 : Is Method Synthetic */ - jvmtiError (JNICALL *IsMethodSynthetic) (jvmtiEnv* env, - jmethodID method, - jboolean* is_synthetic_ptr); - - /* 78 : Get Loaded Classes */ - jvmtiError (JNICALL *GetLoadedClasses) (jvmtiEnv* env, - jint* class_count_ptr, - jclass** classes_ptr); - - /* 79 : Get Classloader Classes */ - jvmtiError (JNICALL *GetClassLoaderClasses) (jvmtiEnv* env, - jobject initiating_loader, - jint* class_count_ptr, - jclass** classes_ptr); - - /* 80 : Pop Frame */ - jvmtiError (JNICALL *PopFrame) (jvmtiEnv* env, - jthread thread); - - /* 81 : Force Early Return - Object */ - jvmtiError (JNICALL *ForceEarlyReturnObject) (jvmtiEnv* env, - jthread thread, - jobject value); - - /* 82 : Force Early Return - Int */ - jvmtiError (JNICALL *ForceEarlyReturnInt) (jvmtiEnv* env, - jthread thread, - jint value); - - /* 83 : Force Early Return - Long */ - jvmtiError (JNICALL *ForceEarlyReturnLong) (jvmtiEnv* env, - jthread thread, - jlong value); - - /* 84 : Force Early Return - Float */ - jvmtiError (JNICALL *ForceEarlyReturnFloat) (jvmtiEnv* env, - jthread thread, - jfloat value); - - /* 85 : Force Early Return - Double */ - jvmtiError (JNICALL *ForceEarlyReturnDouble) (jvmtiEnv* env, - jthread thread, - jdouble value); - - /* 86 : Force Early Return - Void */ - jvmtiError (JNICALL *ForceEarlyReturnVoid) (jvmtiEnv* env, - jthread thread); - - /* 87 : Redefine Classes */ - jvmtiError (JNICALL *RedefineClasses) (jvmtiEnv* env, - jint class_count, - const jvmtiClassDefinition* class_definitions); - - /* 88 : Get Version Number */ - jvmtiError (JNICALL *GetVersionNumber) (jvmtiEnv* env, - jint* version_ptr); - - /* 89 : Get Capabilities */ - jvmtiError (JNICALL *GetCapabilities) (jvmtiEnv* env, - jvmtiCapabilities* capabilities_ptr); - - /* 90 : Get Source Debug Extension */ - jvmtiError (JNICALL *GetSourceDebugExtension) (jvmtiEnv* env, - jclass klass, - char** source_debug_extension_ptr); - - /* 91 : Is Method Obsolete */ - jvmtiError (JNICALL *IsMethodObsolete) (jvmtiEnv* env, - jmethodID method, - jboolean* is_obsolete_ptr); - - /* 92 : Suspend Thread List */ - jvmtiError (JNICALL *SuspendThreadList) (jvmtiEnv* env, - jint request_count, - const jthread* request_list, - jvmtiError* results); - - /* 93 : Resume Thread List */ - jvmtiError (JNICALL *ResumeThreadList) (jvmtiEnv* env, - jint request_count, - const jthread* request_list, - jvmtiError* results); - - /* 94 : RESERVED */ - void *reserved94; - - /* 95 : RESERVED */ - void *reserved95; - - /* 96 : RESERVED */ - void *reserved96; - - /* 97 : RESERVED */ - void *reserved97; - - /* 98 : RESERVED */ - void *reserved98; - - /* 99 : RESERVED */ - void *reserved99; - - /* 100 : Get All Stack Traces */ - jvmtiError (JNICALL *GetAllStackTraces) (jvmtiEnv* env, - jint max_frame_count, - jvmtiStackInfo** stack_info_ptr, - jint* thread_count_ptr); - - /* 101 : Get Thread List Stack Traces */ - jvmtiError (JNICALL *GetThreadListStackTraces) (jvmtiEnv* env, - jint thread_count, - const jthread* thread_list, - jint max_frame_count, - jvmtiStackInfo** stack_info_ptr); - - /* 102 : Get Thread Local Storage */ - jvmtiError (JNICALL *GetThreadLocalStorage) (jvmtiEnv* env, - jthread thread, - void** data_ptr); - - /* 103 : Set Thread Local Storage */ - jvmtiError (JNICALL *SetThreadLocalStorage) (jvmtiEnv* env, - jthread thread, - const void* data); - - /* 104 : Get Stack Trace */ - jvmtiError (JNICALL *GetStackTrace) (jvmtiEnv* env, - jthread thread, - jint start_depth, - jint max_frame_count, - jvmtiFrameInfo* frame_buffer, - jint* count_ptr); - - /* 105 : RESERVED */ - void *reserved105; - - /* 106 : Get Tag */ - jvmtiError (JNICALL *GetTag) (jvmtiEnv* env, - jobject object, - jlong* tag_ptr); - - /* 107 : Set Tag */ - jvmtiError (JNICALL *SetTag) (jvmtiEnv* env, - jobject object, - jlong tag); - - /* 108 : Force Garbage Collection */ - jvmtiError (JNICALL *ForceGarbageCollection) (jvmtiEnv* env); - - /* 109 : Iterate Over Objects Reachable From Object */ - jvmtiError (JNICALL *IterateOverObjectsReachableFromObject) (jvmtiEnv* env, - jobject object, - jvmtiObjectReferenceCallback object_reference_callback, - const void* user_data); - - /* 110 : Iterate Over Reachable Objects */ - jvmtiError (JNICALL *IterateOverReachableObjects) (jvmtiEnv* env, - jvmtiHeapRootCallback heap_root_callback, - jvmtiStackReferenceCallback stack_ref_callback, - jvmtiObjectReferenceCallback object_ref_callback, - const void* user_data); - - /* 111 : Iterate Over Heap */ - jvmtiError (JNICALL *IterateOverHeap) (jvmtiEnv* env, - jvmtiHeapObjectFilter object_filter, - jvmtiHeapObjectCallback heap_object_callback, - const void* user_data); - - /* 112 : Iterate Over Instances Of Class */ - jvmtiError (JNICALL *IterateOverInstancesOfClass) (jvmtiEnv* env, - jclass klass, - jvmtiHeapObjectFilter object_filter, - jvmtiHeapObjectCallback heap_object_callback, - const void* user_data); - - /* 113 : RESERVED */ - void *reserved113; - - /* 114 : Get Objects With Tags */ - jvmtiError (JNICALL *GetObjectsWithTags) (jvmtiEnv* env, - jint tag_count, - const jlong* tags, - jint* count_ptr, - jobject** object_result_ptr, - jlong** tag_result_ptr); - - /* 115 : Follow References */ - jvmtiError (JNICALL *FollowReferences) (jvmtiEnv* env, - jint heap_filter, - jclass klass, - jobject initial_object, - const jvmtiHeapCallbacks* callbacks, - const void* user_data); - - /* 116 : Iterate Through Heap */ - jvmtiError (JNICALL *IterateThroughHeap) (jvmtiEnv* env, - jint heap_filter, - jclass klass, - const jvmtiHeapCallbacks* callbacks, - const void* user_data); - - /* 117 : RESERVED */ - void *reserved117; - - /* 118 : RESERVED */ - void *reserved118; - - /* 119 : RESERVED */ - void *reserved119; - - /* 120 : Set JNI Function Table */ - jvmtiError (JNICALL *SetJNIFunctionTable) (jvmtiEnv* env, - const jniNativeInterface* function_table); - - /* 121 : Get JNI Function Table */ - jvmtiError (JNICALL *GetJNIFunctionTable) (jvmtiEnv* env, - jniNativeInterface** function_table); - - /* 122 : Set Event Callbacks */ - jvmtiError (JNICALL *SetEventCallbacks) (jvmtiEnv* env, - const jvmtiEventCallbacks* callbacks, - jint size_of_callbacks); - - /* 123 : Generate Events */ - jvmtiError (JNICALL *GenerateEvents) (jvmtiEnv* env, - jvmtiEvent event_type); - - /* 124 : Get Extension Functions */ - jvmtiError (JNICALL *GetExtensionFunctions) (jvmtiEnv* env, - jint* extension_count_ptr, - jvmtiExtensionFunctionInfo** extensions); - - /* 125 : Get Extension Events */ - jvmtiError (JNICALL *GetExtensionEvents) (jvmtiEnv* env, - jint* extension_count_ptr, - jvmtiExtensionEventInfo** extensions); - - /* 126 : Set Extension Event Callback */ - jvmtiError (JNICALL *SetExtensionEventCallback) (jvmtiEnv* env, - jint extension_event_index, - jvmtiExtensionEvent callback); - - /* 127 : Dispose Environment */ - jvmtiError (JNICALL *DisposeEnvironment) (jvmtiEnv* env); - - /* 128 : Get Error Name */ - jvmtiError (JNICALL *GetErrorName) (jvmtiEnv* env, - jvmtiError error, - char** name_ptr); - - /* 129 : Get JLocation Format */ - jvmtiError (JNICALL *GetJLocationFormat) (jvmtiEnv* env, - jvmtiJlocationFormat* format_ptr); - - /* 130 : Get System Properties */ - jvmtiError (JNICALL *GetSystemProperties) (jvmtiEnv* env, - jint* count_ptr, - char*** property_ptr); - - /* 131 : Get System Property */ - jvmtiError (JNICALL *GetSystemProperty) (jvmtiEnv* env, - const char* property, - char** value_ptr); - - /* 132 : Set System Property */ - jvmtiError (JNICALL *SetSystemProperty) (jvmtiEnv* env, - const char* property, - const char* value); - - /* 133 : Get Phase */ - jvmtiError (JNICALL *GetPhase) (jvmtiEnv* env, - jvmtiPhase* phase_ptr); - - /* 134 : Get Current Thread CPU Timer Information */ - jvmtiError (JNICALL *GetCurrentThreadCpuTimerInfo) (jvmtiEnv* env, - jvmtiTimerInfo* info_ptr); - - /* 135 : Get Current Thread CPU Time */ - jvmtiError (JNICALL *GetCurrentThreadCpuTime) (jvmtiEnv* env, - jlong* nanos_ptr); - - /* 136 : Get Thread CPU Timer Information */ - jvmtiError (JNICALL *GetThreadCpuTimerInfo) (jvmtiEnv* env, - jvmtiTimerInfo* info_ptr); - - /* 137 : Get Thread CPU Time */ - jvmtiError (JNICALL *GetThreadCpuTime) (jvmtiEnv* env, - jthread thread, - jlong* nanos_ptr); - - /* 138 : Get Timer Information */ - jvmtiError (JNICALL *GetTimerInfo) (jvmtiEnv* env, - jvmtiTimerInfo* info_ptr); - - /* 139 : Get Time */ - jvmtiError (JNICALL *GetTime) (jvmtiEnv* env, - jlong* nanos_ptr); - - /* 140 : Get Potential Capabilities */ - jvmtiError (JNICALL *GetPotentialCapabilities) (jvmtiEnv* env, - jvmtiCapabilities* capabilities_ptr); - - /* 141 : RESERVED */ - void *reserved141; - - /* 142 : Add Capabilities */ - jvmtiError (JNICALL *AddCapabilities) (jvmtiEnv* env, - const jvmtiCapabilities* capabilities_ptr); - - /* 143 : Relinquish Capabilities */ - jvmtiError (JNICALL *RelinquishCapabilities) (jvmtiEnv* env, - const jvmtiCapabilities* capabilities_ptr); - - /* 144 : Get Available Processors */ - jvmtiError (JNICALL *GetAvailableProcessors) (jvmtiEnv* env, - jint* processor_count_ptr); - - /* 145 : Get Class Version Numbers */ - jvmtiError (JNICALL *GetClassVersionNumbers) (jvmtiEnv* env, - jclass klass, - jint* minor_version_ptr, - jint* major_version_ptr); - - /* 146 : Get Constant Pool */ - jvmtiError (JNICALL *GetConstantPool) (jvmtiEnv* env, - jclass klass, - jint* constant_pool_count_ptr, - jint* constant_pool_byte_count_ptr, - unsigned char** constant_pool_bytes_ptr); - - /* 147 : Get Environment Local Storage */ - jvmtiError (JNICALL *GetEnvironmentLocalStorage) (jvmtiEnv* env, - void** data_ptr); - - /* 148 : Set Environment Local Storage */ - jvmtiError (JNICALL *SetEnvironmentLocalStorage) (jvmtiEnv* env, - const void* data); - - /* 149 : Add To Bootstrap Class Loader Search */ - jvmtiError (JNICALL *AddToBootstrapClassLoaderSearch) (jvmtiEnv* env, - const char* segment); - - /* 150 : Set Verbose Flag */ - jvmtiError (JNICALL *SetVerboseFlag) (jvmtiEnv* env, - jvmtiVerboseFlag flag, - jboolean value); - - /* 151 : Add To System Class Loader Search */ - jvmtiError (JNICALL *AddToSystemClassLoaderSearch) (jvmtiEnv* env, - const char* segment); - - /* 152 : Retransform Classes */ - jvmtiError (JNICALL *RetransformClasses) (jvmtiEnv* env, - jint class_count, - const jclass* classes); - - /* 153 : Get Owned Monitor Stack Depth Info */ - jvmtiError (JNICALL *GetOwnedMonitorStackDepthInfo) (jvmtiEnv* env, - jthread thread, - jint* monitor_info_count_ptr, - jvmtiMonitorStackDepthInfo** monitor_info_ptr); - - /* 154 : Get Object Size */ - jvmtiError (JNICALL *GetObjectSize) (jvmtiEnv* env, - jobject object, - jlong* size_ptr); - -} jvmtiInterface_1; - -struct _jvmtiEnv { - const struct jvmtiInterface_1_ *functions; -#ifdef __cplusplus - - - jvmtiError Allocate(jlong size, - unsigned char** mem_ptr) { - return functions->Allocate(this, size, mem_ptr); - } - - jvmtiError Deallocate(unsigned char* mem) { - return functions->Deallocate(this, mem); - } - - jvmtiError GetThreadState(jthread thread, - jint* thread_state_ptr) { - return functions->GetThreadState(this, thread, thread_state_ptr); - } - - jvmtiError GetCurrentThread(jthread* thread_ptr) { - return functions->GetCurrentThread(this, thread_ptr); - } - - jvmtiError GetAllThreads(jint* threads_count_ptr, - jthread** threads_ptr) { - return functions->GetAllThreads(this, threads_count_ptr, threads_ptr); - } - - jvmtiError SuspendThread(jthread thread) { - return functions->SuspendThread(this, thread); - } - - jvmtiError SuspendThreadList(jint request_count, - const jthread* request_list, - jvmtiError* results) { - return functions->SuspendThreadList(this, request_count, request_list, results); - } - - jvmtiError ResumeThread(jthread thread) { - return functions->ResumeThread(this, thread); - } - - jvmtiError ResumeThreadList(jint request_count, - const jthread* request_list, - jvmtiError* results) { - return functions->ResumeThreadList(this, request_count, request_list, results); - } - - jvmtiError StopThread(jthread thread, - jobject exception) { - return functions->StopThread(this, thread, exception); - } - - jvmtiError InterruptThread(jthread thread) { - return functions->InterruptThread(this, thread); - } - - jvmtiError GetThreadInfo(jthread thread, - jvmtiThreadInfo* info_ptr) { - return functions->GetThreadInfo(this, thread, info_ptr); - } - - jvmtiError GetOwnedMonitorInfo(jthread thread, - jint* owned_monitor_count_ptr, - jobject** owned_monitors_ptr) { - return functions->GetOwnedMonitorInfo(this, thread, owned_monitor_count_ptr, owned_monitors_ptr); - } - - jvmtiError GetOwnedMonitorStackDepthInfo(jthread thread, - jint* monitor_info_count_ptr, - jvmtiMonitorStackDepthInfo** monitor_info_ptr) { - return functions->GetOwnedMonitorStackDepthInfo(this, thread, monitor_info_count_ptr, monitor_info_ptr); - } - - jvmtiError GetCurrentContendedMonitor(jthread thread, - jobject* monitor_ptr) { - return functions->GetCurrentContendedMonitor(this, thread, monitor_ptr); - } - - jvmtiError RunAgentThread(jthread thread, - jvmtiStartFunction proc, - const void* arg, - jint priority) { - return functions->RunAgentThread(this, thread, proc, arg, priority); - } - - jvmtiError SetThreadLocalStorage(jthread thread, - const void* data) { - return functions->SetThreadLocalStorage(this, thread, data); - } - - jvmtiError GetThreadLocalStorage(jthread thread, - void** data_ptr) { - return functions->GetThreadLocalStorage(this, thread, data_ptr); - } - - jvmtiError GetTopThreadGroups(jint* group_count_ptr, - jthreadGroup** groups_ptr) { - return functions->GetTopThreadGroups(this, group_count_ptr, groups_ptr); - } - - jvmtiError GetThreadGroupInfo(jthreadGroup group, - jvmtiThreadGroupInfo* info_ptr) { - return functions->GetThreadGroupInfo(this, group, info_ptr); - } - - jvmtiError GetThreadGroupChildren(jthreadGroup group, - jint* thread_count_ptr, - jthread** threads_ptr, - jint* group_count_ptr, - jthreadGroup** groups_ptr) { - return functions->GetThreadGroupChildren(this, group, thread_count_ptr, threads_ptr, group_count_ptr, groups_ptr); - } - - jvmtiError GetStackTrace(jthread thread, - jint start_depth, - jint max_frame_count, - jvmtiFrameInfo* frame_buffer, - jint* count_ptr) { - return functions->GetStackTrace(this, thread, start_depth, max_frame_count, frame_buffer, count_ptr); - } - - jvmtiError GetAllStackTraces(jint max_frame_count, - jvmtiStackInfo** stack_info_ptr, - jint* thread_count_ptr) { - return functions->GetAllStackTraces(this, max_frame_count, stack_info_ptr, thread_count_ptr); - } - - jvmtiError GetThreadListStackTraces(jint thread_count, - const jthread* thread_list, - jint max_frame_count, - jvmtiStackInfo** stack_info_ptr) { - return functions->GetThreadListStackTraces(this, thread_count, thread_list, max_frame_count, stack_info_ptr); - } - - jvmtiError GetFrameCount(jthread thread, - jint* count_ptr) { - return functions->GetFrameCount(this, thread, count_ptr); - } - - jvmtiError PopFrame(jthread thread) { - return functions->PopFrame(this, thread); - } - - jvmtiError GetFrameLocation(jthread thread, - jint depth, - jmethodID* method_ptr, - jlocation* location_ptr) { - return functions->GetFrameLocation(this, thread, depth, method_ptr, location_ptr); - } - - jvmtiError NotifyFramePop(jthread thread, - jint depth) { - return functions->NotifyFramePop(this, thread, depth); - } - - jvmtiError ForceEarlyReturnObject(jthread thread, - jobject value) { - return functions->ForceEarlyReturnObject(this, thread, value); - } - - jvmtiError ForceEarlyReturnInt(jthread thread, - jint value) { - return functions->ForceEarlyReturnInt(this, thread, value); - } - - jvmtiError ForceEarlyReturnLong(jthread thread, - jlong value) { - return functions->ForceEarlyReturnLong(this, thread, value); - } - - jvmtiError ForceEarlyReturnFloat(jthread thread, - jfloat value) { - return functions->ForceEarlyReturnFloat(this, thread, value); - } - - jvmtiError ForceEarlyReturnDouble(jthread thread, - jdouble value) { - return functions->ForceEarlyReturnDouble(this, thread, value); - } - - jvmtiError ForceEarlyReturnVoid(jthread thread) { - return functions->ForceEarlyReturnVoid(this, thread); - } - - jvmtiError FollowReferences(jint heap_filter, - jclass klass, - jobject initial_object, - const jvmtiHeapCallbacks* callbacks, - const void* user_data) { - return functions->FollowReferences(this, heap_filter, klass, initial_object, callbacks, user_data); - } - - jvmtiError IterateThroughHeap(jint heap_filter, - jclass klass, - const jvmtiHeapCallbacks* callbacks, - const void* user_data) { - return functions->IterateThroughHeap(this, heap_filter, klass, callbacks, user_data); - } - - jvmtiError GetTag(jobject object, - jlong* tag_ptr) { - return functions->GetTag(this, object, tag_ptr); - } - - jvmtiError SetTag(jobject object, - jlong tag) { - return functions->SetTag(this, object, tag); - } - - jvmtiError GetObjectsWithTags(jint tag_count, - const jlong* tags, - jint* count_ptr, - jobject** object_result_ptr, - jlong** tag_result_ptr) { - return functions->GetObjectsWithTags(this, tag_count, tags, count_ptr, object_result_ptr, tag_result_ptr); - } - - jvmtiError ForceGarbageCollection() { - return functions->ForceGarbageCollection(this); - } - - jvmtiError IterateOverObjectsReachableFromObject(jobject object, - jvmtiObjectReferenceCallback object_reference_callback, - const void* user_data) { - return functions->IterateOverObjectsReachableFromObject(this, object, object_reference_callback, user_data); - } - - jvmtiError IterateOverReachableObjects(jvmtiHeapRootCallback heap_root_callback, - jvmtiStackReferenceCallback stack_ref_callback, - jvmtiObjectReferenceCallback object_ref_callback, - const void* user_data) { - return functions->IterateOverReachableObjects(this, heap_root_callback, stack_ref_callback, object_ref_callback, user_data); - } - - jvmtiError IterateOverHeap(jvmtiHeapObjectFilter object_filter, - jvmtiHeapObjectCallback heap_object_callback, - const void* user_data) { - return functions->IterateOverHeap(this, object_filter, heap_object_callback, user_data); - } - - jvmtiError IterateOverInstancesOfClass(jclass klass, - jvmtiHeapObjectFilter object_filter, - jvmtiHeapObjectCallback heap_object_callback, - const void* user_data) { - return functions->IterateOverInstancesOfClass(this, klass, object_filter, heap_object_callback, user_data); - } - - jvmtiError GetLocalObject(jthread thread, - jint depth, - jint slot, - jobject* value_ptr) { - return functions->GetLocalObject(this, thread, depth, slot, value_ptr); - } - - jvmtiError GetLocalInt(jthread thread, - jint depth, - jint slot, - jint* value_ptr) { - return functions->GetLocalInt(this, thread, depth, slot, value_ptr); - } - - jvmtiError GetLocalLong(jthread thread, - jint depth, - jint slot, - jlong* value_ptr) { - return functions->GetLocalLong(this, thread, depth, slot, value_ptr); - } - - jvmtiError GetLocalFloat(jthread thread, - jint depth, - jint slot, - jfloat* value_ptr) { - return functions->GetLocalFloat(this, thread, depth, slot, value_ptr); - } - - jvmtiError GetLocalDouble(jthread thread, - jint depth, - jint slot, - jdouble* value_ptr) { - return functions->GetLocalDouble(this, thread, depth, slot, value_ptr); - } - - jvmtiError SetLocalObject(jthread thread, - jint depth, - jint slot, - jobject value) { - return functions->SetLocalObject(this, thread, depth, slot, value); - } - - jvmtiError SetLocalInt(jthread thread, - jint depth, - jint slot, - jint value) { - return functions->SetLocalInt(this, thread, depth, slot, value); - } - - jvmtiError SetLocalLong(jthread thread, - jint depth, - jint slot, - jlong value) { - return functions->SetLocalLong(this, thread, depth, slot, value); - } - - jvmtiError SetLocalFloat(jthread thread, - jint depth, - jint slot, - jfloat value) { - return functions->SetLocalFloat(this, thread, depth, slot, value); - } - - jvmtiError SetLocalDouble(jthread thread, - jint depth, - jint slot, - jdouble value) { - return functions->SetLocalDouble(this, thread, depth, slot, value); - } - - jvmtiError SetBreakpoint(jmethodID method, - jlocation location) { - return functions->SetBreakpoint(this, method, location); - } - - jvmtiError ClearBreakpoint(jmethodID method, - jlocation location) { - return functions->ClearBreakpoint(this, method, location); - } - - jvmtiError SetFieldAccessWatch(jclass klass, - jfieldID field) { - return functions->SetFieldAccessWatch(this, klass, field); - } - - jvmtiError ClearFieldAccessWatch(jclass klass, - jfieldID field) { - return functions->ClearFieldAccessWatch(this, klass, field); - } - - jvmtiError SetFieldModificationWatch(jclass klass, - jfieldID field) { - return functions->SetFieldModificationWatch(this, klass, field); - } - - jvmtiError ClearFieldModificationWatch(jclass klass, - jfieldID field) { - return functions->ClearFieldModificationWatch(this, klass, field); - } - - jvmtiError GetLoadedClasses(jint* class_count_ptr, - jclass** classes_ptr) { - return functions->GetLoadedClasses(this, class_count_ptr, classes_ptr); - } - - jvmtiError GetClassLoaderClasses(jobject initiating_loader, - jint* class_count_ptr, - jclass** classes_ptr) { - return functions->GetClassLoaderClasses(this, initiating_loader, class_count_ptr, classes_ptr); - } - - jvmtiError GetClassSignature(jclass klass, - char** signature_ptr, - char** generic_ptr) { - return functions->GetClassSignature(this, klass, signature_ptr, generic_ptr); - } - - jvmtiError GetClassStatus(jclass klass, - jint* status_ptr) { - return functions->GetClassStatus(this, klass, status_ptr); - } - - jvmtiError GetSourceFileName(jclass klass, - char** source_name_ptr) { - return functions->GetSourceFileName(this, klass, source_name_ptr); - } - - jvmtiError GetClassModifiers(jclass klass, - jint* modifiers_ptr) { - return functions->GetClassModifiers(this, klass, modifiers_ptr); - } - - jvmtiError GetClassMethods(jclass klass, - jint* method_count_ptr, - jmethodID** methods_ptr) { - return functions->GetClassMethods(this, klass, method_count_ptr, methods_ptr); - } - - jvmtiError GetClassFields(jclass klass, - jint* field_count_ptr, - jfieldID** fields_ptr) { - return functions->GetClassFields(this, klass, field_count_ptr, fields_ptr); - } - - jvmtiError GetImplementedInterfaces(jclass klass, - jint* interface_count_ptr, - jclass** interfaces_ptr) { - return functions->GetImplementedInterfaces(this, klass, interface_count_ptr, interfaces_ptr); - } - - jvmtiError GetClassVersionNumbers(jclass klass, - jint* minor_version_ptr, - jint* major_version_ptr) { - return functions->GetClassVersionNumbers(this, klass, minor_version_ptr, major_version_ptr); - } - - jvmtiError GetConstantPool(jclass klass, - jint* constant_pool_count_ptr, - jint* constant_pool_byte_count_ptr, - unsigned char** constant_pool_bytes_ptr) { - return functions->GetConstantPool(this, klass, constant_pool_count_ptr, constant_pool_byte_count_ptr, constant_pool_bytes_ptr); - } - - jvmtiError IsInterface(jclass klass, - jboolean* is_interface_ptr) { - return functions->IsInterface(this, klass, is_interface_ptr); - } - - jvmtiError IsArrayClass(jclass klass, - jboolean* is_array_class_ptr) { - return functions->IsArrayClass(this, klass, is_array_class_ptr); - } - - jvmtiError IsModifiableClass(jclass klass, - jboolean* is_modifiable_class_ptr) { - return functions->IsModifiableClass(this, klass, is_modifiable_class_ptr); - } - - jvmtiError GetClassLoader(jclass klass, - jobject* classloader_ptr) { - return functions->GetClassLoader(this, klass, classloader_ptr); - } - - jvmtiError GetSourceDebugExtension(jclass klass, - char** source_debug_extension_ptr) { - return functions->GetSourceDebugExtension(this, klass, source_debug_extension_ptr); - } - - jvmtiError RetransformClasses(jint class_count, - const jclass* classes) { - return functions->RetransformClasses(this, class_count, classes); - } - - jvmtiError RedefineClasses(jint class_count, - const jvmtiClassDefinition* class_definitions) { - return functions->RedefineClasses(this, class_count, class_definitions); - } - - jvmtiError GetObjectSize(jobject object, - jlong* size_ptr) { - return functions->GetObjectSize(this, object, size_ptr); - } - - jvmtiError GetObjectHashCode(jobject object, - jint* hash_code_ptr) { - return functions->GetObjectHashCode(this, object, hash_code_ptr); - } - - jvmtiError GetObjectMonitorUsage(jobject object, - jvmtiMonitorUsage* info_ptr) { - return functions->GetObjectMonitorUsage(this, object, info_ptr); - } - - jvmtiError GetFieldName(jclass klass, - jfieldID field, - char** name_ptr, - char** signature_ptr, - char** generic_ptr) { - return functions->GetFieldName(this, klass, field, name_ptr, signature_ptr, generic_ptr); - } - - jvmtiError GetFieldDeclaringClass(jclass klass, - jfieldID field, - jclass* declaring_class_ptr) { - return functions->GetFieldDeclaringClass(this, klass, field, declaring_class_ptr); - } - - jvmtiError GetFieldModifiers(jclass klass, - jfieldID field, - jint* modifiers_ptr) { - return functions->GetFieldModifiers(this, klass, field, modifiers_ptr); - } - - jvmtiError IsFieldSynthetic(jclass klass, - jfieldID field, - jboolean* is_synthetic_ptr) { - return functions->IsFieldSynthetic(this, klass, field, is_synthetic_ptr); - } - - jvmtiError GetMethodName(jmethodID method, - char** name_ptr, - char** signature_ptr, - char** generic_ptr) { - return functions->GetMethodName(this, method, name_ptr, signature_ptr, generic_ptr); - } - - jvmtiError GetMethodDeclaringClass(jmethodID method, - jclass* declaring_class_ptr) { - return functions->GetMethodDeclaringClass(this, method, declaring_class_ptr); - } - - jvmtiError GetMethodModifiers(jmethodID method, - jint* modifiers_ptr) { - return functions->GetMethodModifiers(this, method, modifiers_ptr); - } - - jvmtiError GetMaxLocals(jmethodID method, - jint* max_ptr) { - return functions->GetMaxLocals(this, method, max_ptr); - } - - jvmtiError GetArgumentsSize(jmethodID method, - jint* size_ptr) { - return functions->GetArgumentsSize(this, method, size_ptr); - } - - jvmtiError GetLineNumberTable(jmethodID method, - jint* entry_count_ptr, - jvmtiLineNumberEntry** table_ptr) { - return functions->GetLineNumberTable(this, method, entry_count_ptr, table_ptr); - } - - jvmtiError GetMethodLocation(jmethodID method, - jlocation* start_location_ptr, - jlocation* end_location_ptr) { - return functions->GetMethodLocation(this, method, start_location_ptr, end_location_ptr); - } - - jvmtiError GetLocalVariableTable(jmethodID method, - jint* entry_count_ptr, - jvmtiLocalVariableEntry** table_ptr) { - return functions->GetLocalVariableTable(this, method, entry_count_ptr, table_ptr); - } - - jvmtiError GetBytecodes(jmethodID method, - jint* bytecode_count_ptr, - unsigned char** bytecodes_ptr) { - return functions->GetBytecodes(this, method, bytecode_count_ptr, bytecodes_ptr); - } - - jvmtiError IsMethodNative(jmethodID method, - jboolean* is_native_ptr) { - return functions->IsMethodNative(this, method, is_native_ptr); - } - - jvmtiError IsMethodSynthetic(jmethodID method, - jboolean* is_synthetic_ptr) { - return functions->IsMethodSynthetic(this, method, is_synthetic_ptr); - } - - jvmtiError IsMethodObsolete(jmethodID method, - jboolean* is_obsolete_ptr) { - return functions->IsMethodObsolete(this, method, is_obsolete_ptr); - } - - jvmtiError SetNativeMethodPrefix(const char* prefix) { - return functions->SetNativeMethodPrefix(this, prefix); - } - - jvmtiError SetNativeMethodPrefixes(jint prefix_count, - char** prefixes) { - return functions->SetNativeMethodPrefixes(this, prefix_count, prefixes); - } - - jvmtiError CreateRawMonitor(const char* name, - jrawMonitorID* monitor_ptr) { - return functions->CreateRawMonitor(this, name, monitor_ptr); - } - - jvmtiError DestroyRawMonitor(jrawMonitorID monitor) { - return functions->DestroyRawMonitor(this, monitor); - } - - jvmtiError RawMonitorEnter(jrawMonitorID monitor) { - return functions->RawMonitorEnter(this, monitor); - } - - jvmtiError RawMonitorExit(jrawMonitorID monitor) { - return functions->RawMonitorExit(this, monitor); - } - - jvmtiError RawMonitorWait(jrawMonitorID monitor, - jlong millis) { - return functions->RawMonitorWait(this, monitor, millis); - } - - jvmtiError RawMonitorNotify(jrawMonitorID monitor) { - return functions->RawMonitorNotify(this, monitor); - } - - jvmtiError RawMonitorNotifyAll(jrawMonitorID monitor) { - return functions->RawMonitorNotifyAll(this, monitor); - } - - jvmtiError SetJNIFunctionTable(const jniNativeInterface* function_table) { - return functions->SetJNIFunctionTable(this, function_table); - } - - jvmtiError GetJNIFunctionTable(jniNativeInterface** function_table) { - return functions->GetJNIFunctionTable(this, function_table); - } - - jvmtiError SetEventCallbacks(const jvmtiEventCallbacks* callbacks, - jint size_of_callbacks) { - return functions->SetEventCallbacks(this, callbacks, size_of_callbacks); - } - - jvmtiError SetEventNotificationMode(jvmtiEventMode mode, - jvmtiEvent event_type, - jthread event_thread, - ...) { - return functions->SetEventNotificationMode(this, mode, event_type, event_thread); - } - - jvmtiError GenerateEvents(jvmtiEvent event_type) { - return functions->GenerateEvents(this, event_type); - } - - jvmtiError GetExtensionFunctions(jint* extension_count_ptr, - jvmtiExtensionFunctionInfo** extensions) { - return functions->GetExtensionFunctions(this, extension_count_ptr, extensions); - } - - jvmtiError GetExtensionEvents(jint* extension_count_ptr, - jvmtiExtensionEventInfo** extensions) { - return functions->GetExtensionEvents(this, extension_count_ptr, extensions); - } - - jvmtiError SetExtensionEventCallback(jint extension_event_index, - jvmtiExtensionEvent callback) { - return functions->SetExtensionEventCallback(this, extension_event_index, callback); - } - - jvmtiError GetPotentialCapabilities(jvmtiCapabilities* capabilities_ptr) { - return functions->GetPotentialCapabilities(this, capabilities_ptr); - } - - jvmtiError AddCapabilities(const jvmtiCapabilities* capabilities_ptr) { - return functions->AddCapabilities(this, capabilities_ptr); - } - - jvmtiError RelinquishCapabilities(const jvmtiCapabilities* capabilities_ptr) { - return functions->RelinquishCapabilities(this, capabilities_ptr); - } - - jvmtiError GetCapabilities(jvmtiCapabilities* capabilities_ptr) { - return functions->GetCapabilities(this, capabilities_ptr); - } - - jvmtiError GetCurrentThreadCpuTimerInfo(jvmtiTimerInfo* info_ptr) { - return functions->GetCurrentThreadCpuTimerInfo(this, info_ptr); - } - - jvmtiError GetCurrentThreadCpuTime(jlong* nanos_ptr) { - return functions->GetCurrentThreadCpuTime(this, nanos_ptr); - } - - jvmtiError GetThreadCpuTimerInfo(jvmtiTimerInfo* info_ptr) { - return functions->GetThreadCpuTimerInfo(this, info_ptr); - } - - jvmtiError GetThreadCpuTime(jthread thread, - jlong* nanos_ptr) { - return functions->GetThreadCpuTime(this, thread, nanos_ptr); - } - - jvmtiError GetTimerInfo(jvmtiTimerInfo* info_ptr) { - return functions->GetTimerInfo(this, info_ptr); - } - - jvmtiError GetTime(jlong* nanos_ptr) { - return functions->GetTime(this, nanos_ptr); - } - - jvmtiError GetAvailableProcessors(jint* processor_count_ptr) { - return functions->GetAvailableProcessors(this, processor_count_ptr); - } - - jvmtiError AddToBootstrapClassLoaderSearch(const char* segment) { - return functions->AddToBootstrapClassLoaderSearch(this, segment); - } - - jvmtiError AddToSystemClassLoaderSearch(const char* segment) { - return functions->AddToSystemClassLoaderSearch(this, segment); - } - - jvmtiError GetSystemProperties(jint* count_ptr, - char*** property_ptr) { - return functions->GetSystemProperties(this, count_ptr, property_ptr); - } - - jvmtiError GetSystemProperty(const char* property, - char** value_ptr) { - return functions->GetSystemProperty(this, property, value_ptr); - } - - jvmtiError SetSystemProperty(const char* property, - const char* value) { - return functions->SetSystemProperty(this, property, value); - } - - jvmtiError GetPhase(jvmtiPhase* phase_ptr) { - return functions->GetPhase(this, phase_ptr); - } - - jvmtiError DisposeEnvironment() { - return functions->DisposeEnvironment(this); - } - - jvmtiError SetEnvironmentLocalStorage(const void* data) { - return functions->SetEnvironmentLocalStorage(this, data); - } - - jvmtiError GetEnvironmentLocalStorage(void** data_ptr) { - return functions->GetEnvironmentLocalStorage(this, data_ptr); - } - - jvmtiError GetVersionNumber(jint* version_ptr) { - return functions->GetVersionNumber(this, version_ptr); - } - - jvmtiError GetErrorName(jvmtiError error, - char** name_ptr) { - return functions->GetErrorName(this, error, name_ptr); - } - - jvmtiError SetVerboseFlag(jvmtiVerboseFlag flag, - jboolean value) { - return functions->SetVerboseFlag(this, flag, value); - } - - jvmtiError GetJLocationFormat(jvmtiJlocationFormat* format_ptr) { - return functions->GetJLocationFormat(this, format_ptr); - } - -#endif /* __cplusplus */ -}; - - -#ifdef __cplusplus -} /* extern "C" */ -#endif /* __cplusplus */ - -#endif /* !_JAVA_JVMTI_H_ */ - diff --git a/include/win32/jawt_md.h b/include/win32/jawt_md.h deleted file mode 100644 index 82ba034..0000000 --- a/include/win32/jawt_md.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * %W% %E% - * - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. - * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. - */ - -#ifndef _JAVASOFT_JAWT_MD_H_ -#define _JAVASOFT_JAWT_MD_H_ - -#include -#include "jawt.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Win32-specific declarations for AWT native interface. - * See notes in jawt.h for an example of use. - */ -typedef struct jawt_Win32DrawingSurfaceInfo { - /* Native window, DDB, or DIB handle */ - union { - HWND hwnd; - HBITMAP hbitmap; - void* pbits; - }; - /* - * This HDC should always be used instead of the HDC returned from - * BeginPaint() or any calls to GetDC(). - */ - HDC hdc; - HPALETTE hpalette; -} JAWT_Win32DrawingSurfaceInfo; - -#ifdef __cplusplus -} -#endif - -#endif /* !_JAVASOFT_JAWT_MD_H_ */ diff --git a/include/win32/jni_md.h b/include/win32/jni_md.h deleted file mode 100644 index 9ac4718..0000000 --- a/include/win32/jni_md.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * %W% %E% - * - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. - * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. - */ - -#ifndef _JAVASOFT_JNI_MD_H_ -#define _JAVASOFT_JNI_MD_H_ - -#define JNIEXPORT __declspec(dllexport) -#define JNIIMPORT __declspec(dllimport) -#define JNICALL __stdcall - -typedef long jint; -typedef __int64 jlong; -typedef signed char jbyte; - -#endif /* !_JAVASOFT_JNI_MD_H_ */ diff --git a/lib/wiiuse.dll b/lib/wiiuse.dll new file mode 100644 index 0000000000000000000000000000000000000000..d2a452861d4ae3456255f314ea7f511b2a37d665 GIT binary patch literal 55364 zcmeIb3w#vS**`u>HV`nd5rd#bT`|~T5wjsz4J9NjAP|i}l#00IvLVsjn#>}o=;9_d zn&@ z_w$*ZIn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xQ&$UowOVO42qG0S_qJ_5C!qY_^#qaGtWBHmu*%&S5@<|q}t zKJK=7$BU*zgG`AW3qDz2aZ-j~tigv3(eGdw@o+9s)_o{|Wpsa8BH0IWdAl78HyRa-s1Ah& z_f^qJ_I9-6=PInCMqnPN{X_z{pvWf>tS zUeS;2%=#!3Xb;3E8@N17One0*=o=BlK(SB1->@LF4(KJ?g52L1F1V7sdbTggnm^mI zd>U(KR0V|JFiLD1o3#SvmG<%~odb)!5#^Yb;M^sw$HU#9=Y#SQ3+4?~{96=ud=g?w zSt)&72*pJE!3T!L(gjzk49LE)!EkP#I$xPVI+sUKAygA$9s)sX!C9HZGj$DBDw(<} zoBU8`ihe#CK{=(^Enh_@`uIMTW0_>{KX26(K_#C}C4rt!j^LUV2Y2xj5h(czAGnP6 z`ys4eA4q0q5?0eG2jwbOQs#!y;G!zmXA(DKf8Xo~WSKHKC+fW*e_>2@g)OK}4O9x} zYJVu>1C}FeBb!7v_g@8}52os=Ync1{APUq`o0H&yJTkVhe82`pSHEbR0bVy?cq+OJ zcKgkxC@C4aRn+bU+6QviK-rwjK6x1^q0E5F#J7rv$pq2YN>HI@I&0` zi!&_4jGYRBjefiGZ4)K=KdX#*nNkXiuJx#LmW#&Yob5UnldZWzv3{*Cq+`1D=j%#i zTTF)4)>Ha6igTK)eny7bf_>T*ACIMvu~CJjC_Hfe$*ihOmD$xIiO;r{IZBjf3U)x1 z8OT~?!iRSYSe!vpE}JrQCiGRm`hw5bRw>`UA)$44reTQENC$Vcn5YBwo9qLX=l(o~ zQ8Luk19zQ8YmDYQU>UWur;etmqrsL&l<@n2s#1taO(|Fq7_e8 HR^I+Udaap! literal 0 HcmV?d00001 diff --git a/lib/wiiuse.lib b/lib/wiiuse.lib deleted file mode 100644 index e6d010ed778ae680bb24bf039841138423bd336d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10344 zcmb_iOK%)S5H8y!F(welvGHr|tlxoyahzQ{MhKagM1m87V3o!9Lr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