3030
3131#include " nsISupports.idl"
3232
33- interface nsIURI;
3433interface nsIObserver;
3534interface nsIPrincipal;
3635interface mozIDOMWindow;
@@ -75,46 +74,6 @@ interface nsIPermissionManager : nsISupports
7574 const uint32_t EXPIRE_TIME = 2 ;
7675 const uint32_t EXPIRE_POLICY = 3 ;
7776
78- /* *
79- * Add permission information for a given URI and permission type. This
80- * operation will cause the type string to be registered if it does not
81- * currently exist. If a permission already exists for a given type, it
82- * will be modified.
83- *
84- * @param uri the uri to add the permission for
85- * @param type a case-sensitive ASCII string, identifying the consumer.
86- * Consumers should choose this string to be unique, with
87- * respect to other consumers.
88- * @param permission an integer representing the desired action (e.g. allow
89- * or deny). The interpretation of this number is up to the
90- * consumer, and may represent different actions for different
91- * types. Consumers may use one of the enumerated permission
92- * actions defined above, for convenience.
93- * NOTE: UNKNOWN_ACTION (0) is reserved to represent the
94- * default permission when no entry is found for a host, and
95- * should not be used by consumers to indicate otherwise.
96- * @param expiretype a constant defining whether this permission should
97- * never expire (EXPIRE_NEVER), expire at the end of the
98- * session (EXPIRE_SESSION), or expire at a specified time
99- * (EXPIRE_TIME).
100- * @param expiretime an integer representation of when this permission
101- * should be forgotten (milliseconds since Jan 1 1970 0:00:00).
102- */
103- void add (in nsIURI uri,
104- in ACString type,
105- in uint32_t permission,
106- [optional] in uint32_t expireType,
107- [optional] in int64_t expireTime);
108-
109- /* *
110- * Deprecated! Use getAllForPrincipal!
111- * Get all custom permissions for a given URI. This will return
112- * an enumerator of all permissions which are not set to default
113- * and which belong to the matching principal of the given URI.
114- *
115- * @param uri the URI to get all permissions for
116- */
117- nsISimpleEnumerator getAllForURI (in nsIURI uri);
11877
11978 /* *
12079 * Get all custom permissions for a given nsIPrincipal. This will return an
@@ -147,19 +106,6 @@ interface nsIPermissionManager : nsISupports
147106 [optional] in uint32_t expireType,
148107 [optional] in int64_t expireTime);
149108
150- /* *
151- * Remove permission information for a given URI and permission type. This will
152- * remove the permission for the entire host described by the uri, acting as the
153- * opposite operation to the add() method.
154- *
155- * @param uri the uri to remove the permission for
156- * @param type a case-sensitive ASCII string, identifying the consumer.
157- * The type must have been previously registered using the
158- * add() method.
159- */
160- void remove (in nsIURI uri,
161- in ACString type);
162-
163109 /* *
164110 * Remove permission information for a given principal.
165111 * This is internally calling remove() with the host from the principal's URI.
@@ -198,18 +144,6 @@ interface nsIPermissionManager : nsISupports
198144 */
199145 void removeByTypeSince (in ACString type, in int64_t since);
200146
201- /* *
202- * Test whether a website has permission to perform the given action.
203- * This function will perform a pref lookup to permissions.default.<type>
204- * if the specific permission type is part of the whitelist for that functionality.
205- * @param uri the uri to be tested
206- * @param type a case-sensitive ASCII string, identifying the consumer
207- * @param return see add(), param permission. returns UNKNOWN_ACTION when
208- * there is no stored permission for this uri and / or type.
209- */
210- uint32_t testPermission (in nsIURI uri,
211- in ACString type);
212-
213147 /* *
214148 * Test whether the principal has the permission to perform a given action.
215149 * System principals will always have permissions granted.
@@ -229,19 +163,6 @@ interface nsIPermissionManager : nsISupports
229163 uint32_t testPermissionFromWindow (in mozIDOMWindow window,
230164 in ACString type);
231165
232- /* *
233- * Test whether a website has permission to perform the given action.
234- * This requires an exact hostname match, subdomains are not a match.
235- * This function will perform a pref lookup to permissions.default.<type>
236- * if the specific permission type is part of the whitelist for that functionality.
237- * @param uri the uri to be tested
238- * @param type a case-sensitive ASCII string, identifying the consumer
239- * @param return see add(), param permission. returns UNKNOWN_ACTION when
240- * there is no stored permission for this uri and / or type.
241- */
242- uint32_t testExactPermission (in nsIURI uri,
243- in ACString type);
244-
245166 /* *
246167 * See testExactPermission() above.
247168 * System principals will always have permissions granted.
@@ -266,23 +187,6 @@ interface nsIPermissionManager : nsISupports
266187 uint32_t testExactPermanentPermission (in nsIPrincipal principal,
267188 in ACString type);
268189
269- /* *
270- * Get the permission object associated with the given URI and action.
271- * @param uri The URI
272- * @param type A case-sensitive ASCII string identifying the consumer
273- * @param exactHost If true, only the specific host will be matched,
274- * @see testExactPermission. If false, subdomains will
275- * also be searched, @see testPermission.
276- * @returns The matching permission object, or null if no matching object
277- * was found. No matching object is equivalent to UNKNOWN_ACTION.
278- * @note Clients in general should prefer the test* methods unless they
279- * need to know the specific stored details.
280- * @note This method will always return null for the system principal.
281- */
282- nsIPermission getPermissionObjectForURI (in nsIURI uri,
283- in ACString type,
284- in boolean exactHost);
285-
286190 /* *
287191 * Get the permission object associated with the given principal and action.
288192 * @param principal The principal
0 commit comments