summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/KServiceTypeProfile.java
blob: f028a374f442d0f228291fccb32d9bbe8ea6d280 (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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.koala;

import org.kde.qt.Qt;
import org.kde.qt.QtSupport;

/**

 KServiceTypeProfile represents the user's preferences for services
 of a service type.
 It consists of a list of services (service offers) for the service type
 that is sorted by the user's preference.
 TDETrader uses KServiceTypeProfile to sort its results, so usually
 you can just use TDETrader to find the user's preferred service.
		@short Represents the user's preferences for services of a service type.
		@see KService
		@see KServiceType
		@see KServiceOffer
		@see TDETrader

*/
public class KServiceTypeProfile implements QtSupport {
	private long _qt;
	private boolean _allocatedInJavaWorld = true;
	protected KServiceTypeProfile(Class dummy){}

	/**	
		 Returns the list of all service offers for the service types
		 that are represented by this profile.
				@return the list of KServiceOffer instances
   
		@short    Returns the list of all service offers for the service types  that are represented by this profile.
	*/
	// KServiceTypeProfile::OfferList offers(); >>>> NOT CONVERTED
	/**	
		 Returns the preferred service for <code>_serviceType</code> and <code>_genericServiceType</code>
		 ("Application", type of component, or null).
			@param serviceType the service type (e.g. a MIME type)
			@param genericServiceType the generic service type (e.g. "Application" or
		                           "KParts/ReadOnlyPart")
				@return the preferred service, or 0 if no service is available
   
		@short    Returns the preferred service for <code>_serviceType</code> and <code>_genericServiceType</code>  ("Application", type of component, or null).
	*/
	// KService::Ptr preferredService(const TQString& arg1,const TQString& arg2); >>>> NOT CONVERTED
	/**	
		 Returns the profile for the requested service type.
			@param servicetype the service type (e.g. a MIME type)
			@param genericServiceType the generic service type (e.g. "Application"
		                           or "KParts/ReadOnlyPart"). Can be null,
		                           then the "Application" generic type will be used
				@return the KServiceTypeProfile with the given arguments, or 0 if not found
   
		@short    Returns the profile for the requested service type.
	*/
	public static native KServiceTypeProfile serviceTypeProfile(String servicetype, String genericServiceType);
	public static native KServiceTypeProfile serviceTypeProfile(String servicetype);
	/**	
		 Returns the offers associated with a given servicetype, sorted by preference.
		 This is what TDETrader uses to get the list of offers, before applying the
		 constraints and preferences.
			 If <code>genericServiceType</code> is specified, a list is returned with
		 the offers associated with the combination of the two service types.
		 This is almost like an "foo in ServiceTypes" constraint in the TDETrader,
		 but the difference is that to order the offers, we will look at entries
		 specifically for those two service types. Typically, this is used for
		 getting the list of embeddable components that can handle a given mimetype.
		 In that case, <code>servicetype</code> is the mimetype and <code>genericServiceType</code> is "KParts/ReadOnlyPart".
			@param servicetype the service type (e.g. a MIME type)
			@param genericServiceType the generic service type (e.g. "Application"
		                           or "KParts/ReadOnlyPart"). Can be null,
		                           then all generic types will be included
				@return the list of offers witht he given parameters
   
		@short    Returns the offers associated with a given servicetype, sorted by preference.
	*/
	// KServiceTypeProfile::OfferList offers(const TQString& arg1,const TQString& arg2); >>>> NOT CONVERTED
	// KServiceTypeProfile::OfferList offers(const TQString& arg1); >>>> NOT CONVERTED
	/**	
		 Returns a list of all KServiceTypeProfiles.
				@return a list of all KServiceTypeProfiles
   
		@short    Returns a list of all KServiceTypeProfiles.
	*/
	// const TQPtrList<KServiceTypeProfile>& serviceTypeProfiles(); >>>> NOT CONVERTED
	/**	
		 Clear all cached information
		   		@short    Clear all cached information
	*/
	public static native void clear();
	/**	
		 This method activates a special mode of KServiceTypeProfile, in which all/all
		 and all/allfiles are excluded from the results of the queries.
		 It is meant for the configuration module _only_.
			   		@short    This method activates a special mode of KServiceTypeProfile, in which all/all  and all/allfiles are excluded from the results of the queries.
	*/
	public static native void setConfigurationMode();
	/**	
			   		@short
	*/
	public static native boolean configurationMode();
	/**	
		 Constructor is called when the user profile is read for the
		 first time.
			@param serviceType the service type (e.g. a MIME type)
			@param genericServiceType the generic service type (e.g. "Application"
		                           or "KParts/ReadOnlyPart"). Can be null,
		                           then the "Application" generic type will be used
		   		@short    Constructor is called when the user profile is read for the  first time.
	*/
	public KServiceTypeProfile(String serviceType, String genericServiceType) {
		newKServiceTypeProfile(serviceType,genericServiceType);
	}
	private native void newKServiceTypeProfile(String serviceType, String genericServiceType);
	public KServiceTypeProfile(String serviceType) {
		newKServiceTypeProfile(serviceType);
	}
	private native void newKServiceTypeProfile(String serviceType);
	/**	
		 Add a service to this profile.
			@param _service the name of the service
			@param _preference the user's preference value, must be positive,
		              bigger is better
			@param _allow_as_default true if the service should be used as
		                 default
		   		@short    Add a service to this profile.
	*/
	protected native void addService(String _service, int _preference, boolean _allow_as_default);
	protected native void addService(String _service, int _preference);
	protected native void addService(String _service);
	/** 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();
}