summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/TDEConfig.java
blob: 326355fdc766fccb59f7a0cba3ad6e9d7e6b5392 (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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.koala;

import org.kde.qt.Qt;
import org.kde.qt.TQMetaObject;
import org.kde.qt.QtSupport;
import java.util.ArrayList;

/**

 Access KDE Configuration entries.
 This class implements KDE's default configuration system.
		@author Kalle Dalheimer <kalle@kde.org>, Preston Brown <pbrown@kde.org>

		@short KDE Configuration Management class.
		@see TDEGlobal#config
		@see TDEConfigBase
		@see KSimpleConfig

*/
public class TDEConfig extends TDEConfigBase  {
	protected TDEConfig(Class dummy){super((Class) null);}
	public native TQMetaObject metaObject();
	public native String className();
	/**	
		 Constructs a TDEConfig object.
			@param fileName A file to parse in addition to the
		        system-wide file(s).  If it is not provided, only global
		        KDE configuration data will be read (depending on the value of
		        <code>bUseKDEGlobals</code>).
			@param bReadOnly Set the config object's read-only status. Note that the
		        object will automatically become read-only if either the user does not have
		        write permission to <code>fileName</code> or if no file was specified.
			@param bUseKDEGlobals Toggle reading the global KDE configuration file.
			@param resType the place to look in (config, data, etc) See TDEStandardDirs.
		   		@short    Constructs a TDEConfig object.
	*/
	public TDEConfig(String fileName, boolean bReadOnly, boolean bUseKDEGlobals, String resType) {
		super((Class) null);
		newTDEConfig(fileName,bReadOnly,bUseKDEGlobals,resType);
	}
	private native void newTDEConfig(String fileName, boolean bReadOnly, boolean bUseKDEGlobals, String resType);
	public TDEConfig(String fileName, boolean bReadOnly, boolean bUseKDEGlobals) {
		super((Class) null);
		newTDEConfig(fileName,bReadOnly,bUseKDEGlobals);
	}
	private native void newTDEConfig(String fileName, boolean bReadOnly, boolean bUseKDEGlobals);
	public TDEConfig(String fileName, boolean bReadOnly) {
		super((Class) null);
		newTDEConfig(fileName,bReadOnly);
	}
	private native void newTDEConfig(String fileName, boolean bReadOnly);
	public TDEConfig(String fileName) {
		super((Class) null);
		newTDEConfig(fileName);
	}
	private native void newTDEConfig(String fileName);
	public TDEConfig() {
		super((Class) null);
		newTDEConfig();
	}
	private native void newTDEConfig();
	public TDEConfig(TDEConfigBackEnd backEnd, boolean bReadOnly) {
		super((Class) null);
		newTDEConfig(backEnd,bReadOnly);
	}
	private native void newTDEConfig(TDEConfigBackEnd backEnd, boolean bReadOnly);
	public TDEConfig(TDEConfigBackEnd backEnd) {
		super((Class) null);
		newTDEConfig(backEnd);
	}
	private native void newTDEConfig(TDEConfigBackEnd backEnd);
	/**	
		 Clears all entries out of the <code>dirtyEntryMap</code>, so the
		 values will not be written to disk on a later call to
		 sync().
			@param bDeep If true, the dirty map is actually emptied.
		        otherwise, the config object's global dirty flag is set to
		        false, but the dirty entries remain in the dirty entry
		        map.
				@short    Clears all entries out of the <code>dirtyEntryMap</code>, so the  values will not be written to disk on a later call to  sync().
		@see TDEConfigBase#rollback
	*/
	public native void rollback(boolean bDeep);
	public native void rollback();
	/**	
		 Returns a list of groups that are known.
				@return a list of of groups
   
		@short    Returns a list of groups that are known.
	*/
	public native ArrayList groupList();
	/**	
		 Returns a map (tree) of entries for all entries in a particular
		 group.
			  Only the actual entry string is returned, none of the
		 other internal data should be included.
			@param pGroup A group to get keys from.
				@return A map of entries in the group specified, indexed by key.
         The returned map may be empty if the group is not found.
   
		@short    Returns a map (tree) of entries for all entries in a particular  group.
	*/
	// TQMap<TQString, TQString> entryMap(const TQString& arg1); >>>> NOT CONVERTED
	/**	
		 Clears all internal data structures and then reread
		 configuration information from disk.
		   		@short    Clears all internal data structures and then reread  configuration information from disk.
	*/
	public native void reparseConfiguration();
	/**	
		 Set the file mode for newly created files.
			@param mode the mode for new files as described in chmod(2)
				@short    Set the file mode for newly created files.
		@see #man:chmod(2)
		@see #for
		@see #a
		@see #description
		@see #of
		@see <code></code>@see #mode
	*/
	public native void setFileWriteMode(int mode);
	/**	
		 Forces all following write-operations being performed on kdeglobals,
		 independent of the bGlobal flag in writeEntry().
			@param force true to force writing in kdeglobals
				@short    Forces all following write-operations being performed on kdeglobals,  independent of the bGlobal flag in writeEntry().
		@see #forceGlobal
	*/
	public native void setForceGlobal(boolean force);
	/**	
		 Returns true if all entries are being written into kdeglobals.
				@return true if all entries are being written into kdeglobals

		@short    Returns true if all entries are being written into kdeglobals.
		@see #setForceGlobal
	*/
	public native boolean forceGlobal();
	/**	
		 Checks whether the config file contains the update <code>id</code>
		 as contained in <code>updateFile.</code> If not, it runs tdeconf_update
		 to update the config file.
			 If you install config update files with critical fixes
		 you may wish to use this method to verify that a critical
		 update has indeed been performed to catch the case where
		 a user restores an old config file from backup that has
		 not been updated yet.
			@param id the update to check
			@param updateFile the file containing the update
				@short    Checks whether the config file contains the update <code>id</code>  as contained in <code>updateFile.</code>
	*/
	public native void checkUpdate(String id, String updateFile);
	/**	
		 Copies all entries from this config object to a new config
		 object that will save itself to <code>file.</code>
			 Actual saving to <code>file</code> happens when the returned object is
		 destructed or when sync() is called upon it.
			@param file the new config object will save itself to.
			@param config optional config object to reuse
				@short    Copies all entries from this config object to a new config  object that will save itself to <code>file.</code>
	*/
	public native TDEConfig copyTo(String file, TDEConfig config);
	public native TDEConfig copyTo(String file);
	/**	
		 Returns a lock file object for the configuration file or 0 if
		 the backend does not support locking.
			@param bGlobal if true, return the lock file for the global config file
			 NOTE: TDEConfig.sync() requires a lock on both the normal and global
		 config file. When calling TDEConfig.sync() while having a lock on the
		 global config file, the normal config file MUST be locked AS WELL and the 
		 normal config file MUST be locked BEFORE the global config file!
		 Otherwise there is a risk of deadlock.
				@short    Returns a lock file object for the configuration file or 0 if  the backend does not support locking.
	*/
	// TDELockFile::Ptr lockFile(bool arg1); >>>> NOT CONVERTED
	// TDELockFile::Ptr lockFile(); >>>> NOT CONVERTED
	/**	
		 Returns true if the specified group is known.
			@param group The group to search for.
				@return true if the group exists.
   
		@short    Returns true if the specified group is known.
	*/
	protected native boolean internalHasGroup(String group);
	/**	
			 Returns a map (tree) of the entries in the specified group.
			 Do not use this function, the implementation / return type are
		 subject to change.
			@param pGroup the group to provide a KEntryMap for.
				@return The map of the entries in the group.
   
		@short
	*/
	// KEntryMap internalEntryMap(const TQString& arg1); >>>> NOT CONVERTED
	/**	
			 Returns a copy of the internal map used to hold all entries.
			 Do not use this function, the implementation / return type are
		 subject to change.
				@return The map of the entries in the group.
   
		@short
	*/
	// KEntryMap internalEntryMap(); >>>> NOT CONVERTED
	/**	
		 Inserts a (key, value) pair into the internal storage mechanism of
		 the configuration object.
			@param _key The key to insert.  It contains information both on
		        the group of the key and the key itself. If the key already
		        exists, the old value will be replaced.
			@param _data the KEntry that is to be stored.
			@param _checkGroup When false, assume that the group already exists.
		   		@short    Inserts a (key, value) pair into the internal storage mechanism of  the configuration object.
	*/
	protected native void putData(KEntryKey _key, KEntry _data, boolean _checkGroup);
	protected native void putData(KEntryKey _key, KEntry _data);
	/**	
		 Looks up an entry in the config object's internal structure.
			@param _key The key to look up  It contains information both on
		        the group of the key and the entry's key itself.
				@return the KEntry value (data) found for the key.  KEntry.aValue
 will be the null string if nothing was located.
   
		@short    Looks up an entry in the config object's internal structure.
	*/
	protected native KEntry lookupData(KEntryKey _key);
	/** 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();
}