summaryrefslogtreecommitdiffstats
path: root/offapi/com/sun/star/packages
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
commited5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch)
tree7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /offapi/com/sun/star/packages
parentInitial commit. (diff)
downloadlibreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz
libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'offapi/com/sun/star/packages')
-rw-r--r--offapi/com/sun/star/packages/EncryptionNotAllowedException.idl39
-rw-r--r--offapi/com/sun/star/packages/NoEncryptionException.idl39
-rw-r--r--offapi/com/sun/star/packages/NoRawFormatException.idl40
-rw-r--r--offapi/com/sun/star/packages/Package.idl107
-rw-r--r--offapi/com/sun/star/packages/PackageEncryption.idl25
-rw-r--r--offapi/com/sun/star/packages/PackageFolder.idl86
-rw-r--r--offapi/com/sun/star/packages/PackageFolderEnumeration.idl44
-rw-r--r--offapi/com/sun/star/packages/PackageStream.idl76
-rw-r--r--offapi/com/sun/star/packages/WrongPasswordException.idl39
-rw-r--r--offapi/com/sun/star/packages/XDataSinkEncrSupport.idl142
-rw-r--r--offapi/com/sun/star/packages/XPackageEncryption.idl134
-rw-r--r--offapi/com/sun/star/packages/manifest/ManifestReader.idl33
-rw-r--r--offapi/com/sun/star/packages/manifest/ManifestWriter.idl33
-rw-r--r--offapi/com/sun/star/packages/manifest/XManifestReader.idl42
-rw-r--r--offapi/com/sun/star/packages/manifest/XManifestWriter.idl44
-rw-r--r--offapi/com/sun/star/packages/zip/XZipFileAccess.idl58
-rw-r--r--offapi/com/sun/star/packages/zip/XZipFileAccess2.idl45
-rw-r--r--offapi/com/sun/star/packages/zip/ZipConstants.idl250
-rw-r--r--offapi/com/sun/star/packages/zip/ZipEntry.idl95
-rw-r--r--offapi/com/sun/star/packages/zip/ZipException.idl45
-rw-r--r--offapi/com/sun/star/packages/zip/ZipFileAccess.idl48
-rw-r--r--offapi/com/sun/star/packages/zip/ZipIOException.idl44
22 files changed, 1508 insertions, 0 deletions
diff --git a/offapi/com/sun/star/packages/EncryptionNotAllowedException.idl b/offapi/com/sun/star/packages/EncryptionNotAllowedException.idl
new file mode 100644
index 000000000..e42e53e42
--- /dev/null
+++ b/offapi/com/sun/star/packages/EncryptionNotAllowedException.idl
@@ -0,0 +1,39 @@
+/* -*- 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_EncryptionNotAllowedException_idl__
+#define __com_sun_star_packages_EncryptionNotAllowedException_idl__
+
+#include <com/sun/star/uno/Exception.idl>
+
+
+
+ module com { module sun { module star { module packages {
+
+/** This exception can be thrown in case object is encrypted when it is not allowed
+ */
+exception EncryptionNotAllowedException: com::sun::star::uno::Exception
+{
+};
+
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/packages/NoEncryptionException.idl b/offapi/com/sun/star/packages/NoEncryptionException.idl
new file mode 100644
index 000000000..c98ca62b7
--- /dev/null
+++ b/offapi/com/sun/star/packages/NoEncryptionException.idl
@@ -0,0 +1,39 @@
+/* -*- 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_NoEncryptionException_idl__
+#define __com_sun_star_packages_NoEncryptionException_idl__
+
+#include <com/sun/star/uno/Exception.idl>
+
+
+
+ module com { module sun { module star { module packages {
+
+/** This exception can be thrown in case object is not encrypted one as expected.
+ */
+published exception NoEncryptionException: com::sun::star::uno::Exception
+{
+};
+
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/packages/NoRawFormatException.idl b/offapi/com/sun/star/packages/NoRawFormatException.idl
new file mode 100644
index 000000000..2bd981f36
--- /dev/null
+++ b/offapi/com/sun/star/packages/NoRawFormatException.idl
@@ -0,0 +1,40 @@
+/* -*- 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_NoRawFormatException_idl__
+#define __com_sun_star_packages_NoRawFormatException_idl__
+
+#include <com/sun/star/io/IOException.idl>
+
+
+
+ module com { module sun { module star { module packages {
+
+/** This exception can be thrown in case provided stream is not a raw stream
+ representing encrypted package stream.
+ */
+published exception NoRawFormatException: com::sun::star::io::IOException
+{
+};
+
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/packages/Package.idl b/offapi/com/sun/star/packages/Package.idl
new file mode 100644
index 000000000..fa44f8115
--- /dev/null
+++ b/offapi/com/sun/star/packages/Package.idl
@@ -0,0 +1,107 @@
+/* -*- 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_Package_idl__
+#define __com_sun_star_packages_Package_idl__
+
+#include <com/sun/star/lang/XInitialization.idl>
+#include <com/sun/star/container/XHierarchicalNameAccess.idl>
+#include <com/sun/star/lang/XSingleServiceFactory.idl>
+#include <com/sun/star/util/XChangesBatch.idl>
+
+
+
+module com { module sun { module star { module packages {
+
+/** The Package is a service that provides access to a set of
+ files and folders contained within a Package. One instance of the
+ Package service exists for each Package file to be manipulated.
+
+ Each instance is created with an argument which specifies the URL of
+ the Package file to which the user requires access. If the instance is
+ created without arguments, it must be initialized with the
+ com::sun::star::lang::XInitialization service methods
+ before it is a valid instance of the service.
+*/
+published service Package
+{
+ /**
+ A Package can be initialized with one of the following:
+
+ 1. A file URL referring to a package.
+ 2. An XInputStream referring to a package (it must also
+ support an XSeekable interface).
+ 3. An XStream referring to a package. The XInputStream must support
+ an XSeekable interface, and the XOutputStream must support an
+ XTruncate interface.
+
+ It will throw a css::uno::Exception if initialized with bad data or
+ if the package has an invalid format (for example, a corrupt central
+ directory record if the file is a ZIP file).
+ */
+ interface com::sun::star::lang::XInitialization;
+ /**
+ This interface is used to get access to any entry within the package
+ For example:
+ getByHierarchicalName ("folder/subfolder/file1.txt");
+ This will return a PackageStream which refers to the specified stream.
+ This is also used to get access to a particular folder within the
+ Package. For example:
+ getByHierarchicalName ("folder/subfolder/");
+ This will return a PackageFolder which describes the contents of the specified
+ folder.
+
+ Calls to methods of XHierarchicalNameAccess must NOT have a leading slash.
+ */
+ interface com::sun::star::container::XHierarchicalNameAccess;
+ /**
+ This interface is used to create new PackageStream or PackageFolder
+ implementation objects for addition to the Package.
+
+ createInstance - creates a new stream implementation object (when first
+ created, the new object is not part of the Package). It must be added
+ to the PackageFolder in which it will reside using the methods in the
+ PackageFolder service.
+
+ createInstanceWithArguments - This accepts one boolean value as an
+ argument. If it set to true, a PackageFolder implementation is created,
+ if it is set to false, a PackageStream implementation is created.
+
+ Creating and inserting a new stream would be done as follows:
+
+ 1. xNewStream = package->createInstanceWithArguments( false );
+ 2. xDataStream = new MyStreamImpl(). (wherever the data comes from)
+ 3. xNewStream->setInputStream( xDataStream );
+ 4. parentFolder->insertByName( "image.png", xNewStream );
+
+ Replacing an existing stream would be very similar, except that the
+ call ->insertByName would be replaced by ->replaceByName.
+ */
+ interface com::sun::star::lang::XSingleServiceFactory;
+ /**
+ This interface is used to commit any changes to the Package. A new
+ Package file will be written with any new or changed streams/folders and
+ omitting any PackageStream or PackageFolder that has been removed.
+ */
+ interface com::sun::star::util::XChangesBatch;
+};
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/packages/PackageEncryption.idl b/offapi/com/sun/star/packages/PackageEncryption.idl
new file mode 100644
index 000000000..a2ab55ed3
--- /dev/null
+++ b/offapi/com/sun/star/packages/PackageEncryption.idl
@@ -0,0 +1,25 @@
+/* -*- 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/.
+ */
+#ifndef __com_sun_star_packages_PackageEncryption_idl__
+#define __com_sun_star_packages_PackageEncryption_idl__
+
+#include <com/sun/star/packages/XPackageEncryption.idl>
+
+
+module com { module sun { module star { module packages {
+
+
+service PackageEncryption : XPackageEncryption;
+
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/packages/PackageFolder.idl b/offapi/com/sun/star/packages/PackageFolder.idl
new file mode 100644
index 000000000..8b652d3bd
--- /dev/null
+++ b/offapi/com/sun/star/packages/PackageFolder.idl
@@ -0,0 +1,86 @@
+/* -*- 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_PackageFolder_idl__
+#define __com_sun_star_packages_PackageFolder_idl__
+
+#include <com/sun/star/container/XNamed.idl>
+#include <com/sun/star/container/XChild.idl>
+#include <com/sun/star/container/XNameContainer.idl>
+#include <com/sun/star/beans/XPropertySet.idl>
+#include <com/sun/star/container/XEnumerationAccess.idl>
+
+module com { module sun { module star { module packages {
+
+/**
+ The PackageFolder service represents a single folder or directory within
+ a Package. Instances of this service can only be constructed by an
+ implementation of the Package service and not via the service manager.
+*/
+published service PackageFolder
+{
+ /**
+ This interface is used to get or set the name of the folder.
+ */
+ interface com::sun::star::container::XNamed;
+ /**
+ The getParent method of XChild will return the PackageFolder that
+ contains this PackageFolder or nothing if this PackageFolder is
+ the root PackageFolder.
+
+ setParent will move the PackageFolder.
+ */
+ interface com::sun::star::container::XChild;
+ /**
+ This interface describes all of the PackageFolders and PackageStreams
+ which are contained within this instance of the PackageFolder service.
+
+ XElementAccess::getElementType returns service PackageStream
+ XNameAccess::getByName returns either a PackageFolder or a PackageStream
+ as a css::uno::Any
+ XNameAccess::getElementNames returns a uno::Sequence of strings containing
+ the names of all children stored in the PackageFolder
+ */
+ interface com::sun::star::container::XNameContainer;
+ /**
+ This interface will return an implementation of service
+ PackageFolderEnumeration, which represents an iterator over the children
+ of the PackageFolder, or the PackageStreams and PackageFolders contained
+ within this instance of the PackageFolder service.
+
+ This provides a "snapshot" of the contents of the
+ PackageFolder at the time of construction. It is the responsibility of the
+ caller to ensure that any given member of the enumeration refers to a valid
+ PackageStream or PackageFolder.
+
+ */
+ interface com::sun::star::container::XEnumerationAccess;
+
+ /**
+ This interface provides access to the properties of the package entry.
+ Currently, this only supports one entry which is a string called
+ MediaType. This contains the MIME type of the stream (e.g. "text/html").
+ For PackageFolders, this is always an empty string.
+ */
+ interface com::sun::star::beans::XPropertySet;
+};
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/packages/PackageFolderEnumeration.idl b/offapi/com/sun/star/packages/PackageFolderEnumeration.idl
new file mode 100644
index 000000000..980de887a
--- /dev/null
+++ b/offapi/com/sun/star/packages/PackageFolderEnumeration.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_PackageFolderEnumeration_idl__
+#define __com_sun_star_packages_PackageFolderEnumeration_idl__
+
+
+#include <com/sun/star/container/XEnumeration.idl>
+
+
+module com { module sun { module star { module packages {
+
+
+/**
+This service provides an iterator over the contents of a given instance
+of a PackageFolder. This provides a "snapshot" of the contents of the
+PackageFolder at the time of construction. It is the responsibility of the
+caller to ensure that any given member of the enumeration refers to a valid
+PackageStream or PackageFolder.
+*/
+published service PackageFolderEnumeration
+{
+ interface com::sun::star::container::XEnumeration;
+};
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/packages/PackageStream.idl b/offapi/com/sun/star/packages/PackageStream.idl
new file mode 100644
index 000000000..432a527f6
--- /dev/null
+++ b/offapi/com/sun/star/packages/PackageStream.idl
@@ -0,0 +1,76 @@
+/* -*- 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_PackageStream_idl__
+#define __com_sun_star_packages_PackageStream_idl__
+
+
+#include <com/sun/star/container/XNamed.idl>
+#include <com/sun/star/container/XChild.idl>
+#include <com/sun/star/beans/XPropertySet.idl>
+#include <com/sun/star/io/XActiveDataSink.idl>
+
+
+module com { module sun { module star { module packages {
+
+
+/**This service represents a stream contained within a Package. Instances of
+this class can only be constructed by the implementation of the Package
+service.
+*/
+published service PackageStream
+{
+ /**
+ This sets or gets the name of the Stream as contained within its parent
+ PackageFolder.
+ */
+ interface com::sun::star::container::XNamed;
+ /**
+ getParent returns the PackageFolder that the PackageStream is in. This
+ may be the root PackageFolder. setParent moves a PackageStream.
+ */
+ interface com::sun::star::container::XChild;
+ /**
+ getInputStream provides read access to the contents of this PackageStream.
+ If this PackageStream was a member of the Package when it was instantiated,
+ the XInputStream returned is a Reference to the stream of the whole Package,
+ with limits set on where it can seek to and read from. If the PackageStream
+ is a new addition to the package, then getInputStream returns a Reference
+ to the XInputStream which was specified with setInputStream.
+
+ setInputStream - provides a stream to the data contained in the PackageStream
+ this must be specified for new PackageStreams added to the Package. If this
+ is called more than once, it will replace the existing stream.
+ */
+ interface com::sun::star::io::XActiveDataSink;
+ /**
+ This interface provides access to the properties of the package entry.
+ Currently, this supports three entries:
+
+ 1. Size, describing the uncompressed size of PackageStream.
+ 2. MediaType, a string describing the MIME type of the stream.
+ 3. Compress, a boolean flag to specify whether or not to compress
+ this PackageStream.
+ */
+ interface com::sun::star::beans::XPropertySet;
+};
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/packages/WrongPasswordException.idl b/offapi/com/sun/star/packages/WrongPasswordException.idl
new file mode 100644
index 000000000..e0b16d5da
--- /dev/null
+++ b/offapi/com/sun/star/packages/WrongPasswordException.idl
@@ -0,0 +1,39 @@
+/* -*- 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_WrongPasswordException_idl__
+#define __com_sun_star_packages_WrongPasswordException_idl__
+
+#include <com/sun/star/uno/Exception.idl>
+
+
+
+ module com { module sun { module star { module packages {
+
+/** This exception can be thrown in case wrong password was provided.
+ */
+published exception WrongPasswordException: com::sun::star::uno::Exception
+{
+};
+
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/packages/XDataSinkEncrSupport.idl b/offapi/com/sun/star/packages/XDataSinkEncrSupport.idl
new file mode 100644
index 000000000..05c0cbb65
--- /dev/null
+++ b/offapi/com/sun/star/packages/XDataSinkEncrSupport.idl
@@ -0,0 +1,142 @@
+/* -*- 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_XDataSinkEncrSupport_idl__
+#define __com_sun_star_packages_XDataSinkEncrSupport_idl__
+
+#include <com/sun/star/uno/XInterface.idl>
+
+#include <com/sun/star/io/XInputStream.idl>
+
+#include <com/sun/star/io/IOException.idl>
+#include <com/sun/star/packages/WrongPasswordException.idl>
+#include <com/sun/star/packages/NoEncryptionException.idl>
+
+#include <com/sun/star/packages/EncryptionNotAllowedException.idl>
+#include <com/sun/star/packages/NoRawFormatException.idl>
+
+
+
+module com { module sun { module star { module packages {
+
+
+/** Allows to get access to the stream of a PackageStream.
+ */
+interface XDataSinkEncrSupport: com::sun::star::uno::XInterface
+{
+ /** Allows to get access to the data of the PackageStream.
+ <p>
+ In case stream is encrypted one and the key for the stream is not set,
+ an exception must be thrown.
+ </p>
+
+ @returns
+ the stream
+
+ @throws ::com::sun::star::packages::WrongPasswordException
+ no key or a wrong one is set
+
+ @throws ::com::sun::star::io::IOException
+ in case of io problems during retrieving
+ */
+ ::com::sun::star::io::XInputStream getDataStream()
+ raises( ::com::sun::star::packages::WrongPasswordException,
+ ::com::sun::star::packages::zip::ZipException,
+ ::com::sun::star::io::IOException );
+
+
+ /** Allows to get access to the data of the PackageStream as to raw stream.
+ In case stream is not encrypted an exception will be thrown.
+ <p>
+ The difference of raw stream is that it contains header for encrypted data,
+ so an encrypted stream can be copied from one PackageStream to
+ another one without decryption.
+ </p>
+
+ @returns
+ the raw representation of stream
+
+ @throws ::com::sun::star::packages::NoEncryptionException
+ the PackageStream object is not encrypted
+
+ @throws ::com::sun::star::io::IOException
+ in case of io problems during retrieving
+ */
+ ::com::sun::star::io::XInputStream getRawStream()
+ raises( ::com::sun::star::packages::NoEncryptionException,
+ ::com::sun::star::io::IOException );
+
+ /** Allows to set a data stream for the PackageStream.
+ <p>
+ In case PackageStream is marked as encrypted the data stream will be encrypted on storing.
+ </p>
+
+ @param aStream
+ new data stream
+
+ @throws ::com::sun::star::io::IOException
+ in case of io problems
+ */
+ void setDataStream( [in] ::com::sun::star::io::XInputStream aStream )
+ raises( ::com::sun::star::io::IOException );
+
+ /** Allows to set raw stream for the PackageStream.
+ The PackageStream object can not be marked as encrypted one,
+ an exception will be thrown in such case.
+
+ @param aStream
+ the new raw representation of stream
+
+ @throws ::com::sun::star::packages::EncryptionNotAllowedException
+ the PackageStream object is marked as encrypted
+
+ @throws ::com::sun::star::packages::NoRawFormatException
+ the stream is not a correct raw representation of encrypted package stream
+
+ @throws ::com::sun::star::io::IOException
+ in case of io problems during retrieving
+ */
+ void setRawStream( [in] ::com::sun::star::io::XInputStream aStream )
+ raises( ::com::sun::star::packages::EncryptionNotAllowedException,
+ ::com::sun::star::packages::NoRawFormatException,
+ ::com::sun::star::io::IOException );
+
+ /** Allows to get access to the raw data of the stream as it is stored in
+ the package.
+
+ @returns
+ the plain raw stream as it is stored in the package
+
+ @throws ::com::sun::star::packages::NoEncryptionException
+ the PackageStream object is not encrypted
+
+ @throws ::com::sun::star::io::IOException
+ in case of io problems during retrieving
+ */
+ ::com::sun::star::io::XInputStream getPlainRawStream()
+ raises( ::com::sun::star::io::IOException,
+ ::com::sun::star::packages::NoEncryptionException );
+
+};
+
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/packages/XPackageEncryption.idl b/offapi/com/sun/star/packages/XPackageEncryption.idl
new file mode 100644
index 000000000..5ccec598a
--- /dev/null
+++ b/offapi/com/sun/star/packages/XPackageEncryption.idl
@@ -0,0 +1,134 @@
+/* -*- 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_XPackageEncryption_idl__
+#define __com_sun_star_packages_XPackageEncryption_idl__
+
+#include <com/sun/star/uno/XInterface.idl>
+
+#include <com/sun/star/io/XInputStream.idl>
+#include <com/sun/star/io/XOutputStream.idl>
+
+
+module com { module sun { module star { module packages {
+
+
+/** Allows to transparently plug-in crypto for PackageStreams.
+
+ @since LibreOffice 7.0
+ */
+interface XPackageEncryption: com::sun::star::uno::XInterface
+{
+ /** Read package crypto information
+
+ @param rStreams
+ Substreams of the package (in the case of MS encryption, those
+ are OLE substorage streams).
+
+ @returns
+ True if crypto info could be retrieved, and engine initialised. False otherwise.
+ */
+ boolean readEncryptionInfo([in] sequence < com::sun::star::beans::NamedValue > rStreams);
+
+ /** Set or refresh encryption key
+
+ @param rPassword
+ Optional password to use for generating encryption key.
+
+ @returns
+ True if key setup was successful. False otherwise.
+ */
+ boolean generateEncryptionKey([in] string rPassword);
+
+ /** Decrypt document content
+
+ After crypto setup via readEncryptionInfo(), pipe package bits through
+ encryption engine.
+
+ @param rxInputStream
+ Input data (encrypted)
+
+ @param rxOutputStream
+ Output data (decrypted)
+
+ @returns
+ True if decryption finished without error. False otherwise.
+ */
+ boolean decrypt([in] com::sun::star::io::XInputStream rxInputStream,
+ [out] com::sun::star::io::XOutputStream rxOutputStream);
+
+ /** Create key-value list of encryption meta data
+
+ After generateEncryptionKey() succeeded in setting up crypto,
+ use this method to create requisite meta data. Depending on
+ underlying crypto, this can be a salt, init vector, or other
+ algorithm-specific information that needs to be stored
+ alongside an encrypted document
+
+ @param rPassword
+ Same password as provided to generateEncryptionKey
+
+ @returns
+ Sequence of opaque key-value pairs needed for decrypting this
+ setup. Can be passed back into other instances of this service
+ via setupEncryption()
+ */
+ sequence<com::sun::star::beans::NamedValue> createEncryptionData([in] string rPassword);
+
+ /** Set key-value list of encryption meta data
+
+ Use this method to setup requisite encryption meta
+ data. Depending on the underlying crypto, this can be a salt, init
+ vector, or other algorithm-specific information that needs to
+ be stored alongside an encrypted document
+
+ @returns
+ True if encryption algo setup finished without error. False otherwise.
+ */
+ boolean setupEncryption([in] sequence<com::sun::star::beans::NamedValue> rMediaEncData);
+
+ /** Encrypt given stream
+
+ After setting up crypto via setupEncryption(), use this method to encrypt content.
+
+ @returns
+ Sequence of named output streams, specific to the crypto
+ provider. The names of sequence entry denote the substream
+ identifiers, if any. In the case of MS OLE storage, it's the
+ substorage names.
+ */
+ sequence<com::sun::star::beans::NamedValue> encrypt([in] com::sun::star::io::XInputStream rxInputStream);
+
+ /** Check if decryption meta data is valid
+
+ Some implementations might for example check HMAC values
+ here. Call this before trusting encrypted data.
+
+ @returns
+ True if decryption algo setup finished without error and
+ consistency checks have passed. False otherwise.
+ */
+ boolean checkDataIntegrity();
+};
+
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/packages/manifest/ManifestReader.idl b/offapi/com/sun/star/packages/manifest/ManifestReader.idl
new file mode 100644
index 000000000..262234947
--- /dev/null
+++ b/offapi/com/sun/star/packages/manifest/ManifestReader.idl
@@ -0,0 +1,33 @@
+/* -*- 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_manifest_ManifestReader_idl__
+#define __com_sun_star_packages_manifest_ManifestReader_idl__
+
+#include <com/sun/star/packages/manifest/XManifestReader.idl>
+
+module com { module sun { module star { module packages { module manifest {
+
+published service ManifestReader : XManifestReader;
+
+
+}; }; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/packages/manifest/ManifestWriter.idl b/offapi/com/sun/star/packages/manifest/ManifestWriter.idl
new file mode 100644
index 000000000..d61e65233
--- /dev/null
+++ b/offapi/com/sun/star/packages/manifest/ManifestWriter.idl
@@ -0,0 +1,33 @@
+/* -*- 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_manifest_ManifestWriter_idl__
+#define __com_sun_star_packages_manifest_ManifestWriter_idl__
+
+#include <com/sun/star/packages/manifest/XManifestWriter.idl>
+
+module com { module sun { module star { module packages { module manifest {
+
+published service ManifestWriter : XManifestWriter;
+
+
+}; }; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/packages/manifest/XManifestReader.idl b/offapi/com/sun/star/packages/manifest/XManifestReader.idl
new file mode 100644
index 000000000..4005aac4d
--- /dev/null
+++ b/offapi/com/sun/star/packages/manifest/XManifestReader.idl
@@ -0,0 +1,42 @@
+/* -*- 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_manifest_XManifestReader_idl__
+#define __com_sun_star_packages_manifest_XManifestReader_idl__
+
+#include <com/sun/star/beans/PropertyValue.idl>
+#include <com/sun/star/io/XInputStream.idl>
+
+
+module com { module sun { module star { module packages { module manifest {
+
+/** This interface reads the manifest data from a file. The user
+ must supply an XInputStream when calling readManifestSequence() to receive
+ a sequence of manifest entries. Each manifest entry is represented by
+ a sequence of PropertyValues. */
+published interface XManifestReader: com::sun::star::uno::XInterface
+{
+ /** Supplies the XManifestReader with an XInputStream to read from, reads
+ the data and returns it to the caller.
+ */
+ sequence < sequence < com::sun::star::beans::PropertyValue > > readManifestSequence( [in] com::sun::star::io::XInputStream rStream );
+};
+}; }; }; }; };
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/packages/manifest/XManifestWriter.idl b/offapi/com/sun/star/packages/manifest/XManifestWriter.idl
new file mode 100644
index 000000000..0886d732f
--- /dev/null
+++ b/offapi/com/sun/star/packages/manifest/XManifestWriter.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_manifest_XManifestWriter_idl__
+#define __com_sun_star_packages_manifest_XManifestWriter_idl__
+
+#include <com/sun/star/beans/PropertyValue.idl>
+#include <com/sun/star/io/XOutputStream.idl>
+
+
+module com { module sun { module star { module packages { module manifest {
+
+/** This interface writes the manifest data to a file. The user
+ calls writeManifestSequence() with the XOutputStream to write the data to
+ and the sequence of manifest entries to be written passed as parameters.
+ Each manifest entry is represented by a sequence of PropertyValues.*/
+
+published interface XManifestWriter: com::sun::star::uno::XInterface
+{
+ /** Writes the supplied sequence of manifest entries to the supplied
+ XOutputStream
+ */
+ void writeManifestSequence([in] com::sun::star::io::XOutputStream rStream,
+ [in] sequence < sequence < com::sun::star::beans::PropertyValue > > rSequence );
+};
+}; }; }; }; };
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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: */