navit
0.5.3-trunk
|
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include "android.h"
#include <android/log.h>
#include "navit.h"
#include "config_.h"
#include "command.h"
#include "debug.h"
#include "event.h"
#include "callback.h"
#include "country.h"
#include "projection.h"
#include "coord.h"
#include "map.h"
#include "mapset.h"
#include "navit_nls.h"
#include "transform.h"
#include "color.h"
#include "types.h"
#include "search.h"
#include "start_real.h"
#include "track.h"
Data Structures | |
struct | android_search_priv |
Functions | |
JNIEXPORT jint JNICALL | JNI_OnLoad (JavaVM *aVm, void *aReserved) |
int | android_find_class_global (char *name, jclass *ret) |
int | android_find_method (jclass class, char *name, char *args, jmethodID *ret) |
int | android_find_static_method (jclass class, char *name, char *args, jmethodID *ret) |
JNIEXPORT void JNICALL | Java_org_navitproject_navit_Navit_navitMain (JNIEnv *env, jobject thiz, jstring lang, jstring path, jstring map_path) |
Starts the Navitlib for Android. More... | |
JNIEXPORT void JNICALL | Java_org_navitproject_navit_Navit_navitDestroy (JNIEnv *env, jobject thiz) |
JNIEXPORT void JNICALL | Java_org_navitproject_navit_NavitGraphics_sizeChangedCallback (JNIEnv *env, jobject thiz, jlong id, jint w, jint h) |
JNIEXPORT void JNICALL | Java_org_navitproject_navit_NavitGraphics_paddingChangedCallback (JNIEnv *env, jobject thiz, jlong id, jint left, jint top, jint right, jint bottom) |
JNIEXPORT void JNICALL | Java_org_navitproject_navit_NavitGraphics_buttonCallback (JNIEnv *env, jobject thiz, jlong id, jint pressed, jint button, jint x, jint y) |
JNIEXPORT void JNICALL | Java_org_navitproject_navit_NavitGraphics_motionCallback (JNIEnv *env, jobject thiz, jlong id, jint x, jint y) |
JNIEXPORT void JNICALL | Java_org_navitproject_navit_NavitGraphics_keypressCallback (JNIEnv *env, jobject thiz, jlong id, jstring str) |
JNIEXPORT void JNICALL | Java_org_navitproject_navit_NavitTimeout_timeoutCallback (JNIEnv *env, jobject thiz, jlong id) |
JNIEXPORT void JNICALL | Java_org_navitproject_navit_NavitVehicle_vehicleCallback (JNIEnv *env, jobject thiz, jlong id, jobject location) |
JNIEXPORT void JNICALL | Java_org_navitproject_navit_NavitWatch_poll (JNIEnv *env, jobject thiz, jlong func, jint fd, jint cond) |
JNIEXPORT void JNICALL | Java_org_navitproject_navit_NavitWatch_watchCallback (JNIEnv *env, jobject thiz, jlong id) |
JNIEXPORT void JNICALL | Java_org_navitproject_navit_NavitSensors_sensorCallback (JNIEnv *env, jobject thiz, jlong id, jint sensor, jfloat x, jfloat y, jfloat z) |
JNIEXPORT void JNICALL | Java_org_navitproject_navit_NavitTraff_onFeedReceived (JNIEnv *env, jobject thiz, jlong id, jstring feed) |
void | android_return_search_result (struct jni_object *jni_o, int type, struct pcoord *location, const char *address) |
JNIEXPORT jstring JNICALL | Java_org_navitproject_navit_NavitAppConfig_callbackLocalizedString (JNIEnv *env, jclass thiz, jstring str) |
JNIEXPORT jstring JNICALL | Java_org_navitproject_navit_NavitGraphics_getDefaultCountry (JNIEnv *env, jobject thiz, jint channel, jstring str) |
JNIEXPORT jobjectArray JNICALL | Java_org_navitproject_navit_NavitGraphics_getAllCountries (JNIEnv *env, jclass thiz) |
JNIEXPORT jstring JNICALL | Java_org_navitproject_navit_NavitGraphics_getCoordForPoint (JNIEnv *env, jobject thiz, jint x, jint y, jboolean absoluteCoord) |
JNIEXPORT jobject JNICALL | Java_org_navitproject_navit_NavitCallbackHandler_callbackCmdChannel (JNIEnv *env, jclass thiz, jint command) |
JNIEXPORT jint JNICALL | Java_org_navitproject_navit_NavitCallbackHandler_callbackMessageChannel (JNIEnv *env, jclass thiz, jint channel, jstring str) |
static char * | postal_str (struct search_list_result *res, int level) |
static char * | district_str (struct search_list_result *res, int level) |
static char * | town_str (struct search_list_result *res, int level) |
static void | android_search_end (struct android_search_priv *search_priv) |
static void | android_search_idle_result (struct android_search_priv *search_priv, struct search_list_result *res) |
static void | android_search_idle (struct android_search_priv *search_priv) |
static void | start_search (struct android_search_priv *search_priv, const char *search_string) |
JNIEXPORT jlong JNICALL | Java_org_navitproject_navit_NavitAddressSearchActivity_callbackStartAddressSearch (JNIEnv *env, jobject thiz, jint partial, jstring country, jstring str) |
JNIEXPORT void JNICALL | Java_org_navitproject_navit_NavitAddressSearchActivity_callbackCancelAddressSearch (JNIEnv *env, jobject thiz, jlong handle) |
Variables | |
JNIEnv * | jnienv |
jobject * | android_activity = NULL |
static enum attr_type | android_search_level [] |
int android_find_class_global | ( | char * | name, |
jclass * | ret | ||
) |
References dbg, jnienv, lvl_error, and name.
Referenced by pedestrian_navit_init(), plugin_init(), speech_android_init(), traffic_traff_android_init(), and vehicle_android_init().
int android_find_method | ( | jclass | class, |
char * | name, | ||
char * | args, | ||
jmethodID * | ret | ||
) |
References dbg, jnienv, lvl_error, and name.
Referenced by speech_android_init(), and vehicle_android_init().
int android_find_static_method | ( | jclass | class, |
char * | name, | ||
char * | args, | ||
jmethodID * | ret | ||
) |
void android_return_search_result | ( | struct jni_object * | jni_o, |
int | type, | ||
struct pcoord * | location, | ||
const char * | address | ||
) |
References c, jni_object::env, jni_object::jm, jni_object::jo, coord_geo::lat, coord_geo::lng, pcoord::pro, transform_to_geo(), type, pcoord::x, and pcoord::y.
Referenced by android_search_idle_result().
|
static |
References callback_destroy(), dbg, jni_object::env, event_remove_idle(), android_search_priv::idle_clb, android_search_priv::idle_ev, jni_object::jo, lvl_debug, lvl_error, android_search_priv::phrases, android_search_priv::search_list, search_list_destroy(), and android_search_priv::search_result_obj.
Referenced by android_search_idle().
|
static |
References android_search_end(), android_search_idle_result(), android_search_level, attr_to_name(), android_search_priv::current_phrase_per_level, dbg, android_search_priv::found, lvl_debug, lvl_info, android_search_priv::partial, android_search_priv::phrases, android_search_priv::search_attr, android_search_priv::search_list, search_list_get_result(), search_list_level(), search_list_search(), attr::str, attr::type, and attr::u.
Referenced by start_search().
|
static |
References android_return_search_result(), search_list_common::c, search_list_town::common, search_list_street::common, search_list_house_number::common, search_list_result::country, dbg, android_search_priv::found, search_list_house_number::house_number, search_list_result::house_number, lvl_error, search_list_country::name, search_list_street::name, android_search_priv::search_attr, android_search_priv::search_result_obj, search_list_result::street, search_list_result::town, town_str(), and attr::type.
Referenced by android_search_idle().
|
static |
JNIEXPORT void JNICALL Java_org_navitproject_navit_Navit_navitDestroy | ( | JNIEnv * | env, |
jobject | thiz | ||
) |
JNIEXPORT void JNICALL Java_org_navitproject_navit_Navit_navitMain | ( | JNIEnv * | env, |
jobject | thiz, | ||
jstring | lang, | ||
jstring | path, | ||
jstring | map_path | ||
) |
Starts the Navitlib for Android.
env | provided by JVM |
thiz | the calling Navit instance |
lang | a string describing the language |
path | relates to NAVIT_DATA_DIR on linux |
map_path | where the binfiles are stored |
References android_activity, dbg, jnienv, lvl_debug, and main_real().
JNIEXPORT void JNICALL Java_org_navitproject_navit_NavitAddressSearchActivity_callbackCancelAddressSearch | ( | JNIEnv * | env, |
jobject | thiz, | ||
jlong | handle | ||
) |
JNIEXPORT jlong JNICALL Java_org_navitproject_navit_NavitAddressSearchActivity_callbackStartAddressSearch | ( | JNIEnv * | env, |
jobject | thiz, | ||
jint | partial, | ||
jstring | country, | ||
jstring | str | ||
) |
References config_get(), config_get_attr(), android_search_priv::current_phrase_per_level, dbg, jni_object::env, jni_object::jm, jni_object::jo, lvl_debug, lvl_error, attr::navit, navit_get_mapset(), android_search_priv::partial, android_search_priv::search_list, search_list_get_result(), search_list_new(), search_list_search(), android_search_priv::search_result_obj, start_search(), attr::str, attr::type, and attr::u.
JNIEXPORT jstring JNICALL Java_org_navitproject_navit_NavitAppConfig_callbackLocalizedString | ( | JNIEnv * | env, |
jclass | thiz, | ||
jstring | str | ||
) |
References navit_nls_gettext().
JNIEXPORT jobject JNICALL Java_org_navitproject_navit_NavitCallbackHandler_callbackCmdChannel | ( | JNIEnv * | env, |
jclass | thiz, | ||
jint | command | ||
) |
JNIEXPORT jint JNICALL Java_org_navitproject_navit_NavitCallbackHandler_callbackMessageChannel | ( | JNIEnv * | env, |
jclass | thiz, | ||
jint | channel, | ||
jstring | str | ||
) |
References attr::attrs, c, command_evaluate(), config_get(), config_get_attr(), data, dbg, coord_geo::lat, coord_geo::lng, lvl_debug, lvl_error, attr::map, map_new(), mapset_add_attr(), mapset_get_map_by_name(), mapset_remove_attr(), name, attr::navit, navit_draw(), navit_get_mapset(), navit_get_trans(), navit_set_destination(), p, pcoord_format_degree_short(), pcoord::pro, projection_mg, attr::str, transform_from_geo(), transform_get_projection(), transform_reverse(), attr::type, type, attr::u, pcoord::x, and pcoord::y.
JNIEXPORT void JNICALL Java_org_navitproject_navit_NavitGraphics_buttonCallback | ( | JNIEnv * | env, |
jobject | thiz, | ||
jlong | id, | ||
jint | pressed, | ||
jint | button, | ||
jint | x, | ||
jint | y | ||
) |
References callback_call_4, dbg, and lvl_debug.
JNIEXPORT jobjectArray JNICALL Java_org_navitproject_navit_NavitGraphics_getAllCountries | ( | JNIEnv * | env, |
jclass | thiz | ||
) |
References config_get(), config_get_attr(), search_list_result::country, dbg, search_list_country::iso2, lvl_debug, search_list::ms, search_list_country::name, attr::navit, navit_get_mapset(), navit_nls_gettext(), search_list_destroy(), search_list_get_result(), search_list_new(), search_list_search(), attr::str, attr::type, and attr::u.
JNIEXPORT jstring JNICALL Java_org_navitproject_navit_NavitGraphics_getCoordForPoint | ( | JNIEnv * | env, |
jobject | thiz, | ||
jint | x, | ||
jint | y, | ||
jboolean | absoluteCoord | ||
) |
JNIEXPORT jstring JNICALL Java_org_navitproject_navit_NavitGraphics_getDefaultCountry | ( | JNIEnv * | env, |
jobject | thiz, | ||
jint | channel, | ||
jstring | str | ||
) |
References config_get(), config_get_attr(), search_list_result::country, country_default(), country_search_destroy(), country_search_get_item(), country_search_new(), dbg, search_list_country::iso2, item_attr_get(), lvl_debug, search_list::ms, attr::navit, navit_get_mapset(), navit_get_tracking(), search_list_get_result(), search_list_new(), search_list_search(), attr::str, tracking_get_attr(), attr::type, and attr::u.
JNIEXPORT void JNICALL Java_org_navitproject_navit_NavitGraphics_keypressCallback | ( | JNIEnv * | env, |
jobject | thiz, | ||
jlong | id, | ||
jstring | str | ||
) |
References callback_call_1, dbg, lvl_debug, and attr::str.
JNIEXPORT void JNICALL Java_org_navitproject_navit_NavitGraphics_motionCallback | ( | JNIEnv * | env, |
jobject | thiz, | ||
jlong | id, | ||
jint | x, | ||
jint | y | ||
) |
References callback_call_2, dbg, and lvl_debug.
JNIEXPORT void JNICALL Java_org_navitproject_navit_NavitGraphics_paddingChangedCallback | ( | JNIEnv * | env, |
jobject | thiz, | ||
jlong | id, | ||
jint | left, | ||
jint | top, | ||
jint | right, | ||
jint | bottom | ||
) |
References callback_call_4, dbg, and lvl_debug.
JNIEXPORT void JNICALL Java_org_navitproject_navit_NavitGraphics_sizeChangedCallback | ( | JNIEnv * | env, |
jobject | thiz, | ||
jlong | id, | ||
jint | w, | ||
jint | h | ||
) |
References callback_call_2, dbg, and lvl_debug.
JNIEXPORT void JNICALL Java_org_navitproject_navit_NavitSensors_sensorCallback | ( | JNIEnv * | env, |
jobject | thiz, | ||
jlong | id, | ||
jint | sensor, | ||
jfloat | x, | ||
jfloat | y, | ||
jfloat | z | ||
) |
References callback_call_4, dbg, and lvl_debug.
JNIEXPORT void JNICALL Java_org_navitproject_navit_NavitTimeout_timeoutCallback | ( | JNIEnv * | env, |
jobject | thiz, | ||
jlong | id | ||
) |
JNIEXPORT void JNICALL Java_org_navitproject_navit_NavitTraff_onFeedReceived | ( | JNIEnv * | env, |
jobject | thiz, | ||
jlong | id, | ||
jstring | feed | ||
) |
References callback_call_1.
JNIEXPORT void JNICALL Java_org_navitproject_navit_NavitVehicle_vehicleCallback | ( | JNIEnv * | env, |
jobject | thiz, | ||
jlong | id, | ||
jobject | location | ||
) |
References callback_call_1.
JNIEXPORT void JNICALL Java_org_navitproject_navit_NavitWatch_poll | ( | JNIEnv * | env, |
jobject | thiz, | ||
jlong | func, | ||
jint | fd, | ||
jint | cond | ||
) |
JNIEXPORT void JNICALL Java_org_navitproject_navit_NavitWatch_watchCallback | ( | JNIEnv * | env, |
jobject | thiz, | ||
jlong | id | ||
) |
References callback_call_0, dbg, and lvl_debug.
JNIEXPORT jint JNICALL JNI_OnLoad | ( | JavaVM * | aVm, |
void * | aReserved | ||
) |
|
static |
|
static |
References android_search_idle(), callback_cast, callback_new_1, dbg, event_add_idle(), android_search_priv::idle_clb, android_search_priv::idle_ev, lvl_debug, android_search_priv::partial, android_search_priv::phrases, android_search_priv::search_attr, search_fix_spaces(), android_search_priv::search_list, search_list_search(), attr::str, attr::type, and attr::u.
Referenced by Java_org_navitproject_navit_NavitAddressSearchActivity_callbackStartAddressSearch().
|
static |
References search_list_town::common, search_list_common::county_name, district_str(), postal_str(), search_list_result::town, and search_list_common::town_name.
Referenced by android_search_idle_result().
jobject* android_activity = NULL |
Referenced by event_android_main_loop_quit(), graphics_android_cmd_runMenuItem(), graphics_android_disable_suspend(), graphics_android_fullscreen(), graphics_android_init(), hide_native_keyboard(), Java_org_navitproject_navit_Navit_navitMain(), pedestrian_navit_init(), plugin_init(), set_activity(), show_native_keyboard(), speech_android_init(), traffic_traff_android_init(), and vehicle_android_init().
|
static |
Referenced by android_search_idle().
JNIEnv* jnienv |
Referenced by android_find_class_global(), android_find_method(), android_find_static_method(), draw_circle(), draw_drag(), draw_image(), draw_image_warp(), draw_lines(), draw_mode(), draw_polygon(), draw_polygon_with_holes(), draw_rectangle(), draw_text(), event_android_add_idle(), event_android_add_timeout(), event_android_add_watch(), event_android_main_loop_quit(), event_android_new(), event_android_remove_idle(), event_android_remove_timeout(), event_android_remove_watch(), find_class_global(), find_method(), find_static_method(), graphics_android_cmd_runMenuItem(), graphics_android_disable_suspend(), graphics_android_fullscreen(), graphics_android_init(), graphics_android_new(), hide_native_keyboard(), image_new(), initPaint(), Java_org_navitproject_navit_Navit_navitMain(), JNI_OnLoad(), overlay_disable(), overlay_resize(), pedestrian_navit_init(), plugin_init(), set_activity(), set_attr(), show_native_keyboard(), speech_android_init(), speech_android_say(), traffic_traff_android_destroy(), traffic_traff_android_init(), traffic_traff_android_set_selection(), vehicle_android_init(), and vehicle_android_position_callback().