static int map_scheme_callback (SsdWidget widget, const char *new_value, const void *value, void *context) { roadmap_analytics_log_event(ANALYTICS_EVENT_MAPSCHEME, ANALYTICS_EVENT_INFO_CHANGED_TO, value); roadmap_skin_set_scheme((const char *)value); ssd_dialog_hide_all(dec_close); return 1; }
static int end_button_callback (SsdWidget widget, const char *new_value) { set_first_time_no(); ssd_dialog_hide_all (dec_ok); roadmap_analytics_log_event (ANALYTICS_EVENT_NEW_USER_SIGNUP, ANALYTICS_EVENT_INFO_ACTION, "End"); roadmap_welcome_guided_tour_start(); return 1; }
BOOL RealtimeAltRoutes_Route_Request(int iTripId, const RoadMapPosition *from_pos, const RoadMapPosition *to_pos, int max_routes, BOOL showListFirst){ static NavigateRouteCallbacks cb = { RealtimeAltRoutes_OnRouteRC, RealtimeAltRoutes_OnRouteResults, RealtimeAltRoutes_OnRouteSegments, navigate_main_update_route, navigate_main_on_instrumented_segment, navigate_main_on_suggest_reroute, navigate_main_on_segment_ver_mismatch }; RoadMapGpsPosition position; PluginLine fromLine; int fromPoint; cancelled = FALSE; gShowListFirst = showListFirst; if (navigate_main_get_follow_gps()){ if (RealtimeAltRoutes_GetOrigin (&position, &fromLine, &fromPoint)){ from_pos = (RoadMapPosition*)&position; }else{ fromLine.line_id = -1; fromPoint = -1; if (roadmap_gps_have_reception()){ from_pos = roadmap_trip_get_position ("GPS"); } } }else{ fromLine.line_id = -1; fromPoint = -1; } roadmap_analytics_log_event(ANALYTICS_EVENT_ALT_ROUTES, NULL, NULL); CalculatingAltRoutes = TRUE; //roadmap_main_set_periodic( 50000, route_request_timeout ); navigate_main_prepare_for_request(); navigate_route_request (&fromLine, fromPoint, NULL, from_pos, to_pos, NULL, NULL, NULL, NULL, ROADMAP_SOCIAL_DESTINATION_MODE_DISABLED, ROADMAP_SOCIAL_DESTINATION_MODE_DISABLED, 0, iTripId, max_routes, &cb); return TRUE; }
void roadmap_mood_set(const char *value){ roadmap_config_declare ("user", &MoodCfg, "happy", NULL); roadmap_analytics_log_event(ANALYTICS_EVENT_MOOD, ANALYTICS_EVENT_INFO_CHANGED_TO, value); roadmap_config_set (&MoodCfg, value); roadmap_config_save(1); gState = roadmap_mood_from_string(value); #ifdef QTMOBILITY roadmap_mood_changed(gState); #endif OnMoodChanged(); }
static void route_request_timeout(void) { roadmap_main_remove_periodic( route_request_timeout ); ssd_progress_msg_dialog_hide(); if (CalculatingAltRoutes) { char msg[128]; snprintf(msg, sizeof(msg), "%s.\n%s", roadmap_lang_get("Routing service timed out"), roadmap_lang_get("Please try again later")); roadmap_messagebox_timeout("Oops",msg ,5); roadmap_analytics_log_event (ANALYTICS_EVENT_ROUTE_ERROR, ANALYTICS_EVENT_INFO_ERROR, "TimeOut"); navigate_route_cancel_request(); CalculatingAltRoutes = FALSE; } }
static int roadmap_exclusive_mood_call_back (SsdWidget widget, const char *new_value, const void *value) { RoadMapCallback cb = (RoadMapCallback)widget->parent->context; int iMood = roadmap_mood_from_string( value); if ( (iMood <= Mood_Gold) && (iMood >= Mood_Bronze) && (iMood - Mood_Bronze) > roadmap_mood_get_exclusive_moods() -1) { ssd_dialog_set_focus(NULL); ssd_dialog_draw(); return 0; } roadmap_analytics_log_event(ANALYTICS_EVENT_MOOD, ANALYTICS_EVENT_INFO_CHANGED_TO, value); roadmap_mood_set(value); ssd_dialog_hide ( "MoodDlg", dec_close ); if (cb) (*cb)(); return 1; }
void RealtimeExternalPoiNotifier_NotifyOnNavigate(int iID){ roadmap_log(ROADMAP_DEBUG, "RealtimeExternalPoiNotifier NotifyOnNavigate - external POI DB =id =%d",iID); roadmap_analytics_log_event(ANALYTICS_EVENT_NAVIGATE, ANALYTICS_EVENT_INFO_SOURCE, "POI"); Realtime_ExternalPoiNotifyOnNavigate(iID); }