diff options
Diffstat (limited to 'offapi/com/sun/star/packages/zip')
-rw-r--r-- | offapi/com/sun/star/packages/zip/XZipFileAccess.idl | 58 | ||||
-rw-r--r-- | offapi/com/sun/star/packages/zip/XZipFileAccess2.idl | 45 | ||||
-rw-r--r-- | offapi/com/sun/star/packages/zip/ZipConstants.idl | 250 | ||||
-rw-r--r-- | offapi/com/sun/star/packages/zip/ZipEntry.idl | 95 | ||||
-rw-r--r-- | offapi/com/sun/star/packages/zip/ZipException.idl | 45 | ||||
-rw-r--r-- | offapi/com/sun/star/packages/zip/ZipFileAccess.idl | 48 | ||||
-rw-r--r-- | offapi/com/sun/star/packages/zip/ZipIOException.idl | 44 |
7 files changed, 585 insertions, 0 deletions
diff --git a/offapi/com/sun/star/packages/zip/XZipFileAccess.idl b/offapi/com/sun/star/packages/zip/XZipFileAccess.idl new file mode 100644 index 000000000..af3ac00ee --- /dev/null +++ b/offapi/com/sun/star/packages/zip/XZipFileAccess.idl @@ -0,0 +1,58 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_packages_zip_XZipFileAccess_idl__ +#define __com_sun_star_packages_zip_XZipFileAccess_idl__ + +#include <com/sun/star/container/NoSuchElementException.idl> +#include <com/sun/star/io/XInputStream.idl> +#include <com/sun/star/io/IOException.idl> +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/packages/zip/ZipException.idl> + +module com { module sun { module star { module packages { module zip { + + +/** allows to get reading access to non-encrypted entries inside zip file. + */ +interface XZipFileAccess: ::com::sun::star::uno::XInterface +{ + /** allows to get stream by specifying a pattern. + + <p> + The first stream with a name that fits to the pattern will be returned. + The pattern allows to use "*" wildcard symbol. If the name contains "*" + or "\" symbols itself they must guarded with backslash "\". + The slashes have no special meaning here so they can be replaced + by wildcards also. + </p> + */ + ::com::sun::star::io::XInputStream getStreamByPattern( [in] string aPattern ) + raises( ::com::sun::star::container::NoSuchElementException, + ::com::sun::star::io::IOException, + ::com::sun::star::packages::WrongPasswordException, + ::com::sun::star::packages::zip::ZipException ); + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/packages/zip/XZipFileAccess2.idl b/offapi/com/sun/star/packages/zip/XZipFileAccess2.idl new file mode 100644 index 000000000..796ecf4ce --- /dev/null +++ b/offapi/com/sun/star/packages/zip/XZipFileAccess2.idl @@ -0,0 +1,45 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_packages_zip_XZipFileAccess2_idl__ +#define __com_sun_star_packages_zip_XZipFileAccess2_idl__ + +#include <com/sun/star/packages/zip/XZipFileAccess.idl> +#include <com/sun/star/container/XNameAccess.idl> + + +module com { module sun { module star { module packages { module zip { + + +/** + Merged interface for ZipFileAccess service. + @since LibreOffice 4.1 + */ +interface XZipFileAccess2 +{ + interface XZipFileAccess; + interface com::sun::star::container::XNameAccess; + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/packages/zip/ZipConstants.idl b/offapi/com/sun/star/packages/zip/ZipConstants.idl new file mode 100644 index 000000000..553ed4707 --- /dev/null +++ b/offapi/com/sun/star/packages/zip/ZipConstants.idl @@ -0,0 +1,250 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_packages_zip_ZipConstants_idl__ +#define __com_sun_star_packages_zip_ZipConstants_idl__ + + + + +module com { module sun { module star { module packages { module zip { + + +/** defines the constants used by the ZIP interfaces. + */ +published constants ZipConstants +{ + /** Compression method for the deflate algorithm (the only one currently + supported). + */ + const short DEFLATED = 8; + + /** Compression level for no compression. + */ + const short NO_COMPRESSION = 0; + + /** Compression level for fastest compression + */ + const short BEST_SPEED = 1; + + /** Compression level for best compression + */ + const short BEST_COMPRESSION = 9; + + /** Default compression level. + */ + const short DEFAULT_COMPRESSION = -1; + + /** Compression strategy best used for data consisting mostly of small + values with a somewhat random distribution. Forces more Huffman + coding and less string matching. + */ + const short FILTERED = 1; + + /** Compression strategy for Huffman coding only. + */ + const short HUFFMAN_ONLY = 2; + + /** Default compression strategy + */ + const short DEFAULT_STRATEGY = 0; + + /** entry is uncompressed + */ + const short STORED = 0; + + /** entry is uncompressed + */ + const short DEF_MEM_LEVEL = 8; + + /** Header Signature: "PK\003\004" + */ + const long LOCSIG = 0x04034b50; + + /** Header Signature: "PK\007\008" + */ + const long EXTSIG = 0x08074b50; + + /** Header Signature: "PK\001\002" + */ + const long CENSIG = 0x02014b50; + + /** Header Signature: "PK\005\006" + */ + const long ENDSIG = 0x06054b50; + + /** Header Signature: "PK\007\008" + */ + const long SPANSIG = 0x08074b50; + + /** LOC header size in bytes (including signatures) + */ + const short LOCHDR = 30; + + /** EXT header size in bytes (including signatures) + */ + const short EXTHDR = 16; + + /** CEN header size in bytes (including signatures) + */ + const short CENHDR = 46; + + /** END header size in bytes (including signatures) + */ + const short ENDHDR = 22; + + /// LOC LOC LOC + /** LOC header field "version needed to extract" offset + */ + const short LOCVER = 4; + + /** LOC header field "general purpose bit flags" offset + */ + const short LOCFLG = 6; + + /** LOC header field "compression method" offset + */ + const short LOCHOW = 8; + + /** LOC header field "modification time" offset + */ + const short LOCTIM = 10; + + /** LOC header field "CRC of uncompressed data" offset + */ + const short LOCCRC = 14; + + /** LOC header field "compressed data size" offset + */ + const short LOCSIZ = 18; + + /** LOC header field "uncompressed data size" offset + */ + const short LOCLEN = 22; + + /** LOC header field "filename length" offset + */ + const short LOCNAM = 26; + + /** LOC header field "extra field length" offset + */ + const short LOCEXT = 28; + + /** EXT header field "CRC of uncompressed data" offsets + */ + const short EXTCRC = 4; + + /** EXT header field "compressed size" offsets + */ + const short EXTSIZ = 8; + + /** EXT header field "uncompressed size" offsets + */ + const short EXTLEN = 12; + + /** CEN header field "version made by" offset + */ + const short CENVEM = 4; + + /** CEN header field "version needed to extract" offset + */ + const short CENVER = 6; + + /** CEN header field "general purpose bit flags" offset + */ + const short CENFLG = 8; + + /** CEN header field "compression method" offset + */ + const short CENHOW = 10; + + /** CEN header field "modification time" offset + */ + const short CENTIM = 12; + + /** CEN header field "modification time" offset + */ + const short CENDAT = 14; + + /** CEN header field "CRC of uncompressed data" offset + */ + const short CENCRC = 16; + + /** CEN header field "compressed size" offset + */ + const short CENSIZ = 20; + + /** CEN header field "uncompressed size" offset + */ + const short CENLEN = 24; + + /** CEN header field "length of filename" offset + */ + const short CENNAM = 28; + + /** CEN header field "length of extra field" offset + */ + const short CENEXT = 30; + + /** CEN header field "file comment length" offset + */ + const short CENCOM = 32; + + /** CEN header field "disk number start" offset + */ + const short CENDSK = 34; + + /** CEN header field "internal file attributes" offset + */ + const short CENATT = 36; + + /** CEN header field "external file attributes" offset + */ + const short CENATX = 38; + + /** CEN header field "offset of local header" offset + */ + const short CENOFF = 42; + + /** END header field "number of entries on this disk" offset + */ + const short ENDSUB = 8; + + /** END header field "total number of entries" offset + */ + const short ENDTOT = 10; + + /** END header field "central directory size" offset + */ + const short ENDSIZ = 12; + + /** END header field "central directory offset" offset + */ + const short ENDOFF = 16; + + /** END header field "size of zip file comment" offset + */ + const short ENDCOM = 20; + +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/packages/zip/ZipEntry.idl b/offapi/com/sun/star/packages/zip/ZipEntry.idl new file mode 100644 index 000000000..fa3e41ba1 --- /dev/null +++ b/offapi/com/sun/star/packages/zip/ZipEntry.idl @@ -0,0 +1,95 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_packages_zip_ZipEntry_idl__ +#define __com_sun_star_packages_zip_ZipEntry_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/xml/sax/InputSource.idl> + +#include <com/sun/star/io/IOException.idl> + + + +module com { module sun { module star { module packages { module zip { + + +/** used to represent a ZIP file entry + + + <p>This interface is an IDL version of the Java interface + <em>java.util.zip.ZipFile</em> with some minor adaptations.</p> + */ +published struct ZipEntry +{ + /** version needed to extract + */ + short nVersion; + + /** bit flags + */ + short nFlag; + + /** compression method + */ + short nMethod; + + /** modification time + */ + long nTime; + + /** CRC-32 of entry data + */ + long nCrc; + + /** uncompressed size of entry data + */ + long nCompressedSize; + + /** uncompressed size of entry data + */ + long nSize; + + /** offset of LOC header + */ + long nOffset; + + /** The number of the disk this entry is saved on + */ + short nDiskNumber; + + /** the entry name + */ + string sName; + + /** optional extra field data for entry + */ + sequence<byte> extra; + + /** optional comment + */ + string sComment; +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/packages/zip/ZipException.idl b/offapi/com/sun/star/packages/zip/ZipException.idl new file mode 100644 index 000000000..1ff286d03 --- /dev/null +++ b/offapi/com/sun/star/packages/zip/ZipException.idl @@ -0,0 +1,45 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_packages_zip_ZipException_idl__ +#define __com_sun_star_packages_zip_ZipException_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/io/XInputStream.idl> + +#include <com/sun/star/io/IOException.idl> + + +module com { module sun { module star { module packages { module zip { + + +/** used to indicate that a ZIP exception has occurred. + <p>This interface is an IDL version of the Java interface + <em>java.util.zip.ZipException</em> with some minor adaptations.</p> + */ +published exception ZipException: com::sun::star::uno::Exception +{ +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/packages/zip/ZipFileAccess.idl b/offapi/com/sun/star/packages/zip/ZipFileAccess.idl new file mode 100644 index 000000000..6d54509b5 --- /dev/null +++ b/offapi/com/sun/star/packages/zip/ZipFileAccess.idl @@ -0,0 +1,48 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_packages_zip_ZipFileAccess_idl__ +#define __com_sun_star_packages_zip_ZipFileAccess_idl__ + +#include <com/sun/star/packages/zip/XZipFileAccess2.idl> +#include <com/sun/star/packages/zip/ZipException.idl> +#include <com/sun/star/ucb/ContentCreationException.idl> +#include <com/sun/star/ucb/InteractiveIOException.idl> + + + +module com { module sun { module star { module packages { module zip { + + +/** allows to get reading access to non-encrypted entries inside zip file. + */ +service ZipFileAccess : XZipFileAccess2 +{ + createWithURL([in] string URL) + raises ( com::sun::star::io::IOException, + com::sun::star::ucb::ContentCreationException, + com::sun::star::ucb::InteractiveIOException, + com::sun::star::packages::zip::ZipException ); +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/packages/zip/ZipIOException.idl b/offapi/com/sun/star/packages/zip/ZipIOException.idl new file mode 100644 index 000000000..ff0cb964e --- /dev/null +++ b/offapi/com/sun/star/packages/zip/ZipIOException.idl @@ -0,0 +1,44 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_packages_zip_ZipIOException_idl__ +#define __com_sun_star_packages_zip_ZipIOException_idl__ + +#include <com/sun/star/io/IOException.idl> + + +module com { module sun { module star { module packages { module zip { + + +/** used to indicate that a ZIP exception has occurred. + Usually can be thrown from XInputStream interface implementations. + <p>This interface is an IDL version of the Java interface + <em>java.util.zip.ZipException</em> with some minor adaptations.</p> + + @since OOo 1.1.2 + */ +published exception ZipIOException: com::sun::star::io::IOException +{ +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |