2010-09-10 12:12:11 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=2 et sw=2 tw=80: */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2010-09-10 12:12:11 -07:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
|
|
|
interface nsIURI;
|
|
|
|
|
2012-10-23 09:31:19 -07:00
|
|
|
[scriptable, function, uuid(38f15cc7-2df0-4a90-8b7f-1606b2243522)]
|
2010-10-19 10:58:33 -07:00
|
|
|
interface nsIIndexedDatabaseUsageCallback : nsISupports
|
|
|
|
{
|
|
|
|
void onUsageResult(in nsIURI aURI,
|
2011-12-15 23:34:24 -08:00
|
|
|
in unsigned long long aUsage,
|
2012-10-23 09:31:19 -07:00
|
|
|
in unsigned long long aFileUsage,
|
|
|
|
in unsigned long aAppId,
|
|
|
|
in boolean aInMozBrowserOnly);
|
2010-10-19 10:58:33 -07:00
|
|
|
};
|
|
|
|
|
2012-10-23 09:31:19 -07:00
|
|
|
[scriptable, builtinclass, uuid(e5168115-baff-4559-887e-7c0405cc9e63)]
|
2010-09-10 12:12:11 -07:00
|
|
|
interface nsIIndexedDatabaseManager : nsISupports
|
|
|
|
{
|
2010-10-19 10:58:33 -07:00
|
|
|
/**
|
|
|
|
* Schedules an asynchronous callback that will return the total amount of
|
|
|
|
* disk space being used by databases for the given origin.
|
|
|
|
*
|
|
|
|
* @param aURI
|
|
|
|
* The URI whose usage is being queried.
|
|
|
|
* @param aCallback
|
|
|
|
* The callback that will be called when the usage is available.
|
|
|
|
*/
|
2012-10-23 09:31:19 -07:00
|
|
|
[optional_argc]
|
2010-10-19 10:58:33 -07:00
|
|
|
void getUsageForURI(in nsIURI aURI,
|
2012-10-23 09:31:19 -07:00
|
|
|
in nsIIndexedDatabaseUsageCallback aCallback,
|
|
|
|
[optional] in unsigned long aAppId,
|
|
|
|
[optional] in boolean aInMozBrowserOnly);
|
2010-10-19 10:58:33 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Cancels an asynchronous usage check initiated by a previous call to
|
|
|
|
* getUsageForURI().
|
|
|
|
*
|
|
|
|
* @param aURI
|
|
|
|
* The URI whose usage is being queried.
|
|
|
|
* @param aCallback
|
|
|
|
* The callback that will be called when the usage is available.
|
|
|
|
*/
|
2012-10-23 09:31:19 -07:00
|
|
|
[optional_argc]
|
2010-10-19 10:58:33 -07:00
|
|
|
void cancelGetUsageForURI(in nsIURI aURI,
|
2012-10-23 09:31:19 -07:00
|
|
|
in nsIIndexedDatabaseUsageCallback aCallback,
|
|
|
|
[optional] in unsigned long aAppId,
|
|
|
|
[optional] in boolean aInMozBrowserOnly);
|
2010-09-10 12:12:11 -07:00
|
|
|
|
2010-10-19 10:58:33 -07:00
|
|
|
/**
|
|
|
|
* Removes all databases stored for the given URI. The files may not be
|
|
|
|
* deleted immediately depending on prohibitive concurrent operations.
|
|
|
|
*
|
|
|
|
* @param aURI
|
|
|
|
* The URI whose databases are to be cleared.
|
|
|
|
*/
|
2012-10-23 09:31:19 -07:00
|
|
|
[optional_argc]
|
|
|
|
void clearDatabasesForURI(in nsIURI aURI,
|
|
|
|
[optional] in unsigned long aAppId,
|
|
|
|
[optional] in boolean aInMozBrowserOnly);
|
2012-01-03 07:27:39 -08:00
|
|
|
|
|
|
|
/**
|
2012-06-29 09:48:35 -07:00
|
|
|
* Defines indexedDB and IDBKeyrange with its static functions on
|
2012-01-03 07:27:39 -08:00
|
|
|
* aObject and initializes DOM exception providers if needed.
|
|
|
|
*
|
|
|
|
* @param aObject
|
2012-06-29 09:48:35 -07:00
|
|
|
* The object, indexedDB and IDBKeyrange should be defined on.
|
2012-01-03 07:27:39 -08:00
|
|
|
*/
|
|
|
|
[implicit_jscontext]
|
|
|
|
void initWindowless(in jsval aObject);
|
2010-09-10 12:12:11 -07:00
|
|
|
};
|