本文整理汇总了C++中roadmap_log函数的典型用法代码示例。如果您正苦于以下问题:C++ roadmap_log函数的具体用法?C++ roadmap_log怎么用?C++ roadmap_log使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了roadmap_log函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: dummy_handler
static void dummy_handler(NOPH_Exception_t exception, void *arg) {
if (arg) {
RoadMapImage i = (RoadMapImage) arg;
roadmap_log(ROADMAP_ERROR, "Error drawing image: %s\n", i->file_name);
}
NOPH_delete(exception);
}
开发者ID:Priednis,项目名称:WazeWP7,代码行数:7,代码来源:roadmap_canvas.c
示例2: FreeMapNativeManager_OpenExternalBrowser
/*************************************************************************************************
* FreeMapNativeManager_OpenExternalBrowser
* Loads the url to the external browser
*
*/
void FreeMapNativeManager_OpenExternalBrowser( const char* aUrl )
{
android_method_context_type lMthdContext;
int retVal = -1;
jmethodID mid;
jstring url = NULL;
JNI_LOG( ROADMAP_INFO, "Trying to call method %s through JNI", JNI_CALL_FreeMapNativeManager_OpenExternalBrowser );
mid = InitJNIMethodContext( &gJniObj, &lMthdContext, JNI_CALL_FreeMapNativeManager_OpenExternalBrowser,
JNI_CALL_FreeMapNativeManager_OpenExternalBrowser_Sig );
if ( !mid || !lMthdContext.env )
{
roadmap_log( ROADMAP_ERROR, "Failed to obtain method context!" );
return;
}
if ( aUrl != NULL )
{
url = (*lMthdContext.env)->NewStringUTF( lMthdContext.env, aUrl );
}
// Calling the method
(*lMthdContext.env)->CallVoidMethod( lMthdContext.env, gJniObj.obj, lMthdContext.mid, url );
// Release local references
if ( url )
(*lMthdContext.env)->DeleteLocalRef( lMthdContext.env, url );
}
开发者ID:sashakh,项目名称:waze,代码行数:33,代码来源:FreeMapNativeManager_JNI.c
示例3: FreeMapNativeManager_GetThumbnail
/*************************************************************************************************
* FreeMapNativeManager_GetThumbnail
* Returns the thumbnail in the supplied byte buffer with the last taken image
*
*/
int FreeMapNativeManager_GetThumbnail( int aThumbWidth, int aThumbHeight, int bytePP, int* aBuf )
{
android_method_context_type lMthdContext;
int retVal = -1;
int buf_size;
jmethodID mid;
jintArray bufJNI;
JNI_LOG( ROADMAP_INFO, "Trying to call method %s through JNI", JNI_CALL_FreeMapNativeManager_GetThumbnail );
mid = InitJNIMethodContext( &gJniObj, &lMthdContext, JNI_CALL_FreeMapNativeManager_GetThumbnail,
JNI_CALL_FreeMapNativeManager_GetThumbnail_Sig );
if ( !mid || !lMthdContext.env )
{
roadmap_log( ROADMAP_ERROR, "Failed to obtain method context!" );
return retVal;
}
buf_size = aThumbHeight*aThumbWidth;
bufJNI = (*lMthdContext.env)->NewIntArray( lMthdContext.env, buf_size );
// Calling the method
retVal = (*lMthdContext.env)->CallIntMethod( lMthdContext.env, gJniObj.obj, lMthdContext.mid,
aThumbWidth, aThumbHeight, bufJNI );
// Copy the elements
(*lMthdContext.env)->GetIntArrayRegion( lMthdContext.env, bufJNI, 0, buf_size, aBuf );
return retVal;
}
开发者ID:sashakh,项目名称:waze,代码行数:35,代码来源:FreeMapNativeManager_JNI.c
示例4: FreeMapNativeManager_TakePictureAsync
/*************************************************************************************************
* FreeMapNativeManager_TakePictureAsync()
* Shows the camera capture preview and saves the taken image
*
*/
int FreeMapNativeManager_TakePictureAsync( int aImageWidth, int aImageHeight, int aImageQuality,
char* aImageFolder, char* aImageFile )
{
android_method_context_type lMthdContext;
int retVal = -1;
jmethodID mid;
jbyteArray imageFolder, imageFile;
JNI_LOG( ROADMAP_INFO, "Trying to call method %s through JNI", JNI_CALL_FreeMapNativeManager_TakePictureAsync );
mid = InitJNIMethodContext( &gJniObj, &lMthdContext, JNI_CALL_FreeMapNativeManager_TakePictureAsync,
JNI_CALL_FreeMapNativeManager_TakePictureAsync_Sig );
if ( !mid || !lMthdContext.env )
{
roadmap_log( ROADMAP_ERROR, "Failed to obtain method context!" );
return retVal;
}
imageFolder = (*lMthdContext.env)->NewByteArray( lMthdContext.env, strlen( aImageFolder ) );
(*lMthdContext.env)->SetByteArrayRegion( lMthdContext.env, imageFolder, 0, strlen( aImageFolder ), aImageFolder );
imageFile = (*lMthdContext.env)->NewByteArray( lMthdContext.env, strlen( aImageFile ) );
(*lMthdContext.env)->SetByteArrayRegion( lMthdContext.env, imageFile, 0, strlen( aImageFile ), aImageFile );
// Calling the method
retVal = (*lMthdContext.env)->CallIntMethod( lMthdContext.env, gJniObj.obj, lMthdContext.mid,
aImageWidth, aImageHeight, aImageQuality, imageFolder, imageFile );
return retVal;
}
开发者ID:sashakh,项目名称:waze,代码行数:33,代码来源:FreeMapNativeManager_JNI.c
示例5: upload_error_callback
static void upload_error_callback( void *context, int connection_failure, const char *format, ...) {
upload_context * ctx = (upload_context *)context;
roadmap_log(ROADMAP_ERROR,"error in uploading voice : %s",ctx->full_path);
(*ctx->cb ) (ctx->context);
roadmap_path_free(ctx->full_path);
free(ctx);
}
开发者ID:sashakh,项目名称:waze,代码行数:7,代码来源:roadmap_recorder.c
示例6: roadmap_plugin_get_direction
int roadmap_plugin_get_direction (PluginLine *line, int who) {
if (line->plugin_id == ROADMAP_PLUGIN_ID) {
roadmap_square_set_current (line->square);
return roadmap_line_route_get_direction (line->line_id, who);
} else {
RoadMapPluginHooks *hooks = get_hooks (line->plugin_id);
if (hooks == NULL) {
roadmap_log (ROADMAP_ERROR, "plugin id:%d is missing.",
line->plugin_id);
return 0;
}
if (hooks->route_direction != NULL) {
return (*hooks->route_direction) (line, who);
}
return 0;
}
}
开发者ID:Daoudai,项目名称:waze-qt,代码行数:25,代码来源:roadmap_plugin.c
示例7: roadmap_main_start_init
/*************************************************************************************************
* Java_com_waze_FreeMapNativeManager_AppStartNTV
* Starts the application
*
*/
JNIEXPORT void JNICALL Java_com_waze_FreeMapNativeManager_AppStartNTV
( JNIEnv* aJNIEnv, jobject aJObj, jstring aUrl, int aAppMode )
{
roadmap_main_start_init();
const char* url = NULL;
if ( aUrl )
{
char query[URL_MAX_LENGTH];
jboolean isCopy;
url = (*aJNIEnv)->GetStringUTFChars( aJNIEnv, aUrl, &isCopy );
roadmap_urlscheme_remove_prefix( query, url );
roadmap_urlscheme_init( query );
(*aJNIEnv)->ReleaseStringUTFChars( aJNIEnv, aUrl, url );
}
roadmap_log( ROADMAP_WARNING, "Applicaiton started with URL string: %s", url );
roadmap_main_set_app_mode( aAppMode );
// Widget Mode
if ( aAppMode == 1 )
{
roadmap_screen_set_background_run( TRUE );
}
roadmap_start(0, NULL);
}
开发者ID:sashakh,项目名称:waze,代码行数:33,代码来源:FreeMapNativeManager_JNI.c
示例8: roadmap_square_set_current
const char *roadmap_plugin_street_full_name (const PluginLine *line) {
if (line->plugin_id == ROADMAP_PLUGIN_ID) {
RoadMapStreetProperties properties;
roadmap_square_set_current (line->square);
roadmap_street_get_properties (line->line_id, &properties);
return roadmap_street_get_full_name (&properties);
} else {
RoadMapPluginHooks *hooks = get_hooks (line->plugin_id);
if (hooks == NULL) {
roadmap_log (ROADMAP_ERROR, "plugin id:%d is missing.",
line->plugin_id);
return "";
}
if (hooks->get_street_full_name != NULL) {
return (*hooks->get_street_full_name) (line);
}
return "";
}
}
开发者ID:Daoudai,项目名称:waze-qt,代码行数:27,代码来源:roadmap_plugin.c
示例9: roadmap_log
/*************************************************************************************************
* Java_com_waze_FreeMapNativeManager_UrlHandlerNTV
* JNI wrapper for
*
*/
JNIEXPORT jboolean JNICALL Java_com_waze_FreeMapNativeManager_UrlHandlerNTV
( JNIEnv* aJNIEnv, jobject aJObj, jstring aUrl )
{
jboolean isCopy;
jboolean res = JNI_FALSE;
const char* url = (*aJNIEnv)->GetStringUTFChars( aJNIEnv, aUrl, &isCopy );
/*
* Try to handle by browser
*/
roadmap_log( ROADMAP_INFO, "Processing url: %s", url );
if ( roadmap_browser_url_handler( url ) == TRUE )
{
res = JNI_TRUE;
}
/*
* Try to handle by url scheme
*/
if ( ( res == JNI_FALSE ) && roadmap_urlscheme_valid( url ) )
{
char query[URL_MAX_LENGTH];
roadmap_urlscheme_remove_prefix( query, url );
roadmap_urlscheme_init( query );
res = JNI_TRUE;
}
(*aJNIEnv)->ReleaseStringUTFChars( aJNIEnv, aUrl, url );
return res;
}
开发者ID:sashakh,项目名称:waze,代码行数:36,代码来源:FreeMapNativeManager_JNI.c
示例10: roadmap_plugin_get_street
void roadmap_plugin_get_street (const PluginLine *line, PluginStreet *street) {
if (line->plugin_id == ROADMAP_PLUGIN_ID) {
RoadMapStreetProperties properties;
roadmap_square_set_current (line->square);
roadmap_street_get_properties (line->line_id, &properties);
street->plugin_id = ROADMAP_PLUGIN_ID;
street->street_id = properties.street;
street->square = line->square;
} else {
RoadMapPluginHooks *hooks = get_hooks (line->plugin_id);
street->plugin_id = line->plugin_id;
street->square = line->square;
if (hooks == NULL) {
roadmap_log (ROADMAP_ERROR, "plugin id:%d is missing.",
line->plugin_id);
street->street_id = -1;
return;
}
if (hooks->get_street != NULL) {
(*hooks->get_street) (line, street);
} else {
street->street_id = -1;
}
return;
}
}
开发者ID:Daoudai,项目名称:waze-qt,代码行数:35,代码来源:roadmap_plugin.c
示例11: roadmap_plugin_activate_db
int roadmap_plugin_activate_db (const PluginLine *line) {
if (line->plugin_id == ROADMAP_PLUGIN_ID) {
if (roadmap_locator_activate (line->fips) != ROADMAP_US_OK) {
return -1;
}
return 0;
} else {
RoadMapPluginHooks *hooks = get_hooks (line->plugin_id);
if (hooks == NULL) {
roadmap_log (ROADMAP_ERROR, "plugin id:%d is missing.",
line->plugin_id);
return -1;
}
if (hooks->activate_db != NULL) {
return (*hooks->activate_db) (line);
}
return 0;
}
}
开发者ID:Daoudai,项目名称:waze-qt,代码行数:27,代码来源:roadmap_plugin.c
示例12: roadmap_main_set_input
void roadmap_main_set_input (RoadMapIO *io, RoadMapInput callback)
{
int i;
for (i = 0; i < ROADMAP_MAX_IO; ++i) {
if (RoadMapMainIo[i] == NULL) {
RoadMapMainIo[i] = (roadmap_main_io *) malloc (sizeof(roadmap_main_io));
RoadMapMainIo[i]->io = io;
RoadMapMainIo[i]->callback = callback;
RoadMapMainIo[i]->is_valid = 1;
break;
}
}
if (i == ROADMAP_MAX_IO) {
roadmap_log (ROADMAP_FATAL, "Too many set input calls");
return;
}
if ( io == NULL || callback == NULL ) return;
if ( io->subsystem != ROADMAP_IO_NET ) return;
CRoadMapNativeNet* net = (CRoadMapNativeNet*)(io->os.socket);
if ( net == NULL ) return;
net->StartPolling((void*)callback, (void*)RoadMapMainIo[i]);
}
开发者ID:NoamSheffer,项目名称:WazeWP7,代码行数:27,代码来源:roadmap_main.cpp
示例13: WazeSoundRecorder_Start
/*************************************************************************************************
* WazeSoundRecorder_Start()
* Starts the audio recorder
* aPath - path to
* aTimeout - timeout for recording in ms
*/
int WazeSoundRecorder_Start( const char* aPath, int aTimeout )
{
jmethodID mid;
android_method_context_type lMthdContext;
jstring path = NULL;
int res;
JNI_LOG( ROADMAP_INFO, "Trying to call method %s through JNI", JNI_CALL_WazeSoundRecorder_Start );
mid = InitJNIMethodContext( &gJniObj, &lMthdContext, JNI_CALL_WazeSoundRecorder_Start,
JNI_CALL_WazeSoundRecorder_Start_Sig );
if ( !mid || !lMthdContext.env )
{
roadmap_log( ROADMAP_ERROR, "Failed to obtain method context!" );
return -1;
}
if ( aPath != NULL )
{
path = (*lMthdContext.env)->NewStringUTF( lMthdContext.env, aPath );
}
// Call the method
res = (*lMthdContext.env)->CallIntMethod( lMthdContext.env, gJniObj.obj, mid, path, aTimeout );
// Release local references
if ( path )
(*lMthdContext.env)->DeleteLocalRef( lMthdContext.env, path );
return res;
}
开发者ID:sashakh,项目名称:waze,代码行数:37,代码来源:WazeSoundRecorder_JNI.c
示例14: roadmap_lang_get
const char* roadmap_lang_get (const char *name) {
int hash;
int i;
if (!RoadMapLangLoaded) return name;
if ( name == NULL )
{
roadmap_log( ROADMAP_ERROR, "String is not initialized! Language module can't work with NULL strings" );
return ("");
}
hash = roadmap_hash_string (name);
for (i = roadmap_hash_get_first (RoadMapLangHash, hash);
i >= 0;
i = roadmap_hash_get_next (RoadMapLangHash, i)) {
if (!strcmp(name, RoadMapLangItems[i].name)) {
return RoadMapLangItems[i].value;
}
}
return name;
}
开发者ID:Daoudai,项目名称:waze-qt,代码行数:27,代码来源:roadmap_lang.c
示例15: roadmap_canvas3_ogl_updateScale
void roadmap_canvas3_ogl_updateScale(int zoom) {
float angRad;
//static float maxAngle= 67.3;
static float maxAngle= 62;
float ang= 24;
//float angZoom= 384;
float angZoom= 3000;
if (!isInitialized || zoom== 0)
return;
if ( !is_canvas_ready() )
return;
if ( roadmap_screen_is_hd_screen() ) {
zoom /= 2;
}
while (angZoom > zoom) {
angZoom/= 1.1;
ang= ang* 1.026; // (5/4)^(ln(1.1)/ln(2))
}
if (ang > maxAngle)
ang= maxAngle;
angRad= ang*M_PI/180;
if (angRad!= angle) {
double distH;
angle= angRad;
distH= roadmap_canvas_ogl_rotateMe(0);
roadmap_log(ROADMAP_DEBUG,"zoom= %d angle= %lf y dist= %lg\n",zoom,ang,distH);
}
}
开发者ID:GitPicz,项目名称:waze,代码行数:31,代码来源:roadmap_canvas3d.c
示例16: roadmap_main_set_seconds_timer
void roadmap_main_set_seconds_timer(int interval_in_seconds, RoadMapCallback callback){
int index;
struct RoadMapSecondTimer *timer = NULL;
for (index = 0; index < ROADMAP_MAX_TIMER; ++index) {
if (RoadMapSecondTimers[index].callback == callback) {
return;
}
if (timer == NULL) {
if (RoadMapSecondTimers[index].callback == NULL) {
timer = RoadMapSecondTimers + index;
}
}
}
if (timer == NULL) {
roadmap_log (ROADMAP_FATAL, "Timer table saturated");
}
timer->callback = callback;
timer->how_many_seconds_left = interval_in_seconds + 1;
// added +1 to be harsh in the nearest call to the timeout - better to call it in 1.1 seconds than
// 0.1 for example.
timer->interval_in_seconds = interval_in_seconds;
}
开发者ID:NoamSheffer,项目名称:WazeWP7,代码行数:25,代码来源:roadmap_main.c
示例17: rim_on_scheduledTask
void rim_on_scheduledTask(int id) {
int index = id & 0x0000ffff;
int uid = id >> 16;
RoadMapCallback callback;
if (uid != RoadMapMainPeriodicTimer[index].uid) {
roadmap_log(ROADMAP_ERROR, "invokelater on old timer! %d:%d", uid, RoadMapMainPeriodicTimer[index].uid);
return;
}
callback = RoadMapMainPeriodicTimer[index].callback;
time_t start = NOPH_System_currentTimeMillis();
if (callback != NULL) {
last_called_cb = callback;
//printf("callback is : 0x%x \n", callback);
(*callback) ();
}
time_t t = NOPH_System_currentTimeMillis() - start;
if (t > 1000) {
printf("In rim_on_invokeLater, too long! %d 0x%x\n",
t, (int)callback);
}
}
开发者ID:NoamSheffer,项目名称:WazeWP7,代码行数:28,代码来源:roadmap_main.c
示例18: battery_status_print
void battery_status_print(int cur_battery_level){
static int last_printed_battery_level = 100;
if( (cur_battery_level< MIN_BATTERY_LEVEL_TO_PRINT) && ( cur_battery_level < last_printed_battery_level - BATTERY_LEVEL_PRINT_STEPS) ) {
roadmap_log(ROADMAP_ERROR,"battery level is low : %d", cur_battery_level);
last_printed_battery_level = cur_battery_level;
}
}
开发者ID:NoamSheffer,项目名称:WazeWP7,代码行数:7,代码来源:roadmap_main.c
示例19: roadmap_main_remove_periodic
void roadmap_main_remove_periodic (RoadMapCallback callback) {
int index;
for (index = 0; index < ROADMAP_MAX_TIMER; ++index) {
if (RoadMapMainPeriodicTimer[index].callback == callback) {
RoadMapMainPeriodicTimer[index].callback = NULL;
NOPH_TimerMgr_remove (timer_mgr, index);
return;
}
if (RoadMapSecondTimers[index].callback == callback){
RoadMapSecondTimers[index].callback = NULL;
RoadMapSecondTimers[index].how_many_seconds_left = -1;
RoadMapSecondTimers[index].interval_in_seconds = -1;
return;
}
}
roadmap_log (ROADMAP_ERROR, "timer 0x%08x not found", callback);
}
开发者ID:NoamSheffer,项目名称:WazeWP7,代码行数:26,代码来源:roadmap_main.c
示例20: roadmap_path_create
void roadmap_path_create (const char *path)
{
LPWSTR path_unicode;
int res, stopFlag = 0;
char parent_path[512] = {0};
char *pNext = parent_path;
char delim = '\\';
strncpy( parent_path, path, 512 );
while( !stopFlag )
{
pNext = strchr( pNext+1, delim );
if ( pNext )
*pNext = 0;
else
stopFlag = 1;
path_unicode = ConvertToWideChar(parent_path, CP_UTF8);
res = CreateDirectory(path_unicode, NULL);
free(path_unicode);
if ( res == 0 && GetLastError() != 183) // error 183 = path already exists
{
roadmap_log( ROADMAP_ERROR, "Error creating path: %s, Error: %d", path, GetLastError() );
stopFlag = 1;
}
if ( pNext )
*pNext = delim;
}
}
开发者ID:NoamSheffer,项目名称:WazeWP7,代码行数:30,代码来源:roadmap_path.c
注:本文中的roadmap_log函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论