// Path: src/net/propero/rdp/Common.java
// public class Common {
// 
// 	public static boolean underApplet = false;
// 
// 	public static Rdp5 rdp;
// 
// 	public static Secure secure;
// 
// 	public static MCS mcs;
// 
// 	public static RdesktopFrame frame;
// 
// 	/**
// 	 * Quit the application
// 	 */
// 	public static void exit() {
// 		Rdesktop.exit(0, rdp, frame, true);
// 	}
// }
// 
// Path: src/net/propero/rdp/RdpEvent.java
// public enum RdpEvent {
// 	INIT("init"),	
// 	DESTROY("destroy");
// 	
// 	private String name;
// 
// 	RdpEvent(String name) {
// 		this.name = name;
// 	}
// 
// 	public String toString() {
// 		return name;
// 	}
// }
// 
// Path: src/net/propero/rdp/RdpEventPublisher.java
// public class RdpEventPublisher {
// 
// 	static Logger logger = Logger.getLogger(RdpEventPublisher.class);
// 	
// 	private static List<RdpEventSubscriber> subscribers = new ArrayList<RdpEventSubscriber>();
// 	
// 	public static void subscribe(RdpEventSubscriber listener){
// 		subscribers.add(listener);
// 	}
// 	
// 	public static void publish(RdpEvent e, String txt){
// 		publish(e, txt, null);
// 	}
// 	
// 	public static void publish(RdpEvent e, String txt, Exception ex){
// 		logger.info("publish: " + e + " " + txt + (ex != null ? " " + ex : ""));
// 		
// 		switch(e){
// 		case DESTROY:
// 			for(RdpEventSubscriber s : subscribers){s.destroy(txt);}
// 			break;			
// 		default:
// 			System.err.println("WTF?");
// 		}	
// 	}
// }
// 
// Path: src/net/propero/rdp/RdpEventSubscriber.java
// public interface RdpEventSubscriber {
// 
// 	public void destroy(String s);
// 	
// }


import java.io.File;
import java.io.IOException;
import java.security.AccessController;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.util.StringTokenizer;
import net.propero.rdp.Common;
import net.propero.rdp.RdpEvent;
import net.propero.rdp.RdpEventPublisher;
import net.propero.rdp.RdpEventSubscriber;
/* RdpApplet.java
 * Component: ProperJavaRDP
 * 
 * Revision: $Revision: 13 $
 * Author: $Author: miha_vitorovic $
 * Date: $Date: 2007-05-11 14:14:45 +0200 (Fri, 11 May 2007) $
 *
 * Copyright (c) 2005 Propero Limited
 *
 * Purpose: Provide an applet interface to ProperJavaRDP
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or (at
 * your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA
 * 
 * (See gpl.txt for details of the GNU General Public License.)
 * 
 */

package net.propero.rdp.applet;



public class RdpApplet extends Applet2 {

	private String id;
	
	public void start() {
		System.out.println("new applet");
		id = getRequiredParameter("id");
		subscribeToRdpEvents();
		
// Path: src/net/propero/rdp/Common.java
// public class Common {
// 
// 	public static boolean underApplet = false;
// 
// 	public static Rdp5 rdp;
// 
// 	public static Secure secure;
// 
// 	public static MCS mcs;
// 
// 	public static RdesktopFrame frame;
// 
// 	/**
// 	 * Quit the application
// 	 */
// 	public static void exit() {
// 		Rdesktop.exit(0, rdp, frame, true);
// 	}
// }
// 
// Path: src/net/propero/rdp/RdpEvent.java
// public enum RdpEvent {
// 	INIT("init"),	
// 	DESTROY("destroy");
// 	
// 	private String name;
// 
// 	RdpEvent(String name) {
// 		this.name = name;
// 	}
// 
// 	public String toString() {
// 		return name;
// 	}
// }
// 
// Path: src/net/propero/rdp/RdpEventPublisher.java
// public class RdpEventPublisher {
// 
// 	static Logger logger = Logger.getLogger(RdpEventPublisher.class);
// 	
// 	private static List<RdpEventSubscriber> subscribers = new ArrayList<RdpEventSubscriber>();
// 	
// 	public static void subscribe(RdpEventSubscriber listener){
// 		subscribers.add(listener);
// 	}
// 	
// 	public static void publish(RdpEvent e, String txt){
// 		publish(e, txt, null);
// 	}
// 	
// 	public static void publish(RdpEvent e, String txt, Exception ex){
// 		logger.info("publish: " + e + " " + txt + (ex != null ? " " + ex : ""));
// 		
// 		switch(e){
// 		case DESTROY:
// 			for(RdpEventSubscriber s : subscribers){s.destroy(txt);}
// 			break;			
// 		default:
// 			System.err.println("WTF?");
// 		}	
// 	}
// }
// 
// Path: src/net/propero/rdp/RdpEventSubscriber.java
// public interface RdpEventSubscriber {
// 
// 	public void destroy(String s);
// 	
// }


// Path: src/net/propero/rdp/applet/RdpApplet.java
import java.io.File;
import java.io.IOException;
import java.security.AccessController;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.util.StringTokenizer;
import net.propero.rdp.Common;
import net.propero.rdp.RdpEvent;
import net.propero.rdp.RdpEventPublisher;
import net.propero.rdp.RdpEventSubscriber;

/* RdpApplet.java
 * Component: ProperJavaRDP
 * 
 * Revision: $Revision: 13 $
 * Author: $Author: miha_vitorovic $
 * Date: $Date: 2007-05-11 14:14:45 +0200 (Fri, 11 May 2007) $
 *
 * Copyright (c) 2005 Propero Limited
 *
 * Purpose: Provide an applet interface to ProperJavaRDP
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or (at
 * your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA
 * 
 * (See gpl.txt for details of the GNU General Public License.)
 * 
 */

package net.propero.rdp.applet;



public class RdpApplet extends Applet2 {

	private String id;
	
	public void start() {
		System.out.println("new applet");
		id = getRequiredParameter("id");
		subscribeToRdpEvents();
		
		Common.underApplet = true;