本文整理汇总了C++中DEBUG_ANDROID函数的典型用法代码示例。如果您正苦于以下问题:C++ DEBUG_ANDROID函数的具体用法?C++ DEBUG_ANDROID怎么用?C++ DEBUG_ANDROID使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了DEBUG_ANDROID函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: jni_freerdp_set_clipboard_redirection
JNIEXPORT void JNICALL jni_freerdp_set_clipboard_redirection(JNIEnv *env, jclass cls, jint instance, jboolean enable)
{
freerdp* inst = (freerdp*)instance;
rdpSettings * settings = inst->settings;
DEBUG_ANDROID("clipboard redirect: %s", enable ? "TRUE" : "FALSE");
settings->RedirectClipboard = enable ? TRUE : FALSE;
}
示例2: android_thread_func
void* android_thread_func(void* param)
{
struct thread_data* data;
data = (struct thread_data*) param;
assert(data);
assert(data->instance);
DEBUG_ANDROID("Start.");
freerdp* instance = data->instance;
android_freerdp_run(instance);
free(data);
DEBUG_ANDROID("Quit.");
ExitThread(0);
return NULL;
}
示例3: jni_input_thread
static void* jni_input_thread(void* arg)
{
HANDLE event[3];
wMessageQueue* queue;
freerdp* instance = (freerdp*) arg;
androidContext *aCtx = (androidContext*)instance->context;
assert(NULL != instance);
assert(NULL != aCtx);
DEBUG_ANDROID("Start.");
queue = freerdp_get_message_queue(instance, FREERDP_INPUT_MESSAGE_QUEUE);
event[0] = CreateFileDescriptorEvent(NULL, FALSE, FALSE, aCtx->event_queue->pipe_fd[0]);
event[1] = CreateFileDescriptorEvent(NULL, FALSE, FALSE, aCtx->event_queue->pipe_fd[1]);
event[2] = freerdp_get_message_queue_event_handle(instance, FREERDP_INPUT_MESSAGE_QUEUE);
do
{
DWORD rc = WaitForMultipleObjects(3, event, FALSE, INFINITE);
if ((rc < WAIT_OBJECT_0) || (rc > WAIT_OBJECT_0 + 2))
continue;
if (rc == WAIT_OBJECT_0 + 2)
{
wMessage msg;
MessageQueue_Peek(queue, &msg, FALSE);
if (msg.id == WMQ_QUIT)
break;
}
if (android_check_fds(instance) != TRUE)
break;
}
while(1);
DEBUG_ANDROID("Quit.");
MessageQueue_PostQuit(queue, 0);
ExitThread(0);
return NULL;
}
示例4: android_end_paint
static BOOL android_end_paint(rdpContext* context)
{
int i;
int ninvalid;
HGDI_RGN cinvalid;
int x1, y1, x2, y2;
androidContext *ctx = (androidContext*)context;
rdpSettings* settings = context->instance->settings;
assert(ctx);
assert(settings);
assert(context->instance);
ninvalid = ctx->rdpCtx.gdi->primary->hdc->hwnd->ninvalid;
if (ninvalid == 0)
{
DEBUG_ANDROID("ui_update: ninvalid=%d", ninvalid);
return TRUE;
}
cinvalid = ctx->rdpCtx.gdi->primary->hdc->hwnd->cinvalid;
x1 = cinvalid[0].x;
y1 = cinvalid[0].y;
x2 = cinvalid[0].x + cinvalid[0].w;
y2 = cinvalid[0].y + cinvalid[0].h;
for (i = 0; i < ninvalid; i++)
{
x1 = MIN(x1, cinvalid[i].x);
y1 = MIN(y1, cinvalid[i].y);
x2 = MAX(x2, cinvalid[i].x + cinvalid[i].w);
y2 = MAX(y2, cinvalid[i].y + cinvalid[i].h);
}
DEBUG_ANDROID("ui_update: ninvalid=%d x=%d, y=%d, width=%d, height=%d, bpp=%d",
ninvalid, x1, y1, x2 - x1, y2 - y1, settings->ColorDepth);
freerdp_callback("OnGraphicsUpdate", "(IIIII)V", context->instance,
x1, y1, x2 - x1, y2 - y1);
return TRUE;
}
示例5: jni_freerdp_set_advanced_settings
JNIEXPORT void JNICALL jni_freerdp_set_advanced_settings(JNIEnv *env, jclass cls, jint instance, jstring jRemoteProgram, jstring jWorkDir)
{
freerdp* inst = (freerdp*)instance;
rdpSettings * settings = inst->settings;
const jbyte *remote_program = (*env)->GetStringUTFChars(env, jRemoteProgram, NULL);
const jbyte *work_dir = (*env)->GetStringUTFChars(env, jWorkDir, NULL);
DEBUG_ANDROID("Remote Program: %s", (char*) remote_program);
DEBUG_ANDROID("Work Dir: %s", (char*) work_dir);
if(remote_program && strlen(remote_program) > 0)
settings->AlternateShell = strdup(remote_program);
if(work_dir && strlen(work_dir) > 0)
settings->ShellWorkingDirectory = strdup(work_dir);
(*env)->ReleaseStringUTFChars(env, jRemoteProgram, remote_program);
(*env)->ReleaseStringUTFChars(env, jWorkDir, work_dir);
}
示例6: jni_freerdp_send_unicodekey_event
JNIEXPORT void JNICALL jni_freerdp_send_unicodekey_event(
JNIEnv *env, jclass cls, jint instance, jint keycode)
{
ANDROID_EVENT* event;
freerdp* inst = (freerdp*)instance;
event = (ANDROID_EVENT*) android_event_unicodekey_new(keycode);
android_push_event(inst, event);
DEBUG_ANDROID("send_unicodekey_event: %d", keycode);
}
示例7: jni_freerdp_send_cursor_event
JNIEXPORT void JNICALL jni_freerdp_send_cursor_event(
JNIEnv *env, jclass cls, jint instance, jint x, jint y, jint flags)
{
ANDROID_EVENT* event;
freerdp* inst = (freerdp*)instance;
event = (ANDROID_EVENT*) android_event_cursor_new(flags, x, y);
android_push_event(inst, event);
DEBUG_ANDROID("send_cursor_event: (%d, %d), %d", x, y, flags);
}
示例8: _svg_android_push_state
svg_status_t
_svg_android_push_state (svg_android_t *svg_android,
jobject offscreen_bitmap)
{
DEBUG_ENTRY("push_state");
if (!svg_android->state)
{
DEBUG_ANDROID("P S 1");
if((svg_android->state = _svg_android_state_push (svg_android, svg_android->state)) == NULL)
return SVG_STATUS_NO_MEMORY;
DEBUG_ANDROID("P S 2");
svg_android->state->viewport_width = svg_android->viewport_width;
svg_android->state->viewport_height = svg_android->viewport_height;
DEBUG_ANDROID("P S 3");
}
else
{
DEBUG_ANDROID("P S 4");
if (offscreen_bitmap)
{
jobject new_canvas = ANDROID_CANVAS_CREATE(svg_android, offscreen_bitmap);
DEBUG_ANDROID("P S 5");
svg_android->state->saved_canvas = svg_android->canvas;
svg_android->canvas = new_canvas;
DEBUG_ANDROID("P S 6");
_svg_android_copy_canvas_state (svg_android);
DEBUG_ANDROID("P S 7");
}
DEBUG_ANDROID("P S 8");
if((svg_android->state = _svg_android_state_push (svg_android, svg_android->state)) == NULL)
return SVG_STATUS_NO_MEMORY;
DEBUG_ANDROID("P S 9");
}
DEBUG_ANDROID("P S 10");
DEBUG_EXIT("push_state");
return SVG_STATUS_SUCCESS;
}
示例9: android_desktop_resize
void android_desktop_resize(rdpContext* context)
{
DEBUG_ANDROID("ui_desktop_resize");
assert(context);
assert(context->settings);
assert(context->instance);
freerdp_callback("OnGraphicsResize", "(IIII)V",
context->instance, context->settings->DesktopWidth,
context->settings->DesktopHeight, context->settings->ColorDepth);
}
示例10: android_authenticate
BOOL android_authenticate(freerdp* instance, char** username, char** password, char** domain)
{
DEBUG_ANDROID("Authenticate user:");
DEBUG_ANDROID(" Username: %s", *username);
DEBUG_ANDROID(" Domain: %s", *domain);
JNIEnv* env;
jboolean attached = jni_attach_thread(&env);
jobject jstr1 = create_string_builder(env, *username);
jobject jstr2 = create_string_builder(env, *domain);
jobject jstr3 = create_string_builder(env, *password);
jboolean res = freerdp_callback_bool_result("OnAuthenticate", "(ILjava/lang/StringBuilder;Ljava/lang/StringBuilder;Ljava/lang/StringBuilder;)Z", instance, jstr1, jstr2, jstr3);
if (res == JNI_TRUE)
{
// read back string values
if (*username != NULL)
free(*username);
*username = get_string_from_string_builder(env, jstr1);
if (*domain != NULL)
free(*domain);
*domain = get_string_from_string_builder(env, jstr2);
if (*password == NULL)
free(*password);
*password = get_string_from_string_builder(env, jstr3);
}
if (attached == JNI_TRUE)
jni_detach_thread();
return ((res == JNI_TRUE) ? TRUE : FALSE);
}
示例11: android_verify_certificate
static BOOL android_verify_certificate(freerdp* instance, char* subject, char* issuer, char* fingerprint)
{
DEBUG_ANDROID("Certificate details:");
DEBUG_ANDROID("\tSubject: %s", subject);
DEBUG_ANDROID("\tIssuer: %s", issuer);
DEBUG_ANDROID("\tThumbprint: %s", fingerprint);
DEBUG_ANDROID("The above X.509 certificate could not be verified, possibly because you do not have "
"the CA certificate in your certificate store, or the certificate has expired."
"Please look at the documentation on how to create local certificate store for a private CA.\n");
JNIEnv* env;
jboolean attached = jni_attach_thread(&env);
jstring jstr1 = (*env)->NewStringUTF(env, subject);
jstring jstr2 = (*env)->NewStringUTF(env, issuer);
jstring jstr3 = (*env)->NewStringUTF(env, fingerprint);
jboolean res = freerdp_callback_bool_result("OnVerifyCertificate", "(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z", instance, jstr1, jstr2, jstr3);
if (attached == JNI_TRUE)
jni_detach_thread();
return ((res == JNI_TRUE) ? TRUE : FALSE);
}
示例12: jni_freerdp_set_performance_flags
JNIEXPORT void JNICALL jni_freerdp_set_performance_flags(
JNIEnv *env, jclass cls, jint instance, jboolean remotefx,
jboolean disableWallpaper, jboolean disableFullWindowDrag,
jboolean disableMenuAnimations, jboolean disableTheming,
jboolean enableFontSmoothing, jboolean enableDesktopComposition)
{
freerdp* inst = (freerdp*)instance;
rdpSettings * settings = inst->settings;
DEBUG_ANDROID("remotefx: %d", (remotefx == JNI_TRUE) ? 1 : 0);
if (remotefx == JNI_TRUE)
{
settings->RemoteFxCodec = TRUE;
settings->FastPathOutput = TRUE;
settings->ColorDepth = 32;
settings->LargePointerFlag = TRUE;
settings->FrameMarkerCommandEnabled = TRUE;
}
else
{
/* enable NSCodec if we don't use remotefx */
settings->NSCodec = TRUE;
}
/* store performance settings */
settings->DisableWallpaper = (disableWallpaper == JNI_TRUE) ? TRUE : FALSE;
settings->DisableFullWindowDrag = (disableFullWindowDrag == JNI_TRUE) ? TRUE : FALSE;
settings->DisableMenuAnims = (disableMenuAnimations == JNI_TRUE) ? TRUE : FALSE;
settings->DisableThemes = (disableTheming == JNI_TRUE) ? TRUE : FALSE;
settings->AllowFontSmoothing = (enableFontSmoothing == JNI_TRUE) ? TRUE : FALSE;
settings->AllowDesktopComposition = (enableDesktopComposition == JNI_TRUE) ? TRUE : FALSE;
/* Create performance flags from settings */
freerdp_performance_flags_make(settings);
DEBUG_ANDROID("performance_flags: %04X", settings->PerformanceFlags);
}
示例13: jni_freerdp_set_drive_redirection
JNIEXPORT void JNICALL jni_freerdp_set_drive_redirection(JNIEnv *env, jclass cls, jint instance, jstring jpath)
{
freerdp* inst = (freerdp*)instance;
rdpSettings * settings = inst->settings;
char* args[] = {"drive", "Android", ""};
const jbyte *path = (*env)->GetStringUTFChars(env, jpath, NULL);
DEBUG_ANDROID("drive redirect: %s", (char*)path);
args[2] = (char*)path;
freerdp_client_add_device_channel(settings, 3, args);
settings->DeviceRedirection = TRUE;
(*env)->ReleaseStringUTFChars(env, jpath, path);
}
示例14: jni_freerdp_send_clipboard_data
JNIEXPORT void JNICALL jni_freerdp_send_clipboard_data(JNIEnv *env, jclass cls, jint instance, jstring jdata)
{
ANDROID_EVENT* event;
freerdp* inst = (freerdp*)instance;
const jbyte *data = jdata != NULL ? (*env)->GetStringUTFChars(env, jdata, NULL) : NULL;
int data_length = data ? strlen(data) : 0;
event = (ANDROID_EVENT*) android_event_clipboard_new((void*)data, data_length);
android_push_event(inst, event);
DEBUG_ANDROID("send_clipboard_data: (%s)", data);
if (data)
(*env)->ReleaseStringUTFChars(env, jdata, data);
}
示例15: _svg_android_state_init_copy
svg_android_status_t
_svg_android_state_init_copy (svg_android_state_t *state, const svg_android_state_t *other)
{
if(other == NULL) // Nothing to copy => don't copy
return SVG_ANDROID_STATUS_SUCCESS;
// copy all fields as-is
*state = *other;
/* We don't need our own child_surface or saved cr at this point. */
state->offscreen_bitmap = NULL;
state->saved_canvas = NULL;
// copy paint
state->paint = ANDROID_PAINT_COPY(state->instance, other->paint);
state->paint =
(*(state->instance->env))->NewGlobalRef(
state->instance->env, state->paint);
// copy matrix
state->matrix = ANDROID_MATRIX_COPY(state->instance, other->matrix);
state->matrix =
(*(state->instance->env))->NewGlobalRef(
state->instance->env, state->matrix);
DEBUG_ANDROID("-----------------------------");
DEBUG_ANDROID1("COPY created global refs for paint at %p", state->paint);
DEBUG_ANDROID1("COPY created global refs for paint at %p", state->matrix);
// We need to duplicate the string
if (other->font_family)
state->font_family = strdup ((char *) other->font_family);
// XXX anton: are these not copied already?!
state->viewport_width = other->viewport_width;
state->viewport_height = other->viewport_height;
// Create a copy of the dash
if (other->dash) {
state->dash = malloc (state->num_dashes * sizeof(double));
if (state->dash == NULL)
return SVG_ANDROID_STATUS_NO_MEMORY;
memcpy (state->dash, other->dash, state->num_dashes * sizeof(double));
}
return SVG_ANDROID_STATUS_SUCCESS;
}