--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="gen"/>
+ <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+ <classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
+ <classpathentry kind="output" path="bin/classes"/>
+</classpath>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>FreeRDPCore</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.ApkBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
#include "android_freerdp.h"
#include "android_freerdp_jni.h"
-JNIEXPORT jint JNICALL Java_com_freerdp_afreerdp_services_LibFreeRDP_freerdp_1new(JNIEnv *env, jclass cls)
+JNIEXPORT jint JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1new(JNIEnv *env, jclass cls)
{
return jni_freerdp_new(env, cls);
}
-JNIEXPORT void JNICALL JNICALL Java_com_freerdp_afreerdp_services_LibFreeRDP_freerdp_1free(JNIEnv *env, jclass cls, jint instance)
+JNIEXPORT void JNICALL JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1free(JNIEnv *env, jclass cls, jint instance)
{
jni_freerdp_free(env, cls, instance);
}
-JNIEXPORT jboolean JNICALL Java_com_freerdp_afreerdp_services_LibFreeRDP_freerdp_1connect(JNIEnv *env, jclass cls, jint instance)
+JNIEXPORT jboolean JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1connect(JNIEnv *env, jclass cls, jint instance)
{
return jni_freerdp_connect(env, cls, instance);
}
-JNIEXPORT jboolean JNICALL Java_com_freerdp_afreerdp_services_LibFreeRDP_freerdp_1disconnect(JNIEnv *env, jclass cls, jint instance)
+JNIEXPORT jboolean JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1disconnect(JNIEnv *env, jclass cls, jint instance)
{
return jni_freerdp_disconnect(env, cls, instance);
}
-JNIEXPORT void JNICALL Java_com_freerdp_afreerdp_services_LibFreeRDP_freerdp_1cancel_1connection(JNIEnv *env, jclass cls, jint instance)
+JNIEXPORT void JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1cancel_1connection(JNIEnv *env, jclass cls, jint instance)
{
jni_freerdp_cancel_connection(env, cls, instance);
}
-JNIEXPORT void JNICALL Java_com_freerdp_afreerdp_services_LibFreeRDP_freerdp_1set_1connection_1info(JNIEnv *env, jclass cls, jint instance,
+JNIEXPORT void JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1set_1connection_1info(JNIEnv *env, jclass cls, jint instance,
jstring jhostname, jstring jusername, jstring jpassword, jstring jdomain, jint width, jint height, jint color_depth, jint port,
jboolean console, jint security, jstring certname)
{
width, height, color_depth, port, console, security, certname);
}
-JNIEXPORT void JNICALL Java_com_freerdp_afreerdp_services_LibFreeRDP_freerdp_1set_1advanced_1settings(JNIEnv *env, jclass cls, jint instance, jstring remote_program, jstring work_dir)
+JNIEXPORT void JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1set_1advanced_1settings(JNIEnv *env, jclass cls, jint instance, jstring remote_program, jstring work_dir)
{
jni_freerdp_set_advanced_settings(env, cls, instance, remote_program, work_dir);
}
-JNIEXPORT void JNICALL Java_com_freerdp_afreerdp_services_LibFreeRDP_freerdp_1set_1data_1directory(JNIEnv *env, jclass cls, jint instance, jstring directory)
+JNIEXPORT void JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1set_1data_1directory(JNIEnv *env, jclass cls, jint instance, jstring directory)
{
jni_freerdp_set_data_directory(env, cls, instance, directory);
}
-JNIEXPORT void JNICALL Java_com_freerdp_afreerdp_services_LibFreeRDP_freerdp_1set_1performance_1flags(
+JNIEXPORT void JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1set_1performance_1flags(
JNIEnv *env, jclass cls, jint instance, jboolean remotefx, jboolean disableWallpaper, jboolean disableFullWindowDrag,
jboolean disableMenuAnimations, jboolean disableTheming, jboolean enableFontSmoothing, jboolean enableDesktopComposition)
{
jni_freerdp_set_performance_flags(env, cls, instance, remotefx, disableWallpaper, disableFullWindowDrag, disableMenuAnimations, disableTheming, enableFontSmoothing, enableDesktopComposition);
}
-JNIEXPORT jboolean JNICALL Java_com_freerdp_afreerdp_services_LibFreeRDP_freerdp_1update_1graphics(
+JNIEXPORT jboolean JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1update_1graphics(
JNIEnv *env, jclass cls, jint instance, jobject bitmap, jint x, jint y, jint width, jint height)
{
return jni_freerdp_update_graphics(env, cls, instance, bitmap, x, y, width, height);
}
-JNIEXPORT void JNICALL Java_com_freerdp_afreerdp_services_LibFreeRDP_freerdp_1send_1cursor_1event(
+JNIEXPORT void JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1send_1cursor_1event(
JNIEnv *env, jclass cls, jint instance, jint x, jint y, jint flags)
{
jni_freerdp_send_cursor_event(env, cls, instance, x, y, flags);
}
-JNIEXPORT void JNICALL Java_com_freerdp_afreerdp_services_LibFreeRDP_freerdp_1send_1key_1event(
+JNIEXPORT void JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1send_1key_1event(
JNIEnv *env, jclass cls, jint instance, jint keycode, jboolean down)
{
jni_freerdp_send_key_event(env, cls, instance, keycode, down);
}
-JNIEXPORT void JNICALL Java_com_freerdp_afreerdp_services_LibFreeRDP_freerdp_1send_1unicodekey_1event
+JNIEXPORT void JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1send_1unicodekey_1event
(JNIEnv *env, jclass cls, jint instance, jint keycode)
{
jni_freerdp_send_unicodekey_event(env, cls, instance, keycode);
}
-JNIEXPORT jstring JNICALL Java_com_freerdp_afreerdp_services_LibFreeRDP_freerdp_1get_1version(JNIEnv *env, jclass cls)
+JNIEXPORT jstring JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1get_1version(JNIEnv *env, jclass cls)
{
return jni_freerdp_get_version(env, cls);
}
#include "com_freerdp_afreerdp_services_LibFreeRDP.h"
-#define JAVA_LIBFREERDP_CLASS "com/freerdp/afreerdp/services/LibFreeRDP"
+#define JAVA_LIBFREERDP_CLASS "com/freerdp/freerdpcore/services/LibFreeRDP"
#endif /* __ANDROID_FREERDP_JNI_H */
* Method: freerdp_new
* Signature: ()I
*/
-JNIEXPORT jint JNICALL Java_com_freerdp_afreerdp_services_LibFreeRDP_freerdp_1new
+JNIEXPORT jint JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1new
(JNIEnv *, jclass);
/*
* Method: freerdp_free
* Signature: (I)V
*/
-JNIEXPORT void JNICALL Java_com_freerdp_afreerdp_services_LibFreeRDP_freerdp_1free
+JNIEXPORT void JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1free
(JNIEnv *, jclass, jint);
/*
* Method: freerdp_connect
* Signature: (I)Z
*/
-JNIEXPORT jboolean JNICALL Java_com_freerdp_afreerdp_services_LibFreeRDP_freerdp_1connect
+JNIEXPORT jboolean JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1connect
(JNIEnv *, jclass, jint);
/*
* Method: freerdp_disconnect
* Signature: (I)Z
*/
-JNIEXPORT jboolean JNICALL Java_com_freerdp_afreerdp_services_LibFreeRDP_freerdp_1disconnect
+JNIEXPORT jboolean JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1disconnect
(JNIEnv *, jclass, jint);
/*
* Method: freerdp_cancel_connection
* Signature: (I)V
*/
-JNIEXPORT void JNICALL Java_com_freerdp_afreerdp_services_LibFreeRDP_freerdp_1cancel_1connection
+JNIEXPORT void JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1cancel_1connection
(JNIEnv *, jclass, jint);
/*
* Method: freerdp_set_connection_info
* Signature: (ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IIIIZILjava/lang/String;)V
*/
-JNIEXPORT void JNICALL Java_com_freerdp_afreerdp_services_LibFreeRDP_freerdp_1set_1connection_1info
+JNIEXPORT void JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1set_1connection_1info
(JNIEnv *, jclass, jint, jstring, jstring, jstring, jstring, jint, jint, jint, jint, jboolean, jint, jstring);
/*
* Method: freerdp_set_performance_flags
* Signature: (IZZZZZZZ)V
*/
-JNIEXPORT void JNICALL Java_com_freerdp_afreerdp_services_LibFreeRDP_freerdp_1set_1performance_1flags
+JNIEXPORT void JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1set_1performance_1flags
(JNIEnv *, jclass, jint, jboolean, jboolean, jboolean, jboolean, jboolean, jboolean, jboolean);
/*
* Method: freerdp_set_advanced_settings
* Signature: (ILjava/lang/String;Ljava/lang/String;)V
*/
-JNIEXPORT void JNICALL Java_com_freerdp_afreerdp_services_LibFreeRDP_freerdp_1set_1advanced_1settings
+JNIEXPORT void JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1set_1advanced_1settings
(JNIEnv *, jclass, jint, jstring, jstring);
/*
* Method: freerdp_set_data_directory
* Signature: (ILjava/lang/String;)V
*/
-JNIEXPORT void JNICALL Java_com_freerdp_afreerdp_services_LibFreeRDP_freerdp_1set_1data_1directory
+JNIEXPORT void JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1set_1data_1directory
(JNIEnv *, jclass, jint, jstring);
/*
* Method: freerdp_update_graphics
* Signature: (ILandroid/graphics/Bitmap;IIII)Z
*/
-JNIEXPORT jboolean JNICALL Java_com_freerdp_afreerdp_services_LibFreeRDP_freerdp_1update_1graphics
+JNIEXPORT jboolean JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1update_1graphics
(JNIEnv *, jclass, jint, jobject, jint, jint, jint, jint);
/*
* Method: freerdp_send_cursor_event
* Signature: (IIII)V
*/
-JNIEXPORT void JNICALL Java_com_freerdp_afreerdp_services_LibFreeRDP_freerdp_1send_1cursor_1event
+JNIEXPORT void JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1send_1cursor_1event
(JNIEnv *, jclass, jint, jint, jint, jint);
/*
* Method: freerdp_send_key_event
* Signature: (IIZ)V
*/
-JNIEXPORT void JNICALL Java_com_freerdp_afreerdp_services_LibFreeRDP_freerdp_1send_1key_1event
+JNIEXPORT void JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1send_1key_1event
(JNIEnv *, jclass, jint, jint, jboolean);
/*
* Method: freerdp_send_unicodekey_event
* Signature: (II)V
*/
-JNIEXPORT void JNICALL Java_com_freerdp_afreerdp_services_LibFreeRDP_freerdp_1send_1unicodekey_1event
+JNIEXPORT void JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1send_1unicodekey_1event
(JNIEnv *, jclass, jint, jint);
/*
* Method: freerdp_get_version
* Signature: ()Ljava/lang/String;
*/
-JNIEXPORT jstring JNICALL Java_com_freerdp_afreerdp_services_LibFreeRDP_freerdp_1get_1version
+JNIEXPORT jstring JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1get_1version
(JNIEnv *, jclass);
#ifdef __cplusplus
--- /dev/null
+# To enable ProGuard in your project, edit project.properties
+# to define the proguard.config property as described in that file.
+#
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in ${sdk.dir}/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the ProGuard
+# include property in project.properties.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
--- /dev/null
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system edit
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+#
+# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
+#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
+
+# Project target.
+target=android-8
+android.library=true
<item android:id="@+id/exit"
android:icon="@drawable/icon_menu_exit"
android:title="@string/menu_exit"
- />
+ />
</menu>
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-->
-<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" xmlns:freerdp="http://schemas.android.com/apk/res/com.freerdp.afreerdp" >
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" xmlns:freerdp="http://schemas.android.com/apk/res-auto" >
<PreferenceCategory android:title="@string/settings_cat_ui">
<CheckBoxPreference android:key="ui.hide_status_bar" android:title="@string/settings_ui_hide_status_bar"/>
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-->
-<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" xmlns:freerdp="http://schemas.android.com/apk/res/com.freerdp.afreerdp" >
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" xmlns:freerdp="http://schemas.android.com/apk/res-auto" >
<PreferenceCategory android:key="category.host" android:title="@string/settings_cat_host">
<EditTextPreference android:key="bookmark.label" android:title="Label" android:summary="@string/settings_label"/>
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-->
-<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" xmlns:freerdp="http://schemas.android.com/apk/res/com.freerdp.afreerdp" >
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" xmlns:freerdp="http://schemas.android.com/apk/res-auto" >
<PreferenceCategory android:title="@string/settings_cat_screen">
<com.freerdp.afreerdp.utils.IntListPreference android:key="bookmark.colors" android:entries="@array/colors_array" android:title="@string/settings_colors" android:summary="Color depth" android:entryValues="@array/colors_values_array" />
<ListPreference android:key="bookmark.resolution" android:entries="@array/resolutions_array" android:title="@string/settings_resolution" android:summary="XXX" android:entryValues="@array/resolutions_values_array" />
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-->
-<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" xmlns:freerdp="http://schemas.android.com/apk/res/com.freerdp.afreerdp">
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" xmlns:freerdp="http://schemas.android.com/apk/res-auto">
<PreferenceCategory android:title="@string/settings_cat_screen">
<com.freerdp.afreerdp.utils.IntListPreference android:key="bookmark.colors_3g" android:entries="@array/colors_array" android:title="@string/settings_colors" android:summary="Color depth" android:entryValues="@array/colors_values_array" />
<ListPreference android:key="bookmark.resolution_3g" android:entries="@array/resolutions_array" android:title="@string/settings_resolution" android:summary="XXX" android:entryValues="@array/resolutions_values_array" />
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.application;
+package com.freerdp.freerdpcore.application;
import android.app.Application;
import android.content.Intent;
import java.util.*;
-import com.freerdp.afreerdp.application.SessionState;
-import com.freerdp.afreerdp.domain.BookmarkBase;
-import com.freerdp.afreerdp.services.BookmarkDB;
-import com.freerdp.afreerdp.services.HistoryDB;
-import com.freerdp.afreerdp.services.LibFreeRDP;
-import com.freerdp.afreerdp.services.ManualBookmarkGateway;
-import com.freerdp.afreerdp.services.QuickConnectHistoryGateway;
+import com.freerdp.freerdpcore.application.SessionState;
+import com.freerdp.freerdpcore.domain.BookmarkBase;
+import com.freerdp.freerdpcore.services.BookmarkDB;
+import com.freerdp.freerdpcore.services.HistoryDB;
+import com.freerdp.freerdpcore.services.LibFreeRDP;
+import com.freerdp.freerdpcore.services.ManualBookmarkGateway;
+import com.freerdp.freerdpcore.services.QuickConnectHistoryGateway;
public class GlobalApp extends Application implements LibFreeRDP.EventListener
{
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.application;
+package com.freerdp.freerdpcore.application;
import android.content.Context;
import android.content.SharedPreferences;
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.application;
+package com.freerdp.freerdpcore.application;
import android.content.BroadcastReceiver;
import android.content.Context;
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.application;
+package com.freerdp.freerdpcore.application;
import android.content.BroadcastReceiver;
import android.content.Context;
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.application;
+package com.freerdp.freerdpcore.application;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.os.Parcel;
import android.os.Parcelable;
-import com.freerdp.afreerdp.domain.BookmarkBase;
-import com.freerdp.afreerdp.services.LibFreeRDP;
+import com.freerdp.freerdpcore.domain.BookmarkBase;
+import com.freerdp.freerdpcore.services.LibFreeRDP;
public class SessionState implements Parcelable
{
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.domain;
+package com.freerdp.freerdpcore.domain;
-import com.freerdp.afreerdp.application.GlobalApp;
+import com.freerdp.freerdpcore.application.GlobalApp;
import android.content.SharedPreferences;
import android.os.Parcel;
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.domain;
+package com.freerdp.freerdpcore.domain;
public class ConnectionReference
{
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.domain;
+package com.freerdp.freerdpcore.domain;
import android.content.SharedPreferences;
import android.os.Parcel;
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.domain;
+package com.freerdp.freerdpcore.domain;
import android.content.SharedPreferences;
import android.os.Parcel;
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.domain;
+package com.freerdp.freerdpcore.domain;
import android.content.SharedPreferences;
import android.os.Parcel;
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.presentation;
+package com.freerdp.freerdpcore.presentation;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.IllegalFormatException;
-import com.freerdp.afreerdp.services.LibFreeRDP;
+import com.freerdp.freerdpcore.services.LibFreeRDP;
import android.app.Activity;
import android.content.pm.PackageManager.NameNotFoundException;
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.presentation;
+package com.freerdp.freerdpcore.presentation;
import java.io.File;
-import com.freerdp.afreerdp.R;
+import com.freerdp.freerdpcore.R;
import android.app.AlertDialog;
import android.content.DialogInterface;
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.presentation;
+package com.freerdp.freerdpcore.presentation;
-import com.freerdp.afreerdp.R;
-import com.freerdp.afreerdp.application.GlobalApp;
-import com.freerdp.afreerdp.domain.BookmarkBase;
-import com.freerdp.afreerdp.domain.ConnectionReference;
-import com.freerdp.afreerdp.domain.ManualBookmark;
-import com.freerdp.afreerdp.services.BookmarkBaseGateway;
+import com.freerdp.freerdpcore.R;
+import com.freerdp.freerdpcore.application.GlobalApp;
+import com.freerdp.freerdpcore.domain.BookmarkBase;
+import com.freerdp.freerdpcore.domain.ConnectionReference;
+import com.freerdp.freerdpcore.domain.ManualBookmark;
+import com.freerdp.freerdpcore.services.BookmarkBaseGateway;
import android.app.AlertDialog;
import android.content.DialogInterface;
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.presentation;
+package com.freerdp.freerdpcore.presentation;
import android.app.Activity;
import android.content.res.Configuration;
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.presentation;
+package com.freerdp.freerdpcore.presentation;
import java.util.ArrayList;
-import com.freerdp.afreerdp.R;
-import com.freerdp.afreerdp.application.GlobalApp;
-import com.freerdp.afreerdp.application.GlobalSettings;
-import com.freerdp.afreerdp.domain.BookmarkBase;
-import com.freerdp.afreerdp.domain.ConnectionReference;
-import com.freerdp.afreerdp.domain.PlaceholderBookmark;
-import com.freerdp.afreerdp.domain.QuickConnectBookmark;
-import com.freerdp.afreerdp.utils.BookmarkArrayAdapter;
-import com.freerdp.afreerdp.utils.SeparatedListAdapter;
+import com.freerdp.freerdpcore.R;
+import com.freerdp.freerdpcore.application.GlobalApp;
+import com.freerdp.freerdpcore.application.GlobalSettings;
+import com.freerdp.freerdpcore.domain.BookmarkBase;
+import com.freerdp.freerdpcore.domain.ConnectionReference;
+import com.freerdp.freerdpcore.domain.PlaceholderBookmark;
+import com.freerdp.freerdpcore.domain.QuickConnectBookmark;
+import com.freerdp.freerdpcore.utils.BookmarkArrayAdapter;
+import com.freerdp.freerdpcore.utils.SeparatedListAdapter;
import android.app.Activity;
import android.app.AlertDialog;
// get connection reference
AdapterContextMenuInfo menuInfo = (AdapterContextMenuInfo)aItem.getMenuInfo();
String refStr = menuInfo.targetView.getTag().toString();
-
- switch(aItem.getItemId()) {
-
- case R.id.bookmark_connect:
+
+ // refer to http://tools.android.com/tips/non-constant-fields why we can't use switch/case here ..
+ int itemId = aItem.getItemId();
+ if (itemId == R.id.bookmark_connect)
+ {
+ Bundle bundle = new Bundle();
+ bundle.putString(SessionActivity.PARAM_CONNECTION_REFERENCE, refStr);
+ Intent sessionIntent = new Intent(this, SessionActivity.class);
+ sessionIntent.putExtras(bundle);
+
+ startActivity(sessionIntent);
+ return true;
+ }
+ else if (itemId == R.id.bookmark_edit)
+ {
+ Bundle bundle = new Bundle();
+ bundle.putString(BookmarkActivity.PARAM_CONNECTION_REFERENCE, refStr);
+
+ Intent bookmarkIntent = new Intent(this.getApplicationContext(), BookmarkActivity.class);
+ bookmarkIntent.putExtras(bundle);
+ startActivity(bookmarkIntent);
+ return true;
+ }
+ else if (itemId == R.id.bookmark_delete)
+ {
+ if(ConnectionReference.isManualBookmarkReference(refStr))
{
- Bundle bundle = new Bundle();
- bundle.putString(SessionActivity.PARAM_CONNECTION_REFERENCE, refStr);
- Intent sessionIntent = new Intent(this, SessionActivity.class);
- sessionIntent.putExtras(bundle);
-
- startActivity(sessionIntent);
- return true;
+ long id = ConnectionReference.getManualBookmarkId(refStr);
+ GlobalApp.getManualBookmarkGateway().delete(id);
+ manualBookmarkAdapter.remove(id);
+ separatedListAdapter.notifyDataSetChanged();
}
-
- case R.id.bookmark_edit:
+ else
{
- Bundle bundle = new Bundle();
- bundle.putString(BookmarkActivity.PARAM_CONNECTION_REFERENCE, refStr);
-
- Intent bookmarkIntent = new Intent(this.getApplicationContext(), BookmarkActivity.class);
- bookmarkIntent.putExtras(bundle);
- startActivity(bookmarkIntent);
- return true;
+ assert false;
}
-
- case R.id.bookmark_delete:
- {
- if(ConnectionReference.isManualBookmarkReference(refStr))
- {
- long id = ConnectionReference.getManualBookmarkId(refStr);
- GlobalApp.getManualBookmarkGateway().delete(id);
- manualBookmarkAdapter.remove(id);
- separatedListAdapter.notifyDataSetChanged();
- }
- else
- {
- assert false;
- }
-
- showWelcomeScreenOrBookmarkList();
-
- // clear super bar text
- superBarEditText.setText("");
- return true;
- }
- }
+
+ showWelcomeScreenOrBookmarkList();
+
+ // clear super bar text
+ superBarEditText.setText("");
+ return true;
+ }
return false;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
- switch (item.getItemId()) {
-
- case R.id.newBookmark:
- {
- Intent bookmarkIntent = new Intent(this, BookmarkActivity.class);
- startActivity(bookmarkIntent);
- break;
- }
-
- case R.id.appSettings:
- {
- Intent settingsIntent = new Intent(this, ApplicationSettingsActivity.class);
- startActivity(settingsIntent);
- break;
- }
-
- case R.id.help:
- {
- Intent helpIntent = new Intent(this, HelpActivity.class);
- startActivity(helpIntent);
- break;
- }
-
- case R.id.exit:
- {
- finish();
- break;
- }
-
- case R.id.about:
- {
- Intent aboutIntent = new Intent(this, AboutActivity.class);
- startActivity(aboutIntent);
- break;
- }
+ // refer to http://tools.android.com/tips/non-constant-fields why we can't use switch/case here ..
+ int itemId = item.getItemId();
+ if (itemId == R.id.newBookmark)
+ {
+ Intent bookmarkIntent = new Intent(this, BookmarkActivity.class);
+ startActivity(bookmarkIntent);
+ }
+ else if (itemId == R.id.appSettings)
+ {
+ Intent settingsIntent = new Intent(this, ApplicationSettingsActivity.class);
+ startActivity(settingsIntent);
+ }
+ else if (itemId == R.id.help)
+ {
+ Intent helpIntent = new Intent(this, HelpActivity.class);
+ startActivity(helpIntent);
+ }
+ else if (itemId == R.id.exit)
+ {
+ finish();
+ }
+ else if (itemId == R.id.about)
+ {
+ Intent aboutIntent = new Intent(this, AboutActivity.class);
+ startActivity(aboutIntent);
}
return true;
* http://GORGES.us
*/
-package com.freerdp.afreerdp.presentation;
+package com.freerdp.freerdpcore.presentation;
import java.util.List;
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.presentation;
+package com.freerdp.freerdpcore.presentation;
import java.util.Iterator;
import java.util.List;
-import com.freerdp.afreerdp.R;
-import com.freerdp.afreerdp.application.GlobalApp;
-import com.freerdp.afreerdp.application.GlobalSettings;
-import com.freerdp.afreerdp.application.SessionState;
-import com.freerdp.afreerdp.domain.BookmarkBase;
-import com.freerdp.afreerdp.domain.ConnectionReference;
-import com.freerdp.afreerdp.domain.ManualBookmark;
-import com.freerdp.afreerdp.services.LibFreeRDP;
-import com.freerdp.afreerdp.utils.KeyboardMapper;
-import com.freerdp.afreerdp.utils.Mouse;
+import com.freerdp.freerdpcore.R;
+import com.freerdp.freerdpcore.application.GlobalApp;
+import com.freerdp.freerdpcore.application.GlobalSettings;
+import com.freerdp.freerdpcore.application.SessionState;
+import com.freerdp.freerdpcore.domain.BookmarkBase;
+import com.freerdp.freerdpcore.domain.ConnectionReference;
+import com.freerdp.freerdpcore.domain.ManualBookmark;
+import com.freerdp.freerdpcore.services.LibFreeRDP;
+import com.freerdp.freerdpcore.utils.KeyboardMapper;
+import com.freerdp.freerdpcore.utils.Mouse;
import android.app.Activity;
import android.app.Dialog;
@Override
public boolean onOptionsItemSelected(MenuItem item) {
- switch (item.getItemId())
- {
- case R.id.session_touch_pointer:
- {
- // toggle touch pointer
- if(touchPointerView.getVisibility() == View.VISIBLE)
- {
- touchPointerView.setVisibility(View.INVISIBLE);
- sessionView.setTouchPointerPadding(0, 0);
- }
- else
- {
- touchPointerView.setVisibility(View.VISIBLE);
- sessionView.setTouchPointerPadding(touchPointerView.getPointerWidth(), touchPointerView.getPointerHeight());
- }
- break;
- }
+ // refer to http://tools.android.com/tips/non-constant-fields why we can't use switch/case here ..
+ int itemId = item.getItemId();
- case R.id.session_sys_keyboard:
- {
- showKeyboard(!sysKeyboardVisible, false);
- break;
- }
-
- case R.id.session_ext_keyboard:
+ if (itemId == R.id.session_touch_pointer)
+ {
+ // toggle touch pointer
+ if(touchPointerView.getVisibility() == View.VISIBLE)
{
- showKeyboard(false, !extKeyboardVisible);
- break;
+ touchPointerView.setVisibility(View.INVISIBLE);
+ sessionView.setTouchPointerPadding(0, 0);
}
-
- case R.id.session_disconnect:
+ else
{
- showKeyboard(false, false);
- LibFreeRDP.disconnect(session.getInstance());
- break;
+ touchPointerView.setVisibility(View.VISIBLE);
+ sessionView.setTouchPointerPadding(touchPointerView.getPointerWidth(), touchPointerView.getPointerHeight());
}
}
+ else if (itemId == R.id.session_sys_keyboard)
+ {
+ showKeyboard(!sysKeyboardVisible, false);
+ }
+ else if (itemId == R.id.session_ext_keyboard)
+ {
+ showKeyboard(false, !extKeyboardVisible);
+ }
+ else if (itemId == R.id.session_disconnect)
+ {
+ showKeyboard(false, false);
+ LibFreeRDP.disconnect(session.getInstance());
+ }
return true;
}
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.presentation;
+package com.freerdp.freerdpcore.presentation;
import android.util.AttributeSet;
import android.util.Log;
import java.util.*;
-import com.freerdp.afreerdp.application.SessionState;
-import com.freerdp.afreerdp.utils.DoubleGestureDetector;
-import com.freerdp.afreerdp.utils.GestureDetector;
+import com.freerdp.freerdpcore.application.SessionState;
+import com.freerdp.freerdpcore.utils.DoubleGestureDetector;
+import com.freerdp.freerdpcore.utils.GestureDetector;
public class SessionView extends View
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.presentation;
+package com.freerdp.freerdpcore.presentation;
import java.util.ArrayList;
-import com.freerdp.afreerdp.R;
-import com.freerdp.afreerdp.application.GlobalApp;
-import com.freerdp.afreerdp.domain.BookmarkBase;
-import com.freerdp.afreerdp.services.SessionRequestHandlerActivity;
-import com.freerdp.afreerdp.utils.BookmarkArrayAdapter;
+import com.freerdp.freerdpcore.R;
+import com.freerdp.freerdpcore.application.GlobalApp;
+import com.freerdp.freerdpcore.domain.BookmarkBase;
+import com.freerdp.freerdpcore.services.SessionRequestHandlerActivity;
+import com.freerdp.freerdpcore.utils.BookmarkArrayAdapter;
import android.app.AlertDialog;
import android.app.ListActivity;
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.presentation;
+package com.freerdp.freerdpcore.presentation;
-import com.freerdp.afreerdp.R;
-import com.freerdp.afreerdp.utils.GestureDetector;
+import com.freerdp.freerdpcore.R;
+import com.freerdp.freerdpcore.utils.GestureDetector;
import android.content.Context;
import android.graphics.Matrix;
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.services;
+package com.freerdp.freerdpcore.services;
import java.util.ArrayList;
-import com.freerdp.afreerdp.domain.BookmarkBase;
+import com.freerdp.freerdpcore.domain.BookmarkBase;
import android.content.ContentValues;
import android.database.Cursor;
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.services;
+package com.freerdp.freerdpcore.services;
import android.content.Context;
import android.provider.BaseColumns;
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.services;
+package com.freerdp.freerdpcore.services;
import java.util.ArrayList;
-import com.freerdp.afreerdp.R;
-import com.freerdp.afreerdp.application.GlobalApp;
-import com.freerdp.afreerdp.domain.BookmarkBase;
-import com.freerdp.afreerdp.domain.ConnectionReference;
-import com.freerdp.afreerdp.domain.ManualBookmark;
+import com.freerdp.freerdpcore.R;
+import com.freerdp.freerdpcore.application.GlobalApp;
+import com.freerdp.freerdpcore.domain.BookmarkBase;
+import com.freerdp.freerdpcore.domain.ConnectionReference;
+import com.freerdp.freerdpcore.domain.ManualBookmark;
import android.app.SearchManager;
import android.content.ContentProvider;
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.services;
+package com.freerdp.freerdpcore.services;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.services;
+package com.freerdp.freerdpcore.services;
-import com.freerdp.afreerdp.application.GlobalApp;
-import com.freerdp.afreerdp.application.SessionState;
-import com.freerdp.afreerdp.domain.BookmarkBase;
-import com.freerdp.afreerdp.domain.ManualBookmark;
+import com.freerdp.freerdpcore.application.GlobalApp;
+import com.freerdp.freerdpcore.application.SessionState;
+import com.freerdp.freerdpcore.domain.BookmarkBase;
+import com.freerdp.freerdpcore.domain.ManualBookmark;
import android.graphics.Bitmap;
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.services;
+package com.freerdp.freerdpcore.services;
import java.util.ArrayList;
import android.database.Cursor;
import android.database.sqlite.SQLiteOpenHelper;
-import com.freerdp.afreerdp.domain.BookmarkBase;
-import com.freerdp.afreerdp.domain.ManualBookmark;
+import com.freerdp.freerdpcore.domain.BookmarkBase;
+import com.freerdp.freerdpcore.domain.ManualBookmark;
public class ManualBookmarkGateway extends BookmarkBaseGateway {
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.services;
+package com.freerdp.freerdpcore.services;
import java.util.ArrayList;
-import com.freerdp.afreerdp.domain.BookmarkBase;
-import com.freerdp.afreerdp.domain.QuickConnectBookmark;
+import com.freerdp.freerdpcore.domain.BookmarkBase;
+import com.freerdp.freerdpcore.domain.QuickConnectBookmark;
import android.database.Cursor;
import android.database.SQLException;
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.services;
+package com.freerdp.freerdpcore.services;
-import com.freerdp.afreerdp.domain.ConnectionReference;
-import com.freerdp.afreerdp.presentation.BookmarkActivity;
-import com.freerdp.afreerdp.presentation.SessionActivity;
+import com.freerdp.freerdpcore.domain.ConnectionReference;
+import com.freerdp.freerdpcore.presentation.BookmarkActivity;
+import com.freerdp.freerdpcore.presentation.SessionActivity;
import android.app.Activity;
import android.app.SearchManager;
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.utils;
+package com.freerdp.freerdpcore.utils;
import java.util.List;
import android.widget.ImageView;
import android.widget.TextView;
-import com.freerdp.afreerdp.R;
-import com.freerdp.afreerdp.domain.BookmarkBase;
-import com.freerdp.afreerdp.domain.ConnectionReference;
-import com.freerdp.afreerdp.domain.ManualBookmark;
-import com.freerdp.afreerdp.domain.PlaceholderBookmark;
-import com.freerdp.afreerdp.presentation.BookmarkActivity;
+import com.freerdp.freerdpcore.R;
+import com.freerdp.freerdpcore.domain.BookmarkBase;
+import com.freerdp.freerdpcore.domain.ConnectionReference;
+import com.freerdp.freerdpcore.domain.ManualBookmark;
+import com.freerdp.freerdpcore.domain.PlaceholderBookmark;
+import com.freerdp.freerdpcore.presentation.BookmarkActivity;
public class BookmarkArrayAdapter extends ArrayAdapter<BookmarkBase>
{
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.utils;
+package com.freerdp.freerdpcore.utils;
-import com.freerdp.afreerdp.R;
+import com.freerdp.freerdpcore.R;
import android.content.Context;
import android.preference.Preference;
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.utils;
+package com.freerdp.freerdpcore.utils;
import android.content.Context;
import android.os.Handler;
import android.view.MotionEvent;
import android.view.ScaleGestureDetector;
-import com.freerdp.afreerdp.utils.GestureDetector.OnGestureListener;
+import com.freerdp.freerdpcore.utils.GestureDetector.OnGestureListener;
public class DoubleGestureDetector {
/**
* Modified for aFreeRDP by Martin Fleisz (mfleisz@thinstuff.at)
*/
-package com.freerdp.afreerdp.utils;
+package com.freerdp.freerdpcore.utils;
import android.content.Context;
import android.os.Build;
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.utils;
+package com.freerdp.freerdpcore.utils;
-import com.freerdp.afreerdp.R;
+import com.freerdp.freerdpcore.R;
import android.content.Context;
import android.content.res.TypedArray;
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.utils;
+package com.freerdp.freerdpcore.utils;
import android.content.Context;
import android.preference.ListPreference;
*/
-package com.freerdp.afreerdp.utils;
+package com.freerdp.freerdpcore.utils;
-import com.freerdp.afreerdp.R;
+import com.freerdp.freerdpcore.R;
import android.content.Context;
import android.view.KeyEvent;
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.utils;
+package com.freerdp.freerdpcore.utils;
-import com.freerdp.afreerdp.application.GlobalSettings;
+import com.freerdp.freerdpcore.application.GlobalSettings;
public class Mouse {
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-package com.freerdp.afreerdp.utils;
+package com.freerdp.freerdpcore.utils;
import java.util.LinkedHashMap;
import java.util.Map;
-import com.freerdp.afreerdp.R;
+import com.freerdp.freerdpcore.R;
import android.content.Context;
import android.view.View;
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="gen"/>
+ <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+ <classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
+ <classpathentry kind="output" path="bin/classes"/>
+</classpath>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>aFreeRDP</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.ApkBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
--- /dev/null
+# FreeRDP: A Remote Desktop Protocol Implementation
+# Android Client
+#
+# Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
+# Copyright 2013 Bernhard Miklautz <bmiklautz@thinstuff.at>
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set(ANDROID_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+set(ANDROID_PACKAGE_NAME "aFreeRDP")
+
+CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/AndroidManifest.xml.cmake ${CMAKE_CURRENT_SOURCE_DIR}/AndroidManifest.xml @ONLY)
+
+if (ANDROID_SDK)
+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/local.properties.cmake ${CMAKE_CURRENT_SOURCE_DIR}/local.properties @ONLY)
+endif()
+
+add_subdirectory(jni)
+
+
+if(ANDROID_BUILD_JAVA)
+ if (NOT ANDROID_SDK)
+ message(FATAL_ERROR "ANDROID_SDK not set but required for building the java gui (ANDROID_BUILD_JAVA)")
+ endif()
+
+ # And isn't shiped with the android ndk/sdk so
+ # we need to find it on the local machine
+ SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER, BOTH)
+ find_program(ANT_COMMAND ant)
+ SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER, ONLY)
+
+ if(ANT_COMMAND STREQUAL "ANT_COMMAND-NOTFOUND")
+ message(FATAL_ERROR "ant not found but required to build android java")
+ endif()
+
+ if(ANDROID_BUILD_JAVA_DEBUG)
+ set(ANDROID_BUILD_TYPE "debug")
+ set(APK "${ANDROID_SOURCE_DIR}/bin/${ANDROID_PACKAGE_NAME}-release-unsigned.apk")
+ else()
+ set(ANDROID_BUILD_TYPE "release")
+ set(APK "${ANDROID_SOURCE_DIR}/bin/${ANDROID_PACKAGE_NAME}-debug.apk")
+ endif()
+
+ # command to create the android package
+ add_custom_command(
+ OUTPUT "${APK}"
+ COMMAND ${ANT_COMMAND} ${ANDROID_BUILD_TYPE}
+ WORKING_DIRECTORY "${ANDROID_SOURCE_DIR}"
+ MAIN_DEPENDENCY AndroidManifest.xml
+ DEPENDS freerdp-android local.properties
+ )
+ add_custom_target(android-package ALL SOURCES "${APK}")
+ SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "gen;bin")
+endif()
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<lint>
+</lint>
\ No newline at end of file
# Project target.
target=android-8
+android.library.reference.1=../FreeRDPCore
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:state_pressed="true">
+ <shape>
+ <solid android:color="#99D4FF" />
+ <stroke
+ android:width="1dp"
+ android:color="#A7A7A7"
+ />
+ <corners
+ android:radius="3dp"
+ />
+ <padding
+ android:left="3dp"
+ android:top="3dp"
+ android:right="3dp"
+ android:bottom="3dp"
+ />
+ </shape>
+ </item>
+
+ <item android:state_focused="true">
+ <shape>
+ <solid android:color="#E3E3E3" />
+ <stroke
+ android:width="1dp"
+ android:color="#585858"
+ />
+ <corners
+ android:radius="3dp"
+ />
+ <padding
+ android:left="3dp"
+ android:top="3dp"
+ android:right="3dp"
+ android:bottom="3dp"
+ />
+ </shape>
+ </item>
+
+ <item>
+ <shape>
+ <solid android:color="#E3E3E3" />
+ <stroke
+ android:width="1dp"
+ android:color="#585858"
+ />
+ <corners
+ android:radius="3dp"
+ />
+ <padding
+ android:left="3dp"
+ android:top="3dp"
+ android:right="3dp"
+ android:bottom="3dp"
+ />
+ </shape>
+ </item>
+</selector>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <solid android:color="@color/separator_background_color"/>
+ <stroke android:width="1dp" android:color="@color/separator_frame_color" />
+ <padding android:left="1dp" android:top="1dp" android:right="1dp" android:bottom="1dp" />
+<!--
+<color xmlns:android="http://schemas.android.com/apk/res/android"
+ android:color="#C2D6E6"
+ />
+ -->
+
+</shape>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <dimen name="key_height">50dip</dimen>
+</resources>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <!-- key codes to switch between keyboards -->
+ <integer name="keycode_cursor_keyboard">0xF1</integer>
+ <integer name="keycode_numpad_keyboard">0xF2</integer>
+ <integer name="keycode_specialkeys_keyboard">0xF3</integer>
+
+ <!-- common keys - maps to Android KeyEvent.KeyCode consts -->
+ <integer name="keycode_enter">0x01</integer>
+ <integer name="keycode_backspace">0x02</integer>
+
+ <!-- shared keys -->
+ <integer name="keycode_win">0x03</integer>
+ <integer name="keycode_menu">0x04</integer>
+ <integer name="keycode_esc">0x05</integer>
+
+ <integer name="keycode_toggle_win">0x06</integer>
+ <integer name="keycode_toggle_ctrl">0x07</integer>
+ <integer name="keycode_toggle_shift">0x08</integer>
+ <integer name="keycode_toggle_alt">0x09</integer>
+
+ <!-- numpad key codes -->
+ <integer name="keycode_numpad_0">0x0A</integer>
+ <integer name="keycode_numpad_1">0x0B</integer>
+ <integer name="keycode_numpad_2">0x0C</integer>
+ <integer name="keycode_numpad_3">0x0D</integer>
+ <integer name="keycode_numpad_4">0x0E</integer>
+ <integer name="keycode_numpad_5">0x0F</integer>
+ <integer name="keycode_numpad_6">0x10</integer>
+ <integer name="keycode_numpad_7">0x11</integer>
+ <integer name="keycode_numpad_8">0x12</integer>
+ <integer name="keycode_numpad_9">0x13</integer>
+ <integer name="keycode_numpad_add">0x14</integer>
+ <integer name="keycode_numpad_comma">0x15</integer>
+ <integer name="keycode_numpad_divide">0x16</integer>
+ <integer name="keycode_numpad_enter">0x17</integer>
+ <integer name="keycode_numpad_multiply">0x18</integer>
+ <integer name="keycode_numpad_subtract">0x19</integer>
+ <integer name="keycode_numpad_equals">0x1A</integer>
+ <integer name="keycode_numpad_numlock">0x1B</integer>
+ <integer name="keycode_numpad_left_paren">0x1C</integer>
+ <integer name="keycode_numpad_right_paren">0x1D</integer>
+
+ <!-- special key codes -->
+ <integer name="keycode_F1">0x1E</integer>
+ <integer name="keycode_F2">0x1F</integer>
+ <integer name="keycode_F3">0x20</integer>
+ <integer name="keycode_F4">0x21</integer>
+ <integer name="keycode_F5">0x22</integer>
+ <integer name="keycode_F6">0x23</integer>
+ <integer name="keycode_F7">0x24</integer>
+ <integer name="keycode_F8">0x25</integer>
+ <integer name="keycode_F9">0x26</integer>
+ <integer name="keycode_F10">0x27</integer>
+ <integer name="keycode_F11">0x28</integer>
+ <integer name="keycode_F12">0x29</integer>
+ <integer name="keycode_tab">0x2A</integer>
+ <integer name="keycode_print">0x2B</integer>
+ <integer name="keycode_insert">0x2C</integer>
+ <integer name="keycode_delete">0x2D</integer>
+ <integer name="keycode_home">0x2E</integer>
+ <integer name="keycode_end">0x2F</integer>
+ <integer name="keycode_pgup">0x30</integer>
+ <integer name="keycode_pgdn">0x31</integer>
+
+ <!-- cursor key codes -->
+ <integer name="keycode_up">0x32</integer>
+ <integer name="keycode_down">0x33</integer>
+ <integer name="keycode_left">0x34</integer>
+ <integer name="keycode_right">0x45</integer>
+
+</resources>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<resources>
+ <string name="app_title">aFreeRDP</string>
+ <string name="app_name"></string>
+ <!-- Button labels -->
+ <string name="yes">Yes</string>
+ <string name="no">No</string>
+ <string name="cancel">Cancel</string>
+ <string name="cont">Continue</string>
+ <string name="login">Login</string>
+ <string name="logout">Logout</string>
+ <!-- Home menu items -->
+ <string name="menu_exit">Exit</string>
+ <string name="menu_about">About</string>
+ <string name="menu_help">Help</string>
+ <string name="menu_new_bookmark">New Connection</string>
+ <string name="menu_app_settings">Settings</string>
+ <!-- Bookmark menu items -->
+ <string name="menu_title_bookmark">Connection</string>
+ <string name="menu_connect">Connect</string>
+ <string name="menu_edit">Edit</string>
+ <string name="menu_delete">Delete</string>
+ <!-- Session menu items -->
+ <string name="menu_sys_keyboard">Keyboard</string>
+ <string name="menu_ext_keyboard">Function Keys</string>
+ <string name="menu_touch_pointer">Touch Pointer</string>
+ <string name="menu_home">home</string>
+ <string name="menu_disconnect">disconnect</string>
+ <!-- List section headers -->
+ <string name="section_bookmarks">Manual Connections</string>
+ <string name="section_active_sessions">Active Sessions</string>
+ <!-- List placeholder labels -->
+ <string name="list_placeholder_login">Login</string>
+ <string name="list_placeholder_no_servers">No Servers</string>
+ <string name="list_placeholder_connecting">Connecting ...</string>
+ <string name="list_placeholder_disconnecting">Disconnecting ...</string>
+ <string name="list_placeholder_connection_error">Connection Lost</string>
+ <string name="list_placeholder_wrong_password">Wrong Password</string>
+ <string name="list_placeholder_invalid_username">Invalid Username</string>
+ <string name="list_placeholder_add_bookmark">Add Connection</string>
+ <!-- Search strings -->
+ <string name="search_label">aFreeRDP</string>
+ <string name="search_hint">Connect to Computer</string>
+ <string name="search_settings_description">Remote Computers</string>
+ <!-- Bookmark settings strings -->
+ <string name="settings_cat_host">Host</string>
+ <string name="settings_label">Label</string>
+ <string name="settings_hostname">Host</string>
+ <string name="settings_port">Port</string>
+ <string name="settings_cat_credentials">Credentials</string>
+ <string name="settings_credentials">Credentials</string>
+ <string name="settings_username">Username</string>
+ <string name="settings_password">Password</string>
+ <string name="settings_domain">Domain</string>
+ <string name="settings_cat_settings">Settings</string>
+ <string name="settings_screen">Screen</string>
+ <string name="settings_cat_screen">Screen Settings</string>
+ <string name="settings_colors">Colors</string>
+ <string-array name="colors_array">
+ <item>High Color (16 Bit)</item>
+ <item>True Color (24 Bit)</item>
+ <item>Highest Quality (32 Bit)</item>
+ </string-array>
+ <string-array name="colors_values_array">
+ <item>16</item>
+ <item>24</item>
+ <item>32</item>
+ </string-array>
+ <string name="settings_resolution">Resolution</string>
+ <string name="resolution_automatic">Automatic</string>
+ <string name="resolution_custom">Custom</string>
+ <string-array name="resolutions_array">
+ <item>Automatic</item>
+ <item>Custom</item>
+ <item>640x480</item>
+ <item>720x480</item>
+ <item>800x600</item>
+ <item>1024x768</item>
+ <item>1280x1024</item>
+ <item>1440x900</item>
+ <item>1920x1080</item>
+ <item>1920x1200</item>
+ </string-array>
+ <string-array name="resolutions_values_array">
+ <item>automatic</item>
+ <item>custom</item>
+ <item>640x480</item>
+ <item>720x480</item>
+ <item>800x600</item>
+ <item>1024x768</item>
+ <item>1280x1024</item>
+ <item>1440x900</item>
+ <item>1920x1080</item>
+ <item>1920x1200</item>
+ </string-array>
+ <string name="settings_width">Width</string>
+ <string name="settings_height">Height</string>
+ <string name="settings_performance">Performance</string>
+ <string name="settings_cat_performance">Performance Settings</string>
+ <string name="settings_perf_remotefx">RemoteFX</string>
+ <string name="settings_perf_wallpaper">Desktop Background</string>
+ <string name="settings_perf_font_smoothing">Font Smoothing</string>
+ <string name="settings_perf_desktop_composition">Desktop Composition</string>
+ <string name="settings_perf_full_window_drag">Window contents while dragging</string>
+ <string name="settings_perf_menu_animation">Menu Animation</string>
+ <string name="settings_perf_theming">Visual Styles</string>
+ <string name="settings_advanced">Advanced</string>
+ <string name="settings_cat_advanced">Advanced Settings</string>
+ <string name="settings_enable_3g_settings">3G Settings</string>
+ <string name="settings_screen_3g">3G Screen</string>
+ <string name="settings_performance_3g">3G Performance</string>
+ <string name="settings_security">Security</string>
+ <string-array name="security_array">
+ <item>Automatic</item>
+ <item>RDP</item>
+ <item>TLS</item>
+ <item>NLA</item>
+ </string-array>
+ <string-array name="security_values_array">
+ <item>0</item>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ </string-array>
+ <string name="settings_remote_program">Remote Program</string>
+ <string name="settings_work_dir">Working Directory</string>
+ <string name="settings_console_mode">Console Mode</string>
+ <!-- App settings strings -->
+ <string name="settings_password_present">*******</string>
+ <string name="settings_password_empty">not set</string>
+ <string name="settings_cat_ui">User Interface</string>
+ <string name="settings_ui_hide_status_bar">Hide Status Bar</string>
+ <string name="settings_ui_hide_zoom_controls">Hide Zoom Controls</string>
+ <string name="settings_ui_swap_mouse_buttons">Swap Mouse Buttons</string>
+ <string name="settings_ui_invert_scrolling">Invert Scrolling</string>
+ <string name="settings_ui_auto_scroll_touchpointer">Touch Pointer Auto Scroll</string>
+ <string name="settings_ui_ask_on_exit">Show Dialog on Exit</string>
+ <string name="settings_cat_power">Power Saving</string>
+ <string name="settings_power_disconnect_timeout">Close idle Connections</string>
+ <string name="settings_cat_security">Security</string>
+ <string name="settings_security_accept_certificates">Accept all Certificates</string>
+ <string name="settings_security_clear_certificate_cache">Clear Certificate Cache</string>
+ <string name="settings_description_after_minutes">After %1$d Minutes</string>
+ <string name="settings_description_disabled">Disabled</string>
+ <!-- Activity titles -->
+ <string name="title_bookmark_settings">Connection Settings</string>
+ <string name="title_application_settings">Settings</string>
+ <string name="title_home">aFreeRDP - FreeRDP for Android</string>
+ <string name="title_create_shortcut">RDP Connections</string>
+ <string name="title_help">Help</string>
+ <string name="title_about">About</string>
+ <!-- Error message strings -->
+ <string name="error_bookmark_incomplete_title">Cancel without saving?</string>
+ <string name="error_bookmark_incomplete">Press "Cancel" to abort!\nPress "Continue" to specify the required fields!</string>
+ <string name="error_connection_failure">Failed to establish a connection to the server!</string>
+ <!-- Info message strings -->
+ <string name="info_capabilities_changed">The screen settings have changed because the server does not support the settings you specified!</string>
+ <string name="info_reset_success">Deleted the certificate cache!</string>
+ <string name="info_reset_failed">Failed to delete certificate cache!</string>
+ <!-- Dialog strings -->
+ <string name="dlg_title_verify_certificate">Verify Certificate</string>
+ <string name="dlg_msg_verify_certificate">The identity of the remote computer cannot be verified. Do you want to connect anyway?</string>
+ <string name="dlg_title_credentials">Please enter your credentials</string>
+ <string name="dlg_title_create_shortcut">Create Shortcut</string>
+ <string name="dlg_msg_create_shortcut">Shortcut name:</string>
+ <string name="dlg_msg_connecting">Connecting ...</string>
+ <string name="dlg_msg_logging_in">Logging in ...</string>
+ <string name="dlg_title_about">About aFreeRDP</string>
+ <string name="dlg_msg_about">Version: %1$s\n\u00A9 2012 Thinstuff Technologies GmbH</string>
+ <string name="dlg_title_create_bookmark_after_qc">Save Connection Settings?</string>
+ <string name="dlg_msg_create_bookmark_after_qc">Your connection settings have not been saved! Do you want to save them?</string>
+ <string name="dlg_title_save_bookmark">Save Connection?</string>
+ <string name="dlg_save_bookmark">Do you want to save any changes you made to the connection settings?</string>
+ <string name="dlg_dont_show_again">Do not ask again</string>
+ <string name="dlg_title_exit">Exit Application?</string>
+ <string name="dlg_msg_exit">Are you sure you want to exit the application?</string>
+ <string name="dlg_title_clear_cert_cache">Delete Certificates?</string>
+ <string name="dlg_msg_clear_cert_cache">Are you sure you want to delete all your cached Certificates?</string>
+</resources>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+
+<resources>
+ <style name="Theme.Settings" parent="android:Theme.Light">
+ <item name="android:listSeparatorTextViewStyle">@style/SettingsCategory</item>
+ </style>
+ <style name="Theme.Main" parent="android:Theme.Light">
+ </style>
+ <style name="SettingsCategory">
+ <item name="android:layout_width">match_parent</item>
+ <item name="android:layout_height">25dip</item>
+ <item name="android:textStyle">bold</item>
+ <item name="android:textSize">14sp</item>
+ <item name="android:gravity">center_vertical</item>
+ <item name="android:paddingLeft">5sp</item>
+ <item name="android:textColor">@color/separator_text_color</item>
+ <item name="android:layout_margin">2dp</item>
+ <item name="android:background">@drawable/separator_background</item>
+ </style>
+ <style name="ButtonText">
+ <item name="android:textColor">@color/button_text_color</item>
+ <item name="android:gravity">center</item>
+ <item name="android:layout_margin">2dp</item>
+ <item name="android:textSize">18dp</item>
+ <item name="android:padding">6dp</item>
+ <item name="android:background">@drawable/button_background</item>
+ </style>
+ <style name="LabelText">
+ <item name="android:layout_width">wrap_content</item>
+ <item name="android:layout_height">wrap_content</item>
+ <item name="android:textColor">@android:color/primary_text_light</item>
+ <item name="android:layout_margin">2dp</item>
+ <item name="android:textSize">14dp</item>
+ </style>
+ <style name="GetStartedHeaderText">
+ <item name="android:layout_width">wrap_content</item>
+ <item name="android:layout_height">wrap_content</item>
+ <item name="android:textColor">@android:color/primary_text_light</item>
+ <item name="android:textSize">18dp</item>
+ <item name="android:textStyle">bold</item>
+ <item name="android:paddingTop">10dp</item>
+ <item name="android:paddingBottom">10dp</item>
+ <item name="android:paddingLeft">4dp</item>
+ <item name="android:paddingRight">4dp</item>
+ </style>
+ <style name="GetStartedText">
+ <item name="android:layout_width">wrap_content</item>
+ <item name="android:layout_height">wrap_content</item>
+ <item name="android:textColor">@android:color/primary_text_light</item>
+ <item name="android:textSize">15dp</item>
+ <item name="android:paddingLeft">4dp</item>
+ <item name="android:paddingRight">4dp</item>
+ <item name="android:paddingTop">5dp</item>
+ <item name="android:paddingBottom">5dp</item>
+
+ </style>
+</resources>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ Bookmark searchable definition
+
+ Copyright 2013 Thinstuff Technologies GmbH, Author: Martin Fleisz
+
+ This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
+ If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+*/
+ -->
+<searchable
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:label="@string/search_label"
+ android:hint="@string/search_hint"
+ android:searchMode="queryRewriteFromText"
+ android:imeOptions="actionGo"
+
+ android:searchSuggestAuthority="com.freerdp.afreerdp.services.freerdpsuggestionprovider"
+ android:searchSuggestIntentAction="android.intent.action.VIEW"
+ android:searchSuggestSelection=" ? "
+
+ android:includeInGlobalSearch="true"
+ android:searchSettingsDescription="@string/search_settings_description"
+ >
+</searchable>
--- /dev/null
+package com.freerdp.afreerdp.application;
+
+
+public class GlobalApp extends com.freerdp.freerdpcore.application.GlobalApp {
+
+}