// Path: jrdp/core/src/main/java/com/jrdp/core/util/Logger.java
// public class Logger
// {
// 	public static final int INFO = 0;
// 	public static final int DEBUG = 1;
// 	public static final int ERROR = 2;
// 	private static LoggerInterface logger;
// 	
// 	public static void setLogger(LoggerInterface newLogger)
// 	{
// 		logger = newLogger;
// 	}
// 	
// 	public static void log(int type, String message)
// 	{
// 		if(logger != null)
// 			logger.log(type, message);
// 	}
// 	
// 	public static void log(String message)
// 	{
// 		if(logger != null)
// 			logger.log(message);
// 	}
// 	
// 	public static void log(Exception e)
// 	{
// 		if(logger != null)
// 			logger.log(e);
// 	}
// 	
// 	public static void log(Exception e, String message)
// 	{
// 		if(logger != null)
// 			logger.log(e, message);
// 	}
// 	
// 	public interface LoggerInterface
// 	{
// 		public void log(int type, String message);
// 		public void log(String message);
// 		public void log(Exception e);
// 		public void log(Exception e, String message);
// 	}
// }


import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;
import com.jrdp.core.util.Logger;
import java.util.Vector;
	
	private class DatabaseHelper extends SQLiteOpenHelper
	{
		public DatabaseHelper(Context context, String name, CursorFactory factory, int version)
		{
			super(context, name, factory, version);
		}

		@Override
		public void onCreate(SQLiteDatabase db)
		{
			db.execSQL("CREATE TABLE " + TABLE_CONNECTION_INFO + " (" +
					ROW_ID + " INTEGER PRIMARY KEY," +
					ROW_NICKNAME + " TEXT," +
					ROW_IP + " TEXT," + 
					ROW_PORT + " INTEGER," +
					ROW_USERNAME + " TEXT," +
					ROW_PASSWORD + " TEXT," +
					ROW_DOMAIN + " TEXT," +
					ROW_ENCRYPTION_LEVEL + " INTEGER," +
					ROW_PERFORMANCE_FLAGS + " INTEGER," +
					ROW_RESOLUTION_INDEX + " INTEGER," +
					ROW_COLOR + " INTEGER," +
					ROW_INPUT_TYPE + " INTEGER," +
					ROW_LIST_ORDER + " INTEGER );");
		}

		@Override
		public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
		{
// Path: jrdp/core/src/main/java/com/jrdp/core/util/Logger.java
// public class Logger
// {
// 	public static final int INFO = 0;
// 	public static final int DEBUG = 1;
// 	public static final int ERROR = 2;
// 	private static LoggerInterface logger;
// 	
// 	public static void setLogger(LoggerInterface newLogger)
// 	{
// 		logger = newLogger;
// 	}
// 	
// 	public static void log(int type, String message)
// 	{
// 		if(logger != null)
// 			logger.log(type, message);
// 	}
// 	
// 	public static void log(String message)
// 	{
// 		if(logger != null)
// 			logger.log(message);
// 	}
// 	
// 	public static void log(Exception e)
// 	{
// 		if(logger != null)
// 			logger.log(e);
// 	}
// 	
// 	public static void log(Exception e, String message)
// 	{
// 		if(logger != null)
// 			logger.log(e, message);
// 	}
// 	
// 	public interface LoggerInterface
// 	{
// 		public void log(int type, String message);
// 		public void log(String message);
// 		public void log(Exception e);
// 		public void log(Exception e, String message);
// 	}
// }


// Path: jrdp/android/src/main/java/com/jrdp/client/android/Storage.java
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;
import com.jrdp.core.util.Logger;
import java.util.Vector;

	
	private class DatabaseHelper extends SQLiteOpenHelper
	{
		public DatabaseHelper(Context context, String name, CursorFactory factory, int version)
		{
			super(context, name, factory, version);
		}

		@Override
		public void onCreate(SQLiteDatabase db)
		{
			db.execSQL("CREATE TABLE " + TABLE_CONNECTION_INFO + " (" +
					ROW_ID + " INTEGER PRIMARY KEY," +
					ROW_NICKNAME + " TEXT," +
					ROW_IP + " TEXT," + 
					ROW_PORT + " INTEGER," +
					ROW_USERNAME + " TEXT," +
					ROW_PASSWORD + " TEXT," +
					ROW_DOMAIN + " TEXT," +
					ROW_ENCRYPTION_LEVEL + " INTEGER," +
					ROW_PERFORMANCE_FLAGS + " INTEGER," +
					ROW_RESOLUTION_INDEX + " INTEGER," +
					ROW_COLOR + " INTEGER," +
					ROW_INPUT_TYPE + " INTEGER," +
					ROW_LIST_ORDER + " INTEGER );");
		}

		@Override
		public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
		{
			Logger.log(Logger.INFO, "Upgrading database from " + oldVersion + " to " + newVersion);