Files
tubestation/dom/interfaces/offline/nsIDOMOfflineResourceList.idl
Nika Layzell b71cb27d1e Bug 1444745 - Part 2: Add the xptshim and xptshimfile attributes to xpidl, r=mccr8
In the previous patch, one of the files which was deleted is ShimInterfaceInfo.
This is an implementor of nsIInterfaceInfo which exists for legacy reasons, in
order to allow Components.interfaces.nsIDOM* to have the correct constants and
IIDs associated with them.

As that file was deleted, this information now has to be stored in the typelib.
To do this, the information is moved to the xptshim and xptshimfile attributes
on the relevant xpcom interfaces.

xptshim(...) means that this xpcom interface is a shim for the WebIDL interface
with the specified name.

xptshimfile(...) is for use when the webidl interface is declared in another
interface's .webidl file, (in our case, MessageManager.webidl). It contains the
name of the parent binding, such that we can #include the correct file in our
generated code.

This patch does not add the code which uses these changes, only the parsing
logic.
2018-04-17 19:20:51 -04:00

92 lines
2.5 KiB
Plaintext

/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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/. */
#include "domstubs.idl"
[shim(OfflineResourceList), uuid(6044702d-e4a9-420c-b711-558b7d6a3b9f)]
interface nsIDOMOfflineResourceList : nsISupports
{
/**
* Get the list of dynamically-managed entries.
*/
readonly attribute nsISupports mozItems;
/**
* Check that an entry exists in the list of dynamically-managed entries.
*
* @param uri
* The resource to check.
*/
boolean mozHasItem(in DOMString uri);
/**
* Get the number of dynamically-managed entries.
* @status DEPRECATED
* Clients should use the "items" attribute.
*/
readonly attribute unsigned long mozLength;
/**
* Get the URI of a dynamically-managed entry.
* @status DEPRECATED
* Clients should use the "items" attribute.
*/
DOMString mozItem(in unsigned long index);
/**
* Add an item to the list of dynamically-managed entries. The resource
* will be fetched into the application cache.
*
* @param uri
* The resource to add.
*/
void mozAdd(in DOMString uri);
/**
* Remove an item from the list of dynamically-managed entries. If this
* was the last reference to a URI in the application cache, the cache
* entry will be removed.
*
* @param uri
* The resource to remove.
*/
void mozRemove(in DOMString uri);
/**
* State of the application cache this object is associated with.
*/
/* This object is not associated with an application cache. */
const unsigned short UNCACHED = 0;
/* The application cache is not being updated. */
const unsigned short IDLE = 1;
/* The manifest is being fetched and checked for updates */
const unsigned short CHECKING = 2;
/* Resources are being downloaded to be added to the cache */
const unsigned short DOWNLOADING = 3;
/* There is a new version of the application cache available */
const unsigned short UPDATEREADY = 4;
/* The application cache group is now obsolete. */
const unsigned short OBSOLETE = 5;
readonly attribute unsigned short status;
/**
* Begin the application update process on the associated application cache.
*/
void update();
/**
* Swap in the newest version of the application cache, or disassociate
* from the cache if the cache group is obsolete.
*/
void swapCache();
};