|
SWILIB API (X75)
|
Functions for the JVM.
Usage: #include <swilib.h> or #include <swilib/java.h>
Data Structures | |
| struct | JAVA_HEAP_SLOTS |
| Java heap slots, allocated at the VM start and never freed by the firmware (see RamJavaHeapSlots). More... | |
Typedefs | |
| typedef struct JAVA_HEAP_SLOTS | JAVA_HEAP_SLOTS |
Functions | |
| char * | GetLastJavaApplication (void) |
| Get the name of the running Java application. | |
| int | IsNoJava () |
| Check if Java is NOT running. | |
| int8_t * | RamIsRunJava () |
| Check if Java IS running. | |
| int | runMidletLinkablely (const char *midlet, WSHDR *filename) |
| Open file with java midlet. | |
| void | StartMidlet (char *midlet) |
| Start java midlet. | |
| int * | RamJavaVMStarted (void) |
| "VM started" flag: 1 while the Java VM exists, cleared when the VM ends. | |
| int * | RamJavaExitPopup (void) |
| Java exit popup flag: 1 while the "exit Java" popup is shown. | |
| JAVA_HEAP_SLOTS * | RamJavaHeapSlots (void) |
| Java heap slots (see JAVA_HEAP_SLOTS). | |
| void ** | RamJavaVMHeaps (void) |
| Heap pointers reused by the next VM start; a non-NULL entry equals heap[i] of its JAVA_HEAP_SLOTS slot. | |
| int | JAM_StartApplicationClass (WSHDR *class_name, int unk1, int unk2, int unk3, int unk4) |
| Start a Java application by class name, as the firmware's FlexMenu_start does at boot for L"com.siemens.mp.app.flexmenu.MenuContainer" ("JAM_StartApplicationClass(%Pw)", csrc/core/jam_start_handler.c). | |
| struct JAVA_HEAP_SLOTS |
| char * GetLastJavaApplication | ( | void | ) |
Get the name of the running Java application.
| int IsNoJava | ( | ) |
Check if Java is NOT running.
| int8_t * RamIsRunJava | ( | ) |
Check if Java IS running.
On EL71/E71 sw45 this is the midlet manager's count of open Java screens (an int, "decremented gui count to %d" in native/midmgr/midlet_manager.c): 0 = no Java app on screen.
Open file with java midlet.
Launches a java midlet passing it a file name.
| midlet | path to the .jar |
| filename | path to the any file |
| void StartMidlet | ( | char * | midlet | ) |
Start java midlet.
| midlet | path to the .jar |
| int * RamJavaVMStarted | ( | void | ) |
"VM started" flag: 1 while the Java VM exists, cleared when the VM ends.
The JVM message handler (JVM_*_MSG 0x6200-0x6203 on NSG/ELKA, 0x45-0x49 on SG, 0x48-0x4E on X75) ignores messages while it is 0.
| int * RamJavaExitPopup | ( | void | ) |
Java exit popup flag: 1 while the "exit Java" popup is shown.
Then JVM_STOP_MSG / JVM_END_MSG show the popup again instead of ending the VM.
| JAVA_HEAP_SLOTS * RamJavaHeapSlots | ( | void | ) |
Java heap slots (see JAVA_HEAP_SLOTS).
After the VM has ended, free a slot with mfree(raw[i]) and zero heap[i] and the matching RamJavaVMHeaps entry. Without this the Java heap (MBs) stays allocated until a reboot.
| void ** RamJavaVMHeaps | ( | void | ) |
Heap pointers reused by the next VM start; a non-NULL entry equals heap[i] of its JAVA_HEAP_SLOTS slot.
| int JAM_StartApplicationClass | ( | WSHDR * | class_name, |
| int | unk1, | ||
| int | unk2, | ||
| int | unk3, | ||
| int | unk4 ) |
Start a Java application by class name, as the firmware's FlexMenu_start does at boot for L"com.siemens.mp.app.flexmenu.MenuContainer" ("JAM_StartApplicationClass(%Pw)", csrc/core/jam_start_handler.c).
Starts the VM first when it is not running.
| class_name | full class name |
| unk1,unk2,unk3,unk4 | 0 |