static int roadmap_car_call_back (SsdWidget widget, const char *new_value, const void *value, void *context) { roadmap_car_list_dialog *list_context = (roadmap_car_list_dialog *)context; RoadMapConfigDescriptor CarCfg = ROADMAP_CONFIG_ITEM("Trip", "Car"); roadmap_config_declare ("user", &CarCfg, "car_blue", NULL); roadmap_config_set (&CarCfg, value); ssd_generic_list_dialog_hide (); if (list_context->callback) (*list_context->callback)(); return 1; }
#include "roadmap_border.h" #include "roadmap_ticker.h" #include "roadmap_message_ticker.h" #include "roadmap_screen.h" #include "roadmap_main.h" #include "navigate/navigate_bar.h" #include "ssd/ssd_widget.h" #include "roadmap_display.h" #include "roadmap_device.h" static char *RoadMapDisplayPage = NULL; static RoadMapConfigDescriptor RoadMapConfigDisplayDuration = ROADMAP_CONFIG_ITEM("Display", "Duration"); static RoadMapConfigDescriptor RoadMapConfigDisplayBottomRight = ROADMAP_CONFIG_ITEM("Display", "Bottom Right"); static RoadMapConfigDescriptor RoadMapConfigDisplayBottomLeft = ROADMAP_CONFIG_ITEM("Display", "Bottom Left"); static RoadMapConfigDescriptor RoadMapConfigDisplayTopRight = ROADMAP_CONFIG_ITEM("Display", "Top Right"); static RoadMapConfigDescriptor RoadMapConfigConsoleBackground = ROADMAP_CONFIG_ITEM("Console", "Background"); static RoadMapConfigDescriptor RoadMapConfigConsoleForeground = ROADMAP_CONFIG_ITEM("Console", "Foreground");
#define ROADMAP_FOURSQUARE_MAX_VENUE_COUNT 50 #define FOURSQUARE_VENUES_LIST_NAME "VenuesList" #define FOURSQUARE_REQUEST_TIMEOUT 15000 static FoursquareVenue gsVenuesList[ROADMAP_FOURSQUARE_MAX_VENUE_COUNT]; static int gsVenuesCount = 0; static FoursquareCheckin gsCheckInInfo; // User name RoadMapConfigDescriptor FOURSQUARE_CFG_PRM_NAME_Var = ROADMAP_CONFIG_ITEM( FOURSQUARE_CONFIG_TAB, FOURSQUARE_CFG_PRM_NAME_Name); // Password RoadMapConfigDescriptor FOURSQUARE_CFG_PRM_PASSWORD_Var = ROADMAP_CONFIG_ITEM( FOURSQUARE_CONFIG_TAB, FOURSQUARE_CFG_PRM_PASSWORD_Name); // Enable / Disable Tweeting Foursquare login RoadMapConfigDescriptor FOURSQUARE_CFG_PRM_TWEET_LOGIN_Var = ROADMAP_CONFIG_ITEM( FOURSQUARE_CONFIG_TAB, FOURSQUARE_CFG_PRM_TWEET_LOGIN_Name); // Enable / Disable Tweeting Foursquare badge unlock RoadMapConfigDescriptor FOURSQUARE_CFG_PRM_TWEET_BADGE_Var = ROADMAP_CONFIG_ITEM( FOURSQUARE_CONFIG_TAB,
#ifndef ROADMAP_BROWSER #define ROADMAP_BROWSER "dillo" #endif #define CFG_HELP_GUIDED_TOUR_URL_DEFAULT "http://d2bhe1se45kh4t.cloudfront.net/guided_tour_en.mp4" #define CFG_HELP_WHAT_TO_EXPECT_URL_DEFAULT "http://d2bhe1se45kh4t.cloudfront.net/guided_tour_en.mp4" extern RoadMapAction RoadMapStartActions[]; extern BOOL get_menu_item_names( const char* menu_name, ssd_contextmenu_ptr parent, const char* items[], int* count); static RoadMapConfigDescriptor RoadMapConfigBrowser = ROADMAP_CONFIG_ITEM("Help", "Browser"); static RoadMapConfigDescriptor RoadMapConfigBrowserOptions = ROADMAP_CONFIG_ITEM("Help", "Arguments"); static RoadMapConfigDescriptor RoadMapConfigHelpGuidedTour = ROADMAP_CONFIG_ITEM("Help", "Guided tour url"); static RoadMapConfigDescriptor RoadMapConfigHelpWhatToExpectUrl = ROADMAP_CONFIG_ITEM("Help", "What to expect url"); static RoadMapConfigDescriptor RoadMapConfigHelpShowWhatToExpect = ROADMAP_CONFIG_ITEM("Help", "Show what to expect"); static RoadMapConfigDescriptor RoadMapConfigHelpRollerNutshell = ROADMAP_CONFIG_ITEM("Help", "Roller nutshell");
/* TODO:: Add these two params to the configuration *** AGA *** */ #define RM_BACKLIGHT_AUTO_OFF_TIMEOUT 300 /* Time in seconds. Staying this time in the radius of * RM_BACKLIGHT_AUTO_OFF_MOVEMENT meters indicates * "Staying in one position" state */ #define RM_BACKLIGHT_AUTO_OFF_MOVEMENT 10 /* Distance in meters of the movement threshold. * Staying in this radius for RM_BACKLIGHT_AUTO_OFF_TIMEOUT seconds * indicates "Staying in one position" state */ #define RM_BACKLIGHT_ON 1 #define RM_BACKLIGHT_OFF 0 RoadMapConfigDescriptor RoadMapConfigBackLight = ROADMAP_CONFIG_ITEM("Display", "BackLight"); static time_t gsLastMovementTime = 0; /* Time of the last detected movement */ static RoadMapGpsPosition gsLastMovementPos = ROADMAP_GPS_NULL_POSITION; /* Position of the last detected movement */ static int gsBacklightOnActive = 0; void roadmap_device_backlight_monitor_reset( void ); static void roadmap_device_backlight_monitor( time_t gps_time, const RoadMapGpsPrecision *dilution, const RoadMapGpsPosition *position); static void roadmap_device_set_backlight_( int value ); /*********************************************************** * Name : roadmap_device_initialize * Purpose : Loads the backlight parameter from the configuration * and updates the application. Returns the loaded value */ int roadmap_device_initialize( void )
extern void convert_int_coordinate_to_float_string(char* buffer, int value); extern const char* VerifyStatus( /* IN */ const char* pNext, /* IN */ void* pContext, /* OUT */ BOOL* more_data_needed, /* OUT */ roadmap_result* rc); const char* on_local_option( /* IN */ const char* data, /* IN */ void* context, /* OUT */ BOOL* more_data_needed, /* OUT */ roadmap_result* rc); static BOOL s_initialized_once = FALSE; static RoadMapConfigDescriptor s_web_service_name = ROADMAP_CONFIG_ITEM( LSR_WEBSVC_CFG_TAB, LSR_WEBSVC_ADDRESS); static RoadMapConfigDescriptor s_web_service_ls_provider = ROADMAP_CONFIG_ITEM( LSR_WEBSVC_CFG_TAB, LSR_WEBSVC_PROVIDER ); static RoadMapConfigDescriptor s_web_service_ls_provider_label = ROADMAP_CONFIG_ITEM( LSR_WEBSVC_CFG_TAB, LSR_WEBSVC_PROVIDER_LABEL ); static RoadMapConfigDescriptor s_web_service_ls_provider_icon = ROADMAP_CONFIG_ITEM( LSR_WEBSVC_CFG_TAB, LSR_WEBSVC_PROVIDER_ICON ); static RoadMapConfigDescriptor s_web_service_ls_provider_logo =
#include <stdio.h> #include <string.h> #include <stdlib.h> #include "roadmap.h" #include "roadmap_canvas.h" #include "roadmap_res.h" #include "roadmap_res_download.h" #include "roadmap_main.h" #include "roadmap_config.h" #include "roadmap_splash.h" #include "Realtime/Realtime.h" #include "websvc_trans/web_date_format.h" static RoadMapConfigDescriptor RoadMapConfigSplashFeatureEnabled = ROADMAP_CONFIG_ITEM("Splash", "Feature Enabled"); static RoadMapConfigDescriptor RoadMapConfigSplashUpdateTime = ROADMAP_CONFIG_ITEM("Splash", "Update time"); static RoadMapConfigDescriptor RoadMapConfigLastCheckTime = ROADMAP_CONFIG_ITEM("Splash", "Last check time"); static BOOL initialized = FALSE; static RoadMapCallback SplashNextLoginCb = NULL; static void download_wide_splash(void); #define START_DOWNLOAD_DELAY 30000 #define SPLASH_CHECK_INTERVAL 6 * 3600 typedef struct { const char *name; int min_screen_width; int height;
#define ACTIVITY_TIMEOUT_SEC 3 static size_t RecvBytesCount; static size_t SendBytesCount; static size_t LastCounterUpdate; static size_t LastStateUpdate; static int NumConnections; static time_t LastActivityTime = 0; static const char *LastErrorText = ""; static ROADMAP_NET_MON_STATE CurrentState = NET_MON_DISABLED; #if !defined(INLINE_DEC) #define INLINE_DEC #endif static RoadMapConfigDescriptor RoadMapConfigNetMonitorEnabled = ROADMAP_CONFIG_ITEM("Network", "Monitor Enabled"); static BOOL RoadMapNetMonEnabled = FALSE; static void periodic_callack (void) { if( RoadMapNetMonEnabled == FALSE || ( #ifndef _WIN32 (CurrentState == NET_MON_IDLE) && #endif // _WIN32 ((time(NULL) - LastActivityTime) > ACTIVITY_TIMEOUT_SEC)) ) { roadmap_message_unset('!'); LastActivityTime = 0; roadmap_main_remove_periodic(periodic_callack); roadmap_screen_redraw(); }
//intro texts static char * INTRO_ENG[NUMBER_OF_LINES_INTRO] = {INTR_ENG_0,INTR_ENG_1,INTR_ENG_2,INTR_ENG_3}; static char * INTRO_ESP[NUMBER_OF_LINES_INTRO] = {INTR_ESP_0,INTR_ESP_1,INTR_ESP_2,INTR_ESP_3}; #if defined(RIMAPI) || defined(ANDROID) static void terms_of_use_native(); #endif static void add_intro_texts(SsdWidget group, int tab_flag); extern RoadMapConfigDescriptor RT_CFG_PRM_NKNM_Var; //// First time static RoadMapConfigDescriptor WELCOME_WIZ_FIRST_TIME_Var = ROADMAP_CONFIG_ITEM( WELCOME_WIZ_TAB, WELCOME_WIZ_FIRST_TIME_Name); static RoadMapConfigDescriptor WELCOME_WIZ_ENABLED_Var = ROADMAP_CONFIG_ITEM( WELCOME_WIZ_TAB, WELOCME_WIZ_ENABLED_Name); static RoadMapConfigDescriptor WELCOME_WIZ_TERMS_OF_USE_Var = ROADMAP_CONFIG_ITEM( WELCOME_WIZ_TAB, WELCOME_WIZ_TERMS_OF_USE_Name); static RoadMapConfigDescriptor WELCOME_WIZ_MINUTES_FOR_ACTIVATION_Var = ROADMAP_CONFIG_ITEM( WELCOME_WIZ_TAB,
#include "roadmap_math.h" #include "roadmap_config.h" #include "roadmap_message.h" #include "roadmap_spawn.h" #include "roadmap_voice.h" struct roadmap_voice_config { RoadMapConfigDescriptor config; const char *default_text; }; static RoadMapConfigDescriptor RoadMapVoiceMute = ROADMAP_CONFIG_ITEM("Voice", "Mute"); BOOL featureEnabled = FALSE; static struct roadmap_voice_config RoadMapVoiceText[] = { {ROADMAP_CONFIG_ITEM("Voice", "Approach"), "flite -t 'Approaching %N'"}, {ROADMAP_CONFIG_ITEM("Voice", "Current Street"), "flite -t 'On %N'"}, {ROADMAP_CONFIG_ITEM("Voice", "Next Intersection"), "flite -t 'Next intersection: %N'"}, {ROADMAP_CONFIG_ITEM("Voice", "Selected Street"), "flite -t 'Selected %N'"}, {ROADMAP_CONFIG_ITEM("Voice", "Driving Instruction"), "flite -t 'In %t, %I'|flite -t '%I to %T'|flite -t '%I'"}, {ROADMAP_CONFIG_ITEM_EMPTY, NULL} }; /* This will be overwritten with the setting from the session context. */ static int RoadMapVoiceMuted = 1;
//======================== Globals ======================== /* * Status attributes */ static int sgTtsFeatureEnabled = 0; // Feature static const char* sgTtsVoiceId = NULL; static const char* sgTtsDefaultVoiceId = NULL; static TtsOnVoiceChangedCb sgOnVoiceChangedCBs[TTS_VOICE_CHANGED_CB_MAX_NUM] = {NULL}; static RoadMapConfigDescriptor RMConfigTTSEnabled = ROADMAP_CONFIG_ITEM( TTS_CFG_CATEGORY, TTS_CFG_FEATURE_ENABLED ); static RoadMapConfigDescriptor RMConfigTTSVoiceId = ROADMAP_CONFIG_ITEM( TTS_CFG_CATEGORY, TTS_CFG_VOICE_ID ); static RoadMapConfigDescriptor RMConfigTTSDefaultVoiceId = ROADMAP_CONFIG_ITEM( TTS_CFG_CATEGORY, TTS_CFG_DEFAULT_VOICE_ID ); //======================== Local Declarations ======================== //static const char* tts_cache_get(const char* text); //static const TtsCacheEntry* tts_cache_add( const char* text, const char* file_name ); static void _queue_one( const char* text, TtsTextType text_type, TtsRequestCompletedCb completed_cb, void* user_context, int flags ); static void _on_response( void* context, int res_status, TtsSynthResponseData* response_data ); static BOOL _process_cached( const TtsRequest* request_ctx );
#include "roadmap_navigate.h" #include "roadmap_trip.h" #include "roadmap_res_download.h" #include "roadmap_messagebox.h" #include "Realtime/Realtime.h" #include "Realtime/RealtimeAlerts.h" #include "Realtime/RealtimeAlertsList.h" #include "roadmap_start.h" #include "ssd/ssd_list.h" #define MAX_GROUPS 200 ////////////////////////////////////////////////////////////////////////////////////////////////// static RoadMapConfigDescriptor RoadMapConfigGroupsPopUpReports = ROADMAP_CONFIG_ITEM("Groups", "Pop-up reports"); static RoadMapConfigDescriptor RoadMapConfigGroupsShowWazers = ROADMAP_CONFIG_ITEM("Groups", "Show wazers"); static RoadMapConfigDescriptor RoadMapConfigGroupsURL = ROADMAP_CONFIG_ITEM("Groups", "URL"); static RoadMapConfigDescriptor RoadMapConfigGroupsFeatureEnabled = ROADMAP_CONFIG_ITEM("Groups", "Feature Enabled"); static RoadMapConfigDescriptor RoadMapConfigGroupsTipShown = ROADMAP_CONFIG_ITEM("Groups", "Tip Shown"); ////////////////////////////////////////////////////////////////////////////////////////////////// static int g_NumFollowingGroups = 0;
RoadMapCallback callback; } roadmap_mood_list_dialog; typedef struct { char *value; char *label; char *icon; } roadmap_mood_list; static int g_exclusiveMoods = 0; static RoadMapConfigDescriptor MoodCfg = ROADMAP_CONFIG_ITEM("User", "Mood"); static RoadMapConfigDescriptor NewbieNumberOfMilesCfg = ROADMAP_CONFIG_ITEM("Newbie", "Number of Miles"); ////////////////////////////////////////////////////////////////////////////////////////////////// const char* roadmap_mood_to_string(MoodType mood){ switch(mood) { case Mood_Happy: return roadmap_path_join("moods",MOOD_Name_Happy); case Mood_Sad: return roadmap_path_join("moods",MOOD_Name_Sad); case Mood_Mad: return roadmap_path_join("moods",MOOD_Name_Mad); case Mood_Bored: return roadmap_path_join("moods",MOOD_Name_Bored); case Mood_Speedy: return roadmap_path_join("moods",MOOD_Name_Speedy); case Mood_Starving: return roadmap_path_join("moods",MOOD_Name_Starving);
static agg::renderer_scanline_aa_solid<agg::renderer_base<pixfmt> > ren_solid(agg_renb); static font_engine_type m_feng; static font_manager_type m_fman(m_feng); static font_engine_type m_image_feng; static font_manager_type m_image_fman(m_image_feng); static font_engine_type m_feng_nor; static font_manager_type m_fman_nor(m_feng_nor); static font_engine_type m_image_feng_nor; static font_manager_type m_image_fman_nor(m_image_feng_nor); static RoadMapConfigDescriptor RoadMapConfigFont = ROADMAP_CONFIG_ITEM("Labels", "FontName"); static RoadMapConfigDescriptor RoadMapConfigFontNormal = ROADMAP_CONFIG_ITEM("Labels", "FontNameNormal"); struct roadmap_canvas_pen { struct roadmap_canvas_pen *next; char *name; agg::rgba8 color; int thickness; agg::line_profile_aa *profile; }; static struct roadmap_canvas_pen *RoadMapPenList = NULL; static RoadMapPen CurrentPen; static int RoadMapCanvasFontLoaded = 0;
#include "roadmap_canvas.h" #include "roadmap_config.h" #include "roadmap_lang.h" #include "roadmap_geo_location_info.h" #include "ssd/ssd_widget.h" #include "ssd/ssd_container.h" #include "ssd/ssd_dialog.h" #include "ssd/ssd_bitmap.h" #include "ssd/ssd_progress.h" #include "ssd/ssd_button.h" #include "ssd/ssd_text.h" static RoadMapConfigDescriptor GEO_LOCATION_DISPLAYED_Var = ROADMAP_CONFIG_ITEM( GEO_LOCATION_TAB, GEO_LOCATION_DISPLAYED_Name); static RoadMapConfigDescriptor GEO_LOCATION_ENABLED_Var = ROADMAP_CONFIG_ITEM( GEO_LOCATION_TAB, GEO_LOCATION_ENABLED_Name); typedef struct tag_geo_location_info { char metroplolitan[128]; char state[50]; char map_score[50]; char traffic_score[50]; char usage_score[50];
#include "roadmap_config.h" #include "roadmap_line.h" #include "roadmap_math.h" #include "roadmap_locator.h" #include "roadmap_plugin.h" #include "roadmap_line_route.h" #include "roadmap_street.h" #include "roadmap_fuzzy.h" #define FUZZY_TRUTH_MAX 1024 static RoadMapConfigDescriptor RoadMapConfigConfidence = ROADMAP_CONFIG_ITEM("Accuracy", "Confidence"); static RoadMapConfigDescriptor RoadMapConfigAccuracyStreet = ROADMAP_CONFIG_ITEM("Accuracy", "Street"); static int RoadMapAccuracyStreet; static int RoadMapConfidence; static int RoadMapError = 10; void roadmap_fuzzy_set_cycle_params (int street_accuracy, int confidence) { RoadMapAccuracyStreet = street_accuracy; RoadMapConfidence = confidence; }
#include "../roadmap_math.h" #include "../roadmap_res.h" #include "Realtime.h" #include "RealtimeTrafficInfo.h" static void RealtimeTrafficInfoScreenRepaint (int max_pen); #define TRAFFIC_PEN_WIDTH 4 #define MAX_SEGEMENTS 2500 static int plugId; static RoadMapPen pens[5]; static RoadMapPen speed_text_pen; static RoadMapConfigDescriptor RouteInfoConfigRouteColorBad = ROADMAP_CONFIG_ITEM("TrafficInfo", "RouteColorBad"); static RoadMapConfigDescriptor RouteInfoConfigRouteColorMild = ROADMAP_CONFIG_ITEM("TrafficInfo", "RouteColorMild"); static RoadMapConfigDescriptor RouteInfoConfigRouteColorGood = ROADMAP_CONFIG_ITEM("TrafficInfo", "RouteColorGood"); RoadMapConfigDescriptor RouteInfoConfigDisplayTraffic = ROADMAP_CONFIG_ITEM("TrafficInfo", "Display traffic info"); static RoadMapPluginHooks RealtimeTrafficInfoPluginHooks = { NULL, NULL, NULL, NULL,
#include "roadmap_square.h" #include "roadmap_layer.h" #include "roadmap_main.h" #include "roadmap_sound.h" #include "roadmap_alert.h" #include "roadmap_alerter.h" #include "roadmap_lang.h" #include "roadmap_softkeys.h" #include "roadmap_messagebox.h" #include "editor/db/editor_db.h" #include "ssd/ssd_dialog.h" #include "ssd/ssd_confirm_dialog.h" #include "navigate/navigate_main.h" static RoadMapConfigDescriptor AlertsEnabledCfg = ROADMAP_CONFIG_ITEM("Alerts", "Enable Alerts"); static RoadMapConfigDescriptor AlertsAudioEnabledCfg = ROADMAP_CONFIG_ITEM("Alerts", "Enable Audio Alerts"); static RoadMapConfigDescriptor MinSpeedToAlertCfg = ROADMAP_CONFIG_ITEM("Alerts", "Minimum Speed to Alert"); typedef struct { int active_alert_id; int distance_to_alert; int alert_type; int alert_providor; } active_alert_st;
#include "roadmap_display.h" #include "roadmap_device_events.h" static RoadMapSize gMiddleImageSize = {-1, -1}; static RoadMapPen RoadMapTickerPen; static BOOL gTickerOn = FALSE; static BOOL gTickerHide = FALSE; static BOOL gTickerSupressHide = FALSE; static int gLastUpdateEvent = default_event; static BOOL gInitialized; static RoadMapGuiRect OpenIconRct; //static RoadMapGuiRect CloseIconRct; static RoadMapConfigDescriptor ShowTickerCfg = ROADMAP_CONFIG_ITEM("User", "Show points ticker"); static int gTickerTopBarOffset = 0; #define TICKER_TOP_BAR_DIVIDER_OFFSET 25 #define TICKER_TOP_BAR_TEXT_OFFSET 25 //////////////////////////////////////////////////////////////////////////////// static void show_close_icon(){ } //////////////////////////////////////////////////////////////////////////////// int ticker_cfg_on (void) { return (roadmap_config_match(&ShowTickerCfg, "yes")); } ////////////////////////////////////////////////////////////////////////////////
static RoadMapCallback RMBrowserClose = NULL; // Native browser close function - called to close the native browser control/view static RMBrowserAttributes RMBrowserAttrs; // Contains the attributes of the call to the browser // Note has to be updated each call to browser static const char* SSD_WEB_VIEW_BTN_NAMES[] = { "WEB_VIEW_DALOG.LEFT1 BUTTON", "WEB_VIEW_DALOG.LEFT2 BUTTON", "WEB_VIEW_DALOG.RIGHT1 BUTTON", "WEB_VIEW_DALOG.RIGHT2 BUTTON" }; void roadmap_browser_show_ssd( const char* url, int browser_flags ); static int title_btn_cb ( SsdWidget widget, const char *new_value ); static void roadmap_browser_format_title_bar( SsdWidget title_bar, int browser_flags ); static SsdWidget add_title_button( int btn_id, SsdWidget title_bar, int ssd_flags ); static int button_id( int flag ); #ifdef __SYMBIAN32__ static RoadMapConfigDescriptor RoadMapConfigShowExternal = ROADMAP_CONFIG_ITEM("Browser", "Show external browser"); ////////////////////////////////////////////////////////////////////////////////////////////////// static BOOL roadmap_browser_show_external (void) { if (0 == strcmp (roadmap_config_get (&RoadMapConfigShowExternal), "yes")){ return TRUE; } return FALSE; } ////////////////////////////////////////////////////////////////////////////////////////////////// void roadmap_browser_set_show_external (void) { roadmap_config_set (&RoadMapConfigShowExternal, "yes"); roadmap_config_save(0); }
#include "../roadmap_utf8.h" #include "../roadmap_start.h" #include "../roadmap_trip.h" #include "generic_search.h" #include "address_search.h" #include "local_search.h" #include "single_search.h" #include "../Realtime/Realtime.h" #include "../ssd/ssd_progress_msg_dialog.h" #include "../roadmap_lang.h" static BOOL s_initialized_once = FALSE; static RoadMapConfigDescriptor s_web_service_name = ROADMAP_CONFIG_ITEM( SSR_WEBSVC_CFG_TAB, SSR_WEBSVC_ADDRESS); extern const char* VerifyStatus( /* IN */ const char* pNext, /* IN */ void* pContext, /* OUT */ BOOL* more_data_needed, /* OUT */ roadmap_result* rc); static const char* on_single_search_address_candidate( /* IN */ const char* data, /* IN */ void* context, /* OUT */ BOOL* more_data_needed, /* OUT */ roadmap_result* rc); static wst_parser data_parser[] = { { "RC", VerifyStatus},
* See roadmap_library.h */ #include <stdlib.h> #include <string.h> #include "JNI/FreeMapJNI.h" #include "roadmap.h" #include "roadmap_config.h" #include "roadmap_path.h" #include "roadmap_file.h" #include "roadmap_sound.h" #include "roadmap_prompts.h" #include "roadmap_lang.h" static RoadMapConfigDescriptor RoadMapConfigVolControl = ROADMAP_CONFIG_ITEM( "Voice", "Volume Control" ); /* Defined in C file */ #define __SND_VOLUME_LVLS_COUNT__ (4) const int SND_VOLUME_LVLS_COUNT = __SND_VOLUME_LVLS_COUNT__; const int SND_VOLUME_LVLS[] = {0, 1, 2, 3}; const char* SND_VOLUME_LVLS_LABELS[__SND_VOLUME_LVLS_COUNT__]; const char* SND_DEFAULT_VOLUME_LVL = "2"; static BOOL sgInitialized = FALSE; static const char* get_full_name( const char* name ); void roadmap_sound_initialize () {
#include "roadmap.h" #include "roadmap_config.h" #ifdef _WIN32 #ifdef TOUCH_SCREEN #pragma message(" Target device type: TOUCH-SCREEN") #else #pragma message(" Target device type: MENU ONLY (NO TOUCH-SCREEN)") #endif // TOUCH_SCREEN #endif // _WIN32 static RoadMapConfigDescriptor RoadMapConfigGeometryMain = ROADMAP_CONFIG_ITEM("Geometry", "Main"); static RoadMapConfigDescriptor RoadMapConfigGeometryUnit = ROADMAP_CONFIG_ITEM("Geometry", "Unit"); static RoadMapConfigDescriptor RoadMapConfigAddressPosition = ROADMAP_CONFIG_ITEM("Address", "Position"); static RoadMapConfigDescriptor RoadMapConfigGeneralToolbar = ROADMAP_CONFIG_ITEM("General", "Toolbar"); static RoadMapConfigDescriptor RoadMapConfigGeneralIcons = ROADMAP_CONFIG_ITEM("General", "Icons"); static RoadMapConfigDescriptor RoadMapConfigMapCache = ROADMAP_CONFIG_ITEM("Map", "Cache");
#include "roadmap_screen.h" #include "roadmap_plugin.h" #include "roadmap_gps.h" #include "roadmap_navigate.h" #include "roadmap_skin.h" #include "roadmap_sunrise.h" #include "roadmap_trip.h" #include "roadmap_config.h" #define MAX_LISTENERS 16 static RoadMapCallback RoadMapSkinListeners[MAX_LISTENERS] = {NULL}; static const char *CurrentSkin = "default"; static const char *CurrentSubSkin = "day"; RoadMapConfigDescriptor RoadMapConfigAutoNightMode = ROADMAP_CONFIG_ITEM("Display", "Auto night mode"); static RoadMapConfigDescriptor RoadMapConfigFeatureEnabled = ROADMAP_CONFIG_ITEM("Auto night mode", "Feature enabled"); RoadMapConfigDescriptor RoadMapConfigMapScheme = ROADMAP_CONFIG_ITEM("Display", "Map scheme"); static BOOL ToggleToNightMode = TRUE; static void toggle_skin_timer(void); static const char *get_map_schema(void){ return (const char *) roadmap_config_get(&RoadMapConfigMapScheme); }
#include "roadmap.h" #include "roadmap_gui.h" #include "roadmap_math.h" #include "roadmap_config.h" #include "roadmap_canvas.h" #include "roadmap_plugin.h" #include "roadmap_skin.h" #include "roadmap_screen.h" #include "editor/editor_screen.h" #include "roadmap_layer.h" static RoadMapConfigDescriptor RoadMapConfigStylePretty = ROADMAP_CONFIG_ITEM("Style", "Use Pretty Lines"); /* The following table is a hardcoded default we use until the * "category" tables are created. */ static char *RoadMapDefaultCategoryTable[] = { "Freeways", "Primary", "Secondary", "Ramps", "Highways", "Exit", "Streets", "Pedestrian", "4X4 Trails", "Trails",
#include "ssd/ssd_widget.h" #include "ssd/ssd_container.h" #include "ssd/ssd_dialog.h" #include "ssd/ssd_bitmap.h" #include "ssd/ssd_progress.h" #include "ssd/ssd_separator.h" #include "ssd/ssd_button.h" #include "ssd/ssd_text.h" #include "Realtime/Realtime.h" #include "Realtime/RealtimeAltRoutes.h" #include "Realtime/RealtimeAlerts.h" static event_on_routes_table g_events_on_route; static RoadMapConfigDescriptor RoadMapConfigFeatureEnabled = ROADMAP_CONFIG_ITEM("Events on Route", "Feature enabled"); ////////////////////////////////////////////////////////////////////////////////////////////////// BOOL events_on_route_feature_enabled (void) { if (0 == strcmp (roadmap_config_get (&RoadMapConfigFeatureEnabled), "yes")){ return TRUE; } return FALSE; } /////////////////////////////////////////////////////////////////////////////////////////// void events_on_route_init(void) { int i; roadmap_config_declare_enumeration ("preferences", &RoadMapConfigFeatureEnabled, NULL, "yes", "no", NULL);
#include "roadmap_main.h" #include "editor/editor_screen.h" #include "navigate/navigate_main.h" #include "roadmap_prompts.h" #include "roadmap_messagebox.h" #include "roadmap_alternative_routes.h" #define CLOCK_SETTINGS_12_HOUR "12 hr." #define CLOCK_SETTINGS_24_HOUR "24 hr." static const char* title = "General settings"; static int DialogShowsShown = 0; static const char *yesno_label[2]; static const char *yesno[2]; static RoadMapConfigDescriptor RoadMapConfigConnectionAuto = ROADMAP_CONFIG_ITEM("Connection", "AutoConnect"); static RoadMapConfigDescriptor RoadMapConfigBackLight = ROADMAP_CONFIG_ITEM("Display", "BackLight"); static RoadMapConfigDescriptor RoadMapConfigVolControl = ROADMAP_CONFIG_ITEM( "Voice", "Volume Control" ); static RoadMapConfigDescriptor RoadMapConfigGeneralUnit = ROADMAP_CONFIG_ITEM("General", "Unit"); static RoadMapConfigDescriptor RoadMapConfigShowTicker = ROADMAP_CONFIG_ITEM("User", "Show points ticker"); RoadMapConfigDescriptor RoadMapConfigUseNativeKeyboard = ROADMAP_CONFIG_ITEM("Keyboard", "Use native"); static RoadMapConfigDescriptor RoadMapConfigEventsRadius = ROADMAP_CONFIG_ITEM("Events", "Radius");
RTBonus *g_pbonus; static void AddBonusToMap(RTBonus *pApdon, BOOL isCustom); static RoadMapGuiRect old_rect = {-1, -1, -1, -1}; #define ANIMATION_SOUND "bonus" #define MINIMUM_DISTANCE_TO_CHECK 5 roadmap_alert_provider RoadmapRealTimeMapbonusnsProvider = { "RealTimeBonus", RealtimeBonus_Count, RealtimeBonus_Get_Id, RealtimeBonus_Get_Position, RealtimeBonus_Get_Speed, NULL, NULL, NULL, RealtimeBonus_Get_Distance, NULL, RealtimeBonus_Is_Alertable, NULL, NULL, NULL, RealtimeBonus_Check_Same_Street, RealtimeBonus_HandleEvent, RealtimeBonus_is_square_dependent, RealtimeBonus_get_location_info, RealtimeBonus_distance_check,RealtimeBonus_get_priority, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}; static RoadMapConfigDescriptor RoadMapConfigCustomBonusRadius = ROADMAP_CONFIG_ITEM("Custom bonus", "Radius"); static RoadMapConfigDescriptor RoadMapConfigCustomBonusLastID = ROADMAP_CONFIG_ITEM("Custom bonus", "Last Bonus ID"); static RoadMapConfigDescriptor RoadMapConfigCustomBonusFeatureEnabled = ROADMAP_CONFIG_ITEM("Custom bonus", "Feature enabled"); static RoadMapConfigDescriptor RoadMapConfigBonusURL = ROADMAP_CONFIG_ITEM("Bonus", "URL"); static int g_CustomIndex = -1; ////////////////////////////////////////////////////////////////////////////////////////////////// static BOOL custom_bonus_feature_enabled (void) {
#include "roadmap_path.h" #include "roadmap_file.h" #include "roadmap_spawn.h" #include "roadmap_help.h" #define RDM_URLHEAD "file://" #define RDM_MANUAL "manual.html" #ifndef ROADMAP_BROWSER #define ROADMAP_BROWSER "dillo" #endif static RoadMapConfigDescriptor RoadMapConfigBrowser = ROADMAP_CONFIG_ITEM("Help", "Browser"); static RoadMapConfigDescriptor RoadMapConfigBrowserOptions = ROADMAP_CONFIG_ITEM("Help", "Arguments"); static char *RoadMapHelpManual = NULL; /* -- The help display functions. -------------------------------------- */ static void roadmap_help_make_url (const char *path) { int size; const char *options = roadmap_config_get(&RoadMapConfigBrowserOptions); char *url;
#include "roadmap_time.h" #include <rimapi.h> #endif #define COMPRESSION_LEVEL 6 #define LOG_UPLOAD_CONTENT_TYPE "log/gzip" #define GET_2_DIGIT_STRING( num_in, str_out ) \ { \ str_out[0] = '0'; \ sprintf( &str_out[(num_in < 10)], "%d", num_in ); \ } static RoadMapConfigDescriptor RMCfgDebugInfoServer = ROADMAP_CONFIG_ITEM( CFG_CATEGORY_DEBUG_INFO, CFG_ENTRY_DEBUG_INFO_SERVER ); static char warning_message[ROADMAP_WARNING_MAX_LEN]; static int in_process = 0; typedef struct tag_upload_context{ char * full_path; char ** files; char ** cursor; int file_num; int total; }upload_context; static int upload_file_size_callback( void *context, int aSize ); static void upload_progress_callback( void *context, int aLoaded ); static void upload_error_callback( void *context);