void roadmap_help_about (void) { #ifdef IPHONE_NATIVE roadmap_main_show_root(0); #endif //IPHONE_NATIVE char about[700]; sprintf (about, "Waze Qt port " PORT_RELEASE "\nDone by [email protected]\nhttp://code.google.com/p/waze-qt/\nBased on Waze(c) release %s\n%s\n%s", roadmap_start_version(), roadmap_lang_get("www.waze.com"), roadmap_lang_get("Licensed under the terms of the\nGPL v2")); about_dialog(about); }
static const char * create_group_url(const char *group_name) { static char url[1024]; snprintf(url, sizeof(url),"%s?sessionid=%d&cookie=%s&deviceid=%d&width=%d&height=%d&gotogroup=%s&client_version=%s&web_version=%s&lang=%s", roadmap_groups_get_url(), Realtime_GetServerId(), Realtime_GetServerCookie(), RT_DEVICE_ID, roadmap_canvas_width(), roadmap_canvas_height() - roadmap_bar_bottom_height(), group_name, roadmap_start_version(), BROWSER_WEB_VERSION, roadmap_lang_get_system_lang()); append_current_location(url + strlen(url)); return &url[0]; }
static char *build_url(RTBonus *pbonus, int iHeight, int iWidth){ static char url[1024]; snprintf(url, sizeof(url),"%s?bonus_id=%d&sessionid=%d&cookie=%s&deviceid=%d&width=%d&height=%d&client_version=%s&lang=%s&template=%d&%s", GetBaseUrl(), pbonus->iID, Realtime_GetServerId(), Realtime_GetServerCookie(), RT_DEVICE_ID, iWidth, iHeight, roadmap_start_version(), roadmap_lang_get_system_lang(), pbonus->iTemplateID, (pbonus->pWebDlgExtraParams == NULL) ? "" : pbonus->pWebDlgExtraParams); return &url[0]; }
static const char *create_url(void) { static char url[1024]; snprintf(url, sizeof(url),"%s?sessionid=%d&cookie=%s&deviceid=%d&width=%d&height=%d&client_version=%s&web_version=%s&lang=%s", roadmap_groups_get_url(), Realtime_GetServerId(), Realtime_GetServerCookie(), #ifndef RIMAPI RT_DEVICE_ID, #else 20, // until server is changed. TODO : CHANGE! #endif roadmap_canvas_width(), roadmap_canvas_height() - roadmap_bar_bottom_height(), roadmap_start_version(), BROWSER_WEB_VERSION, roadmap_lang_get_system_lang()); append_current_location(url + strlen(url)); return &url[0]; }
/************************************************************************************************* * Java_com_waze_FreeMapNativeManager_InitManagerNTV * Initializes the JNI object for the FreeMapNativeManager class * Initializes the application resources path as provided from the Java layer */ JNIEXPORT void JNICALL Java_com_waze_FreeMapNativeManager_InitNativeManagerNTV ( JNIEnv* aJNIEnv, jobject aJObj, jstring aCfgPath, jint aBuildSdkVersion, jstring aDeviceName, jstring aDeviceModel, jstring aDeviceManufacturer ) { jboolean isCopy; const char* cfgPath = (*aJNIEnv)->GetStringUTFChars( aJNIEnv, aCfgPath, &isCopy ); const char* deviceName = (*aJNIEnv)->GetStringUTFChars( aJNIEnv, aDeviceName, &isCopy ); const char* deviceModel = (*aJNIEnv)->GetStringUTFChars( aJNIEnv, aDeviceModel, &isCopy ); const char* deviceManufacturer = (*aJNIEnv)->GetStringUTFChars( aJNIEnv, aDeviceManufacturer, &isCopy ); roadmap_path_initialize( cfgPath ); (*aJNIEnv)->ReleaseStringUTFChars( aJNIEnv, aCfgPath, cfgPath ); // The logger can be started only after the path initialization JNI_LOG( ROADMAP_INFO, "Initializing JNI object FreeMapNativeManager" ); InitJNIObject( &gJniObj, aJNIEnv, aJObj, "FreeMapNativeManager" ); roadmap_main_set_build_sdk_version( aBuildSdkVersion ); roadmap_main_set_device_name( deviceName ); roadmap_main_set_device_model( deviceModel ); roadmap_main_set_device_manufacturer( deviceManufacturer ); roadmap_log( ROADMAP_WARNING, "JNI LIB DEBUG: Version: %s, OS Version: %d. Device: %s. Model: %s. Manufacturer: %s. roadmap_start address: 0x%x.\n", roadmap_start_version(), aBuildSdkVersion, roadmap_main_get_device_name(), deviceModel, deviceManufacturer, roadmap_start ); (*aJNIEnv)->ReleaseStringUTFChars( aJNIEnv, aDeviceName, deviceName ); (*aJNIEnv)->ReleaseStringUTFChars( aJNIEnv, aDeviceModel, deviceModel ); (*aJNIEnv)->ReleaseStringUTFChars( aJNIEnv, aDeviceManufacturer, deviceManufacturer ); }
/////////////////////////////////////////////////////// // Compress files and prepare for upload int prepare_for_upload () { int res; char out_filename[256]; char **files; char **cursor; const char* directory; int count; int total; time_t now; struct tm *tms; char year[5], month[5], day[5]; #ifdef RIMAPI timeStruct time_s; #endif sprintf (warning_message,"%s",roadmap_lang_get("Preparing files for upload...")); ssd_progress_msg_dialog_show(warning_message); roadmap_main_flush(); //Count files for upload directory = roadmap_path_gps(); files = roadmap_path_list (directory, ".csv"); count = 1; //Counting also the postmortem for (cursor = files; *cursor != NULL; ++cursor) { count++; } total = count; count = 0; //Prepare log count++; sprintf (warning_message,"%s\n%d/%d",roadmap_lang_get("Preparing files for upload..."),count, total); ssd_progress_msg_dialog_show(warning_message); roadmap_main_flush(); // Building the filename time( &now ); tms = localtime( &now ); #ifdef RIMAPI roadmap_time_get_time(&time_s); tms->tm_hour = time_s.hours; tms->tm_min = time_s.minutes; #endif GET_2_DIGIT_STRING( tms->tm_mday, day ); GET_2_DIGIT_STRING( tms->tm_mon+1, month ); // Zero based from January GET_2_DIGIT_STRING( tms->tm_year-100, year ); // Year from 1900 snprintf(out_filename,256, "%s%s%s__%d_%d__%s_%d_%s__%s.gz", day, month, year, tms->tm_hour, tms->tm_min, RealTime_GetUserName(), RT_DEVICE_ID, roadmap_start_version(), roadmap_log_filename()); #ifndef RIMAPI res = roadmap_zlib_compress(roadmap_log_path(), roadmap_log_filename(), roadmap_path_debug(), out_filename, COMPRESSION_LEVEL,TRUE); #else // 0 = Z_OK = SUCCESS. 1 = failure. res = NOPH_ZLib_compress(roadmap_log_path(), roadmap_log_filename(), roadmap_path_debug(),out_filename,COMPRESSION_LEVEL); strcpy(zipped_log_name,out_filename); // emporary until path_list is implemented #endif if (res != Z_OK) { ssd_progress_msg_dialog_hide(); return 0; } //Prepare CSV files for (cursor = files; *cursor != NULL; ++cursor) { count++; sprintf (warning_message,"%s\n%d/%d",roadmap_lang_get("Preparing files for upload..."),count, total); ssd_progress_msg_dialog_show(warning_message); roadmap_main_flush(); sprintf(out_filename, "%s%s.gz", *cursor, RealTime_GetUserName()); #ifndef J2ME res = roadmap_zlib_compress(directory, *cursor, roadmap_path_debug(), out_filename, COMPRESSION_LEVEL,FALSE); #else // 0 = Z_OK = SUCCESS. 1 = failure. res = NOPH_ZLib_compress(directory, *cursor, roadmap_path_debug(),out_filename,COMPRESSION_LEVEL); #endif if (res != Z_OK) { ssd_progress_msg_dialog_hide(); return 0; } else { roadmap_file_remove(directory, *cursor); } } roadmap_path_list_free (files); ssd_progress_msg_dialog_hide(); return 1; }