summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/KDEDesktopMimeType.java
blob: d5b7a18fb25f54833a7cdf95a6ce4c540d36166e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.koala;

import org.kde.qt.Qt;
import org.kde.qt.QtSupport;
import org.kde.qt.TQDataStream;
import org.kde.qt.TQPixmap;
import java.util.ArrayList;

/**

 Mime type for desktop files.
 Handles mount/umount icon, and user-defined properties.
		@short Mimetype for a .desktop file.

*/
public class KDEDesktopMimeType extends KMimeType  {
	protected KDEDesktopMimeType(Class dummy){super((Class) null);}
	public static final int ST_MOUNT = 0;
	public static final int ST_UNMOUNT = 1;
	public static final int ST_USER_DEFINED = 2;

	/**	
		 Construct a desktop mimetype and take all information from a desktop file.
			@param config the desktop configuration file that describes the mime type
		   		@short    Construct a desktop mimetype and take all information from a desktop file.
	*/
	public KDEDesktopMimeType(KDesktopFile config) {
		super((Class) null);
		newKDEDesktopMimeType(config);
	}
	private native void newKDEDesktopMimeType(KDesktopFile config);
	/**	 \internal 		@short   \internal
	*/
	public KDEDesktopMimeType(TQDataStream _str, int offset) {
		super((Class) null);
		newKDEDesktopMimeType(_str,offset);
	}
	private native void newKDEDesktopMimeType(TQDataStream _str, int offset);
	public native String icon(String _url, boolean _is_local);
	public native String icon(KURL _url, boolean _is_local);
	public native TQPixmap pixmap(KURL _url, int _group, int _force_size, int _state, StringBuffer _path);
	public native TQPixmap pixmap(KURL _url, int _group, int _force_size, int _state);
	public native TQPixmap pixmap(KURL _url, int _group, int _force_size);
	public native TQPixmap pixmap(KURL _url, int _group);
	public native String comment(String _url, boolean _is_local);
	public native String comment(KURL _url, boolean _is_local);
	/**	
		 Returns a list of services for the given .desktop file that are handled
		 by kio itself. Namely mount/unmount for FSDevice files.
				@return the list of services
   
		@short    Returns a list of services for the given .
	*/
	// TQValueList<KDEDesktopMimeType::Service> builtinServices(const KURL& arg1); >>>> NOT CONVERTED
	/**	
		 Returns a list of services defined by the user as possible actions
		 on the given .desktop file. May include empty actions which represent where
		 visual separators should appear in user-visible representations of those actions,
		 such as separators in a menu.
			@param path the path to the desktop file describing the services
			@param bLocalFiles true if those services are to be applied to local files only
		 (if false, services that don't have %u or %U in the Exec line won't be taken into account).
				@return the list of user deviced actions
   
		@short    Returns a list of services defined by the user as possible actions  on the given .
	*/
	// TQValueList<KDEDesktopMimeType::Service> userDefinedServices(const TQString& arg1,bool arg2); >>>> NOT CONVERTED
	/**	
		 Overload of userDefinedServices for speed purposes: it takes a KConfig so that
		 the caller can check things in the file without having it parsed twice.
				@short    Overload of userDefinedServices for speed purposes: it takes a KConfig  so that  the caller can check things in the file without having it parsed twice.
	*/
	// TQValueList<KDEDesktopMimeType::Service> userDefinedServices(const TQString& arg1,KConfig& arg2,bool arg3); >>>> NOT CONVERTED
	/**	
		 Overload of userDefinedServices but also allows you to pass a list of urls for this file.
		 This allows for the menu to be changed depending on the exact files via
		 the X-TDE-GetActionMenu extension.
				@short    Overload of userDefinedServices but also allows you to pass a list of urls for this file.
	*/
	// TQValueList<KDEDesktopMimeType::Service> userDefinedServices(const TQString& arg1,KConfig& arg2,bool arg3,const KURL::List& arg4); >>>> NOT CONVERTED
	/**	
		 Execute <code>service</code> on the list of <code>urls.</code>
			@param urls the list of urls
			@param service the service to execute
		   		@short    Execute <code>service</code> on the list of <code>urls.</code>
	*/
	// void executeService(const KURL::List& arg1,KDEDesktopMimeType::Service& arg2); >>>> NOT CONVERTED
	/**	
		 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.
			@param _url the url to run
			@param _is_local true if the URL is local, false otherwise
				@return true on success and false on failure.

		@short    Invokes the default action for the desktop entry.
		@see KRun#runURL
	*/
	public static native int run(KURL _url, boolean _is_local);
	public native TQPixmap pixmap(int group, int force_size, int state, StringBuffer path);
	public native TQPixmap pixmap(int group, int force_size, int state);
	public native TQPixmap pixmap(int group, int force_size);
	public native TQPixmap pixmap(int group);
	protected static native int runFSDevice(KURL _url, KSimpleConfig cfg);
	protected static native int runApplication(KURL _url, String _serviceFile);
	protected static native int runLink(KURL _url, KSimpleConfig cfg);
	protected static native int runMimeType(KURL _url, KSimpleConfig cfg);
	/** Deletes the wrapped C++ instance */
	protected native void finalize() throws InternalError;
	/** Delete the wrapped C++ instance ahead of finalize() */
	public native void dispose();
	/** Has the wrapped C++ instance been deleted? */
	public native boolean isDisposed();
}