/***************************************************************************
                            KDEDesktopMimeType.java -  description
                             -------------------
    begin                : Tue Jan 29 20:06:57 2002
    copyright            : (C) 2000-2001 Lost Highway Ltd.
    email                : Richard_Dale@tipitina.demon.co.uk
    generated by         : duke@tipitina on Tue Jan 29 20:06:57 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;

/**


 @short Mimetype for a .desktop file
 Handles mount/umount icon, and user-defined properties.
*/
public class KDEDesktopMimeType extends KMimeType  {
	protected KDEDesktopMimeType(Class dummy){super((Class) null);}

	private native void newKDEDesktopMimeType( KDesktopFile config);
	public KDEDesktopMimeType( KDesktopFile config) {
		super((Class) null);
		newKDEDesktopMimeType( config);
	}
	private native void newKDEDesktopMimeType( QDataStream _str, int offset);
	public KDEDesktopMimeType( QDataStream _str, int offset) {
		super((Class) null);
		newKDEDesktopMimeType( _str, offset);
	}
	public native String icon( String _url, boolean _is_local);
	public native String icon( KURL _url, boolean _is_local);
	public native QPixmap pixmap( KURL _url, int _group, int _force_size, int _state, String _path);
	public native QPixmap pixmap( KURL _url, int _group);
	public native String comment( String _url, boolean _is_local);
	public native String comment( KURL _url, boolean _is_local);

/** 

*/
//	public static native QValueList<Service> builtinServices( KURL _url);

/** 

*/
//	public static native QValueList<Service> userDefinedServices( String path, boolean bLocalFiles);

/** 

   
*/
//	public static native void executeService( String _path, KDEDesktopMimeType_Service _service);

/** 
 Execute <code>service</code> on the list of <code>urls</code>
   
*/
//	public static native void executeService( ArrayList urls, KDEDesktopMimeType_Service service);

/** 
 Invokes the default action for the desktop entry. If the desktop
 entry is not local, then only false is returned. Otherwise we
 would create a security problem. Only types Link and Mimetype
 could be followed.

*/
	public static native long run( KURL _url, boolean _is_local);
	public native QPixmap pixmap( int a, int b, int c, String d);
	protected static native long runFSDevice( KURL _url, KSimpleConfig cfg);
	protected static native long runApplication( KURL _url, String _serviceFile);
	protected static native long runLink( KURL _url, KSimpleConfig cfg);
	protected static native long runMimeType( KURL _url, KSimpleConfig cfg);
	public static final int ST_MOUNT = 0;
	public static final int ST_UNMOUNT = 1;
	public static final int ST_USER_DEFINED = 2;
}
