KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > swt > internal > mozilla > nsIPref


1 /* ***** BEGIN LICENSE BLOCK *****
2  * Version: MPL 1.1
3  *
4  * The contents of this file are subject to the Mozilla Public License Version
5  * 1.1 (the "License"); you may not use this file except in compliance with
6  * the License. You may obtain a copy of the License at
7  * http://www.mozilla.org/MPL/
8  *
9  * Software distributed under the License is distributed on an "AS IS" basis,
10  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11  * for the specific language governing rights and limitations under the
12  * License.
13  *
14  * The Original Code is Mozilla Communicator client code, released March 31, 1998.
15  *
16  * The Initial Developer of the Original Code is
17  * Netscape Communications Corporation.
18  * Portions created by Netscape are Copyright (C) 1998-1999
19  * Netscape Communications Corporation. All Rights Reserved.
20  *
21  * Contributor(s):
22  *
23  * IBM
24  * - Binding to permit interfacing between Mozilla and SWT
25  * - Copyright (C) 2003 IBM Corp. All Rights Reserved.
26  *
27  * ***** END LICENSE BLOCK ***** */

28 package org.eclipse.swt.internal.mozilla;
29
30 public class nsIPref extends nsISupports {
31
32     static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 45;
33
34     public static final String JavaDoc NS_IPREF_IID_STRING =
35         "a22ad7b0-ca86-11d1-a9a4-00805f8a7ac4";
36
37     public static final nsID NS_IPREF_IID =
38         new nsID(NS_IPREF_IID_STRING);
39
40     public nsIPref(int address) {
41         super(address);
42     }
43
44     public int ReadUserPrefs(int aFile) {
45         return XPCOM.VtblCall(super.LAST_METHOD_ID + 1, getAddress(), aFile);
46     }
47
48     public int ResetPrefs() {
49         return XPCOM.VtblCall(super.LAST_METHOD_ID + 2, getAddress());
50     }
51
52     public int ResetUserPrefs() {
53         return XPCOM.VtblCall(super.LAST_METHOD_ID + 3, getAddress());
54     }
55
56     public int SavePrefFile(int aFile) {
57         return XPCOM.VtblCall(super.LAST_METHOD_ID + 4, getAddress(), aFile);
58     }
59
60     public int GetBranch(byte[] aPrefRoot, int[] _retval) {
61         return XPCOM.VtblCall(super.LAST_METHOD_ID + 5, getAddress(), aPrefRoot, _retval);
62     }
63
64     public int GetDefaultBranch(byte[] aPrefRoot, int[] _retval) {
65         return XPCOM.VtblCall(super.LAST_METHOD_ID + 6, getAddress(), aPrefRoot, _retval);
66     }
67
68     public static final int ePrefInvalid = 0;
69
70     public static final int ePrefLocked = 1;
71
72     public static final int ePrefUserset = 2;
73
74     public static final int ePrefConfig = 4;
75
76     public static final int ePrefRemote = 8;
77
78     public static final int ePrefLilocal = 16;
79
80     public static final int ePrefString = 32;
81
82     public static final int ePrefInt = 64;
83
84     public static final int ePrefBool = 128;
85
86     public static final int ePrefValuetypeMask = 224;
87
88     public int GetRoot(int[] aRoot) {
89         return XPCOM.VtblCall(super.LAST_METHOD_ID + 7, getAddress(), aRoot);
90     }
91
92     public int GetPrefType(byte[] aPrefName, int[] _retval) {
93         return XPCOM.VtblCall(super.LAST_METHOD_ID + 8, getAddress(), aPrefName, _retval);
94     }
95
96     public int GetBoolPref(byte[] aPrefName, boolean[] _retval) {
97         return XPCOM.VtblCall(super.LAST_METHOD_ID + 9, getAddress(), aPrefName, _retval);
98     }
99
100     public int SetBoolPref(byte[] aPrefName, int aValue) {
101         return XPCOM.VtblCall(super.LAST_METHOD_ID + 10, getAddress(), aPrefName, aValue);
102     }
103
104     public int GetCharPref(byte[] aPrefName, int[] _retval) {
105         return XPCOM.VtblCall(super.LAST_METHOD_ID + 11, getAddress(), aPrefName, _retval);
106     }
107
108     public int SetCharPref(byte[] aPrefName, byte[] aValue) {
109         return XPCOM.VtblCall(super.LAST_METHOD_ID + 12, getAddress(), aPrefName, aValue);
110     }
111
112     public int GetIntPref(byte[] aPrefName, int[] _retval) {
113         return XPCOM.VtblCall(super.LAST_METHOD_ID + 13, getAddress(), aPrefName, _retval);
114     }
115
116     public int SetIntPref(byte[] aPrefName, int aValue) {
117         return XPCOM.VtblCall(super.LAST_METHOD_ID + 14, getAddress(), aPrefName, aValue);
118     }
119
120     public int GetComplexValue(byte[] aPrefName, nsID aType, int[] aValue) {
121         return XPCOM.VtblCall(super.LAST_METHOD_ID + 15, getAddress(), aPrefName, aType, aValue);
122     }
123
124     public int SetComplexValue(byte[] aPrefName, nsID aType, int aValue) {
125         return XPCOM.VtblCall(super.LAST_METHOD_ID + 16, getAddress(), aPrefName, aType, aValue);
126     }
127
128     public int ClearUserPref(byte[] aPrefName) {
129         return XPCOM.VtblCall(super.LAST_METHOD_ID + 17, getAddress(), aPrefName);
130     }
131
132     public int PrefIsLocked(byte[] aPrefName, boolean[] _retval) {
133         return XPCOM.VtblCall(super.LAST_METHOD_ID + 18, getAddress(), aPrefName, _retval);
134     }
135
136     public int LockPref(byte[] aPrefName) {
137         return XPCOM.VtblCall(super.LAST_METHOD_ID + 19, getAddress(), aPrefName);
138     }
139
140     public int UnlockPref(byte[] aPrefName) {
141         return XPCOM.VtblCall(super.LAST_METHOD_ID + 20, getAddress(), aPrefName);
142     }
143
144     public int ResetBranch(byte[] aStartingAt) {
145         return XPCOM.VtblCall(super.LAST_METHOD_ID + 21, getAddress(), aStartingAt);
146     }
147
148     public int DeleteBranch(byte[] aStartingAt) {
149         return XPCOM.VtblCall(super.LAST_METHOD_ID + 22, getAddress(), aStartingAt);
150     }
151
152     public int GetChildList(byte[] aStartingAt, int[] aCount, int[] aChildArray) {
153         return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
154     }
155
156     public int AddObserver(byte[] aDomain, int aObserver, boolean aHoldWeak) {
157         return XPCOM.VtblCall(super.LAST_METHOD_ID + 24, getAddress(), aDomain, aObserver, aHoldWeak);
158     }
159
160     public int RemoveObserver(byte[] aDomain, int aObserver) {
161         return XPCOM.VtblCall(super.LAST_METHOD_ID + 25, getAddress(), aDomain, aObserver);
162     }
163
164     public int CopyCharPref(byte[] pref, int[] _retval) {
165         return XPCOM.VtblCall(super.LAST_METHOD_ID + 26, getAddress(), pref, _retval);
166     }
167
168     public int CopyDefaultCharPref(byte[] pref, int[] _retval) {
169         return XPCOM.VtblCall(super.LAST_METHOD_ID + 27, getAddress(), pref, _retval);
170     }
171
172     public int GetDefaultBoolPref(byte[] pref, boolean[] _retval) {
173         return XPCOM.VtblCall(super.LAST_METHOD_ID + 28, getAddress(), pref, _retval);
174     }
175
176     public int GetDefaultIntPref(byte[] pref, int[] _retval) {
177         return XPCOM.VtblCall(super.LAST_METHOD_ID + 29, getAddress(), pref, _retval);
178     }
179
180     public int SetDefaultBoolPref(byte[] pref, boolean value) {
181         return XPCOM.VtblCall(super.LAST_METHOD_ID + 30, getAddress(), pref, value);
182     }
183
184     public int SetDefaultCharPref(byte[] pref, byte[] value) {
185         return XPCOM.VtblCall(super.LAST_METHOD_ID + 31, getAddress(), pref, value);
186     }
187
188     public int SetDefaultIntPref(byte[] pref, int value) {
189         return XPCOM.VtblCall(super.LAST_METHOD_ID + 32, getAddress(), pref, value);
190     }
191
192     public int CopyUnicharPref(byte[] pref, int[] _retval) {
193         return XPCOM.VtblCall(super.LAST_METHOD_ID + 33, getAddress(), pref, _retval);
194     }
195
196     public int CopyDefaultUnicharPref(byte[] pref, int[] _retval) {
197         return XPCOM.VtblCall(super.LAST_METHOD_ID + 34, getAddress(), pref, _retval);
198     }
199
200     public int SetUnicharPref(byte[] pref, char[] value) {
201         return XPCOM.VtblCall(super.LAST_METHOD_ID + 35, getAddress(), pref, value);
202     }
203
204     public int SetDefaultUnicharPref(byte[] pref, char[] value) {
205         return XPCOM.VtblCall(super.LAST_METHOD_ID + 36, getAddress(), pref, value);
206     }
207
208     public int GetLocalizedUnicharPref(byte[] pref, int[] _retval) {
209         return XPCOM.VtblCall(super.LAST_METHOD_ID + 37, getAddress(), pref, _retval);
210     }
211
212     public int GetDefaultLocalizedUnicharPref(byte[] pref, int[] _retval) {
213         return XPCOM.VtblCall(super.LAST_METHOD_ID + 38, getAddress(), pref, _retval);
214     }
215
216     public int GetFilePref(byte[] pref, int[] _retval) {
217         return XPCOM.VtblCall(super.LAST_METHOD_ID + 39, getAddress(), pref, _retval);
218     }
219
220     public int SetFilePref(byte[] pref, int value, boolean setDefault) {
221         return XPCOM.VtblCall(super.LAST_METHOD_ID + 40, getAddress(), pref, value, setDefault);
222     }
223
224     public int GetFileXPref(byte[] pref, int[] _retval) {
225         return XPCOM.VtblCall(super.LAST_METHOD_ID + 41, getAddress(), pref, _retval);
226     }
227
228     public int SetFileXPref(byte[] pref, int value) {
229         return XPCOM.VtblCall(super.LAST_METHOD_ID + 42, getAddress(), pref, value);
230     }
231
232     public int RegisterCallback(byte[] domain, int callback, int closure) {
233         return XPCOM.VtblCall(super.LAST_METHOD_ID + 43, getAddress(), domain, callback, closure);
234     }
235
236     public int UnregisterCallback(byte[] domain, int callback, int closure) {
237         return XPCOM.VtblCall(super.LAST_METHOD_ID + 44, getAddress(), domain, callback, closure);
238     }
239
240     public int EnumerateChildren(byte[] parent, int callback, int data) {
241         return XPCOM.VtblCall(super.LAST_METHOD_ID + 45, getAddress(), parent, callback, data);
242     }
243 }
Popular Tags