Added new advanced configuration options for async.
This commit is contained in:
parent
0d7df9ab72
commit
1e041d1952
@ -3,6 +3,7 @@
|
||||
<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 exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
|
||||
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
|
||||
<classpathentry kind="output" path="bin/classes"/>
|
||||
</classpath>
|
||||
|
@ -134,7 +134,9 @@ BOOL android_post_connect(freerdp* instance)
|
||||
{
|
||||
DEBUG_ANDROID("android_post_connect");
|
||||
|
||||
freerdp_callback("OnSettingsChanged", "(IIII)V", instance, instance->settings->DesktopWidth, instance->settings->DesktopHeight, instance->settings->ColorDepth);
|
||||
freerdp_callback("OnSettingsChanged", "(IIII)V", instance,
|
||||
instance->settings->DesktopWidth, instance->settings->DesktopHeight,
|
||||
instance->settings->ColorDepth);
|
||||
|
||||
instance->context->cache = cache_new(instance->settings);
|
||||
|
||||
@ -553,8 +555,10 @@ JNIEXPORT void JNICALL jni_freerdp_set_connection_info(JNIEnv *env, jclass cls,
|
||||
}
|
||||
|
||||
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)
|
||||
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;
|
||||
@ -617,7 +621,10 @@ JNIEXPORT void JNICALL jni_freerdp_set_performance_flags(
|
||||
DEBUG_ANDROID("performance_flags: %04X", settings->PerformanceFlags);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL jni_freerdp_set_advanced_settings(JNIEnv *env, jclass cls, jint instance, jstring jRemoteProgram, jstring jWorkDir)
|
||||
JNIEXPORT void JNICALL jni_freerdp_set_advanced_settings(JNIEnv *env, jclass cls,
|
||||
jint instance, jstring jRemoteProgram, jstring jWorkDir,
|
||||
jboolean async_channel, jboolean async_transport, jboolean async_input,
|
||||
jboolean async_update)
|
||||
{
|
||||
freerdp* inst = (freerdp*)instance;
|
||||
rdpSettings * settings = inst->settings;
|
||||
@ -628,6 +635,12 @@ JNIEXPORT void JNICALL jni_freerdp_set_advanced_settings(JNIEnv *env, jclass cls
|
||||
DEBUG_ANDROID("Remote Program: %s", (char*) remote_program);
|
||||
DEBUG_ANDROID("Work Dir: %s", (char*) work_dir);
|
||||
|
||||
/* Enable async mode. */
|
||||
settings->AsyncUpdate = async_update;
|
||||
settings->AsyncChannels = async_channel;
|
||||
settings->AsyncTransport = async_transport;
|
||||
settings->AsyncInput = async_input;
|
||||
|
||||
if(remote_program && strlen(remote_program) > 0)
|
||||
settings->AlternateShell = strdup(remote_program);
|
||||
|
||||
|
@ -43,7 +43,10 @@ JNIEXPORT void JNICALL jni_freerdp_set_connection_info(JNIEnv *env, jclass cls,
|
||||
jint height, jint color_depth, jint port, jboolean console, jint security, jstring jcertname);
|
||||
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);
|
||||
JNIEXPORT void JNICALL jni_freerdp_set_advanced_settings(JNIEnv *env, jclass cls, jint instance, jstring jRemoteProgram, jstring jWorkDir);
|
||||
JNIEXPORT void JNICALL jni_freerdp_set_advanced_settings(JNIEnv *env, jclass cls,
|
||||
jint instance, jstring jRemoteProgram, jstring jWorkDir,
|
||||
jboolean async_channel, jboolean async_transport, jboolean async_input,
|
||||
jboolean async_update);
|
||||
JNIEXPORT void JNICALL jni_freerdp_set_drive_redirection(JNIEnv *env, jclass cls, jint instance, jstring jpath);
|
||||
JNIEXPORT void JNICALL jni_freerdp_set_clipboard_redirection(JNIEnv *env, jclass cls, jint instance, jboolean enable);
|
||||
JNIEXPORT void JNICALL jni_freerdp_set_gateway_info(JNIEnv *env, jclass cls, jint instance, jstring jgatewayhostname, jint port, jstring jgatewayusername, jstring jgatewaypassword, jstring jgatewaydomain);
|
||||
|
@ -53,9 +53,14 @@ JNIEXPORT void JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_
|
||||
width, height, color_depth, port, console, security, certname);
|
||||
}
|
||||
|
||||
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)
|
||||
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,
|
||||
jboolean async_channel, jboolean async_transport, jboolean async_input,
|
||||
jboolean async_update)
|
||||
{
|
||||
jni_freerdp_set_advanced_settings(env, cls, instance, remote_program, work_dir);
|
||||
jni_freerdp_set_advanced_settings(env, cls, instance, remote_program, work_dir,
|
||||
async_channel, async_transport, async_input, async_update);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1set_1data_1directory(JNIEnv *env, jclass cls, jint instance, jstring directory)
|
||||
|
@ -66,10 +66,10 @@ JNIEXPORT void JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_
|
||||
/*
|
||||
* Class: com_freerdp_freerdpcore_services_LibFreeRDP
|
||||
* Method: freerdp_set_advanced_settings
|
||||
* Signature: (ILjava/lang/String;Ljava/lang/String;)V
|
||||
* Signature: (ILjava/lang/String;Ljava/lang/String;ZZZZ)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_freerdp_freerdpcore_services_LibFreeRDP_freerdp_1set_1advanced_1settings
|
||||
(JNIEnv *, jclass, jint, jstring, jstring);
|
||||
(JNIEnv *, jclass, jint, jstring, jstring, jboolean, jboolean, jboolean, jboolean);
|
||||
|
||||
/*
|
||||
* Class: com_freerdp_freerdpcore_services_LibFreeRDP
|
||||
|
@ -130,6 +130,10 @@
|
||||
</string-array>
|
||||
<string name="settings_remote_program">Programa Remoto</string>
|
||||
<string name="settings_work_dir">Directorio de trabajo</string>
|
||||
<string name="settings_async_channel">Async channel</string>
|
||||
<string name="settings_async_transport">Async transport</string>
|
||||
<string name="settings_async_input">Async input</string>
|
||||
<string name="settings_async_update">Async update</string>
|
||||
<string name="settings_console_mode">Modo Consola</string>
|
||||
<!-- App settings strings -->
|
||||
<string name="settings_password_present">*******</string>
|
||||
|
@ -129,6 +129,10 @@
|
||||
</string-array>
|
||||
<string name="settings_remote_program">"Lancement de programme"</string>
|
||||
<string name="settings_work_dir">"Répertoire de travail"</string>
|
||||
<string name="settings_async_channel">Async channel</string>
|
||||
<string name="settings_async_transport">Async transport</string>
|
||||
<string name="settings_async_input">Async input</string>
|
||||
<string name="settings_async_update">Async update</string>
|
||||
<string name="settings_console_mode">"Mode console"</string>
|
||||
<!-- App settings strings -->
|
||||
<string name="settings_password_present">"*******"</string>
|
||||
|
@ -130,6 +130,10 @@
|
||||
</string-array>
|
||||
<string name="settings_remote_program">Extern programma</string>
|
||||
<string name="settings_work_dir">Werkmap</string>
|
||||
<string name="settings_async_channel">Async channel</string>
|
||||
<string name="settings_async_transport">Async transport</string>
|
||||
<string name="settings_async_input">Async input</string>
|
||||
<string name="settings_async_update">Async update</string>
|
||||
<string name="settings_console_mode">Console modus</string>
|
||||
<!-- App settings strings -->
|
||||
<string name="settings_password_present">*******</string>
|
||||
|
@ -127,6 +127,10 @@
|
||||
</string-array>
|
||||
<string name="settings_remote_program">Remote Program</string>
|
||||
<string name="settings_work_dir">Working Directory</string>
|
||||
<string name="settings_async_channel">Async channel</string>
|
||||
<string name="settings_async_transport">Async transport</string>
|
||||
<string name="settings_async_input">Async input</string>
|
||||
<string name="settings_async_update">Async update</string>
|
||||
<string name="settings_console_mode">Console Mode</string>
|
||||
<!-- App settings strings -->
|
||||
<string name="settings_password_present">*******</string>
|
||||
|
@ -39,6 +39,10 @@
|
||||
<com.freerdp.freerdpcore.utils.IntListPreference android:key="bookmark.security" android:title="@string/settings_security" android:entries="@array/security_array" android:entryValues="@array/security_values_array" />
|
||||
<EditTextPreference android:key="bookmark.remote_program" android:title="@string/settings_remote_program" android:summary="notepad.exe"/>
|
||||
<EditTextPreference android:key="bookmark.work_dir" android:title="@string/settings_work_dir"/>
|
||||
<CheckBoxPreference android:key="bookmark.async_channel" android:title="@string/settings_async_channel"/>
|
||||
<CheckBoxPreference android:key="bookmark.async_transport" android:title="@string/settings_async_transport"/>
|
||||
<CheckBoxPreference android:key="bookmark.async_update" android:title="@string/settings_async_update"/>
|
||||
<CheckBoxPreference android:key="bookmark.async_input" android:title="@string/settings_async_input"/>
|
||||
<CheckBoxPreference android:key="bookmark.console_mode" android:title="@string/settings_console_mode"/>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
@ -299,6 +299,10 @@ public class BookmarkBase implements Parcelable, Cloneable
|
||||
private boolean consoleMode;
|
||||
private String remoteProgram;
|
||||
private String workDir;
|
||||
private boolean asyncChannel;
|
||||
private boolean asyncTransport;
|
||||
private boolean asyncInput;
|
||||
private boolean asyncUpdate;
|
||||
|
||||
public AdvancedSettings() {
|
||||
init();
|
||||
@ -313,6 +317,10 @@ public class BookmarkBase implements Parcelable, Cloneable
|
||||
consoleMode = (parcel.readInt() == 1) ? true : false;
|
||||
remoteProgram = parcel.readString();
|
||||
workDir = parcel.readString();
|
||||
asyncChannel = (parcel.readInt() == 1) ? true : false;
|
||||
asyncTransport = (parcel.readInt() == 1) ? true : false;
|
||||
asyncInput = (parcel.readInt() == 1) ? true : false;
|
||||
asyncUpdate = (parcel.readInt() == 1) ? true : false;
|
||||
}
|
||||
|
||||
private void init() {
|
||||
@ -324,6 +332,10 @@ public class BookmarkBase implements Parcelable, Cloneable
|
||||
consoleMode = false;
|
||||
remoteProgram = "";
|
||||
workDir = "";
|
||||
asyncChannel = true;
|
||||
asyncTransport = true;
|
||||
asyncInput = true;
|
||||
asyncUpdate = true;
|
||||
}
|
||||
|
||||
public void setEnable3GSettings(boolean enable3GSettings) {
|
||||
@ -394,6 +406,46 @@ public class BookmarkBase implements Parcelable, Cloneable
|
||||
return workDir;
|
||||
}
|
||||
|
||||
public boolean getAsyncTransport()
|
||||
{
|
||||
return asyncTransport;
|
||||
}
|
||||
|
||||
public void setAsyncTransport(boolean enabled)
|
||||
{
|
||||
asyncTransport = enabled;
|
||||
}
|
||||
|
||||
public boolean getAsyncUpdate()
|
||||
{
|
||||
return asyncUpdate;
|
||||
}
|
||||
|
||||
public void setAsyncUpdate(boolean enabled)
|
||||
{
|
||||
asyncUpdate = enabled;
|
||||
}
|
||||
|
||||
public boolean getAsyncInput()
|
||||
{
|
||||
return asyncInput;
|
||||
}
|
||||
|
||||
public void setAsyncInput(boolean enabled)
|
||||
{
|
||||
asyncInput = enabled;
|
||||
}
|
||||
|
||||
public void setAsyncChannel(boolean enabled)
|
||||
{
|
||||
asyncChannel = enabled;
|
||||
}
|
||||
|
||||
public boolean getAsyncChannel()
|
||||
{
|
||||
return asyncChannel;
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator<AdvancedSettings> CREATOR = new Parcelable.Creator<AdvancedSettings>()
|
||||
{
|
||||
public AdvancedSettings createFromParcel(Parcel in) {
|
||||
@ -422,6 +474,10 @@ public class BookmarkBase implements Parcelable, Cloneable
|
||||
out.writeInt(consoleMode ? 1 : 0);
|
||||
out.writeString(remoteProgram);
|
||||
out.writeString(workDir);
|
||||
out.writeInt(asyncChannel ? 1 : 0);
|
||||
out.writeInt(asyncTransport ? 1 : 0);
|
||||
out.writeInt(asyncInput ? 1 : 0);
|
||||
out.writeInt(asyncUpdate ? 1 : 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -623,6 +679,10 @@ public class BookmarkBase implements Parcelable, Cloneable
|
||||
editor.putInt("bookmark.security", advancedSettings.getSecurity());
|
||||
editor.putString("bookmark.remote_program", advancedSettings.getRemoteProgram());
|
||||
editor.putString("bookmark.work_dir", advancedSettings.getWorkDir());
|
||||
editor.putBoolean("bookmark.async_channel", advancedSettings.getAsyncChannel());
|
||||
editor.putBoolean("bookmark.async_transport", advancedSettings.getAsyncTransport());
|
||||
editor.putBoolean("bookmark.async_input", advancedSettings.getAsyncInput());
|
||||
editor.putBoolean("bookmark.async_update", advancedSettings.getAsyncUpdate());
|
||||
editor.putBoolean("bookmark.console_mode", advancedSettings.getConsoleMode());
|
||||
|
||||
editor.commit();
|
||||
@ -665,6 +725,10 @@ public class BookmarkBase implements Parcelable, Cloneable
|
||||
advancedSettings.setSecurity(sharedPrefs.getInt("bookmark.security", 0));
|
||||
advancedSettings.setRemoteProgram(sharedPrefs.getString("bookmark.remote_program", ""));
|
||||
advancedSettings.setWorkDir(sharedPrefs.getString("bookmark.work_dir", ""));
|
||||
advancedSettings.setAsyncChannel(sharedPrefs.getBoolean("bookmark.async_channel", true));
|
||||
advancedSettings.setAsyncTransport(sharedPrefs.getBoolean("bookmark.async_transport", true));
|
||||
advancedSettings.setAsyncInput(sharedPrefs.getBoolean("bookmark.async_input", true));
|
||||
advancedSettings.setAsyncUpdate(sharedPrefs.getBoolean("bookmark.async_update", true));
|
||||
advancedSettings.setConsoleMode(sharedPrefs.getBoolean("bookmark.console_mode", false));
|
||||
}
|
||||
|
||||
|
@ -68,6 +68,10 @@ public abstract class BookmarkBaseGateway
|
||||
values.put("console_mode", bookmark.getAdvancedSettings().getConsoleMode());
|
||||
values.put("remote_program", bookmark.getAdvancedSettings().getRemoteProgram());
|
||||
values.put("work_dir", bookmark.getAdvancedSettings().getWorkDir());
|
||||
values.put("async_channel", bookmark.getAdvancedSettings().getAsyncChannel());
|
||||
values.put("async_transport", bookmark.getAdvancedSettings().getAsyncTransport());
|
||||
values.put("async_input", bookmark.getAdvancedSettings().getAsyncInput());
|
||||
values.put("async_update", bookmark.getAdvancedSettings().getAsyncUpdate());
|
||||
|
||||
// add any special columns
|
||||
addBookmarkSpecificColumns(bookmark, values);
|
||||
@ -104,6 +108,10 @@ public abstract class BookmarkBaseGateway
|
||||
values.put("console_mode", bookmark.getAdvancedSettings().getConsoleMode());
|
||||
values.put("remote_program", bookmark.getAdvancedSettings().getRemoteProgram());
|
||||
values.put("work_dir", bookmark.getAdvancedSettings().getWorkDir());
|
||||
values.put("async_channel", bookmark.getAdvancedSettings().getAsyncChannel());
|
||||
values.put("async_transport", bookmark.getAdvancedSettings().getAsyncTransport());
|
||||
values.put("async_input", bookmark.getAdvancedSettings().getAsyncInput());
|
||||
values.put("async_update", bookmark.getAdvancedSettings().getAsyncUpdate());
|
||||
|
||||
addBookmarkSpecificColumns(bookmark, values);
|
||||
|
||||
@ -223,6 +231,10 @@ public abstract class BookmarkBaseGateway
|
||||
columns.add("console_mode");
|
||||
columns.add("remote_program");
|
||||
columns.add("work_dir");
|
||||
columns.add("async_channel");
|
||||
columns.add("async_transport");
|
||||
columns.add("async_input");
|
||||
columns.add("async_update");
|
||||
|
||||
addBookmarkSpecificColumns(columns);
|
||||
}
|
||||
@ -281,6 +293,14 @@ public abstract class BookmarkBaseGateway
|
||||
bookmark.getAdvancedSettings().setConsoleMode(cursor.getInt(cursor.getColumnIndex("console_mode")) == 0 ? false : true);
|
||||
bookmark.getAdvancedSettings().setRemoteProgram(cursor.getString(cursor.getColumnIndex("remote_program")));
|
||||
bookmark.getAdvancedSettings().setWorkDir(cursor.getString(cursor.getColumnIndex("work_dir")));
|
||||
bookmark.getAdvancedSettings().setAsyncChannel(
|
||||
cursor.getInt(cursor.getColumnIndex("async_channel")) == 1 ? true : false);
|
||||
bookmark.getAdvancedSettings().setAsyncTransport(
|
||||
cursor.getInt(cursor.getColumnIndex("async_transport")) == 1 ? true : false);
|
||||
bookmark.getAdvancedSettings().setAsyncInput(
|
||||
cursor.getInt(cursor.getColumnIndex("async_input")) == 1 ? true : false);
|
||||
bookmark.getAdvancedSettings().setAsyncUpdate(
|
||||
cursor.getInt(cursor.getColumnIndex("async_update")) == 1 ? true : false);
|
||||
|
||||
readBookmarkSpecificColumns(bookmark, cursor);
|
||||
|
||||
|
@ -22,7 +22,7 @@ import android.database.sqlite.SQLiteOpenHelper;
|
||||
|
||||
public class BookmarkDB extends SQLiteOpenHelper
|
||||
{
|
||||
private static final int DB_VERSION = 3;
|
||||
private static final int DB_VERSION = 5;
|
||||
private static final String DB_NAME = "bookmarks.db";
|
||||
|
||||
public static final String ID = BaseColumns._ID;
|
||||
@ -104,6 +104,10 @@ public class BookmarkDB extends SQLiteOpenHelper
|
||||
+ "security, "
|
||||
+ "remote_program, "
|
||||
+ "work_dir, "
|
||||
+ "async_channel, "
|
||||
+ "async_transport, "
|
||||
+ "async_input, "
|
||||
+ "async_update, "
|
||||
+ "console_mode) "
|
||||
+ "VALUES ( "
|
||||
+ "'Test Server', "
|
||||
@ -144,6 +148,10 @@ public class BookmarkDB extends SQLiteOpenHelper
|
||||
+ "security INTEGER, "
|
||||
+ "remote_program TEXT, "
|
||||
+ "work_dir TEXT, "
|
||||
+ "async_channel INTEGER DEFAULT 0, "
|
||||
+ "async_transport INTEGER DEFAULT 0, "
|
||||
+ "async_input INTEGER DEFAULT 0, "
|
||||
+ "async_update INTEGER DEFAULT 0, "
|
||||
+ "console_mode INTEGER, "
|
||||
|
||||
+ "FOREIGN KEY(screen_settings) REFERENCES tbl_screen_settings(" + ID + "), "
|
||||
|
@ -35,7 +35,9 @@ public class LibFreeRDP
|
||||
boolean disableMenuAnimations, boolean disableTheming,
|
||||
boolean enableFontSmoothing, boolean enableDesktopComposition);
|
||||
|
||||
private static native void freerdp_set_advanced_settings(int inst, String remoteProgram, String workDir);
|
||||
private static native void freerdp_set_advanced_settings(int inst,
|
||||
String remoteProgram, String workDir, boolean async_channel,
|
||||
boolean async_transport, boolean async_input, boolean async_update);
|
||||
|
||||
private static native void freerdp_set_data_directory(int inst, String directory);
|
||||
|
||||
@ -149,7 +151,10 @@ public class LibFreeRDP
|
||||
flags.getDesktopComposition());
|
||||
|
||||
BookmarkBase.AdvancedSettings advancedSettings = bookmark.getAdvancedSettings();
|
||||
freerdp_set_advanced_settings(inst, advancedSettings.getRemoteProgram(), advancedSettings.getWorkDir());
|
||||
freerdp_set_advanced_settings(inst, advancedSettings.getRemoteProgram(),
|
||||
advancedSettings.getWorkDir(), advancedSettings.getAsyncChannel(),
|
||||
advancedSettings.getAsyncTransport(), advancedSettings.getAsyncInput(),
|
||||
advancedSettings.getAsyncUpdate());
|
||||
|
||||
// drive redirection enabled?
|
||||
if (advancedSettings.getRedirectSDCard())
|
||||
|
@ -52,7 +52,10 @@ public class RDPFileParser {
|
||||
lines++; ok = false;
|
||||
|
||||
if (errors > MAX_ERRORS || lines > MAX_LINES)
|
||||
{
|
||||
br.close();
|
||||
throw new IOException("Parsing limits exceeded");
|
||||
}
|
||||
|
||||
String[] fields = line.split(":", 3);
|
||||
|
||||
@ -81,6 +84,7 @@ public class RDPFileParser {
|
||||
|
||||
if (!ok) errors++;
|
||||
}
|
||||
br.close();
|
||||
}
|
||||
|
||||
public String getString(String optionName)
|
||||
|
Loading…
Reference in New Issue
Block a user