summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorMartin Gallwey <mtg@openoffice.org>2001-04-19 13:09:35 +0000
committerMartin Gallwey <mtg@openoffice.org>2001-04-19 13:09:35 +0000
commit6ce3967867d049335fc8bc2aad80c9a4aa915563 (patch)
tree63bcf976928d24a27b5e5d456b25e1b079c90eab /package
parentdf67d6b6583aba58ddc4b4cf38515549d4b0558e (diff)
Initial import
Diffstat (limited to 'package')
-rw-r--r--package/source/manifest/ManifestDefines.hxx72
-rw-r--r--package/source/manifest/ManifestExport.cxx122
-rw-r--r--package/source/manifest/ManifestExport.hxx81
-rw-r--r--package/source/manifest/ManifestImport.cxx130
-rw-r--r--package/source/manifest/ManifestImport.hxx103
-rw-r--r--package/source/manifest/ManifestReader.cxx194
-rw-r--r--package/source/manifest/ManifestReader.hxx103
-rw-r--r--package/source/manifest/ManifestWriter.cxx168
-rw-r--r--package/source/manifest/ManifestWriter.hxx105
-rw-r--r--package/source/manifest/makefile.mk101
10 files changed, 1179 insertions, 0 deletions
diff --git a/package/source/manifest/ManifestDefines.hxx b/package/source/manifest/ManifestDefines.hxx
new file mode 100644
index 000000000000..b3c1c7af6dd8
--- /dev/null
+++ b/package/source/manifest/ManifestDefines.hxx
@@ -0,0 +1,72 @@
+/*************************************************************************
+ *
+ * $RCSfile: ManifestDefines.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: mtg $ $Date: 2001-04-19 14:09:35 $
+ *
+ * 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 _MANIFEST_DEFINES_HXX
+#define _MANIFEST_DEFINES_HXX
+
+#define ELEMENT_MANIFEST "manifest:manifest"
+#define ELEMENT_FILE_ENTRY "manifest:file-entry"
+#define ATTRIBUTE_FULL_PATH "manifest:full-path"
+#define ATTRIBUTE_MEDIA_TYPE "manifest:media-type"
+#define ATTRIBUTE_CDATA "CDATA"
+#define ATTRIBUTE_XMLNS "xmlns:manifest"
+#define MANIFEST_NAMESPACE "http://openoffice.org/2001/manifest"
+
+#endif
diff --git a/package/source/manifest/ManifestExport.cxx b/package/source/manifest/ManifestExport.cxx
new file mode 100644
index 000000000000..be4fe22ffacf
--- /dev/null
+++ b/package/source/manifest/ManifestExport.cxx
@@ -0,0 +1,122 @@
+/*************************************************************************
+ *
+ * $RCSfile: ManifestExport.cxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: mtg $ $Date: 2001-04-19 14:09:35 $
+ *
+ * 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 _MANIFEST_EXPORT_HXX
+#include <ManifestExport.hxx>
+#endif
+#ifndef _ATTRIBUTE_LIST_HXX
+#include <AttributeList.hxx>
+#endif
+#ifndef _MANIFEST_DEFINES_HXX
+#include <ManifestDefines.hxx>
+#endif
+#ifndef _COM_SUN_STAR_XML_SAX_XATTRIBUTELIST_HXX
+#include <com/sun/star/xml/sax/XAttributeList.hpp>
+#endif
+
+using namespace rtl;
+using namespace std;
+using namespace com::sun::star::beans;
+using namespace com::sun::star::uno;
+using namespace com::sun::star::xml::sax;
+
+ManifestExport::ManifestExport(Reference < XDocumentHandler > xHandler, const Sequence < Sequence < PropertyValue > > &rManList)
+{
+ const OUString sFileEntryElement ( RTL_CONSTASCII_USTRINGPARAM ( ELEMENT_FILE_ENTRY ) );
+ const OUString sManifestElement ( RTL_CONSTASCII_USTRINGPARAM ( ELEMENT_MANIFEST ) );
+ const OUString sCdataAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_CDATA ) );
+ const OUString sMediaTypeAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_MEDIA_TYPE ) );
+ const OUString sFullPathAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_FULL_PATH ) );
+
+ const OUString sFullPath ( RTL_CONSTASCII_USTRINGPARAM ( "FullPath" ) );
+ const OUString sMediaType ( RTL_CONSTASCII_USTRINGPARAM ( "MediaType" ) );
+
+ AttributeList * pRootAttrList = new AttributeList;
+ pRootAttrList->AddAttribute ( OUString( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_XMLNS ) ),
+ sCdataAttribute,
+ OUString( RTL_CONSTASCII_USTRINGPARAM ( MANIFEST_NAMESPACE ) ) );
+
+ Reference < XAttributeList > xRootAttrList (pRootAttrList);
+ xHandler->startDocument();
+ xHandler->startElement( sManifestElement, xRootAttrList );
+ const Sequence < PropertyValue > *pSequence = rManList.getConstArray();
+
+ for (sal_uInt32 i = 0, nEnd = rManList.getLength() ; i < nEnd ; i++)
+ {
+ AttributeList *pAttrList = new AttributeList;
+ const PropertyValue *pValue = pSequence->getConstArray();
+ OUString aString;
+ for (sal_uInt32 j = 0, nNum = pSequence->getLength(); j < nNum; j++, pValue++)
+ {
+ pValue->Value >>= aString;
+ if (pValue->Name.equals (sMediaType) )
+ pAttrList->AddAttribute ( sMediaTypeAttribute, sCdataAttribute, aString );
+ else if (pValue->Name.equals (sFullPath) )
+ pAttrList->AddAttribute ( sFullPathAttribute, sCdataAttribute, aString );
+ }
+ Reference < XAttributeList > xAttrList = pAttrList;
+ xHandler->startElement( sFileEntryElement , xAttrList);
+ xHandler->endElement( sFileEntryElement );
+ pSequence++;
+ }
+ xHandler->endElement( sManifestElement );
+ xHandler->endDocument();
+}
diff --git a/package/source/manifest/ManifestExport.hxx b/package/source/manifest/ManifestExport.hxx
new file mode 100644
index 000000000000..2f6667c98faf
--- /dev/null
+++ b/package/source/manifest/ManifestExport.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * $RCSfile: ManifestExport.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: mtg $ $Date: 2001-04-19 14:09:35 $
+ *
+ * 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 _MANIFEST_EXPORT_HXX
+#define _MANIFEST_EXPORT_HXX
+
+#ifndef _COM_SUN_STAR_XML_SAX_XDOCUMENTHANDLER_HXX
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#endif
+#ifndef _COM_SUN_STAR_XML_BEANS_PROPERTYVALUE_HPP
+#include <com/sun/star/beans/PropertyValue.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UNO_SEQUENCE_H_
+#include <com/sun/star/uno/Sequence.h>
+#endif
+
+class ManifestExport
+{
+public:
+ ManifestExport(com::sun::star::uno::Reference < com::sun::star::xml::sax::XDocumentHandler > xHandler, const com::sun::star::uno::Sequence < com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue > > &rManList);
+};
+
+#endif
diff --git a/package/source/manifest/ManifestImport.cxx b/package/source/manifest/ManifestImport.cxx
new file mode 100644
index 000000000000..b77265c52956
--- /dev/null
+++ b/package/source/manifest/ManifestImport.cxx
@@ -0,0 +1,130 @@
+/*************************************************************************
+ *
+ * $RCSfile: ManifestImport.cxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: mtg $ $Date: 2001-04-19 14:09:35 $
+ *
+ * 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 _MANIFEST_IMPORT_HXX
+#include <ManifestImport.hxx>
+#endif
+#ifndef _MANIFEST_DEFINES_HXX
+#include <ManifestDefines.hxx>
+#endif
+using namespace com::sun::star::uno;
+using namespace com::sun::star::beans;
+using namespace com::sun::star;
+using namespace rtl;
+using namespace std;
+
+ManifestImport::ManifestImport( vector < Sequence < PropertyValue > > & rNewManVector )
+: rManVector ( rNewManVector )
+{
+}
+ManifestImport::~ManifestImport (void )
+{
+}
+void SAL_CALL ManifestImport::startDocument( )
+ throw(xml::sax::SAXException, uno::RuntimeException)
+{
+}
+void SAL_CALL ManifestImport::endDocument( )
+ throw(xml::sax::SAXException, uno::RuntimeException)
+{
+}
+void SAL_CALL ManifestImport::startElement( const OUString& aName, const uno::Reference< xml::sax::XAttributeList >& xAttribs )
+ throw(xml::sax::SAXException, uno::RuntimeException)
+{
+ static const OUString sFileEntryElement ( RTL_CONSTASCII_USTRINGPARAM ( ELEMENT_FILE_ENTRY ) );
+ static const OUString sManifestElement ( RTL_CONSTASCII_USTRINGPARAM ( ELEMENT_MANIFEST ) );
+ static const OUString sCdataAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_CDATA ) );
+ static const OUString sMediaTypeAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_MEDIA_TYPE ) );
+ static const OUString sFullPathAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_FULL_PATH ) );
+ static const OUString sMediaTypeProperty ( RTL_CONSTASCII_USTRINGPARAM ( "MediaType" ) );
+ static const OUString sFullPathProperty ( RTL_CONSTASCII_USTRINGPARAM ( "FullPath" ) );
+
+ if (aName == sFileEntryElement)
+ {
+ Sequence < PropertyValue > aPropSeq ( 2 );
+ aPropSeq[0].Name = sMediaTypeProperty;
+ aPropSeq[0].Value <<= xAttribs->getValueByName( sMediaTypeAttribute );
+ aPropSeq[1].Name = sFullPathProperty;
+ aPropSeq[1].Value <<= xAttribs->getValueByName( sFullPathAttribute );
+ rManVector.push_back ( aPropSeq );
+ }
+}
+void SAL_CALL ManifestImport::endElement( const OUString& aName )
+ throw(xml::sax::SAXException, uno::RuntimeException)
+{
+}
+void SAL_CALL ManifestImport::characters( const OUString& aChars )
+ throw(xml::sax::SAXException, uno::RuntimeException)
+{
+}
+void SAL_CALL ManifestImport::ignorableWhitespace( const OUString& aWhitespaces )
+ throw(xml::sax::SAXException, uno::RuntimeException)
+{
+}
+void SAL_CALL ManifestImport::processingInstruction( const OUString& aTarget, const OUString& aData )
+ throw(xml::sax::SAXException, uno::RuntimeException)
+{
+}
+void SAL_CALL ManifestImport::setDocumentLocator( const uno::Reference< xml::sax::XLocator >& xLocator )
+ throw(xml::sax::SAXException, uno::RuntimeException)
+{
+}
+
diff --git a/package/source/manifest/ManifestImport.hxx b/package/source/manifest/ManifestImport.hxx
new file mode 100644
index 000000000000..91bc91647fdf
--- /dev/null
+++ b/package/source/manifest/ManifestImport.hxx
@@ -0,0 +1,103 @@
+/*************************************************************************
+ *
+ * $RCSfile: ManifestImport.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: mtg $ $Date: 2001-04-19 14:09:35 $
+ *
+ * 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 _MANIFEST_IMPORT_HXX
+#define _MANIFEST_IMPORT_HXX
+
+#ifndef _CPPUHELPER_IMPLBASE1_HXX_
+#include <cppuhelper/implbase1.hxx> // helper for implementations
+#endif
+#ifndef _COM_SUN_STAR_XML_SAX_XDUCUMENTHANDLER_HPP_
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#endif
+#ifndef _COM_SUN_STAR_XML_SAX_XATTRIBUTELIST_HPP_
+#include <com/sun/star/xml/sax/XAttributeList.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
+#include <com/sun/star/beans/PropertyValue.hpp>
+#endif
+#include <vector>
+
+class ManifestImport : public cppu::WeakImplHelper1 < com::sun::star::xml::sax::XDocumentHandler >
+{
+private:
+ std::vector < ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue > > & rManVector;
+public:
+ ManifestImport( std::vector < ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue > > & rNewVector );
+ ~ManifestImport( void );
+ virtual void SAL_CALL startDocument( )
+ throw(::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL endDocument( )
+ throw(::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL startElement( const ::rtl::OUString& aName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttribs )
+ throw(::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL endElement( const ::rtl::OUString& aName )
+ throw(::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL characters( const ::rtl::OUString& aChars )
+ throw(::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL ignorableWhitespace( const ::rtl::OUString& aWhitespaces )
+ throw(::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL processingInstruction( const ::rtl::OUString& aTarget, const ::rtl::OUString& aData )
+ throw(::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setDocumentLocator( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XLocator >& xLocator )
+ throw(::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+};
+#endif
diff --git a/package/source/manifest/ManifestReader.cxx b/package/source/manifest/ManifestReader.cxx
new file mode 100644
index 000000000000..c702573fbacf
--- /dev/null
+++ b/package/source/manifest/ManifestReader.cxx
@@ -0,0 +1,194 @@
+/*************************************************************************
+ *
+ * $RCSfile: ManifestReader.cxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: mtg $ $Date: 2001-04-19 14:09:35 $
+ *
+ * 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 _MANIFEST_READER_HXX
+#include "ManifestReader.hxx"
+#endif
+#ifndef _CPPUHELPER_FACTORY_HXX_
+#include <cppuhelper/factory.hxx>
+#endif
+#ifndef _COM_SUN_STAR_REGISTRY_XREGISTRYKEY_HPP
+#include <com/sun/star/registry/XRegistryKey.hpp>
+#endif
+#ifndef _COM_SUN_STAR_XML_SAX_XDOCUMENTHANDLER_HPP
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#endif
+#ifndef _COM_SUN_STAR_XML_SAX_SAXPARSEEXCEPTION_HPP
+#include <com/sun/star/xml/sax/SaxParseException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_XML_SAX_XPARSER_HPP
+#include <com/sun/star/xml/sax/XParser.hpp>
+#endif
+#ifndef _VOS_DIAGNOSE_H_
+#include <vos/diagnose.hxx>
+#endif
+#ifndef _MANIFEST_IMPORT_HXX
+#include <ManifestImport.hxx>
+#endif
+#include <vector>
+
+using namespace ::rtl;
+using namespace ::std;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::registry;
+using namespace ::com::sun::star::packages;
+using namespace ::com::sun::star::xml::sax;
+using namespace ::com::sun::star::packages::manifest;
+
+ManifestReader::ManifestReader( const Reference < XMultiServiceFactory > & xNewFactory )
+: xFactory ( xNewFactory )
+{
+}
+ManifestReader::~ManifestReader()
+{
+}
+Any SAL_CALL ManifestReader::queryInterface( const Type& rType )
+ throw(RuntimeException)
+{
+ return ::cppu::queryInterface ( rType ,
+ // OWeakObject interfaces
+ reinterpret_cast< XInterface* > ( this ) ,
+ static_cast< XWeak* > ( this ) ,
+ // My own interfaces
+ static_cast< XManifestReader* > ( this ) );
+
+}
+
+void SAL_CALL ManifestReader::acquire( )
+ throw()
+{
+ OWeakObject::acquire();
+}
+void SAL_CALL ManifestReader::release( )
+ throw()
+{
+ OWeakObject::release();
+}
+
+Sequence< Sequence< PropertyValue > > SAL_CALL ManifestReader::readManifestSequence( const Reference< XInputStream >& rStream )
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ Sequence < Sequence < PropertyValue > > aManifestSequence;
+ Reference < XParser > xParser (xFactory->createInstance ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.xml.sax.Parser" ) ) ), UNO_QUERY );
+ if (xParser.is())
+ {
+ try
+ {
+ vector < Sequence < PropertyValue > > aManVector;
+ Reference < XDocumentHandler > xFilter = new ManifestImport( aManVector );
+ InputSource aParserInput;
+ aParserInput.aInputStream = rStream;
+ aParserInput.sSystemId = OUString ( RTL_CONSTASCII_USTRINGPARAM ( "META-INF/manifest.xml" ) );
+ xParser->setDocumentHandler ( xFilter );
+ xParser->parseStream( aParserInput );
+ aManifestSequence.realloc ( aManVector.size() );
+ Sequence < PropertyValue > * pSequence = aManifestSequence.getArray();
+ ::std::vector < Sequence < PropertyValue > >::const_iterator aIter = aManVector.begin();
+ ::std::vector < Sequence < PropertyValue > >::const_iterator aEnd = aManVector.end();
+ while( aIter != aEnd )
+ *pSequence++ = (*aIter++);
+ }
+ catch (SAXParseException& )
+ {
+ }
+ catch (SAXException& )
+ {
+ }
+ catch (IOException& )
+ {
+ }
+ }
+ return aManifestSequence;
+}
+// Component functions
+
+Reference < XInterface > SAL_CALL ManifestReader_createInstance( Reference< XMultiServiceFactory > const & rServiceFactory )
+{
+ return *new ManifestReader( rServiceFactory );
+}
+
+OUString ManifestReader::getImplementationName()
+{
+ return OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.packages.manifest.comp.ManifestReader" ) );
+}
+
+sal_Bool SAL_CALL ManifestReader::supportsService(OUString const & rServiceName)
+ throw (RuntimeException)
+{
+ return rServiceName == getSupportedServiceNames()[0];
+}
+
+Sequence < OUString > ManifestReader::getSupportedServiceNames()
+{
+ Sequence < OUString > aNames(1);
+ aNames[0] = OUString(RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.packages.manifest.ManifestReader" ) );
+ return aNames;
+}
+Reference < XSingleServiceFactory > ManifestReader::createServiceFactory( Reference < XMultiServiceFactory > const & rServiceFactory )
+{
+ return cppu::createSingleFactory (rServiceFactory,
+ getImplementationName(),
+ ManifestReader_createInstance,
+ getSupportedServiceNames());
+}
diff --git a/package/source/manifest/ManifestReader.hxx b/package/source/manifest/ManifestReader.hxx
new file mode 100644
index 000000000000..7552834a814d
--- /dev/null
+++ b/package/source/manifest/ManifestReader.hxx
@@ -0,0 +1,103 @@
+/*************************************************************************
+ *
+ * $RCSfile: ManifestReader.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: mtg $ $Date: 2001-04-19 14:09:35 $
+ *
+ * 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 _MANIFEST_READER_HXX
+#define _MANIFEST_READER_HXX
+
+#ifndef _CPPUHELPER_WEAK_HXX_
+#include <cppuhelper/weak.hxx>
+#endif
+#ifndef _COM_SUN_STAR_PACKAGES_MANIFEST_XMANIFESTREADER_HPP
+#include <com/sun/star/packages/manifest/XManifestReader.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSINGLESERVICEFACTORY_HPP
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#endif
+
+class ManifestReader: public ::cppu::OWeakObject,
+ public ::com::sun::star::packages::manifest::XManifestReader
+{
+private:
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xFactory;
+public:
+ ManifestReader( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xNewFactory );
+ ~ManifestReader();
+ // XManifestReader
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > > SAL_CALL readManifestSequence( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& rStream )
+ throw (::com::sun::star::uno::RuntimeException);
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& rType )
+ throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire( )
+ throw();
+ virtual void SAL_CALL release( )
+ throw();
+ // Component constructor
+ static ::rtl::OUString getImplementationName();
+ static ::com::sun::star::uno::Sequence < ::rtl::OUString > getSupportedServiceNames();
+ static ::com::sun::star::uno::Reference < com::sun::star::lang::XSingleServiceFactory > createServiceFactory( com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > const & rServiceFactory );
+ virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & rServiceName)
+ throw (com::sun::star::uno::RuntimeException);
+};
+#endif
diff --git a/package/source/manifest/ManifestWriter.cxx b/package/source/manifest/ManifestWriter.cxx
new file mode 100644
index 000000000000..ea2eabea6af2
--- /dev/null
+++ b/package/source/manifest/ManifestWriter.cxx
@@ -0,0 +1,168 @@
+/*************************************************************************
+ *
+ * $RCSfile: ManifestWriter.cxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: mtg $ $Date: 2001-04-19 14:09:35 $
+ *
+ * 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 _MANIFEST_WRITER_HXX
+#include <ManifestWriter.hxx>
+#endif
+#ifndef _MANIFEST_EXPORT_HXX
+#include <ManifestExport.hxx>
+#endif
+#ifndef _CPPUHELPER_FACTORY_HXX_
+#include <cppuhelper/factory.hxx>
+#endif
+#ifndef _COM_SUN_STAR_REGISTRY_XREGISTRYKEY_HPP
+#include <com/sun/star/registry/XRegistryKey.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XACTIVEDATASOURCE_HPP
+#include <com/sun/star/io/XActiveDataSource.hpp>
+#endif
+#ifndef _COM_SUN_STAR_XML_SAX_XDOCUMENTHANDLER_HPP
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#endif
+#ifndef _VOS_DIAGNOSE_H_
+#include <vos/diagnose.hxx>
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::registry;
+using namespace ::com::sun::star::packages;
+using namespace ::com::sun::star::xml::sax;
+using namespace ::com::sun::star::packages::manifest;
+
+ManifestWriter::ManifestWriter( const Reference < XMultiServiceFactory > & xNewFactory )
+: xFactory ( xNewFactory )
+{
+}
+ManifestWriter::~ManifestWriter()
+{
+}
+
+// XInterface methods
+Any SAL_CALL ManifestWriter::queryInterface( const Type& rType )
+ throw(RuntimeException)
+{
+ return ::cppu::queryInterface ( rType ,
+ // OWeakObject interfaces
+ reinterpret_cast< XInterface* > ( this ) ,
+ static_cast< XWeak* > ( this ) ,
+ // My own interfaces
+ static_cast< XManifestWriter* > ( this ) );
+
+}
+
+void SAL_CALL ManifestWriter::acquire( )
+ throw()
+{
+ OWeakObject::acquire();
+}
+void SAL_CALL ManifestWriter::release( )
+ throw()
+{
+ OWeakObject::release();
+}
+// XManifestWriter methods
+void SAL_CALL ManifestWriter::writeManifestSequence( const Reference< XOutputStream >& rStream, const Sequence< Sequence< PropertyValue > >& rSequence )
+ throw (RuntimeException)
+{
+ OUString sSaxWriter ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.xml.sax.Writer" ) );
+ Reference < XActiveDataSource > xSource ( xFactory->createInstance ( sSaxWriter ), UNO_QUERY );
+ if (xSource.is())
+ {
+ xSource->setOutputStream ( rStream );
+ Reference < XDocumentHandler > xHandler ( xSource, UNO_QUERY );
+ if (xHandler.is())
+ ManifestExport aExporter ( xHandler, rSequence);
+ }
+}
+
+// Component methods
+Reference < XInterface > SAL_CALL ManifestWriter_createInstance( Reference< XMultiServiceFactory > const & rServiceFactory )
+{
+ return *new ManifestWriter( rServiceFactory );
+}
+
+OUString ManifestWriter::getImplementationName()
+{
+ return OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.packages.manifest.comp.ManifestWriter" ) );
+}
+
+sal_Bool SAL_CALL ManifestWriter::supportsService(OUString const & rServiceName)
+ throw (RuntimeException)
+{
+ return rServiceName == getSupportedServiceNames()[0];
+}
+Sequence < OUString > ManifestWriter::getSupportedServiceNames()
+{
+ Sequence < OUString > aNames(1);
+ aNames[0] = OUString(RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.packages.manifest.ManifestWriter" ) );
+ return aNames;
+}
+Reference < XSingleServiceFactory > ManifestWriter::createServiceFactory( Reference < XMultiServiceFactory > const & rServiceFactory )
+{
+ return cppu::createSingleFactory (rServiceFactory,
+ getImplementationName(),
+ ManifestWriter_createInstance,
+ getSupportedServiceNames());
+}
diff --git a/package/source/manifest/ManifestWriter.hxx b/package/source/manifest/ManifestWriter.hxx
new file mode 100644
index 000000000000..75670ae28292
--- /dev/null
+++ b/package/source/manifest/ManifestWriter.hxx
@@ -0,0 +1,105 @@
+/*************************************************************************
+ *
+ * $RCSfile: ManifestWriter.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: mtg $ $Date: 2001-04-19 14:09:35 $
+ *
+ * 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 _MANIFEST_WRITER_HXX
+#define _MANIFEST_WRITER_HXX
+
+#ifndef _CPPUHELPER_WEAK_HXX_
+#include <cppuhelper/weak.hxx>
+#endif
+#ifndef _COM_SUN_STAR_PACKAGES_MANIFEST_XMANIFESTWRITER_HPP
+#include <com/sun/star/packages/manifest/XManifestWriter.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSINGLESERVICEFACTORY_HPP
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#endif
+
+
+class ManifestWriter: public ::cppu::OWeakObject,
+ public ::com::sun::star::packages::manifest::XManifestWriter
+{
+private:
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xFactory;
+public:
+ ManifestWriter( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xNewFactory );
+ ~ManifestWriter();
+ // XManifestWriter
+ virtual void SAL_CALL writeManifestSequence( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& rStream, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >& rSequence )
+ throw (::com::sun::star::uno::RuntimeException);
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& rType )
+ throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire( )
+ throw();
+ virtual void SAL_CALL release( )
+ throw();
+ // Component constructor
+ static ::rtl::OUString getImplementationName();
+ static ::com::sun::star::uno::Sequence < ::rtl::OUString > getSupportedServiceNames();
+ static ::com::sun::star::uno::Reference < com::sun::star::lang::XSingleServiceFactory > createServiceFactory( com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > const & rServiceFactory );
+ virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & rServiceName)
+ throw (com::sun::star::uno::RuntimeException);
+};
+#endif
+
diff --git a/package/source/manifest/makefile.mk b/package/source/manifest/makefile.mk
new file mode 100644
index 000000000000..fed7d3947a12
--- /dev/null
+++ b/package/source/manifest/makefile.mk
@@ -0,0 +1,101 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1 $
+#
+# last change: $Author: mtg $ $Date: 2001-04-19 14:09:35 $
+#
+# 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=package
+TARGET=manifest
+AUTOSEG=true
+
+ENABLE_EXCEPTIONS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+# --- Files --------------------------------------------------------
+
+SLOFILES= \
+ $(SLO)$/ManifestReader.obj \
+ $(SLO)$/ManifestWriter.obj \
+ $(SLO)$/ManifestImport.obj \
+ $(SLO)$/ManifestExport.obj \
+ $(SLO)$/AttributeList.obj \
+ $(SLO)$/UnoRegister.obj
+
+# --- UNO stuff ---------------------------------------------------
+
+CPPUMAKERFLAGS=
+#UNOUCROUT=$(OUT)$/inc
+#INCPRE+=$(UNOUCROUT)
+
+UNOUCRDEP= $(SOLARBINDIR)$/offapi.rdb
+UNOUCRRDB= $(SOLARBINDIR)$/offapi.rdb
+
+UNOTYPES=\
+ com.sun.star.packages.manifest.XManifestReader \
+ com.sun.star.packages.manifest.XManifestWriter
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk