mirror of https://github.com/FreeRDP/FreeRDP
Added new advanced configuration options for async.
This commit is contained in:
parent
d7a9add3b4
commit
111d0c670c
|
@ -139,7 +139,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);
|
||||
|
||||
|
@ -578,8 +580,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;
|
||||
|
@ -642,7 +646,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;
|
||||
|
@ -653,6 +660,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_sound_redirection(JNIEnv *env, jclass cls, jint instance, jint redirect);
|
||||
JNIEXPORT void JNICALL jni_freerdp_set_microphone_redirection(JNIEnv *env, jclass cls, jint instance, jboolean enable);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -142,6 +142,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>
|
||||
|
|
|
@ -141,6 +141,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>
|
||||
|
|
|
@ -142,6 +142,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>
|
||||
|
|
|
@ -139,6 +139,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>
|
||||
|
|
|
@ -41,6 +41,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>
|
||||
|
|
|
@ -301,6 +301,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();
|
||||
|
@ -316,7 +320,11 @@ public class BookmarkBase implements Parcelable, Cloneable
|
|||
security = parcel.readInt();
|
||||
consoleMode = (parcel.readInt() == 1) ? true : false;
|
||||
remoteProgram = parcel.readString();
|
||||
workDir = 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() {
|
||||
|
@ -330,6 +338,10 @@ public class BookmarkBase implements Parcelable, Cloneable
|
|||
consoleMode = false;
|
||||
remoteProgram = "";
|
||||
workDir = "";
|
||||
asyncChannel = true;
|
||||
asyncTransport = true;
|
||||
asyncInput = true;
|
||||
asyncUpdate = true;
|
||||
}
|
||||
|
||||
public void setEnable3GSettings(boolean enable3GSettings) {
|
||||
|
@ -415,7 +427,47 @@ 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) {
|
||||
|
@ -446,6 +498,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -649,6 +705,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();
|
||||
|
@ -693,6 +753,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));
|
||||
}
|
||||
|
||||
|
|
|
@ -70,6 +70,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);
|
||||
|
@ -108,6 +112,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);
|
||||
|
||||
|
@ -229,6 +237,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);
|
||||
}
|
||||
|
@ -289,6 +301,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 = 4;
|
||||
private static final int DB_VERSION = 5;
|
||||
private static final String DB_NAME = "bookmarks.db";
|
||||
|
||||
public static final String ID = BaseColumns._ID;
|
||||
|
@ -106,6 +106,10 @@ public class BookmarkDB extends SQLiteOpenHelper
|
|||
+ "security, "
|
||||
+ "remote_program, "
|
||||
+ "work_dir, "
|
||||
+ "async_channel, "
|
||||
+ "async_transport, "
|
||||
+ "async_input, "
|
||||
+ "async_update, "
|
||||
+ "console_mode) "
|
||||
+ "VALUES ( "
|
||||
+ "'Test Server', "
|
||||
|
@ -114,7 +118,7 @@ public class BookmarkDB extends SQLiteOpenHelper
|
|||
+ "'', "
|
||||
+ "'', "
|
||||
+ "3389, "
|
||||
+ "1, 1, 2, 2, 0, 0, 0, 0, '', '', 0);";
|
||||
+ "1, 1, 2, 2, 0, 0, 0, 0, '', '', 1, 1, 1, 1, 0);";
|
||||
db.execSQL(sqlInsertDefaultSessionEntry);
|
||||
}
|
||||
|
||||
|
@ -148,6 +152,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);
|
||||
|
||||
|
@ -151,7 +153,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