Back to index

lightning-sunbird  0.9+nobinonly
nsIZipReader.idl
Go to the documentation of this file.
00001 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
00002  *
00003  * ***** BEGIN LICENSE BLOCK *****
00004  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00005  *
00006  * The contents of this file are subject to the Mozilla Public License Version
00007  * 1.1 (the "License"); you may not use this file except in compliance with
00008  * the License. You may obtain a copy of the License at
00009  * http://www.mozilla.org/MPL/
00010  *
00011  * Software distributed under the License is distributed on an "AS IS" basis,
00012  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00013  * for the specific language governing rights and limitations under the
00014  * License.
00015  *
00016  * The Original Code is Mozilla Communicator client code, released
00017  * March 31, 1998.
00018  *
00019  * The Initial Developer of the Original Code is
00020  * Netscape Communications Corporation.
00021  * Portions created by the Initial Developer are Copyright (C) 1998
00022  * the Initial Developer. All Rights Reserved.
00023  *
00024  * Contributor(s):
00025  *   Daniel Veditz <dveditz@netscape.com>
00026  *   Don Bragg <dbragg@netscape.com>
00027  *   Samir Gehani <sgehani@netscape.com>
00028  *   Mitch Stoltz <mstoltz@netscape.com>
00029  *
00030  * Alternatively, the contents of this file may be used under the terms of
00031  * either the GNU General Public License Version 2 or later (the "GPL"), or
00032  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00033  * in which case the provisions of the GPL or the LGPL are applicable instead
00034  * of those above. If you wish to allow use of your version of this file only
00035  * under the terms of either the GPL or the LGPL, and not to allow others to
00036  * use your version of this file under the terms of the MPL, indicate your
00037  * decision by deleting the provisions above and replace them with the notice
00038  * and other provisions required by the GPL or the LGPL. If you do not delete
00039  * the provisions above, a recipient may use your version of this file under
00040  * the terms of any one of the MPL, the GPL or the LGPL.
00041  *
00042  * ***** END LICENSE BLOCK ***** */
00043 
00044 #include "nsISupports.idl"
00045 
00046 interface nsISimpleEnumerator;
00047 interface nsIInputStream;
00048 interface nsIFile;
00049 
00050 [scriptable, uuid(6ca5e43e-9632-11d3-8cd9-0060b0fc14a3)]
00051 interface nsIZipEntry : nsISupports
00052 {
00053     readonly attribute string           name;
00054     readonly attribute unsigned short   compression;
00055     readonly attribute unsigned long    size;
00056     readonly attribute unsigned long    realSize;
00057     readonly attribute unsigned long    CRC32;
00058 };
00059 
00060 [scriptable, uuid(6ff6a966-9632-11d3-8cd9-0060b0fc14a3)]
00061 interface nsIZipReader : nsISupports
00062 {
00066     void init(in nsIFile zipFile);
00067 
00068     readonly attribute nsIFile file;
00069 
00073     void open();
00074 
00079     void close();
00080 
00087     void test(in string aEntryName);
00088 
00092     void extract(in string zipEntry, in nsIFile outFile);
00093 
00097     nsIZipEntry getEntry(in string zipEntry);
00098 
00102     nsISimpleEnumerator/*<nsIZipEntry>*/ findEntries(in string aPattern);
00103 
00107     nsIInputStream getInputStream(in string zipEntry);
00108 };
00109 
00111 // nsIZipReaderCache
00112 
00113 [scriptable, uuid(52c45d86-0cc3-11d4-986e-00c04fa0cf4a)]
00114 interface nsIZipReaderCache : nsISupports
00115 {
00123     void init(in unsigned long cacheSize);
00124 
00128     nsIZipReader getZip(in nsIFile zipFile);
00129 };
00130 
00132 
00133 %{C++
00134 
00135 #define NS_ZIPREADER_CID                             \
00136 { /* 7526a738-9632-11d3-8cd9-0060b0fc14a3 */         \
00137     0x7526a738,                                      \
00138     0x9632,                                          \
00139     0x11d3,                                          \
00140     {0x8c, 0xd9, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3} \
00141 }
00142 
00143 #define NS_ZIPREADERCACHE_CID                        \
00144 { /* 1b117e16-0cad-11d4-986e-00c04fa0cf4a */         \
00145     0x1b117e16,                                      \
00146     0x0cad,                                          \
00147     0x11d4,                                          \
00148     {0x98, 0x6e, 0x00, 0xc0, 0x4f, 0xa0, 0xcf, 0x4a} \
00149 }
00150 
00151 %}
00152