FreeRDP
android_freerdp.c File Reference
#include <freerdp/config.h>
#include <locale.h>
#include <jni.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <winpr/assert.h>
#include <freerdp/graphics.h>
#include <freerdp/codec/rfx.h>
#include <freerdp/gdi/gdi.h>
#include <freerdp/gdi/gfx.h>
#include <freerdp/client/rdpei.h>
#include <freerdp/client/rdpgfx.h>
#include <freerdp/client/cliprdr.h>
#include <freerdp/codec/h264.h>
#include <freerdp/channels/channels.h>
#include <freerdp/client/channels.h>
#include <freerdp/client/cmdline.h>
#include <freerdp/constants.h>
#include <freerdp/locale/keyboard.h>
#include <freerdp/primitives.h>
#include <freerdp/version.h>
#include <freerdp/settings.h>
#include <freerdp/utils/signal.h>
#include <android/bitmap.h>
#include "android_jni_callback.h"
#include "android_jni_utils.h"
#include "android_cliprdr.h"
#include "android_freerdp_jni.h"

Macros

#define TAG   CLIENT_TAG("android")
 
#define FREERDP_JNI_VERSION   "3.5.1-dev0"
 

Functions

static void android_OnChannelConnectedEventHandler (void *context, const ChannelConnectedEventArgs *e)
 
static void android_OnChannelDisconnectedEventHandler (void *context, const ChannelDisconnectedEventArgs *e)
 
static BOOL android_begin_paint (rdpContext *context)
 
static BOOL android_end_paint (rdpContext *context)
 
static BOOL android_desktop_resize (rdpContext *context)
 
static BOOL android_pre_connect (freerdp *instance)
 
static BOOL android_Pointer_New (rdpContext *context, rdpPointer *pointer)
 
static void android_Pointer_Free (rdpContext *context, rdpPointer *pointer)
 
static BOOL android_Pointer_Set (rdpContext *context, rdpPointer *pointer)
 
static BOOL android_Pointer_SetPosition (rdpContext *context, UINT32 x, UINT32 y)
 
static BOOL android_Pointer_SetNull (rdpContext *context)
 
static BOOL android_Pointer_SetDefault (rdpContext *context)
 
static BOOL android_register_pointer (rdpGraphics *graphics)
 
static BOOL android_post_connect (freerdp *instance)
 
static void android_post_disconnect (freerdp *instance)
 
static BOOL android_authenticate_int (freerdp *instance, char **username, char **password, char **domain, const char *cb_name)
 
static BOOL android_authenticate (freerdp *instance, char **username, char **password, char **domain)
 
static BOOL android_gw_authenticate (freerdp *instance, char **username, char **password, char **domain)
 
static DWORD android_verify_certificate_ex (freerdp *instance, const char *host, UINT16 port, const char *common_name, const char *subject, const char *issuer, const char *fingerprint, DWORD flags)
 
static DWORD android_verify_changed_certificate_ex (freerdp *instance, const char *host, UINT16 port, const char *common_name, const char *subject, const char *issuer, const char *new_fingerprint, const char *old_subject, const char *old_issuer, const char *old_fingerprint, DWORD flags)
 
static int android_freerdp_run (freerdp *instance)
 
static DWORD WINAPI android_thread_func (LPVOID param)
 
static BOOL android_client_new (freerdp *instance, rdpContext *context)
 
static void android_client_free (freerdp *instance, rdpContext *context)
 
static int RdpClientEntry (RDP_CLIENT_ENTRY_POINTS *pEntryPoints)
 
JNIEXPORT jlong JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1new (JNIEnv *env, jclass cls, jobject context)
 
JNIEXPORT void JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1free (JNIEnv *env, jclass cls, jlong instance)
 
JNIEXPORT jstring JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1get_1last_1error_1string (JNIEnv *env, jclass cls, jlong instance)
 
JNIEXPORT jboolean JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1parse_1arguments (JNIEnv *env, jclass cls, jlong instance, jobjectArray arguments)
 
JNIEXPORT jboolean JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1connect (JNIEnv *env, jclass cls, jlong instance)
 
JNIEXPORT jboolean JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1disconnect (JNIEnv *env, jclass cls, jlong instance)
 
JNIEXPORT jboolean JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1update_1graphics (JNIEnv *env, jclass cls, jlong instance, jobject bitmap, jint x, jint y, jint width, jint height)
 
JNIEXPORT jboolean JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1send_1key_1event (JNIEnv *env, jclass cls, jlong instance, jint keycode, jboolean down)
 
JNIEXPORT jboolean JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1send_1unicodekey_1event (JNIEnv *env, jclass cls, jlong instance, jint keycode, jboolean down)
 
JNIEXPORT jboolean JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1send_1cursor_1event (JNIEnv *env, jclass cls, jlong instance, jint x, jint y, jint flags)
 
JNIEXPORT jboolean JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1send_1clipboard_1data (JNIEnv *env, jclass cls, jlong instance, jstring jdata)
 
JNIEXPORT jstring JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1get_1jni_1version (JNIEnv *env, jclass cls)
 
JNIEXPORT jboolean JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1has_1h264 (JNIEnv *env, jclass cls)
 
JNIEXPORT jstring JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1get_1version (JNIEnv *env, jclass cls)
 
JNIEXPORT jstring JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1get_1build_1revision (JNIEnv *env, jclass cls)
 
JNIEXPORT jstring JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1get_1build_1config (JNIEnv *env, jclass cls)
 
jint JNI_OnLoad (JavaVM *vm, void *reserved)
 
void JNICALL JNI_OnUnload (JavaVM *vm, void *reserved)
 

Variables

static jclass gJavaActivityClass = NULL
 

Macro Definition Documentation

◆ FREERDP_JNI_VERSION

#define FREERDP_JNI_VERSION   "3.5.1-dev0"

◆ TAG

#define TAG   CLIENT_TAG("android")

Function Documentation

◆ android_authenticate()

static BOOL android_authenticate ( freerdp *  instance,
char **  username,
char **  password,
char **  domain 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ android_authenticate_int()

static BOOL android_authenticate_int ( freerdp *  instance,
char **  username,
char **  password,
char **  domain,
const char *  cb_name 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ android_begin_paint()

static BOOL android_begin_paint ( rdpContext *  context)
static
Here is the caller graph for this function:

◆ android_client_free()

static void android_client_free ( freerdp *  instance,
rdpContext *  context 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ android_client_new()

static BOOL android_client_new ( freerdp *  instance,
rdpContext *  context 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ android_desktop_resize()

static BOOL android_desktop_resize ( rdpContext *  context)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ android_end_paint()

static BOOL android_end_paint ( rdpContext *  context)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ android_freerdp_run()

static int android_freerdp_run ( freerdp *  instance)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ android_gw_authenticate()

static BOOL android_gw_authenticate ( freerdp *  instance,
char **  username,
char **  password,
char **  domain 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ android_OnChannelConnectedEventHandler()

static void android_OnChannelConnectedEventHandler ( void *  context,
const ChannelConnectedEventArgs *  e 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ android_OnChannelDisconnectedEventHandler()

static void android_OnChannelDisconnectedEventHandler ( void *  context,
const ChannelDisconnectedEventArgs *  e 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ android_Pointer_Free()

static void android_Pointer_Free ( rdpContext *  context,
rdpPointer *  pointer 
)
static
Here is the caller graph for this function:

◆ android_Pointer_New()

static BOOL android_Pointer_New ( rdpContext *  context,
rdpPointer *  pointer 
)
static
Here is the caller graph for this function:

◆ android_Pointer_Set()

static BOOL android_Pointer_Set ( rdpContext *  context,
rdpPointer *  pointer 
)
static
Here is the caller graph for this function:

◆ android_Pointer_SetDefault()

static BOOL android_Pointer_SetDefault ( rdpContext *  context)
static
Here is the caller graph for this function:

◆ android_Pointer_SetNull()

static BOOL android_Pointer_SetNull ( rdpContext *  context)
static
Here is the caller graph for this function:

◆ android_Pointer_SetPosition()

static BOOL android_Pointer_SetPosition ( rdpContext *  context,
UINT32  x,
UINT32  y 
)
static
Here is the caller graph for this function:

◆ android_post_connect()

static BOOL android_post_connect ( freerdp *  instance)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ android_post_disconnect()

static void android_post_disconnect ( freerdp *  instance)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ android_pre_connect()

static BOOL android_pre_connect ( freerdp *  instance)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ android_register_pointer()

static BOOL android_register_pointer ( rdpGraphics *  graphics)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ android_thread_func()

static DWORD WINAPI android_thread_func ( LPVOID  param)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ android_verify_certificate_ex()

static DWORD android_verify_certificate_ex ( freerdp *  instance,
const char *  host,
UINT16  port,
const char *  common_name,
const char *  subject,
const char *  issuer,
const char *  fingerprint,
DWORD  flags 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ android_verify_changed_certificate_ex()

static DWORD android_verify_changed_certificate_ex ( freerdp *  instance,
const char *  host,
UINT16  port,
const char *  common_name,
const char *  subject,
const char *  issuer,
const char *  new_fingerprint,
const char *  old_subject,
const char *  old_issuer,
const char *  old_fingerprint,
DWORD  flags 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1connect()

JNIEXPORT jboolean JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1connect ( JNIEnv *  env,
jclass  cls,
jlong  instance 
)
Here is the call graph for this function:

◆ Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1disconnect()

JNIEXPORT jboolean JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1disconnect ( JNIEnv *  env,
jclass  cls,
jlong  instance 
)
Here is the call graph for this function:

◆ Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1free()

JNIEXPORT void JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1free ( JNIEnv *  env,
jclass  cls,
jlong  instance 
)
Here is the call graph for this function:

◆ Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1get_1build_1config()

JNIEXPORT jstring JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1get_1build_1config ( JNIEnv *  env,
jclass  cls 
)
Here is the call graph for this function:

◆ Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1get_1build_1revision()

JNIEXPORT jstring JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1get_1build_1revision ( JNIEnv *  env,
jclass  cls 
)
Here is the call graph for this function:

◆ Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1get_1jni_1version()

JNIEXPORT jstring JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1get_1jni_1version ( JNIEnv *  env,
jclass  cls 
)

◆ Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1get_1last_1error_1string()

JNIEXPORT jstring JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1get_1last_1error_1string ( JNIEnv *  env,
jclass  cls,
jlong  instance 
)
Here is the call graph for this function:

◆ Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1get_1version()

JNIEXPORT jstring JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1get_1version ( JNIEnv *  env,
jclass  cls 
)
Here is the call graph for this function:

◆ Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1has_1h264()

JNIEXPORT jboolean JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1has_1h264 ( JNIEnv *  env,
jclass  cls 
)
Here is the call graph for this function:

◆ Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1new()

JNIEXPORT jlong JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1new ( JNIEnv *  env,
jclass  cls,
jobject  context 
)
Here is the call graph for this function:

◆ Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1parse_1arguments()

JNIEXPORT jboolean JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1parse_1arguments ( JNIEnv *  env,
jclass  cls,
jlong  instance,
jobjectArray  arguments 
)
Here is the call graph for this function:

◆ Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1send_1clipboard_1data()

JNIEXPORT jboolean JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1send_1clipboard_1data ( JNIEnv *  env,
jclass  cls,
jlong  instance,
jstring  jdata 
)
Here is the call graph for this function:

◆ Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1send_1cursor_1event()

JNIEXPORT jboolean JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1send_1cursor_1event ( JNIEnv *  env,
jclass  cls,
jlong  instance,
jint  x,
jint  y,
jint  flags 
)
Here is the call graph for this function:

◆ Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1send_1key_1event()

JNIEXPORT jboolean JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1send_1key_1event ( JNIEnv *  env,
jclass  cls,
jlong  instance,
jint  keycode,
jboolean  down 
)
Here is the call graph for this function:

◆ Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1send_1unicodekey_1event()

JNIEXPORT jboolean JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1send_1unicodekey_1event ( JNIEnv *  env,
jclass  cls,
jlong  instance,
jint  keycode,
jboolean  down 
)
Here is the call graph for this function:

◆ Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1update_1graphics()

JNIEXPORT jboolean JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1update_1graphics ( JNIEnv *  env,
jclass  cls,
jlong  instance,
jobject  bitmap,
jint  x,
jint  y,
jint  width,
jint  height 
)
Here is the call graph for this function:

◆ JNI_OnLoad()

jint JNI_OnLoad ( JavaVM *  vm,
void *  reserved 
)
Here is the call graph for this function:

◆ JNI_OnUnload()

void JNICALL JNI_OnUnload ( JavaVM *  vm,
void *  reserved 
)
Here is the call graph for this function:

◆ RdpClientEntry()

static int RdpClientEntry ( RDP_CLIENT_ENTRY_POINTS pEntryPoints)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ gJavaActivityClass

jclass gJavaActivityClass = NULL
static