| C H A P T E R 3 |
|
File Organization and Naming |
This chapter describes how the Java Wireless Client software source code is organized and describes the naming conventions used for native files.
The following list shows the organization of the rest of the Java Wireless Client software source hierarchy. The files are located under the installDir/midp directory.
src/ - Top-level source directory
subsystemX/ - Top-level subsystem directory
subsystem.gmk - The subsystem makefile that combines the library makefiles for this subystem and defines settings common to the subsystem
libraryY/- Top-level library directory
libraryY/lib.gmk - Library makefile. Contains rules and settings specific to this library.
libraryY/include - The libraryY exported native interface
libraryY/classes/ - Exported Java programming language interface
implementationZ/ - Implementation of this library
implementationZ/lib.gmk - Implementation makefile. Contains rules and settings specific to this implementation.
implementationZ/libinfo.gmk - Implementation descriptor. Specifies dependencies on other libraries.
implementationZ/include - Additional native exported interfaces specific to this implementation
implementationZ/classes - Java programming language class files for this implementation
implementationZ/native - Native files for this implementation
SubsystemX represents a Java Wireless Client software subsystem or service such as the record management system or the high-level user interface. LibraryY represents one of the libraries that constitute subsystemX. ImplementationZ is one of the alternative implementations of libraryY. TABLE 3-1 shows the Java Wireless Client software subsystems and their libraries. For libraries with more than one implementation, the alternative implementations are listed.
See the Build Guide for instructions about how to add a directory for your platform, as well as subsystems and libraries.
When you add a new library to the existing subsystem, put the exported native interface of this library into a subdirectory named include. Then add one or more implementations of this interface into the respective subdirectories.
Subsystems and libraries use the following naming conventions.
The JavaCall API is distributed in the javacall and javacall-com subdirectories under the main Java Wireless Client software directory. These subdirectories contain the header files that define the JavaCall API as well as a full implementation for Windows.
javacall and javacall-com have similar internal structures. The JavaCall API header files are contained in javacall/interface and javacall-com/interface. Each header file contains a set of related functions. The header files for MIDP live in subdirectories of javacall/interface/midp. Header files for optional APIs are contained in directories corresponding to their defining JSR. For example, the JavaCall API for Bluetooth functionality is contained in javacall-com/interface/jsr82_bt.
Optional APIs might have more than one header file that defines the corresponding JavaCall API. For example, the PIM and FileConnection APIs defined by JSR 75 are represented by these headers:
javacall-com/interface/jsr75_pim_fc/javacall_pim.h
javacall-com/interface/jsr75_pim_fc/javacall_fileconnection.h
The JavaCall API includes an implementation for Windows in javacall/implementation/win32 and javacall-com/implementation/win32. The source files are organized in a structure similar to the structure for the header files. For example, javacall/implementation/win32/midp/lcd.c is the implementation of the JavaCall API defined in javacall/interface/midp/javacall_lcd.h.
Copyright © 2007, Sun Microsystems, Inc. All rights reserved. SUN PROPRIETARY/CONFIDENTIAL.