diff options
-rw-r--r-- | offapi/com/sun/star/packages/Package.idl | 151 | ||||
-rw-r--r-- | offapi/com/sun/star/packages/PackageFolder.idl | 142 | ||||
-rw-r--r-- | offapi/com/sun/star/packages/PackageFolderEnumeration.idl | 88 | ||||
-rw-r--r-- | offapi/com/sun/star/packages/PackageStream.idl | 130 | ||||
-rw-r--r-- | offapi/com/sun/star/packages/makefile.mk | 93 |
5 files changed, 604 insertions, 0 deletions
diff --git a/offapi/com/sun/star/packages/Package.idl b/offapi/com/sun/star/packages/Package.idl new file mode 100644 index 000000000000..211537fb44a9 --- /dev/null +++ b/offapi/com/sun/star/packages/Package.idl @@ -0,0 +1,151 @@ +/************************************************************************* + * + * $RCSfile: Package.idl,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: mi $ $Date: 2001-03-09 15:49:17 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (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.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef __com_sun_star_packages_Package_idl__ +#define __com_sun_star_packages_Package_idl__ + +#ifndef __com_sun_star_lang_XInitialization_idl__ +#include <com/sun/star/lang/XInitialization.idl> +#endif + +#ifndef __com_sun_star_container_XHierarchicalNameAccess_idl__ +#include <com/sun/star/container/XHierarchicalNameAccess.idl> +#endif + +#ifndef __com_sun_star_lang_XSingleServiceFactory_idl__ +#include <com/sun/star/lang/XSingleServiceFactory.idl> +#endif + +#ifndef __com_sun_star_util_XChangesBatch_idl__ +#include <com/sun/star/util/XChangesBatch.idl> +#endif + + +//============================================================================= + +module com { module sun { module star { module packages { + +//============================================================================= +/** The <type>Package</type> 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 initialised with the + <type>XInitialization</type> service methods before it is a valid + instance of the service. +*/ +service Package +{ + /** + This interface is used to obtain the package URL of the Package + file the instance is supposed to provide access to. It will throw + a css::uno::Exception if the package does not exist or 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/"); + Will return a PackageFolder which describes the contents of the specified + folder. + */ + 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, we create a PackageFolder implementation, + if it is set to false, we create a PackageStream implementation. + + 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 have been removed. + */ + interface com::sun::star::util::XChangesBatch; +}; +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/packages/PackageFolder.idl b/offapi/com/sun/star/packages/PackageFolder.idl new file mode 100644 index 000000000000..f429581fecc0 --- /dev/null +++ b/offapi/com/sun/star/packages/PackageFolder.idl @@ -0,0 +1,142 @@ +/************************************************************************* + * + * $RCSfile: PackageFolder.idl,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: mi $ $Date: 2001-03-09 15:49:17 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (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.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef __com_sun_star_packages_PackageFolder_idl__ +#define __com_sun_star_packages_PackageFolder_idl__ + +#ifndef __com_sun_star_container_XNamed_idl__ +#include <com/sun/star/container/XNamed.idl> +#endif + +#ifndef __com_sun_star_container_XChild_idl__ +#include <com/sun/star/container/XChild.idl> +#endif + +#ifndef __com_sun_star_container_XNameContainer_idl__ +#include <com/sun/star/container/XNameContainer.idl> +#endif + +#ifndef __com_sun_star_beans_XPropertySet_idl__ +#include <com/sun/star/beans/XPropertySet.idl> +#endif + +#ifndef __com_sun_star_container_XEnumerationAccess_udl__ +#include <com/sun/star/container/XEnumerationAccess.idl> +#endif +//============================================================================= + +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. +*/ +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 (eg. "text/html"). + For PackageFolders, this is always an empty string. + */ + interface com::sun::star::beans::XPropertySet; +}; +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/packages/PackageFolderEnumeration.idl b/offapi/com/sun/star/packages/PackageFolderEnumeration.idl new file mode 100644 index 000000000000..0c2916806e28 --- /dev/null +++ b/offapi/com/sun/star/packages/PackageFolderEnumeration.idl @@ -0,0 +1,88 @@ +/************************************************************************* + * + * $RCSfile: PackageFolderEnumeration.idl,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: mi $ $Date: 2001-03-09 15:49:17 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (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.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef __com_sun_star_packages_PackageFolderEnumeration_idl__ +#define __com_sun_star_packages_PackageFolderEnumeration_idl__ + + +#ifndef __com_sun_star_container_XEnumeration_idl__ +#include <com/sun/star/container/XEnumeration.idl> +#endif + +//============================================================================= + +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. +*/ +service PackageFolderEnumeration +{ + interface com::sun::star::container::XEnumeration; +}; +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/packages/PackageStream.idl b/offapi/com/sun/star/packages/PackageStream.idl new file mode 100644 index 000000000000..86e4abae50d2 --- /dev/null +++ b/offapi/com/sun/star/packages/PackageStream.idl @@ -0,0 +1,130 @@ +/************************************************************************* + * + * $RCSfile: PackageStream.idl,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: mi $ $Date: 2001-03-09 15:49:17 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (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.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): Martin Gallwey (gallwey@sun.com) + * + * + ************************************************************************/ +#ifndef __com_sun_star_packages_PackageStream_idl__ +#define __com_sun_star_packages_PackageStream_idl__ + + +#ifndef __com_sun_star_container_XNamed_idl__ +#include <com/sun/star/container/XNamed.idl> +#endif + +#ifndef __com_sun_star_container_XChild_idl__ +#include <com/sun/star/container/XChild.idl> +#endif + +#ifndef __com_sun_star_beans_XPropertySet_idl__ +#include <com/sun/star/beans/XPropertySet.idl> +#endif + +#ifndef __com_sun_star_io_XActiveDataSink_idl__ +#include <com/sun/star/io/XActiveDataSink.idl> +#endif + +//============================================================================= + +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. +*/ +service PackageStream +{ + /** + This sets or gets the name of the Stream as contained within it's 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 provide 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 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 diff --git a/offapi/com/sun/star/packages/makefile.mk b/offapi/com/sun/star/packages/makefile.mk new file mode 100644 index 000000000000..26dbe64128e0 --- /dev/null +++ b/offapi/com/sun/star/packages/makefile.mk @@ -0,0 +1,93 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1 $ +# +# last change: $Author: mi $ $Date: 2001-03-09 15:49:17 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (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.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJ=..$/..$/..$/.. + +PRJNAME=api + +TARGET=csspackages +PACKAGE=com$/sun$/star$/packages + +# --- Settings ----------------------------------------------------- +.INCLUDE : $(PRJ)$/util$/makefile.pmk + +# ------------------------------------------------------------------------ + +IDLFILES=\ + Package.idl\ + PackageFolder.idl\ + PackageFolderEnumeration.idl\ + PackageStream.idl\ + XZipFile.idl\ + ZipEntry.idl\ + XChecksum.idl \ + XDeflater.idl \ + XInflater.idl \ + XZipInputStream.idl \ + XZipOutputStream.idl \ + ZipException.idl \ + ZipConstants.idl + +# ------------------------------------------------------------------ + +.INCLUDE : target.mk +.INCLUDE : $(PRJ)$/util$/target.pmk |