/***************************************************************************
                            DCOPObjectProxy.java -  description
                             -------------------
    begin                : Sun Jan 27 16:22:17 2002
    copyright            : (C) 2000-2001 Lost Highway Ltd.
    email                : Richard_Dale@tipitina.demon.co.uk
    generated by         : duke@tipitina on Sun Jan 27 16:22:17 2002, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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.                                   *
 *                                                                         *
***************************************************************************/

package org.kde.koala;

import org.kde.qt.*;
import java.util.*;
import java.lang.Error;

/**

 You must use a proxy if you want to dispatch method calls for
 object IDs which dont have (yet) a corresponding {@link DCOPObject}.
 This is somewhat like virtual object references in CORBA.

 @author Matthias Ettrich <ettrich@kde.org>
 
 @short 
 You must use a proxy if you want to dispatch method calls for
 object IDs which dont have (yet) a corresponding @ref DCOPObject.
*/
public class  DCOPObjectProxy implements QtSupport {
	private long _qt;
	private boolean _allocatedInJavaWorld = true;

	protected DCOPObjectProxy(Class dummy){}

	private native void newDCOPObjectProxy();

/** 
 Creates a new proxy.
     
*/
	public DCOPObjectProxy() {
		newDCOPObjectProxy();
	}
	private native void newDCOPObjectProxy( DCOPClient arg1);

/** 
 Obsolete, do not use. DCOP clients know about object proxies
 automatically.

     
*/
	public DCOPObjectProxy( DCOPClient arg1) {
		newDCOPObjectProxy( arg1);
	}

/** 
 Destroy the proxy.
     
*/
	protected native void finalize() throws InternalError;
	public native void dispose();
	public native boolean isDisposed();

/** 
 Reimplement this method to dispatch method calls.

 This method is called of all proxies if the {@link DCOPClient}
 knows no object with the id <code>obj.</code> If the first proxy returns
 <code>true</code>, the {@link DCOPClient} will no longer call other proxies.

 The object id <code>obj</code> may be empty for app-wide function calls no
 associated with any object.
     
*/
	public native boolean process( String obj, String fun, byte[] data, String replyType, byte[] replyData);
}
