diff options
Diffstat (limited to 'offapi/com/sun/star/xml')
152 files changed, 9670 insertions, 0 deletions
diff --git a/offapi/com/sun/star/xml/Attribute.idl b/offapi/com/sun/star/xml/Attribute.idl new file mode 100644 index 000000000..1141cc8f5 --- /dev/null +++ b/offapi/com/sun/star/xml/Attribute.idl @@ -0,0 +1,52 @@ +/* -*- 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_xml_Attribute_idl__ +#define __com_sun_star_xml_Attribute_idl__ + + +module com { module sun { module star { module xml { + + +/** + * A struct to keep information of an element's attribute. + */ +struct Attribute +{ + /** + * the attribute name + */ + string Name; + + /** + * the attribute namespace URL + */ + string NamespaceURL; + + /** + * the attribute value + */ + string Value; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/AttributeContainer.idl b/offapi/com/sun/star/xml/AttributeContainer.idl new file mode 100644 index 000000000..12857b4ac --- /dev/null +++ b/offapi/com/sun/star/xml/AttributeContainer.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_xml_AttributeContainer_idl__ +#define __com_sun_star_xml_AttributeContainer_idl__ + +#include <com/sun/star/container/XNameContainer.idl> + + +module com { module sun { module star { module xml { + +/** This service describes a container for XML attributes. + + <p>Each attribute is accessed with its local name, or optionally, its local + name with its namespace prefix. The type and value of an attribute is stored + in a <code>AttributeData</code> struct. If you use a namespace in the + <code>AttributeData</code>, you must use a prefix in the name and you must + use a namespace, if you use a prefix. +*/ +published service AttributeContainer +{ + interface com::sun::star::container::XNameContainer; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/AttributeData.idl b/offapi/com/sun/star/xml/AttributeData.idl new file mode 100644 index 000000000..4cfbeaf21 --- /dev/null +++ b/offapi/com/sun/star/xml/AttributeData.idl @@ -0,0 +1,56 @@ +/* -*- 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_xml_AttributeData_idl__ +#define __com_sun_star_xml_AttributeData_idl__ + + + module com { module sun { module star { module xml { + + +/** store the type and value of an XML attribute + inside a XNameContainer + */ +published struct AttributeData +{ + /** the namespace of this XML attribute. + + <p>This string can be empty if you are not using namespaces. + */ + string Namespace; + + + /** the type of this XML attribute. + + <p>For non validating parsers this must be CDATA. + */ + string Type; + + + /** the string value of this XML attribute. + */ + string Value; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/ExportFilter.idl b/offapi/com/sun/star/xml/ExportFilter.idl new file mode 100644 index 000000000..79abaef88 --- /dev/null +++ b/offapi/com/sun/star/xml/ExportFilter.idl @@ -0,0 +1,57 @@ +/* -*- 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_XML_EXPORTFILTER_IDL__ +#define _COM_SUN_STAR_XML_EXPORTFILTER_IDL__ + +#include <com/sun/star/xml/XExportFilter.idl> + + +module com { module sun { module star { module xml { + +/** describes an export filter for XML-based file formats. + + <p>First, the XExportFilter::exporter() method must be + called to provide the export component with the target location to + which the data should be exported. Then, the source document's XML + representation will be generated by calling the appropriate methods + of the com::sun::star::xml::sax::XDocumentHandler + interface. Error conditions must be signaled by throwing + a com::sun::star::xml::sax::SAXException in the + com::sun::star::xml::sax::XDocumentHandler calls. + + @since OOo 1.1.2 + */ +published service ExportFilter +{ + /** The data will be passed in through the + com::sun::star::xml::sax::XDocumentHandler calls. */ + interface com::sun::star::xml::sax::XDocumentHandler; + + /** The XExportFilter:exporter() call will provide the + com::sun::star::document::TypeDetection user data + required to perform the filtering correctly. + */ + interface com::sun::star::xml::XExportFilter; +}; + +}; }; }; }; +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/FastAttribute.idl b/offapi/com/sun/star/xml/FastAttribute.idl new file mode 100644 index 000000000..722939b16 --- /dev/null +++ b/offapi/com/sun/star/xml/FastAttribute.idl @@ -0,0 +1,47 @@ +/* -*- 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_xml_FastAttribute_idl__ +#define __com_sun_star_xml_FastAttribute_idl__ + + +module com { module sun { module star { module xml { + + +/** + * A struct to keep information of an element's attribute. + */ +struct FastAttribute +{ + /** + * the token corresponding to the attribute + */ + long Token; + + /** + * the attribute value + */ + string Value; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/ImportFilter.idl b/offapi/com/sun/star/xml/ImportFilter.idl new file mode 100644 index 000000000..60b88bb07 --- /dev/null +++ b/offapi/com/sun/star/xml/ImportFilter.idl @@ -0,0 +1,41 @@ +/* -*- 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_XML_IMPORTFILTER_IDL__ +#define _COM_SUN_STAR_XML_IMPORTFILTER_IDL__ + +#include <com/sun/star/xml/XImportFilter.idl> + + +module com { module sun { module star { module xml { + +/** describes an import filter for XML-based file formats. + + @since OOo 1.1.2 +*/ +published service ImportFilter +{ + interface com::sun::star::xml::XImportFilter; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/NamespaceContainer.idl b/offapi/com/sun/star/xml/NamespaceContainer.idl new file mode 100644 index 000000000..00f245337 --- /dev/null +++ b/offapi/com/sun/star/xml/NamespaceContainer.idl @@ -0,0 +1,43 @@ +/* -*- 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_xml_NamespaceContainer_idl__ +#define __com_sun_star_xml_NamespaceContainer_idl__ + +#include <com/sun/star/container/XNameContainer.idl> + + +module com { module sun { module star { module xml { + +/** This service describes a container for XML namespaces. + + <p>Each namespace is accessed with its prefix and the URL is stored as a string. + + @see com::sun::star::xforms::Binding +*/ +published service NamespaceContainer +{ + interface com::sun::star::container::XNameContainer; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/ParaUserDefinedAttributesSupplier.idl b/offapi/com/sun/star/xml/ParaUserDefinedAttributesSupplier.idl new file mode 100644 index 000000000..4510e7512 --- /dev/null +++ b/offapi/com/sun/star/xml/ParaUserDefinedAttributesSupplier.idl @@ -0,0 +1,54 @@ +/* -*- 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_xml_ParaUserDefinedAttributesSupplier_idl_ +#define _com_sun_star_xml_ParaUserDefinedAttributesSupplier_idl_ + +#include <com/sun/star/container/XNameContainer.idl> + +module com { module sun { module star { module xml { + +/** A component that supports this service preserves XML attributes, + unknown by its parser, that belong to the XML element representing + it (the component). + + @since OOo 2.0.4 +*/ +published service ParaUserDefinedAttributesSupplier +{ + /** This container holds the AttributeData elements + that represent uninterpreted XML attributes of a paragraph. + + <p>The idea behind this property is that a parser can stow + away all attributes that it cannot handle by itself on reading + an XML file. When the file is stored again, the unknown + attributes can be written back without loss.</p> + + <p>The + com::sun::star::container::XNameContainer + supports the service AttributeContainer.</p> + + */ + [property] ::com::sun::star::container::XNameContainer ParaUserDefinedAttributes; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/TextUserDefinedAttributesSupplier.idl b/offapi/com/sun/star/xml/TextUserDefinedAttributesSupplier.idl new file mode 100644 index 000000000..dc5ffc285 --- /dev/null +++ b/offapi/com/sun/star/xml/TextUserDefinedAttributesSupplier.idl @@ -0,0 +1,54 @@ +/* -*- 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_xml_TextUserDefinedAttributesSupplier_idl_ +#define _com_sun_star_xml_TextUserDefinedAttributesSupplier_idl_ + +#include <com/sun/star/container/XNameContainer.idl> + +module com { module sun { module star { module xml { + +/** A component that supports this service preserves XML attributes, + unknown by its parser, that belong to the XML element representing + it (the component). + + @since OOo 2.0.4 +*/ +published service TextUserDefinedAttributesSupplier +{ + /** This container holds the AttributeData elements + that represent uninterpreted XML attributes of a text. + + <p>The idea behind this property is that a parser can stow + away all attributes that it cannot handle by itself on reading + an XML file. When the file is stored again, the unknown + attributes can be written back without loss.</p> + + <p>The + com::sun::star::container::XNameContainer + supports the service AttributeContainer.</p> + + */ + [property] ::com::sun::star::container::XNameContainer TextUserDefinedAttributes; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/UserDefinedAttributesSupplier.idl b/offapi/com/sun/star/xml/UserDefinedAttributesSupplier.idl new file mode 100644 index 000000000..1757c550a --- /dev/null +++ b/offapi/com/sun/star/xml/UserDefinedAttributesSupplier.idl @@ -0,0 +1,54 @@ +/* -*- 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_xml_UserDefinedAttributesSupplier_idl_ +#define _com_sun_star_xml_UserDefinedAttributesSupplier_idl_ + +#include <com/sun/star/container/XNameContainer.idl> + +module com { module sun { module star { module xml { + +/** A component that supports this service preserves XML attributes, + unknown by its parser, that belong to the XML element representing + it (the component). + + @since OOo 2.0.4 +*/ +published service UserDefinedAttributesSupplier +{ + /** This container holds the AttributeData elements + that represent uninterpreted XML attributes. + + <p>The idea behind this property is that a parser can stow + away all attributes that it cannot handle by itself on reading + an XML file. When the file is stored again, the unknown + attributes can be written back without loss.</p> + + <p>The + com::sun::star::container::XNameContainer + supports the service AttributeContainer.</p> + + */ + [property] ::com::sun::star::container::XNameContainer UserDefinedAttributes; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/XExportFilter.idl b/offapi/com/sun/star/xml/XExportFilter.idl new file mode 100644 index 000000000..8dab67065 --- /dev/null +++ b/offapi/com/sun/star/xml/XExportFilter.idl @@ -0,0 +1,66 @@ +/* -*- 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_XML_XEXPORTFILTER_IDL__ +#define _COM_SUN_STAR_XML_XEXPORTFILTER_IDL__ + +#include <com/sun/star/uno/RuntimeException.idl> +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/beans/PropertyValue.idl> +#include <com/sun/star/xml/sax/XDocumentHandler.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> + + +module com { module sun { module star { module xml { + + + +/** interface to implement for an XML-based import filter. i + + @since OOo 1.1.2 + */ +published interface XExportFilter: com::sun::star::uno::XInterface +{ + /** performs the import. + + <p>The source data (location indicated by <var>aSourceData</var>), and + the XML representation of the document must be generated by calls to + xocHandler (???) methods. + + @param aSourceData + com::sun::star::document::MediaDescriptor + which defines the data source + + @param msUserData + Sequence of strings which contains the user data defined in the + TypeDetection.xml (???) + + @returns + `TRUE` if import process is successful + */ + boolean exporter( + [in] sequence< com::sun::star::beans::PropertyValue > aSourceData, + [in] sequence< string > msUserData ) + raises( com::sun::star::lang::IllegalArgumentException ); +}; + +}; }; }; }; +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/XImportFilter.idl b/offapi/com/sun/star/xml/XImportFilter.idl new file mode 100644 index 000000000..973fbcefa --- /dev/null +++ b/offapi/com/sun/star/xml/XImportFilter.idl @@ -0,0 +1,70 @@ +/* -*- 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_XML_XIMPORTFILTER_IDL__ +#define _COM_SUN_STAR_XML_XIMPORTFILTER_IDL__ + +#include <com/sun/star/uno/RuntimeException.idl> +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/beans/PropertyValue.idl> +#include <com/sun/star/xml/sax/XDocumentHandler.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> + + +module com { module sun { module star { module xml { + + + +/** interface to implement for an XML-based import filter. + + @since OOo 1.1.2 + */ +published interface XImportFilter: com::sun::star::uno::XInterface +{ + /** performs the import. + + <p>The source data (location indicated by <var>aSourceData</var>), + and the XML representation of the document must be generated by calls + to xocHandler (???) methods. + + @param aSourceData + com::sun::star::document::MediaDescriptor + which defines the data source + + @param msUserData + Sequence of strings which contains the user data defined in the + TypeDetection.xml + + @param xDocHandler + target for the XML document representation + + @returns + `TRUE` if import process is successful + */ + boolean importer( + [in] sequence< com::sun::star::beans::PropertyValue > aSourceData, + [in] com::sun::star::xml::sax::XDocumentHandler xDocHandler, + [in] sequence< string > msUserData ) + raises( com::sun::star::lang::IllegalArgumentException ); +}; + +}; }; }; }; +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/XImportFilter2.idl b/offapi/com/sun/star/xml/XImportFilter2.idl new file mode 100644 index 000000000..9c3f6bd56 --- /dev/null +++ b/offapi/com/sun/star/xml/XImportFilter2.idl @@ -0,0 +1,71 @@ +/* -*- 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_XML_XIMPORTFILTER2_IDL__ +#define _COM_SUN_STAR_XML_XIMPORTFILTER2_IDL__ + +#include <com/sun/star/uno/RuntimeException.idl> +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/beans/PropertyValue.idl> +#include <com/sun/star/xml/sax/XFastParser.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> + + +module com { module sun { module star { module xml { + + + +/** interface to implement for an XML-based import filter. + Enhanced vs XImportFilter to take a XFastDocumentHandler. + + @since LibreOffice 7.1 + */ +interface XImportFilter2: com::sun::star::uno::XInterface +{ + /** performs the import. + + <p>The source data (location indicated by <var>aSourceData</var>), + and the XML representation of the document must be generated by calls + to xocHandler (???) methods. + + @param aSourceData + com::sun::star::document::MediaDescriptor + which defines the data source + + @param msUserData + Sequence of strings which contains the user data defined in the + TypeDetection.xml + + @param xFastParser + the fast parser for the XML document, i.e. an SvXMLImport subclass + + @returns + `TRUE` if import process is successful + */ + boolean importer( + [in] sequence< com::sun::star::beans::PropertyValue > aSourceData, + [in] com::sun::star::xml::sax::XFastParser xFastParser, + [in] sequence< string > msUserData ) + raises( com::sun::star::lang::IllegalArgumentException ); +}; + +}; }; }; }; +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/XMLExportFilter.idl b/offapi/com/sun/star/xml/XMLExportFilter.idl new file mode 100644 index 000000000..1afd0112a --- /dev/null +++ b/offapi/com/sun/star/xml/XMLExportFilter.idl @@ -0,0 +1,49 @@ +/* -*- 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_xml_XMLExportFilter_idl__ +#define __com_sun_star_xml_XMLExportFilter_idl__ + + +#include <com/sun/star/document/ExportFilter.idl> + + +module com { module sun { module star { module xml { + +/** describes an export filter for XML-based file formats. + + <p>It is an extension of com::sun::star::document::ExportFilter + and differs from it only in that an + com::sun::star::xml::sax::XDocumentHandler needs to + be passed through the XInitialization interface. This + XDocumentHandler will then be used to export the XML data stream. */ +published service XMLExportFilter +{ + /** A com.sun.star.xml.sax.XDocumentHandler needs to be passed to + the com::sun::star::lang::XInitialization::initialize() call. + */ + service com::sun::star::document::ExportFilter; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/XMLImportFilter.idl b/offapi/com/sun/star/xml/XMLImportFilter.idl new file mode 100644 index 000000000..99d5679f9 --- /dev/null +++ b/offapi/com/sun/star/xml/XMLImportFilter.idl @@ -0,0 +1,50 @@ +/* -*- 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_xml_XMLImportFilter_idl__ +#define __com_sun_star_xml_XMLImportFilter_idl__ + + +#include <com/sun/star/document/ImportFilter.idl> +#include <com/sun/star/xml/sax/XDocumentHandler.idl> + + +module com { module sun { module star { module xml { + +/** describes an import filter for XML-based file formats. + + <p>It is an extension of com::sun::star::document::ImportFilter + and differs from it in that this filter additionally supports the + com::sun::star::xml::sax::XDocumentHandler interface. +*/ +published service XMLImportFilter +{ + /** This service supplied the basic filter functionality. */ + service com::sun::star::document::ImportFilter; + + /** The document handler is used to stream XML data into the filter. */ + interface com::sun::star::xml::sax::XDocumentHandler; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/CipherID.idl b/offapi/com/sun/star/xml/crypto/CipherID.idl new file mode 100644 index 000000000..9e34c09f6 --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/CipherID.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_xml_crypto_CipherID_idl__ +#define __com_sun_star_xml_crypto_CipherID_idl__ + + + +module com { module sun { module star { module xml { module crypto { + +/** The constant set contains identifiers of supported cipher-creation + algorithms. + + @see XCipherContextSupplier + @since OOo 3.4 +*/ +constants CipherID +{ + /** identifier of AES algorithm in CBC mode with W3C padding + */ + const long AES_CBC_W3C_PADDING = 1; + + /** identifier of the Blowfish algorithm in 8-bit CFB mode + */ + const long BLOWFISH_CFB_8 = 2; +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/DigestID.idl b/offapi/com/sun/star/xml/crypto/DigestID.idl new file mode 100644 index 000000000..970eb1147 --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/DigestID.idl @@ -0,0 +1,71 @@ +/* -*- 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_xml_crypto_DigestID_idl__ +#define __com_sun_star_xml_crypto_DigestID_idl__ + + + +module com { module sun { module star { module xml { module crypto { + +/** The constant set contains identifiers of supported digest-creation + algorithms. + + @see XDigestContextSupplier + @since OOo 3.4 +*/ +constants DigestID +{ + /** identifier of SHA-1 algorithm + */ + const long SHA1 = 1; + + /** identifier of SHA-256 algorithm + */ + const long SHA256 = 2; + + /** identifier of SHA-1 algorithm that is applied to the first kilobyte + of data. + */ + const long SHA1_1K = 3; + + /** identifier of SHA-256 algorithm that is applied to the first kilobyte + of data. + */ + const long SHA256_1K = 4; + + /** identifier of SHA-512 algorithm + + @since LibreOffice 6.0 + */ + const long SHA512 = 5; + + /** identifier of SHA-512 algorithm that is applied to the first + kilobyte of data. + + @since LibreOffice 6.0 + */ + const long SHA512_1K = 6; +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/GPGSEInitializer.idl b/offapi/com/sun/star/xml/crypto/GPGSEInitializer.idl new file mode 100644 index 000000000..d041eb9fa --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/GPGSEInitializer.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_xml_crypto_GPGSEInitializer_idl_ +#define __com_sun_star_xml_crypto_GPGSEInitializer_idl_ + +#include <com/sun/star/xml/crypto/XSEInitializer.idl> + +module com { module sun { module star { module xml { module crypto { + +/** + * Service of GPGSEInitializer + * + * @since LibreOffice 6.0 + */ +service GPGSEInitializer : XSEInitializer; + +} ; } ; } ; } ; } ; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/NSSInitializer.idl b/offapi/com/sun/star/xml/crypto/NSSInitializer.idl new file mode 100644 index 000000000..7eb857596 --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/NSSInitializer.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_xml_crypto_NSSInitializer_idl_ +#define __com_sun_star_xml_crypto_NSSInitializer_idl_ + +#include <com/sun/star/xml/crypto/XNSSInitializer.idl> + +module com { module sun { module star { module xml { module crypto { + +/** + This service has a particular lifecycle. If you create an instance, + the NSS backend is not initialized, until some of the crypto functions + are called. As a result you can effectively change the user setting to + the NSS path until NSS is really used. + + After the first usage you have to restart LibreOffice to activate a new + NSS path. + + @since LibreOffice 4.0 + */ +service NSSInitializer : XNSSInitializer; + +} ; } ; } ; } ; } ; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/NSSProfile.idl b/offapi/com/sun/star/xml/crypto/NSSProfile.idl new file mode 100644 index 000000000..1ce68bfa8 --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/NSSProfile.idl @@ -0,0 +1,54 @@ +/* -*- 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_xml_crypto_NSSProfile_idl_ +#define __com_sun_star_xml_crypto_NSSProfile_idl_ + +#include <com/sun/star/mozilla/MozillaProductType.idl> + +module com { module sun { module star { module xml { module crypto { + +/** + @since LibreOffice 7.1 + */ +struct NSSProfile { + /** the name of the NSS profile + + Normally the name will reflect the name of the Mozilla profile. But the + profile list also contains the following special entries: MANUAL and + MOZILLA_CERTIFICATE_FOLDER. + These will have a product type of MozillaProductType::Default and might + have an empty path, if that value is not available. + */ + string Name; + + /** the path to the NSS databases + */ + string Path; + + /** the type of the NSS profile + */ + ::com::sun::star::mozilla::MozillaProductType Type; +}; + +} ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/SEInitializer.idl b/offapi/com/sun/star/xml/crypto/SEInitializer.idl new file mode 100644 index 000000000..cd4c5cd26 --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/SEInitializer.idl @@ -0,0 +1,37 @@ +/* -*- 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_xml_crypto_SEInitializer_idl_ +#define __com_sun_star_xml_crypto_SEInitializer_idl_ + +#include <com/sun/star/xml/crypto/XSEInitializer.idl> + +module com { module sun { module star { module xml { module crypto { + +/** + * Service of SEInitializer + */ +service SEInitializer : XSEInitializer; + +} ; } ; } ; } ; } ; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/SecurityEnvironment.idl b/offapi/com/sun/star/xml/crypto/SecurityEnvironment.idl new file mode 100644 index 000000000..1c18e4b0a --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/SecurityEnvironment.idl @@ -0,0 +1,36 @@ +/* -*- 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_xml_crypto_SecurityEnvironment_idl_ +#define __com_sun_star_xml_crypto_SecurityEnvironment_idl_ + +#include <com/sun/star/xml/crypto/XSecurityEnvironment.idl> + +module com { module sun { module star { module xml { module crypto { + +/** + * Service of XSecurityEnvironment + */ +service SecurityEnvironment : XSecurityEnvironment; + +} ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/SecurityOperationStatus.idl b/offapi/com/sun/star/xml/crypto/SecurityOperationStatus.idl new file mode 100644 index 000000000..764886afc --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/SecurityOperationStatus.idl @@ -0,0 +1,138 @@ +/* -*- 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_xml_crypto_securityoperationstatus_idl_ +#define __com_sun_star_xml_crypto_securityoperationstatus_idl_ + +module com { module sun { module star { module xml { module crypto { + +/** + * Defines results for security operation. + */ +enum SecurityOperationStatus +{ + UNKNOWN, + OPERATION_SUCCEEDED, + RUNTIMEERROR_FAILED, +/** + * The following constants are derived from XMLSec error definitions, as following: + * + * XMLSEC_ERRORS_R_XMLSEC_FAILED + * XMLSEC_ERRORS_R_MALLOC_FAILED + * XMLSEC_ERRORS_R_STRDUP_FAILED + * XMLSEC_ERRORS_R_CRYPTO_FAILED + * XMLSEC_ERRORS_R_XML_FAILED + * XMLSEC_ERRORS_R_XSLT_FAILED + * XMLSEC_ERRORS_R_IO_FAILED + * XMLSEC_ERRORS_R_DISABLED + * XMLSEC_ERRORS_R_NOT_IMPLEMENTED + * XMLSEC_ERRORS_R_INVALID_SIZE + * XMLSEC_ERRORS_R_INVALID_DATA + * XMLSEC_ERRORS_R_INVALID_RESULT + * XMLSEC_ERRORS_R_INVALID_TYPE + * XMLSEC_ERRORS_R_INVALID_OPERATION + * XMLSEC_ERRORS_R_INVALID_STATUS + * XMLSEC_ERRORS_R_INVALID_FORMAT + * XMLSEC_ERRORS_R_DATA_NOT_MATCH + * XMLSEC_ERRORS_R_INVALID_NODE + * XMLSEC_ERRORS_R_INVALID_NODE_CONTENT + * XMLSEC_ERRORS_R_INVALID_NODE_ATTRIBUTE + * XMLSEC_ERRORS_R_MISSING_NODE_ATTRIBUTE + * XMLSEC_ERRORS_R_NODE_ALREADY_PRESENT + * XMLSEC_ERRORS_R_UNEXPECTED_NODE + * XMLSEC_ERRORS_R_NODE_NOT_FOUND + * XMLSEC_ERRORS_R_INVALID_TRANSFORM + * XMLSEC_ERRORS_R_INVALID_TRANSFORM_KEY + * XMLSEC_ERRORS_R_INVALID_URI_TYPE + * XMLSEC_ERRORS_R_TRANSFORM_SAME_DOCUMENT_REQUIRED + * XMLSEC_ERRORS_R_TRANSFORM_DISABLED + * XMLSEC_ERRORS_R_INVALID_KEY_DATA + * XMLSEC_ERRORS_R_KEY_DATA_NOT_FOUND + * XMLSEC_ERRORS_R_KEY_DATA_ALREADY_EXIST + * XMLSEC_ERRORS_R_INVALID_KEY_DATA_SIZE + * XMLSEC_ERRORS_R_KEY_NOT_FOUND + * XMLSEC_ERRORS_R_KEYDATA_DISABLED + * XMLSEC_ERRORS_R_MAX_RETRIEVALS_LEVEL + * XMLSEC_ERRORS_R_MAX_RETRIEVAL_TYPE_MISMATCH + * XMLSEC_ERRORS_R_MAX_ENCKEY_LEVEL + * XMLSEC_ERRORS_R_CERT_VERIFY_FAILED + * XMLSEC_ERRORS_R_CERT_NOT_FOUND + * XMLSEC_ERRORS_R_CERT_REVOKED + * XMLSEC_ERRORS_R_CERT_ISSUER_FAILED + * XMLSEC_ERRORS_R_CERT_NOT_YET_VALID + * XMLSEC_ERRORS_R_CERT_HAS_EXPIRED + * XMLSEC_ERRORS_R_DSIG_NO_REFERENCES + * XMLSEC_ERRORS_R_DSIG_INVALID_REFERENCE + * XMLSEC_ERRORS_R_ASSERTION + * XMLSEC_ERRORS_MAX_NUMBER + */ + ENGINE_FAILED, + MALLOC_FAILED, + STRDUP_FAILED, + CRYPTO_FAILED, + XML_FAILED, + XSLT_FAILED, + IO_FAILED, + DISABLED, + NOT_IMPLEMENTED, + INVALID_SIZE, + INVALID_DATA, + INVALID_RESULT, + INVALID_TYPE, + INVALID_OPERATION, + INVALID_STATUS, + INVALID_FORMAT, + DATA_NOT_MATCH, + INVALID_NODE, + INVALID_NODE_CONTENT, + INVALID_NODE_ATTRIBUTE, + MISSING_NODE_ATTRIBUTE, + NODE_ALREADY_PRESENT, + UNEXPECTED_NODE, + NODE_NOT_FOUND, + INVALID_TRANSFORM, + INVALID_TRANSFORM_KEY, + INVALID_URI_TYPE, + TRANSFORM_SAME_DOCUMENT_REQUIRED, + TRANSFORM_DISABLED, + INVALID_KEY_DATA, + KEY_DATA_NOT_FOUND, + KEY_DATA_ALREADY_EXIST, + INVALID_KEY_DATA_SIZE, + KEY_NOT_FOUND, + KEYDATA_DISABLED, + MAX_RETRIEVALS_LEVEL, + MAX_RETRIEVAL_TYPE_MISMATCH, + MAX_ENCKEY_LEVEL, + CERT_VERIFY_FAILED, + CERT_NOT_FOUND, + CERT_REVOKED, + CERT_ISSUER_FAILED, + CERT_NOT_YET_VALID, + CERT_HAS_EXPIRED, + DSIG_NO_REFERENCES, + DSIG_INVALID_REFERENCE, + ASSERTION +}; + +} ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/XCertificateCreator.idl b/offapi/com/sun/star/xml/crypto/XCertificateCreator.idl new file mode 100644 index 000000000..3137aa004 --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/XCertificateCreator.idl @@ -0,0 +1,55 @@ +/* -*- 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_xml_crypto_xsecurityenvironment_idl_ +#define __com_sun_star_xml_crypto_xsecurityenvironment_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> +#include <com/sun/star/security/XCertificate.idl> + +module com { module sun { module star { module xml { module crypto { + +/** + * Interface for creating and adding certificates + * + * @since LibreOffice 6.2 + */ +interface XCertificateCreator : com::sun::star::uno::XInterface +{ + /** + * Adds a certificate to the certificate database with the trust provided by the trust string. + */ + com::sun::star::security::XCertificate addDERCertificateToTheDatabase( + [in] sequence<byte> aDerCertificate, + [in] string aTrustString); + + /** + * Create certificate from raw DER encoded certificate and associate the private key with the certificate + */ + com::sun::star::security::XCertificate createDERCertificateWithPrivateKey( + [in] sequence<byte> aDerCertificate, + [in] sequence<byte> aPrivateKey) raises (com::sun::star::uno::SecurityException); +}; + +} ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/XCipherContext.idl b/offapi/com/sun/star/xml/crypto/XCipherContext.idl new file mode 100644 index 000000000..bae91c7b1 --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/XCipherContext.idl @@ -0,0 +1,69 @@ +/* -*- 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_xml_crypto_xciphercontext_idl_ +#define __com_sun_star_xml_crypto_xciphercontext_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/lang/DisposedException.idl> + + + module com { module sun { module star { module xml { module crypto { + +/** This interface allows to encrypt/decrypt data using the cipher context. + <p> + The algorithm as well as encryption data are specified on object creation. + </p> + + @see XCipherContextSupplier + @since OOo 3.4 + */ +interface XCipherContext : com::sun::star::uno::XInterface +{ + /** encrypts/decrypts the data using the cipher. + <p> + Please have in mind, the cipher object state might depend from the + already encrypted/decrypted data ( it depends from the used + algorithm ). + </p> + + <p> + Whether the object does encryption or decryption is specified by + creation of the object. + </p> + + @param aData + data that should be encrypted/decrypted + */ + sequence<byte> convertWithCipherContext( [in] sequence< byte > aData ) + raises( ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::lang::DisposedException ); + + /** finalizes cipher and disposes context. + */ + sequence<byte> finalizeCipherContextAndDispose() + raises( ::com::sun::star::lang::DisposedException ); +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/XCipherContextSupplier.idl b/offapi/com/sun/star/xml/crypto/XCipherContextSupplier.idl new file mode 100644 index 000000000..f447e5889 --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/XCipherContextSupplier.idl @@ -0,0 +1,70 @@ +/* -*- 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_xml_crypto_xciphercontextsupplier_idl_ +#define __com_sun_star_xml_crypto_xciphercontextsupplier_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/beans/NamedValue.idl> +#include <com/sun/star/xml/crypto/XCipherContext.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> + + + module com { module sun { module star { module xml { module crypto { + +/** This interface allows to get an object that allows to encrypt/decrypt data + using the specified algorithm. + + @since OOo 3.4 + */ +interface XCipherContextSupplier : com::sun::star::uno::XInterface +{ + /** returns an object that allows to encrypt/decrypt data. + + @param nCipherID + the internal ID specifying the algorithm, + should take value from CipherID + + @param aKey + the key that should be used for the encryption + + @param aInitializationVector + the initialization vector that should be used for the encryption + + @param bEncryption + whether an encryption or decryption cipher should be created + `TRUE` - Encryption + `FALSE` - Decryption + + @param aParams + optional parameters that could be used to initialize the cipher, + + @throws ::com::sun::star::lang::IllegalArgumentException + one of provided arguments is illegal + */ + + XCipherContext getCipherContext( [in] long nCipherID, [in] sequence< byte > aKey, [in] sequence< byte > aInitializationVector, [in] boolean bEncryption, [in] sequence< ::com::sun::star::beans::NamedValue > aParams ) + raises( ::com::sun::star::lang::IllegalArgumentException ); +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/XDigestContext.idl b/offapi/com/sun/star/xml/crypto/XDigestContext.idl new file mode 100644 index 000000000..06553a7da --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/XDigestContext.idl @@ -0,0 +1,57 @@ +/* -*- 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_xml_crypto_xdigestcontext_idl_ +#define __com_sun_star_xml_crypto_xdigestcontext_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/lang/DisposedException.idl> + + + module com { module sun { module star { module xml { module crypto { + +/** This interface allows to generate the digest. + <p> + The algorithm to generate the digest is specified on object creation. + </p> + + @see XDigestContextSupplier + @since OOo 3.4 + */ +interface XDigestContext : com::sun::star::uno::XInterface +{ + /** update the digest with the given data. + + @param aData + data that should be used to update the digest + */ + void updateDigest( [in] sequence< byte > aData ) + raises( ::com::sun::star::lang::DisposedException ); + + /** finalizes digest and disposes context. + */ + sequence<byte> finalizeDigestAndDispose() + raises( ::com::sun::star::lang::DisposedException ); +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/XDigestContextSupplier.idl b/offapi/com/sun/star/xml/crypto/XDigestContextSupplier.idl new file mode 100644 index 000000000..ead3e8ea9 --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/XDigestContextSupplier.idl @@ -0,0 +1,61 @@ +/* -*- 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_xml_crypto_xdigestcontextsupplier_idl_ +#define __com_sun_star_xml_crypto_xdigestcontextsupplier_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/beans/NamedValue.idl> +#include <com/sun/star/xml/crypto/XDigestContext.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> + + + module com { module sun { module star { module xml { module crypto { + +/** This interface allows to get an object to generate a digest of a specified + format. + + @since OOo 3.4 + */ +interface XDigestContextSupplier : com::sun::star::uno::XInterface +{ + /** returns an object that allows to generate the specified digest. + + @param nDigestID + the internal ID specifying the algorithm, + should take value from DigestID + + @param aParams + optional parameters that could be used to initialize the digest, + for example, it could contain a key and etc. + + @throws ::com::sun::star::lang::IllegalArgumentException + one of provided arguments is illegal + */ + XDigestContext getDigestContext( + [in] long nDigestID, + [in] sequence< ::com::sun::star::beans::NamedValue > aParams ) + raises( ::com::sun::star::lang::IllegalArgumentException ); +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/XMLEncryptionException.idl b/offapi/com/sun/star/xml/crypto/XMLEncryptionException.idl new file mode 100644 index 000000000..eed651c01 --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/XMLEncryptionException.idl @@ -0,0 +1,35 @@ +/* -*- 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_xml_crypto_XMLEncryptionException_idl__ +#define __com_sun_star_xml_crypto_XMLEncryptionException_idl__ + +#include <com/sun/star/security/EncryptionException.idl> + +module com { module sun { module star { module xml { module crypto { + +exception XMLEncryptionException : com::sun::star::security::EncryptionException +{ +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/XMLSecurityContext.idl b/offapi/com/sun/star/xml/crypto/XMLSecurityContext.idl new file mode 100644 index 000000000..46fce6231 --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/XMLSecurityContext.idl @@ -0,0 +1,36 @@ +/* -*- 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_xml_crypto_XMLSecurityContext_idl_ +#define __com_sun_star_xml_crypto_XMLSecurityContext_idl_ + +#include <com/sun/star/xml/crypto/XXMLSecurityContext.idl> + +module com { module sun { module star { module xml { module crypto { + +/** + * Service of XMLSecurityContext + */ +service XMLSecurityContext : XXMLSecurityContext; + +} ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/XMLSignature.idl b/offapi/com/sun/star/xml/crypto/XMLSignature.idl new file mode 100644 index 000000000..2596bd351 --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/XMLSignature.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_xml_crypto_xmlsignature_idl_ +#define __com_sun_star_xml_crypto_xmlsignature_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> +#include <com/sun/star/xml/crypto/XXMLSignature.idl> +#include <com/sun/star/lang/XInitialization.idl> + +module com { module sun { module star { module xml { module crypto { + +/** + * Service of XMLSignature + */ +service XMLSignature { + interface com::sun::star::xml::crypto::XXMLSignature ; + interface com::sun::star::lang::XInitialization ; +} ; + +} ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/XMLSignatureException.idl b/offapi/com/sun/star/xml/crypto/XMLSignatureException.idl new file mode 100644 index 000000000..70949f68e --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/XMLSignatureException.idl @@ -0,0 +1,35 @@ +/* -*- 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_xml_crypto_XMLSignatureException_idl__ +#define __com_sun_star_xml_crypto_XMLSignatureException_idl__ + +#include <com/sun/star/security/SignatureException.idl> + +module com { module sun { module star { module xml { module crypto { + +exception XMLSignatureException : com::sun::star::security::SignatureException +{ +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/XNSSInitializer.idl b/offapi/com/sun/star/xml/crypto/XNSSInitializer.idl new file mode 100644 index 000000000..a6ff1ab7b --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/XNSSInitializer.idl @@ -0,0 +1,69 @@ +/* -*- 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_xml_crypto_XNSSInitializer_idl_ +#define __com_sun_star_xml_crypto_XNSSInitializer_idl_ + +#include <com/sun/star/xml/crypto/XCipherContextSupplier.idl> +#include <com/sun/star/xml/crypto/XDigestContextSupplier.idl> +#include <com/sun/star/xml/crypto/NSSProfile.idl> +#include <com/sun/star/xml/lang/XInitialization.idl> + +module com { module sun { module star { module xml { module crypto { + +/** + @since LibreOffice 4.0 + */ +interface XNSSInitializer { + interface ::com::sun::star::xml::crypto::XDigestContextSupplier; + interface ::com::sun::star::xml::crypto::XCipherContextSupplier; + + /** the current path to the NSS databases + + This attribute returns the current setting, based on the user selection + or automatic detection. This value can change until someone uses NSS + crypto functions, because just then LibreOffice initializes the NSS + library and the value stays fixed until LibreOffice is restarted! + + @since LibreOffice 7.1 + */ + [attribute, readonly] string NSSPath; + + /** the state of the NSS initialization + + This attribute returns true, if the NSS library is initialized. + + @see NSSPath + @since LibreOffice 7.1 + */ + [attribute, readonly] boolean IsNSSinitialized; + + /** get the current profile list + + @since LibreOffice 7.1 + */ + sequence<NSSProfile> getNSSProfiles(); +}; + +} ; } ; } ; } ; } ; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/XSEInitializer.idl b/offapi/com/sun/star/xml/crypto/XSEInitializer.idl new file mode 100644 index 000000000..fc8ce622b --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/XSEInitializer.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_xml_crypto_xseinitializer_idl_ +#define __com_sun_star_xml_crypto_xseinitializer_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> + +module com { module sun { module star { module xml { module crypto { + +interface XXMLSecurityContext; + +/** + * Interface to manipulate Security Environment + */ +interface XSEInitializer : com::sun::star::uno::XInterface +{ + /** + Creates a security context. + + @param aString + reserved for internal use. + + @return the security context created + */ + ::com::sun::star::xml::crypto::XXMLSecurityContext createSecurityContext( [in] string aString ); + + /** + * Frees a security context. + * + * @param securityContext the security context to be freed + */ + void freeSecurityContext([in] com::sun::star::xml::crypto::XXMLSecurityContext securityContext); +}; + +} ; } ; } ; } ; } ; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/XSecurityEnvironment.idl b/offapi/com/sun/star/xml/crypto/XSecurityEnvironment.idl new file mode 100644 index 000000000..f3d1ddbf6 --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/XSecurityEnvironment.idl @@ -0,0 +1,115 @@ +/* -*- 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_xml_crypto_xsecurityenvironment_idl_ +#define __com_sun_star_xml_crypto_xsecurityenvironment_idl_ + +#include <com/sun/star/uno/SecurityException.idl> +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> +#include <com/sun/star/security/XCertificate.idl> +#include <com/sun/star/security/CertificateCharacters.idl> +#include <com/sun/star/security/CertificateValidity.idl> + +module com { module sun { module star { module xml { module crypto { + +/** + * Interface of Security Environment + */ +interface XSecurityEnvironment : com::sun::star::uno::XInterface +{ + /** + * Get personal certificates from the environment + */ + sequence< com::sun::star::security::XCertificate > getPersonalCertificates() raises( com::sun::star::uno::SecurityException ) ; + + /** + * Get certificate from the environment by issuer name and serial number + */ + com::sun::star::security::XCertificate getCertificate( [in] string issuerName, [in] sequence< byte > serialNumber ) raises( com::sun::star::uno::SecurityException ) ; + + /** + * Build certificate path from a certain certificate + */ + sequence< com::sun::star::security::XCertificate > buildCertificatePath( [in] com::sun::star::security::XCertificate beginCert ) raises( com::sun::star::uno::SecurityException ) ; + + /** + * Create certificate interface from raw DER encoded certificate + */ + com::sun::star::security::XCertificate createCertificateFromRaw( [in] sequence< byte > rawCertificate ) raises( com::sun::star::uno::SecurityException ) ; + + /** + * Create certificate interface from a Base64 encoded certificate. + */ + com::sun::star::security::XCertificate createCertificateFromAscii( [in] string asciiCertificate ) raises( com::sun::star::uno::SecurityException ) ; + + /** + Verify a certificate. + + The method provides a way to verify a certificate. + @param xEECertificate + The certificate which is to be validated. + + @param intermediateCertificates + Additional certificates which can be used by the method in constructing + the certificate chain. The root certificate may also be contained. However, + the implementation must check if the root certificate is indeed trusted by + the user. + All entries of the sequence must be non-null references. + + @return + The validation status will returned as a bit-wise long, please refer to + CertificateValidity definition. + */ + long verifyCertificate( [in] com::sun::star::security::XCertificate xEECertificate, + [in] sequence< com::sun::star::security::XCertificate > intermediateCertificates) + raises( com::sun::star::uno::SecurityException ) ; + + /** + * Get a certificate characters. + * + * The method provides a way to get certificate characters like: + * 1. Whether or not the certificate have a private key in the user profile. + * 2. Whether or not the certificate is a trusted certificate. + * 3. Whether or not the certificate is a self-signed certificate. + * + * The certificate characters is defined as bit-wise long, please refer to + * CertificateCharacters definition. + */ + long getCertificateCharacters( [in] com::sun::star::security::XCertificate xCertificate ) raises( com::sun::star::uno::SecurityException ) ; + + /** + * Get the Environment detail information + */ + string getSecurityEnvironmentInformation ( ); + + /** + * List all certificates, private (as returned by getPersonalCertificates) as well as those of other people/orgas + * + * @since LibreOffice 6.0 + */ + sequence< com::sun::star::security::XCertificate > getAllCertificates() raises( com::sun::star::uno::SecurityException ) ; + +} ; + +} ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/XUriBinding.idl b/offapi/com/sun/star/xml/crypto/XUriBinding.idl new file mode 100644 index 000000000..0bffbca94 --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/XUriBinding.idl @@ -0,0 +1,61 @@ +/* -*- 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_xml_crypto_xuribinding_idl_ +#define __com_sun_star_xml_crypto_xuribinding_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> +#include <com/sun/star/io/XInputStream.idl> + +module com { module sun { module star { module xml { module crypto { + +/** + * Interface of Uri Binding. + * <p> + * This interface is used to dynamically bind a uri with a + * XInputStream interface. + */ +interface XUriBinding : com::sun::star::uno::XInterface +{ + /** + * Sets the XInputStream interface for a uri. + * + * @param uri the uri to bind + * @param InputStream the XInputStream to be bound + */ + void setUriBinding([in] string uri, + [in] com::sun::star::io::XInputStream InputStream) + raises( com::sun::star::uno::Exception ); + + /** + * Gets the XInputStream interface for a uri. + * + * @param uri the uri whose binding is to get + * @return the XInputStream bound with the uri + */ + com::sun::star::io::XInputStream getUriBinding([in] string uri) + raises( com::sun::star::uno::Exception ); +}; + +} ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/XXMLEncryption.idl b/offapi/com/sun/star/xml/crypto/XXMLEncryption.idl new file mode 100644 index 000000000..20fd5e74d --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/XXMLEncryption.idl @@ -0,0 +1,73 @@ +/* -*- 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_xml_crypto_xxmlencryption_idl_ +#define __com_sun_star_xml_crypto_xxmlencryption_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> +#include <com/sun/star/uno/SecurityException.idl> +#include <com/sun/star/xml/crypto/XXMLEncryptionTemplate.idl> +#include <com/sun/star/xml/wrapper/XXMLElementWrapper.idl> +#include <com/sun/star/xml/crypto/XXMLSecurityContext.idl> +#include <com/sun/star/xml/crypto/XMLEncryptionException.idl> + +module com { module sun { module star { module xml { module crypto { + +/** + * Interface of XML encryption + * + * <p>This interface represents a XML encryptor or decryptor.</p> + * + * <p>The encryptor or decryptor concrete a key by retrieve security context + * and encryption template.</p> + * + * <p>In some cases, the encryptor or decryptor can determine and locate the + * EncryptedKey from the encryption template by dereference the RetrievalMethod + * inside EncryptedData.</p> + * + * <p>In some cases, the EncryptedKey need to be clearly pointed out by the + * encryption template.</p> + */ +interface XXMLEncryption : com::sun::star::uno::XInterface +{ + /** + * Perform encryption in the environment of encryption template and context. + */ + com::sun::star::xml::crypto::XXMLEncryptionTemplate encrypt( + [in] com::sun::star::xml::crypto::XXMLEncryptionTemplate aTemplate , + [in] com::sun::star::xml::crypto::XSecurityEnvironment aEnvironment + ) raises( com::sun::star::xml::crypto::XMLEncryptionException , + com::sun::star::uno::SecurityException ) ; + + /** + * Perform decryption in the environment of encryption template and context. + */ + com::sun::star::xml::crypto::XXMLEncryptionTemplate decrypt( + [in] com::sun::star::xml::crypto::XXMLEncryptionTemplate aTemplate , + [in] com::sun::star::xml::crypto::XXMLSecurityContext aContext + ) raises( com::sun::star::xml::crypto::XMLEncryptionException , + com::sun::star::uno::SecurityException ) ; +} ; + +} ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/XXMLEncryptionTemplate.idl b/offapi/com/sun/star/xml/crypto/XXMLEncryptionTemplate.idl new file mode 100644 index 000000000..adee7b121 --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/XXMLEncryptionTemplate.idl @@ -0,0 +1,83 @@ +/* -*- 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_xml_crypto_xxmlencryptiontemplate_idl_ +#define __com_sun_star_xml_crypto_xxmlencryptiontemplate_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/xml/wrapper/XXMLElementWrapper.idl> +#include <com/sun/star/xml/crypto/XXMLSecurityTemplate.idl> + +module com { module sun { module star { module xml { module crypto { + +/** + * Interface of XML encryption template + * + * <p>This interface represents an encryption template, which is the same as the + * desired XML encryption element[ EncryptedType ] but some of the nodes may be + * empty. The empty entities include CipherValue, which is a subset of + * EncryptedData or EncryptedKey. Empty entities are not allowed in an encryption + * template when performing decryption.</p> + * + * <p>In some cases, the encryptor or decryptor can determine and locate the + * EncryptedKey from the encryption template by dereference the RetrievalMethod + * inside EncryptedData.</p> + * + * <p>In some cases, the EncryptedKey need to be clearly pointed out by the + * encryption template.</p> + * + * <p>With the help of encryption context, the encryptor or decryptor specifies + * the key from the KeyInfo in the encryption template.</p> + * + * + * <p>It isn't a good method to set the EncryptedKey here. In general, there is + * a RetrievalMethod in EncryptedData by which we can get the EncryptedKey. + * + * And sometimes, in the low level, it is hard to determine what the key is + * except that the high level application tell the mechanism and parameters. + * + * So I think it will be more simple that the application set the encrypted key + * information. In this case, the application only need to know the XML schema + * or DTD and the encryption device. If so, the high level application takes the + * action of build the EncryptedKey template and references it in the element of + * EncryptedData. And in this case, the calling to set up EncryptedKey template + * and target is not necessary, because the encryptor or decryptor can determine + * and locate the EncryptedKey from the encryption template of EncryptedData by + * dereference the RetrievalMethod. + * + * In some situation, the high level applications do not want to know anything + * about crypto devices( May be he must, because the lower level do not know + * what the key is ). If it gives the key value, it can get EncryptedKey by + * setting the key template and key value target.</p> + */ +interface XXMLEncryptionTemplate : XXMLSecurityTemplate +{ + /** + * Get the target XML element, i.e. the element to be encrypted + */ + com::sun::star::xml::wrapper::XXMLElementWrapper getTarget( + ) ; +} ; + +} ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/XXMLSecurityContext.idl b/offapi/com/sun/star/xml/crypto/XXMLSecurityContext.idl new file mode 100644 index 000000000..742d550af --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/XXMLSecurityContext.idl @@ -0,0 +1,75 @@ +/* -*- 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_xml_crypto_xxmlsecuritycontext_idl_ +#define __com_sun_star_xml_crypto_xxmlsecuritycontext_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/security/SecurityInfrastructureException.idl> +#include <com/sun/star/xml/crypto/XSecurityEnvironment.idl> + +module com { module sun { module star { module xml { module crypto { + +/** + * Interface of XML security context + * + * <p>This interface specifies a certain signature context. By signature + * context, the signer or verifier retrieves key specification.</p> + */ +interface XXMLSecurityContext : com::sun::star::uno::XInterface +{ + /** + * Add personal security environment , and return the index of the added environment. + */ + long addSecurityEnvironment( [in] XSecurityEnvironment aSecurityEnvironment + ) raises( com::sun::star::security::SecurityInfrastructureException ) ; + + /** + * Get the number of security environments + */ + long getSecurityEnvironmentNumber( ) ; + + /** + * Get personal security environment + */ + com::sun::star::xml::crypto::XSecurityEnvironment getSecurityEnvironmentByIndex([in] long index ) ; + + /** + * An handy method to get the first personal security environment. + * In XMLSec/NSS, the first personal security environment should be the "internal slot" + */ + com::sun::star::xml::crypto::XSecurityEnvironment getSecurityEnvironment( ) ; + + /** + * Get the ID of the internal security environment + */ + long getDefaultSecurityEnvironmentIndex( ) ; + + /** + * set the ID of the internal security environment + */ + void setDefaultSecurityEnvironmentIndex([in] long index ) ; + +} ; + +} ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/XXMLSecurityTemplate.idl b/offapi/com/sun/star/xml/crypto/XXMLSecurityTemplate.idl new file mode 100644 index 000000000..c29f2440b --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/XXMLSecurityTemplate.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_xml_crypto_xxmlsecuritytemplate_idl_ +#define __com_sun_star_xml_crypto_xxmlsecuritytemplate_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/xml/wrapper/XXMLElementWrapper.idl> +#include <com/sun/star/xml/crypto/XUriBinding.idl> +#include <com/sun/star/xml/crypto/SecurityOperationStatus.idl> + +module com { module sun { module star { module xml { module crypto { + +/** + * Interface of the XML security template + * + * <p>This interface represents a security template, which is the super interface + * of the XXMLSignatureTemplate interface and the XXMLEncryptionTemplate interface. + */ +interface XXMLSecurityTemplate : com::sun::star::uno::XInterface +{ + /** + * Load a XML signature template from XML signature element + */ + void setTemplate( + [in] com::sun::star::xml::wrapper::XXMLElementWrapper aXmlElement + ) raises( com::sun::star::lang::IllegalArgumentException ) ; + + /** + * Get the XML signature element that represents the signature template + */ + com::sun::star::xml::wrapper::XXMLElementWrapper getTemplate( + ) ; + + /** + * Load the target XML element, i.e. the element to be signed + */ + void setTarget( + [in] com::sun::star::xml::wrapper::XXMLElementWrapper aXmlElement + ) raises( com::sun::star::lang::IllegalArgumentException ) ; + + /** + * Set the template status + */ + void setStatus( + [in] SecurityOperationStatus status + ) raises( com::sun::star::lang::IllegalArgumentException ) ; + + /** + * Get the template status + */ + SecurityOperationStatus getStatus( ) ; +} ; + +} ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/XXMLSignature.idl b/offapi/com/sun/star/xml/crypto/XXMLSignature.idl new file mode 100644 index 000000000..b0db29018 --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/XXMLSignature.idl @@ -0,0 +1,77 @@ +/* -*- 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_xml_crypto_xxmlsignature_idl_ +#define __com_sun_star_xml_crypto_xxmlsignature_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/SecurityException.idl> +#include <com/sun/star/xml/crypto/XXMLSignatureTemplate.idl> +#include <com/sun/star/xml/crypto/XXMLSecurityContext.idl> +#include <com/sun/star/xml/crypto/XMLSignatureException.idl> + +module com { module sun { module star { module xml { module crypto { + +/** + * Interface of XML signature + * + * <p>This interface represents a XML signer or verifier.</p> + * + * <p>The signer or verifier concrete a key by retrieve signature context and + * signature template.</p> + * + * <p>In some cases, the signer or verifier can determine and locate the + * contents to be signed from the signature template by dereference the URI.</p> + * + * <p>In some cases, the contents to be signed need to be clearly pointed out by + * the signature template.</p> + */ +interface XXMLSignature : com::sun::star::uno::XInterface +{ + /** + * Perform signature in the environment of signature template and context. + */ + com::sun::star::xml::crypto::XXMLSignatureTemplate generate( + [in] com::sun::star::xml::crypto::XXMLSignatureTemplate aTemplate , + [in] com::sun::star::xml::crypto::XSecurityEnvironment aEnvironment + ) raises( com::sun::star::xml::crypto::XMLSignatureException , + com::sun::star::uno::SecurityException ) ; + + /** + * Perform validation in the environment of signature template and context. + */ + com::sun::star::xml::crypto::XXMLSignatureTemplate validate( + [in] com::sun::star::xml::crypto::XXMLSignatureTemplate aTemplate , + [in] com::sun::star::xml::crypto::XXMLSecurityContext aContext + ) raises( com::sun::star::xml::crypto::XMLSignatureException , + com::sun::star::uno::SecurityException ) ; + + /** + * get the time used by the engine, JSR105, + * this method is used for evaluation. + */ + /* + hyper getEngineTime([in] long id); + */ +}; + +} ; } ; } ; } ; } ; +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/XXMLSignatureTemplate.idl b/offapi/com/sun/star/xml/crypto/XXMLSignatureTemplate.idl new file mode 100644 index 000000000..32fc3b991 --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/XXMLSignatureTemplate.idl @@ -0,0 +1,70 @@ +/* -*- 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_xml_crypto_xxmlsignaturetemplate_idl_ +#define __com_sun_star_xml_crypto_xxmlsignaturetemplate_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/xml/wrapper/XXMLElementWrapper.idl> +#include <com/sun/star/xml/crypto/XUriBinding.idl> +#include <com/sun/star/xml/crypto/XXMLSecurityTemplate.idl> + +module com { module sun { module star { module xml { module crypto { + +/** + * Interface of XML signature template + * + * <p>This interface represents a signature template, which is the same as the + * desired XML signature element but some of the nodes may be empty. The empty + * entities include digest value and signature value. Empty entities are not + * allowed in a signature template when performing validation.</p> + * + * <p>In some cases, the signer or verifier can determine and locate the + * contents to be signed from the template by dereference the URI.</p> + * + * <p>With the help of signature context, the signer or verifier specifies the + * key from the KeyInfo in the signature template.</p> + */ +interface XXMLSignatureTemplate : XXMLSecurityTemplate +{ + /** + * Get the target XML element, i.e. the element to be signed + */ + sequence< com::sun::star::xml::wrapper::XXMLElementWrapper > getTargets( + ) ; + + /** + * Set the dynamic URI binding + */ + void setBinding( + [in] com::sun::star::xml::crypto::XUriBinding aUriBinding + ) raises( com::sun::star::lang::IllegalArgumentException ) ; + + /** + * Get the dynamic URI binding + */ + com::sun::star::xml::crypto::XUriBinding getBinding( ) ; +} ; + +} ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/sax/ConstOfSecurityId.idl b/offapi/com/sun/star/xml/crypto/sax/ConstOfSecurityId.idl new file mode 100644 index 000000000..d550519ae --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/sax/ConstOfSecurityId.idl @@ -0,0 +1,37 @@ +/* -*- 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_xml_crypto_sax_constofsecurityid_idl_ +#define __com_sun_star_xml_crypto_sax_constofsecurityid_idl_ + +module com { module sun { module star { module xml { module crypto { module sax { + +/** + * Represents the undefined security id + */ +constants ConstOfSecurityId +{ + const long UNDEFINEDSECURITYID = -1; +}; + +} ; } ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/sax/ElementMarkPriority.idl b/offapi/com/sun/star/xml/crypto/sax/ElementMarkPriority.idl new file mode 100644 index 000000000..ead463f3f --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/sax/ElementMarkPriority.idl @@ -0,0 +1,53 @@ +/* -*- 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_xml_crypto_sax_elementmarkpriority_idl_ +#define __com_sun_star_xml_crypto_sax_elementmarkpriority_idl_ + +module com { module sun { module star { module xml { module crypto { module sax { + +/** + * Defines priority for the element mark's notification. + * <p> + * The PRI_MINIMUM priority is a value less than any practical + * priority value, it is used when compare between different + * priority values. + * <p> + * The PRI_AFTERMODIFY priority represents the notification will be + * sent after any internal modification has finished. + * <p> + * The PRI_BEFOREMODIFY priority represents the notification will be + * sent before any internal modification happens. + * <p> + * So an element mark with PRI_BEFOREMODIFY will be handled first, + * and one with PRI_AFTERMODIFY will be handled at last. + */ +enum ElementMarkPriority +{ + MINIMUM = 1, + AFTERMODIFY, + BEFOREMODIFY +}; + +} ; } ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/sax/ElementMarkType.idl b/offapi/com/sun/star/xml/crypto/sax/ElementMarkType.idl new file mode 100644 index 000000000..c440019c4 --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/sax/ElementMarkType.idl @@ -0,0 +1,41 @@ +/* -*- 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_xml_crypto_sax_elementmarktype_idl_ +#define __com_sun_star_xml_crypto_sax_elementmarktype_idl_ + +module com { module sun { module star { module xml { module crypto { module sax { + +/** + * Defines types of element mark. + * <p> + * the TYPEOFELEMENTMARK type represents a blocker, and the TYPEOFELEMENTCOLLECTOR + * type represents an element collector. + */ +enum ElementMarkType +{ + ELEMENTMARK = 1, + ELEMENTCOLLECTOR +}; + +} ; } ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/sax/ElementStackItem.idl b/offapi/com/sun/star/xml/crypto/sax/ElementStackItem.idl new file mode 100644 index 000000000..01715c6b4 --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/sax/ElementStackItem.idl @@ -0,0 +1,52 @@ +/* -*- 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_xml_crypto_sax_ElementStackItem_idl_ +#define __com_sun_star_xml_crypto_sax_ElementStackItem_idl_ + +#include <com/sun/star/xml/sax/XAttributeList.idl> + +module com { module sun { module star { module xml { module crypto { module sax { + +/** + * A struct to keep a startElement/endElement SAX event. + */ +struct ElementStackItem +{ + /** + * whether it is a startElement event + */ + boolean isStartElementEvent; + + /** + * the name of the element + */ + string elementName; + + /** + * attribute list for a startElement event + */ + com::sun::star::xml::sax::XAttributeList xAttributes; +}; + +} ; } ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/sax/XBlockerMonitor.idl b/offapi/com/sun/star/xml/crypto/sax/XBlockerMonitor.idl new file mode 100644 index 000000000..35eace3f6 --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/sax/XBlockerMonitor.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_xml_crypto_sax_xblockermonitor_idl_ +#define __com_sun_star_xml_crypto_sax_xblockermonitor_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> + +module com { module sun { module star { module xml { module crypto { module sax { + +/** + * Interface of Blocker Monitor. + * <p> + * This interface is used to manipulate a blocker. + */ +interface XBlockerMonitor : com::sun::star::uno::XInterface +{ + /** + * Configures the blocker's id. + * + * @param id the keeper id of the blocker + */ + void setBlockerId([in] long id) + raises( com::sun::star::uno::Exception ); +}; + +} ; } ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/sax/XDecryptionResultBroadcaster.idl b/offapi/com/sun/star/xml/crypto/sax/XDecryptionResultBroadcaster.idl new file mode 100644 index 000000000..21bf34a8f --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/sax/XDecryptionResultBroadcaster.idl @@ -0,0 +1,63 @@ +/* -*- 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_xml_crypto_sax_xdecryptionresultbroadcaster_idl_ +#define __com_sun_star_xml_crypto_sax_xdecryptionresultbroadcaster_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> + +module com { module sun { module star { module xml { module crypto { module sax { + +interface XDecryptionResultListener; + +/** + * Interface of Decryption Result Broadcaster. + * <p> + * This interface is used to manipulate decryption result listener. + */ +interface XDecryptionResultBroadcaster : com::sun::star::uno::XInterface +{ + /** + * Adds a new decryption result listener. + * <p> + * When the decryption is finished, the result information will be sent to this + * listener. + * + * @param listener the listener to be added + */ + void addDecryptionResultListener( + [in] XDecryptionResultListener listener) + raises( com::sun::star::uno::Exception ); + + /** + * Removes a decryption result listener. + * <p> + * After a listener is removed, no result information will be sent to it. + * + * @param listener the listener to be removed + */ + void removeDecryptionResultListener([in] XDecryptionResultListener listener); +}; + +} ; } ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/sax/XDecryptionResultListener.idl b/offapi/com/sun/star/xml/crypto/sax/XDecryptionResultListener.idl new file mode 100644 index 000000000..93bf32913 --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/sax/XDecryptionResultListener.idl @@ -0,0 +1,52 @@ +/* -*- 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_xml_crypto_sax_xdecryptionresultlistener_idl_ +#define __com_sun_star_xml_crypto_sax_xdecryptionresultlistener_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> +#include <com/sun/star/xml/crypto/SecurityOperationStatus.idl> + +module com { module sun { module star { module xml { module crypto { module sax { + +/** + * Interface of Decryption Result Listener. + * <p> + * This interface is used to receive the result information of a + * decryption operation. + */ +interface XDecryptionResultListener : com::sun::star::uno::XInterface +{ + /** + * Notifies the decryption result. + * + * @param securityId the security id of the encryption to be decrypted + * @param decryptionResult the result information + */ + void decrypted( + [in] long securityId, + [in] com::sun::star::xml::crypto::SecurityOperationStatus decryptionResult); +}; + +} ; } ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/sax/XElementStackKeeper.idl b/offapi/com/sun/star/xml/crypto/sax/XElementStackKeeper.idl new file mode 100644 index 000000000..05d0f4903 --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/sax/XElementStackKeeper.idl @@ -0,0 +1,60 @@ +/* -*- 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_xml_crypto_sax_xelementstackkeeper_idl_ +#define __com_sun_star_xml_crypto_sax_xelementstackkeeper_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> +#include <com/sun/star/xml/sax/XDocumentHandler.idl> +#include <com/sun/star/xml/crypto/sax/ElementStackItem.idl> + +module com { module sun { module star { module xml { module crypto { module sax { + +/** + * Manipulate the "key SAX events" in a SAX event stream. + */ +interface XElementStackKeeper : com::sun::star::uno::XInterface +{ + /** + * Starts to buffer key SAX events. + */ + void start(); + + /** + * Stops buffering key SAX events. + */ + void stop(); + + /** + * Transfers the buffered key SAX events to a document handler. + * <p> + * All transferred events are removed from the buffer. + * + * @param handler the document to receive key SAX events + * @param includingTheLastEvent whether to transfer the last key SAX event + */ + void retrieve( [in] com::sun::star::xml::sax::XDocumentHandler handler, [in] boolean includingTheLastEvent); +}; + +} ; } ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/sax/XEncryptionResultBroadcaster.idl b/offapi/com/sun/star/xml/crypto/sax/XEncryptionResultBroadcaster.idl new file mode 100644 index 000000000..ac4390122 --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/sax/XEncryptionResultBroadcaster.idl @@ -0,0 +1,63 @@ +/* -*- 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_xml_crypto_sax_xencryptionresultbroadcaster_idl_ +#define __com_sun_star_xml_crypto_sax_xencryptionresultbroadcaster_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> + +module com { module sun { module star { module xml { module crypto { module sax { + +interface XEncryptionResultListener; + +/** + * Interface of Encryption Result Broadcaster. + * <p> + * This interface is used to manipulate encryption result listener. + */ +interface XEncryptionResultBroadcaster : com::sun::star::uno::XInterface +{ + /** + * Adds a new encryption result listener. + * <p> + * When the encryption is finished, the result information will be sent to this + * listener. + * + * @param listener the listener to be added + */ + void addEncryptionResultListener( + [in] XEncryptionResultListener listener) + raises( com::sun::star::uno::Exception ); + + /** + * Removes an encryption result listener. + * <p> + * After a listener is removed, no result information will be sent to it. + * + * @param listener the listener to be removed + */ + void removeEncryptionResultListener([in] XEncryptionResultListener listener); +}; + +} ; } ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/sax/XEncryptionResultListener.idl b/offapi/com/sun/star/xml/crypto/sax/XEncryptionResultListener.idl new file mode 100644 index 000000000..38aeb9ca4 --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/sax/XEncryptionResultListener.idl @@ -0,0 +1,55 @@ +/* -*- 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_xml_crypto_sax_xencryptionresultlistener_idl_ +#define __com_sun_star_xml_crypto_sax_xencryptionresultlistener_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> +#include <com/sun/star/xml/crypto/SecurityOperationStatus.idl> + +module com { module sun { module star { module xml { module crypto { module sax { + +/** + * Interface of Encryption Result Listener. + * <p> + * This interface is used to receive the result information of an + * encryption operation. + */ +interface XEncryptionResultListener : com::sun::star::uno::XInterface +{ + /** + * Notifies the encryption result. + * + * @param securityId the security id of the encryption + * @param encryptionResult the result information + */ + void encrypted( + [in] long securityId, + [in] com::sun::star::xml::crypto::SecurityOperationStatus encryptionResult); +}; + +} ; } ; } ; } ; } ; } ; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/sax/XKeyCollector.idl b/offapi/com/sun/star/xml/crypto/sax/XKeyCollector.idl new file mode 100644 index 000000000..02f2dd10b --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/sax/XKeyCollector.idl @@ -0,0 +1,49 @@ +/* -*- 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_xml_crypto_sax_xkeycollector_idl_ +#define __com_sun_star_xml_crypto_sax_xkeycollector_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> + +module com { module sun { module star { module xml { module crypto { module sax { + +/** + * Interface of Key Collector. + * <p> + * This interface is used to manipulate key materials. + */ +interface XKeyCollector : com::sun::star::uno::XInterface +{ + /** + * Set the keeper id of the key element. + * + * @param id the keeper id of the key element. If the id is 0, then it represents + * that this security entity has included its key material internally. + */ + void setKeyId([in] long id) + raises( com::sun::star::uno::Exception ); +}; + +} ; } ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/sax/XMissionTaker.idl b/offapi/com/sun/star/xml/crypto/sax/XMissionTaker.idl new file mode 100644 index 000000000..60b9ce1aa --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/sax/XMissionTaker.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_xml_crypto_sax_xmissiontaker_idl_ +#define __com_sun_star_xml_crypto_sax_xmissiontaker_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> + +module com { module sun { module star { module xml { module crypto { module sax { + +/** + * Interface of Mission Taker. + * <p> + * This interface is used to control a mission. + */ +interface XMissionTaker : com::sun::star::uno::XInterface +{ + /** + * Forces a mission to make an end. + * + * @return `TRUE` if the mission is completed successfully, `FALSE` + * otherwise. + */ + boolean endMission(); +}; + +} ; } ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/sax/XReferenceCollector.idl b/offapi/com/sun/star/xml/crypto/sax/XReferenceCollector.idl new file mode 100644 index 000000000..48e5a0ba3 --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/sax/XReferenceCollector.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_xml_crypto_sax_XReferenceCollector_idl_ +#define __com_sun_star_xml_crypto_sax_XReferenceCollector_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> + +module com { module sun { module star { module xml { module crypto { module sax { + +/** + * Interface of Signature Collector. + * <p> + * This interface is used to control collecting a signature. + */ +interface XReferenceCollector : com::sun::star::uno::XInterface +{ + /** + * Sets the reference count of the signature. + * + * @param count the reference count of the signature + */ + void setReferenceCount([in] long count) + raises( com::sun::star::uno::Exception ); + + /** + * Set the keeper id of the element collector of the + * referenced element. + * + * @param id the keeper id of the element collector, + * which is collecting a referenced element + */ + void setReferenceId([in] long id) + raises( com::sun::star::uno::Exception ); +}; + +} ; } ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/sax/XReferenceResolvedBroadcaster.idl b/offapi/com/sun/star/xml/crypto/sax/XReferenceResolvedBroadcaster.idl new file mode 100644 index 000000000..cef647b26 --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/sax/XReferenceResolvedBroadcaster.idl @@ -0,0 +1,70 @@ +/* -*- 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_xml_crypto_sax_xreferenceresolvedbroadcaster_idl_ +#define __com_sun_star_xml_crypto_sax_xreferenceresolvedbroadcaster_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> + +module com { module sun { module star { module xml { module crypto { module sax { + +interface XReferenceResolvedListener; + +/** + * Interface of Reference Resolved Broadcaster. + * <p> + * This interface is used to manipulate reference resolved listener. + */ +interface XReferenceResolvedBroadcaster : com::sun::star::uno::XInterface +{ + /** + * Adds a new reference resolved listener for an element collector. + * <p> + * When the element collector has completely collected that element, + * this listener will receive a notification. + * + * @param referenceId the id of the element collector for which + * the new listener is added + * @param listener the listener to be added + */ + void addReferenceResolvedListener( + [in] long referenceId, + [in] XReferenceResolvedListener listener); + + /** + * Removes a listener from an element collector. + * <p> + * When a listener is removed, it will not receive notification when + * collection completes. + * + * @param referenceId the id of the element collector from which + * the listener is removed + * @param listener the listener to be removed + */ + void removeReferenceResolvedListener( + [in] long referenceId, + [in] XReferenceResolvedListener listener); +}; + +} ; } ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/sax/XReferenceResolvedListener.idl b/offapi/com/sun/star/xml/crypto/sax/XReferenceResolvedListener.idl new file mode 100644 index 000000000..71085587c --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/sax/XReferenceResolvedListener.idl @@ -0,0 +1,49 @@ +/* -*- 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_xml_crypto_sax_xreferenceresolvedlistener_idl_ +#define __com_sun_star_xml_crypto_sax_xreferenceresolvedlistener_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> + +module com { module sun { module star { module xml { module crypto { module sax { + +/** + * Interface of Reference Resolved Listener. + * <p> + * This interface is used to receive the collection completion notification for an element + * collector. + */ +interface XReferenceResolvedListener : com::sun::star::uno::XInterface +{ + /** + * Notifies an element has been collected by an element collector. + * + * @param referenceId the id of the element collector + */ + void referenceResolved([in] long referenceId) + raises( com::sun::star::uno::Exception ); +}; + +} ; } ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/sax/XSAXEventKeeper.idl b/offapi/com/sun/star/xml/crypto/sax/XSAXEventKeeper.idl new file mode 100644 index 000000000..ef2def3fe --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/sax/XSAXEventKeeper.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_xml_crypto_sax_xsaxeventkeeper_idl_ +#define __com_sun_star_xml_crypto_sax_xsaxeventkeeper_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> +#include <com/sun/star/xml/sax/XDocumentHandler.idl> +#include <com/sun/star/xml/wrapper/XXMLDocumentWrapper.idl> +#include <com/sun/star/xml/wrapper/XXMLElementWrapper.idl> + +module com { module sun { module star { module xml { module crypto { module sax { + +/** + * Interface of SAX Event Keeper. + * <p> + * This interface is used to manipulate element marks in a SAX event stream. + * <p> + * There are two kinds of element mark, one is element collector, which is + * used to collect a particular element from the SAX event stream; the other + * is blocker, which is used to block the SAX event stream. + */ +interface XSAXEventKeeper : com::sun::star::uno::XInterface +{ + /** + * Adds a new element collector on the next element in the SAX event + * stream. + * + * @return the keeper id of the new element collector + */ + long addElementCollector(); + + /** + * Removes an element collector. + * + * @param id the keeper id of the element collector to be removed + */ + void removeElementCollector([in] long id); + + /** + * Adds a new blocker on the next element in the SAX event stream. + * <p> + * No SAX event starting from the next element will be forwarded until + * this blocker is removed. + * + * @return the keeper id of the new blocker + */ + long addBlocker(); + + /** + * Removes a blocker + * + * @param id the keeper id of the blocker to be removed + */ + void removeBlocker([in] long id); + + /** + * Checks whether the SAX event stream is blocking. + * + * @return <code>true</code> if blocking, <code>false</code> otherwise + */ + boolean isBlocking(); + + /** + * Gets the element of an element mark. + * + * @param id the keeper id of the element mark, it can be an element + * collector or a blocker + */ + com::sun::star::xml::wrapper::XXMLElementWrapper getElement([in] long id); + + /** + * Sets the element of an element mark. + * <p> + * When an element is replaced outside of this interface, then uses this method + * can restore the link between an element mark and its working element. + * + * @param id the keeper id of the element mark to be set + * @param aElement the new element for this element mark. + */ + void setElement( + [in] long id, + [in] com::sun::star::xml::wrapper::XXMLElementWrapper aElement); + + /** + * Sets the next document handler in the SAX chain. + * <p> + * This handler will receive SAX events forwarded by the SAXEventKeeper. + * + * @param nextHandler the next handler in the SAX chain + * @return the old next handler + */ + com::sun::star::xml::sax::XDocumentHandler setNextHandler( + [in] com::sun::star::xml::sax::XDocumentHandler nextHandler); + + /** + * Prints information about all buffered elements. + * + * @return a tree-style string including all buffer information + */ + string printBufferNodeTree(); + + /** + * Gets the element which current blocking happens. + * <p> + * This element is the working element of the first blocker in tree order. + * + * @return the current blocking element + */ + com::sun::star::xml::wrapper::XXMLElementWrapper getCurrentBlockingNode(); +}; + +} ; } ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/sax/XSAXEventKeeperStatusChangeBroadcaster.idl b/offapi/com/sun/star/xml/crypto/sax/XSAXEventKeeperStatusChangeBroadcaster.idl new file mode 100644 index 000000000..4a4ca1587 --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/sax/XSAXEventKeeperStatusChangeBroadcaster.idl @@ -0,0 +1,64 @@ +/* -*- 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_xml_crypto_sax_xsaxeventkeeperstatuschangebroadcaster_idl_ +#define __com_sun_star_xml_crypto_sax_xsaxeventkeeperstatuschangebroadcaster_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> + +module com { module sun { module star { module xml { module crypto { module sax { + +interface XSAXEventKeeperStatusChangeListener; + +/** + * Interface of SAXEventKeeper Status Change Broadcaster. + * <p> + * This interface is used to manipulate SAXEventKeeper status change listener. + */ +interface XSAXEventKeeperStatusChangeBroadcaster : com::sun::star::uno::XInterface +{ + /** + * Adds a new status change listener. + * <p> + * When the SAXEventKeeper's status changes, the listener will receive a + * notification. + * + * @param listener the listener to be added + */ + void addSAXEventKeeperStatusChangeListener( + [in] XSAXEventKeeperStatusChangeListener listener); + + /** + * Removes a status change listener. + * <p> + * After a listener is removed, no status change notification will be + * sent to it. + * + * @param listener the listener to be removed + */ + void removeSAXEventKeeperStatusChangeListener( + [in] XSAXEventKeeperStatusChangeListener listener); +}; + +} ; } ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/sax/XSAXEventKeeperStatusChangeListener.idl b/offapi/com/sun/star/xml/crypto/sax/XSAXEventKeeperStatusChangeListener.idl new file mode 100644 index 000000000..d214edc8a --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/sax/XSAXEventKeeperStatusChangeListener.idl @@ -0,0 +1,66 @@ +/* -*- 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_xml_crypto_sax_xsaxeventkeeperstatuschangelistener_idl_ +#define __com_sun_star_xml_crypto_sax_xsaxeventkeeperstatuschangelistener_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> + +module com { module sun { module star { module xml { module crypto { module sax { + +/** + * Interface of SAXEventKeeper Status Change Listener. + * <p> + * This interface is used to receive the SAXEventKeeper status change notification. + */ +interface XSAXEventKeeperStatusChangeListener : com::sun::star::uno::XInterface +{ + /** + * Notifies the SAXEventKeeper is entering/leaving blocking state. + * + * @param isBlocking <code>true</code> if the SAXEventKeeper is + * entering blocking state, <code>false</code> + * otherwise + */ + void blockingStatusChanged([in] boolean isBlocking); + + /** + * Notifies the SAXEventKeeper is entering/leaving collecting state. + * + * @param isInsideCollectedElement <code>true</code> if the SAXEventKeeper is + * collecting some element, <code>false</code> + * otherwise + */ + void collectionStatusChanged([in] boolean isInsideCollectedElement); + + /** + * Notifies the SAXEventKeeper's buffer is empty/not empty + * + * @param isBufferEmpty <code>true</code> if the SAXEventKeeper has no buffer + * at all; <code>false</code> otherwise. + */ + void bufferStatusChanged([in] boolean isBufferEmpty); +}; + +} ; } ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/sax/XSecuritySAXEventKeeper.idl b/offapi/com/sun/star/xml/crypto/sax/XSecuritySAXEventKeeper.idl new file mode 100644 index 000000000..94d2e9e71 --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/sax/XSecuritySAXEventKeeper.idl @@ -0,0 +1,68 @@ +/* -*- 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_xml_crypto_sax_xsecuritysaxeventkeeper_idl_ +#define __com_sun_star_xml_crypto_sax_xsecuritysaxeventkeeper_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> +#include <com/sun/star/xml/crypto/sax/XSAXEventKeeper.idl> +#include <com/sun/star/xml/crypto/sax/ConstOfSecurityId.idl> +#include <com/sun/star/xml/crypto/sax/ElementMarkPriority.idl> +#include <com/sun/star/xml/crypto/sax/ElementMarkType.idl> + +module com { module sun { module star { module xml { module crypto { module sax { + +/** + * Interface of Security SAX Event Keeper. + * <p> + * This interface is an extension of the XSAXEventKeeper interface, + * some security related features are added. + */ +interface XSecuritySAXEventKeeper : XSAXEventKeeper +{ + /** + * Adds a new element collector on the next element in the SAX event + * stream. + * + * @param priority the priority of the element collector. See + * ConstOfPriority + * @param modifyElement a flag representing whether the element + * collector will modify the content of its + * element after notification + * @return the keeper id of the new element collector + */ + long addSecurityElementCollector( + [in] ElementMarkPriority priority, + [in] boolean modifyElement); + + /** + * Sets security id for an element mark. + * + * @param id the keeper id of the element collector to be set + * @param securityId the security id to be set + */ + void setSecurityId([in] long id, [in] long securityId); +}; + +} ; } ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/sax/XSignatureCreationResultBroadcaster.idl b/offapi/com/sun/star/xml/crypto/sax/XSignatureCreationResultBroadcaster.idl new file mode 100644 index 000000000..2a1ed9f15 --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/sax/XSignatureCreationResultBroadcaster.idl @@ -0,0 +1,64 @@ +/* -*- 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_xml_crypto_sax_xsignaturecreationresultbroadcaster_idl_ +#define __com_sun_star_xml_crypto_sax_xsignaturecreationresultbroadcaster_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> + +module com { module sun { module star { module xml { module crypto { module sax { + +interface XSignatureCreationResultListener; + +/** + * Interface of Signature Creation Result Broadcaster. + * <p> + * This interface is used to manipulate signature creation result listener. + */ +interface XSignatureCreationResultBroadcaster : com::sun::star::uno::XInterface +{ + /** + * Adds a new signature creation result listener. + * <p> + * When the signature is created, the result information will be sent to this + * listener. + * + * @param listener the listener to be added + */ + void addSignatureCreationResultListener( + [in] XSignatureCreationResultListener listener) + raises( com::sun::star::uno::Exception ); + + /** + * Removes a signature creation result listener. + * <p> + * After a listener is removed, no result information will be sent to it. + * + * @param listener the listener to be removed + */ + void removeSignatureCreationResultListener( + [in] XSignatureCreationResultListener listener); +}; + +} ; } ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/sax/XSignatureCreationResultListener.idl b/offapi/com/sun/star/xml/crypto/sax/XSignatureCreationResultListener.idl new file mode 100644 index 000000000..c7f958a51 --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/sax/XSignatureCreationResultListener.idl @@ -0,0 +1,52 @@ +/* -*- 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_xml_crypto_sax_xsignaturecreationresultlistener_idl_ +#define __com_sun_star_xml_crypto_sax_xsignaturecreationresultlistener_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> +#include <com/sun/star/xml/crypto/SecurityOperationStatus.idl> + +module com { module sun { module star { module xml { module crypto { module sax { + +/** + * Interface of Signature Creation Result Listener. + * <p> + * This interface is used to receive the result information of a + * signature creation. + */ +interface XSignatureCreationResultListener : com::sun::star::uno::XInterface +{ + /** + * Notifies the signature creation result. + * + * @param securityId the security id of the signature + * @param creationResult the result information + */ + void signatureCreated( + [in] long securityId, + [in] com::sun::star::xml::crypto::SecurityOperationStatus creationResult); +}; + +} ; } ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/sax/XSignatureVerifyResultBroadcaster.idl b/offapi/com/sun/star/xml/crypto/sax/XSignatureVerifyResultBroadcaster.idl new file mode 100644 index 000000000..20b64966d --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/sax/XSignatureVerifyResultBroadcaster.idl @@ -0,0 +1,64 @@ +/* -*- 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_xml_crypto_sax_xsignatureverifyresultbroadcaster_idl_ +#define __com_sun_star_xml_crypto_sax_xsignatureverifyresultbroadcaster_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> + +module com { module sun { module star { module xml { module crypto { module sax { + +interface XSignatureVerifyResultListener; + +/** + * Interface of Signature Verify Result Broadcaster. + * <p> + * This interface is used to manipulate signature verify result listener. + */ +interface XSignatureVerifyResultBroadcaster : com::sun::star::uno::XInterface +{ + /** + * Adds a new signature verify result listener. + * <p> + * When the signature is verified, the result information will be sent to this + * listener. + * + * @param listener the listener to be added + */ + void addSignatureVerifyResultListener( + [in] XSignatureVerifyResultListener listener) + raises( com::sun::star::uno::Exception ); + + /** + * Removes a signature verify result listener. + * <p> + * After a listener is removed, no result information will be sent to it. + * + * @param listener the listener to be removed + */ + void removeSignatureVerifyResultListener( + [in] XSignatureVerifyResultListener listener); +}; + +} ; } ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/crypto/sax/XSignatureVerifyResultListener.idl b/offapi/com/sun/star/xml/crypto/sax/XSignatureVerifyResultListener.idl new file mode 100644 index 000000000..f1ea34f9f --- /dev/null +++ b/offapi/com/sun/star/xml/crypto/sax/XSignatureVerifyResultListener.idl @@ -0,0 +1,52 @@ +/* -*- 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_xml_crypto_sax_xsignatureverifyresultlistener_idl_ +#define __com_sun_star_xml_crypto_sax_xsignatureverifyresultlistener_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> +#include <com/sun/star/xml/crypto/SecurityOperationStatus.idl> + +module com { module sun { module star { module xml { module crypto { module sax { + +/** + * Interface of Signature Verify Result Listener. + * <p> + * This interface is used to receive the result information of a + * signature verification. + */ +interface XSignatureVerifyResultListener : com::sun::star::uno::XInterface +{ + /** + * Notifies the signature verify result. + * + * @param securityId the security id of the signature + * @param verifyResult the result information + */ + void signatureVerified( + [in] long securityId, + [in] com::sun::star::xml::crypto::SecurityOperationStatus verifyResult); +}; + +} ; } ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/csax/XCompressedDocumentHandler.idl b/offapi/com/sun/star/xml/csax/XCompressedDocumentHandler.idl new file mode 100644 index 000000000..6d714caa2 --- /dev/null +++ b/offapi/com/sun/star/xml/csax/XCompressedDocumentHandler.idl @@ -0,0 +1,72 @@ +/* -*- 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_xml_csax_XCompressedDocumentHandler_idl__ +#define __com_sun_star_xml_csax_XCompressedDocumentHandler_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/xml/sax/SAXException.idl> +#include <com/sun/star/xml/csax/XMLAttribute.idl> + +module com { module sun { module star { module xml { module csax { + +/** + * A compressed XDocumentHandler interface. + * <p> + * All methods in this interface have the same function with methods + * in the XDocumentHandler interface. + * <p> + * Because there is no interface parameter in these methods, so using + * this interface to transfer SAX event is thought to have better + * performance than using the XDocumentHandler interface, in case of + * when UNO C++/Java bridge is involved. + */ +interface XCompressedDocumentHandler: com::sun::star::uno::XInterface +{ + void compressedStartDocument() + raises( com::sun::star::xml::sax::SAXException ); + + void compressedEndDocument() + raises( com::sun::star::xml::sax::SAXException ); + + void compressedStartElement( [in] string aName, [in] sequence< XMLAttribute > aAttributes) + raises( com::sun::star::xml::sax::SAXException ); + + void compressedEndElement( [in] string aName ) + raises( com::sun::star::xml::sax::SAXException ); + + void compressedCharacters( [in] string aChars ) + raises( com::sun::star::xml::sax::SAXException ); + + void compressedIgnorableWhitespace( [in] string aWhitespaces ) + raises( com::sun::star::xml::sax::SAXException ); + + void compressedProcessingInstruction( [in] string aTarget, [in] string aData ) + raises( com::sun::star::xml::sax::SAXException ); + + void compressedSetDocumentLocator( [in] long columnNumber, [in] long lineNumber, [in] string publicId, [in] string systemId) + raises( com::sun::star::xml::sax::SAXException ); + +}; + +} ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/csax/XMLAttribute.idl b/offapi/com/sun/star/xml/csax/XMLAttribute.idl new file mode 100644 index 000000000..28e4125a2 --- /dev/null +++ b/offapi/com/sun/star/xml/csax/XMLAttribute.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_xml_csax_XMLAttribute_idl__ +#define __com_sun_star_xml_csax_XMLAttribute_idl__ + +module com { module sun { module star { module xml { module csax { + +/** + * A struct to keep information of an element's attribute. + */ +struct XMLAttribute +{ + /** + * the attribute name + */ + string sName; + + /** + * the attribute value + */ + string sValue; +}; + +} ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/DOMException.idl b/offapi/com/sun/star/xml/dom/DOMException.idl new file mode 100644 index 000000000..08799f1d7 --- /dev/null +++ b/offapi/com/sun/star/xml/dom/DOMException.idl @@ -0,0 +1,43 @@ +/* -*- 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_xml_dom_DOMException_idl__ +#define __com_sun_star_xml_dom_DOMException_idl__ + +#include <com/sun/star/uno/Exception.idl> +#include <com/sun/star/xml/dom/DOMExceptionType.idl> + +module com { module sun { module star { module xml { module dom { + + +/** +encapsulates the details of an XML parse error or warning. +*/ + +exception DOMException: com::sun::star::uno::Exception +{ + DOMExceptionType Code; +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/DOMExceptionType.idl b/offapi/com/sun/star/xml/dom/DOMExceptionType.idl new file mode 100644 index 000000000..52b372a88 --- /dev/null +++ b/offapi/com/sun/star/xml/dom/DOMExceptionType.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_xml_dom_DOMExceptionType_idl__ +#define __com_sun_star_xml_dom_DOMExceptionType_idl__ + +module com { module sun { module star { module xml { module dom { + +enum DOMExceptionType +{ + DOMSTRING_SIZE_ERR, + HIERARCHY_REQUEST_ERR, + INDEX_SIZE_ERR, + INUSE_ATTRIBUTE_ERR, + INVALID_ACCESS_ERR, + INVALID_CHARACTER_ERR, + INVALID_MODIFICATION_ERR, + INVALID_STATE_ERR, + NAMESPACE_ERR, + NO_DATA_ALLOWED_ERR, + NO_MODIFICATION_ALLOWED_ERR, + NOT_FOUND_ERR, + NOT_SUPPORTED_ERR, + SYNTAX_ERR, + WRONG_DOCUMENT_ERR +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/DocumentBuilder.idl b/offapi/com/sun/star/xml/dom/DocumentBuilder.idl new file mode 100644 index 000000000..439550964 --- /dev/null +++ b/offapi/com/sun/star/xml/dom/DocumentBuilder.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_xml_dom_documentbuilder_idl +#define __com_sun_star_xml_dom_documentbuilder_idl + +#include <com/sun/star/xml/dom/XDocumentBuilder.idl> + +module com { module sun { module star { module xml { module dom { + +service DocumentBuilder : XDocumentBuilder; + +};};};};}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/NodeType.idl b/offapi/com/sun/star/xml/dom/NodeType.idl new file mode 100644 index 000000000..cd7a753e1 --- /dev/null +++ b/offapi/com/sun/star/xml/dom/NodeType.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_xml_dom_NodeType_idl__ +#define __com_sun_star_xml_dom_NodeType_idl__ + +module com { module sun { module star { module xml { module dom { + +enum NodeType +{ + ATTRIBUTE_NODE, + CDATA_SECTION_NODE, + COMMENT_NODE, + DOCUMENT_FRAGMENT_NODE, + DOCUMENT_NODE, + DOCUMENT_TYPE_NODE, + ELEMENT_NODE, + ENTITY_NODE, + ENTITY_REFERENCE_NODE, + NOTATION_NODE, + PROCESSING_INSTRUCTION_NODE, + TEXT_NODE +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/SAXDocumentBuilder.idl b/offapi/com/sun/star/xml/dom/SAXDocumentBuilder.idl new file mode 100644 index 000000000..0bed88a5f --- /dev/null +++ b/offapi/com/sun/star/xml/dom/SAXDocumentBuilder.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_xml_dom_SAXDocumentBuilder_idl +#define __com_sun_star_xml_dom_SAXDocumentBuilder_idl + +#include <com/sun/star/xml/dom/XSAXDocumentBuilder2.idl> + +module com { module sun { module star { module xml { module dom { + +service SAXDocumentBuilder : XSAXDocumentBuilder2; + +};};};};}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/SAXDocumentBuilderState.idl b/offapi/com/sun/star/xml/dom/SAXDocumentBuilderState.idl new file mode 100644 index 000000000..77aeb54eb --- /dev/null +++ b/offapi/com/sun/star/xml/dom/SAXDocumentBuilderState.idl @@ -0,0 +1,38 @@ +/* -*- 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_xml_dom_SAXDocumentBuilderState_idl__ +#define __com_sun_star_xml_dom_SAXDocumentBuilderState_idl__ + +module com { module sun { module star { module xml { module dom { + +enum SAXDocumentBuilderState +{ + READY, + BUILDING_DOCUMENT, + BUILDING_FRAGMENT, + DOCUMENT_FINISHED, + FRAGMENT_FINISHED +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/XAttr.idl b/offapi/com/sun/star/xml/dom/XAttr.idl new file mode 100644 index 000000000..0fd45807c --- /dev/null +++ b/offapi/com/sun/star/xml/dom/XAttr.idl @@ -0,0 +1,65 @@ +/* -*- 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_xml_dom_XAttr_idl__ +#define __com_sun_star_xml_dom_XAttr_idl__ + +#include <com/sun/star/xml/dom/XNode.idl> + +module com { module sun { module star { module xml { module dom { + +interface XElement; + +interface XAttr: XNode +{ + /** + Returns the name of this attribute. + */ + string getName(); + + /** + The Element node this attribute is attached to or null if this + attribute is not in use. + */ + XElement getOwnerElement(); + + /** + If this attribute was explicitly given a value in the original + document, this is true; otherwise, it is false. + */ + boolean getSpecified(); + + /** + On retrieval, the value of the attribute is returned as a string. + */ + string getValue(); + + /** + Sets the value of the attribute from a string. + Throws: + DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. + + */ + void setValue([in] string value) raises (DOMException); +}; +};};};};}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/XCDATASection.idl b/offapi/com/sun/star/xml/dom/XCDATASection.idl new file mode 100644 index 000000000..b5fa3b2e1 --- /dev/null +++ b/offapi/com/sun/star/xml/dom/XCDATASection.idl @@ -0,0 +1,34 @@ +/* -*- 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_xml_dom_XCDATASection_idl__ +#define __com_sun_star_xml_dom_XCDATASection_idl__ + +#include <com/sun/star/xml/dom/XText.idl> + +module com { module sun { module star { module xml { module dom { + +interface XCDATASection: XText +{ +}; +};};};};}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/XCharacterData.idl b/offapi/com/sun/star/xml/dom/XCharacterData.idl new file mode 100644 index 000000000..3aaadb0c0 --- /dev/null +++ b/offapi/com/sun/star/xml/dom/XCharacterData.idl @@ -0,0 +1,104 @@ +/* -*- 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_xml_dom_XCharacterData_idl__ +#define __com_sun_star_xml_dom_XCharacterData_idl__ + +#include <com/sun/star/xml/dom/XNode.idl> + +module com { module sun { module star { module xml { module dom { + +interface XCharacterData: XNode +{ + /** + Append the string to the end of the character data of the node. + Throws: + DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + */ + void appendData([in] string arg) raises (DOMException); + + /** + Remove a range of 16-bit units from the node. + Throws: + DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater + than the number of 16-bit units in data, or if the specified count is negative. + NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + */ + void deleteData([in] long offset, [in] long count) raises (DOMException); + + /** + Return the character data of the node that implements this interface. + Throws: + DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. + DOMException - DOMSTRING_SIZE_ERR: Raised when it would return more characters + than fit in a DOMString variable on the implementation platform. + + + */ + string getData() raises (DOMException); + + /** + The number of 16-bit units that are available through data and the + substringData method below. + */ + long getLength(); + + /** + Insert a string at the specified 16-bit unit offset. + Throws: + DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than + the number of 16-bit units in data. + NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + */ + void insertData([in] long offset, [in] string arg) raises (DOMException); + + /** + Replace the characters starting at the specified 16-bit unit offset + with the specified string. + Throws; + DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than + the number of 16-bit units in data, or if the specified count is negative. + NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + */ + void replaceData([in] long offset, [in] long count, [in] string arg) raises (DOMException); + + /** + Set the character data of the node that implements this interface. + Throws: + DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. + DOMException - DOMSTRING_SIZE_ERR: Raised when it would return more characters than + fit in a DOMString variable on the implementation platform. + */ + void setData([in] string data) raises (DOMException); + + /** + Extracts a range of data from the node. + Throws: + DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater + than the number of 16-bit units in data, or if the specified count is negative. + DOMSTRING_SIZE_ERR: Raised if the specified range of text does not fit into a DOMString. + */ + string subStringData([in] long offset, [in] long count) raises (DOMException); + +}; +};};};};}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/XComment.idl b/offapi/com/sun/star/xml/dom/XComment.idl new file mode 100644 index 000000000..8aa9fbe55 --- /dev/null +++ b/offapi/com/sun/star/xml/dom/XComment.idl @@ -0,0 +1,35 @@ +/* -*- 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_xml_dom_XComment_idl__ +#define __com_sun_star_xml_dom_XComment_idl__ + +#include <com/sun/star/xml/dom/XCharacterData.idl> + + +module com { module sun { module star { module xml { module dom { + +interface XComment: XCharacterData +{ +}; +};};};};}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/XDOMImplementation.idl b/offapi/com/sun/star/xml/dom/XDOMImplementation.idl new file mode 100644 index 000000000..5804e897f --- /dev/null +++ b/offapi/com/sun/star/xml/dom/XDOMImplementation.idl @@ -0,0 +1,78 @@ +/* -*- 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_xml_dom_XDOMImplementation_idl__ +#define __com_sun_star_xml_dom_XDOMImplementation_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/xml/dom/DOMException.idl> + + +module com { module sun { module star { module xml { module dom { + +interface XDocument; +interface XDocumentType; + +interface XDOMImplementation : com::sun::star::uno::XInterface +{ + /** + Creates a DOM Document object of the specified type with its document element. + Throws: + DOMException - INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal character. + NAMESPACE_ERR: Raised if the qualifiedName is malformed, if the qualifiedName has a prefix + and the namespaceURI is null, or if the qualifiedName has a prefix that is "xml" and + the namespaceURI is different from " http://www.w3.org/XML/1998/namespace" , or if the + DOM implementation does not support the "XML" feature but a non-null namespace URI was + provided, since namespaces were defined by XML. + WRONG_DOCUMENT_ERR: Raised if doctype has already been used with a different document or + was created from a different implementation. + NOT_SUPPORTED_ERR: May be raised by DOM implementations which do not support the + "XML" feature, if they choose not to support this method. Other features introduced + in the future, by the DOM WG or in extensions defined by other groups, may also + demand support for this method; please consult the definition of the feature to see + if it requires this method. + */ + XDocument createDocument([in] string namespaceURI, [in] string qualifiedName, [in] XDocumentType doctype) + raises (DOMException); + + /** + Creates an empty DocumentType node. + Throws: + DOMException - INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal character. + NAMESPACE_ERR: Raised if the qualifiedName is malformed. + NOT_SUPPORTED_ERR: May be raised by DOM implementations which do not support the + "XML" feature, if they choose not to support this method. Other features introduced + in the future, by the DOM WG or in extensions defined by other groups, may also demand + support for this method; please consult the definition of the feature to see if it + requires this method. + */ + XDocumentType createDocumentType([in] string qualifiedName, [in] string publicId, [in] string systemId) + raises (DOMException); + + /** + Test if the DOM implementation implements a specific feature. + */ + boolean hasFeature([in] string feature, [in] string ver); +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/XDocument.idl b/offapi/com/sun/star/xml/dom/XDocument.idl new file mode 100644 index 000000000..9d2292ec3 --- /dev/null +++ b/offapi/com/sun/star/xml/dom/XDocument.idl @@ -0,0 +1,171 @@ +/* -*- 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_xml_dom_XDocument_idl__ +#define __com_sun_star_xml_dom_XDocument_idl__ + +#include <com/sun/star/xml/dom/XNode.idl> +#include <com/sun/star/xml/dom/XAttr.idl> +#include <com/sun/star/xml/dom/XCDATASection.idl> +#include <com/sun/star/xml/dom/XComment.idl> +#include <com/sun/star/xml/dom/XDocumentFragment.idl> +#include <com/sun/star/xml/dom/XEntityReference.idl> +#include <com/sun/star/xml/dom/XProcessingInstruction.idl> +#include <com/sun/star/xml/dom/XDocumentType.idl> +#include <com/sun/star/xml/dom/XDOMImplementation.idl> + +module com { module sun { module star { module xml { module dom { + +interface XDocument: XNode +{ + /** + Creates an Attr of the given name. + Throws: + DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character. + */ + XAttr createAttribute([in] string name) raises (DOMException); + + /** + Creates an attribute of the given qualified name and namespace URI. + Throws: + DOMException - INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal + character, per the XML 1.0 specification . + NAMESPACE_ERR: Raised if the qualifiedName is malformed per the Namespaces in XML + specification, if the qualifiedName has a prefix and the namespaceURI is null, if + the qualifiedName has a prefix that is "xml" and the namespaceURI is different from + " http://www.w3.org/XML/1998/namespace", or if the qualifiedName, or its prefix, is + "xmlns" and the namespaceURI is different from " http://www.w3.org/2000/xmlns/". + NOT_SUPPORTED_ERR: Always thrown if the current document does not support the "XML" + feature, since namespaces were defined by XML. + */ + XAttr createAttributeNS([in] string namespaceURI, [in] string qualifiedName) raises (DOMException); + + /** + Creates a CDATASection node whose value is the specified string. + Throws: + DOMException - NOT_SUPPORTED_ERR: Raised if this document is an HTML document. + */ + XCDATASection createCDATASection([in] string data) raises (DOMException); + + /** + Creates a Comment node given the specified string. + */ + XComment createComment([in] string data); + + /** + Creates an empty DocumentFragment object. + */ + XDocumentFragment createDocumentFragment(); + + + /** + Creates an element of the type specified. + Throws: + DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character. + */ + XElement createElement([in] string tagName) raises (DOMException); + + + /** + Creates an element of the given qualified name and namespace URI. + Throws: + DOMException - INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an + illegal character, per the XML 1.0 specification . + NAMESPACE_ERR: Raised if the qualifiedName is malformed per the Namespaces in + XML specification, if the qualifiedName has a prefix and the namespaceURI is + null, or if the qualifiedName has a prefix that is "xml" and the namespaceURI + is different from " http://www.w3.org/XML/1998/namespace" . + NOT_SUPPORTED_ERR: Always thrown if the current document does not support the + "XML" feature, since namespaces were defined by XML. + */ + XElement createElementNS([in] string namespaceURI, [in] string qualifiedName) raises (DOMException); + + /** + Throws: + DOMException - NOT_SUPPORTED_ERR: Raised if the type of node being imported is not supported. + Creates an EntityReference object. + Throws: + DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character. + NOT_SUPPORTED_ERR: Raised if this document is an HTML document. + */ + XEntityReference createEntityReference([in] string name) raises (DOMException); + + /** + Creates a ProcessingInstruction node given the specified name and + data strings. + Throws: + DOMException - INVALID_CHARACTER_ERR: Raised if the specified target contains an illegal character. + NOT_SUPPORTED_ERR: Raised if this document is an HTML document. + */ + XProcessingInstruction createProcessingInstruction( + [in] string target, [in] string data) raises (DOMException); + + /** + Creates a Text node given the specified string. + */ + XText createTextNode([in] string data); + + /** + The Document Type Declaration (see DocumentType) associated with this + document. + */ + XDocumentType getDoctype(); + + /** + This is a convenience attribute that allows direct access to the child + node that is the root element of the document. + */ + XElement getDocumentElement(); + + /** + Returns the Element whose ID is given by elementId. + */ + XElement getElementById([in] string elementId); + + /** + Returns a NodeList of all the Elements with a given tag name in the + order in which they are encountered in a preorder traversal of the + Document tree. + */ + XNodeList getElementsByTagName([in] string tagname); + + /** + Returns a NodeList of all the Elements with a given local name and + namespace URI in the order in which they are encountered in a preorder + traversal of the Document tree. + */ + XNodeList getElementsByTagNameNS([in] string namespaceURI, [in] string localName); + + /** + The DOMImplementation object that handles this document. + */ + XDOMImplementation getImplementation(); + + /** + Imports a node from another document to this document. + Throws: + DOMException - NOT_SUPPORTED_ERR: Raised if the type of node being imported is not supported. + */ + XNode importNode([in] XNode importedNode, [in] boolean deep) raises (DOMException); +}; +};};};};}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/XDocumentBuilder.idl b/offapi/com/sun/star/xml/dom/XDocumentBuilder.idl new file mode 100644 index 000000000..8ceb7f7d0 --- /dev/null +++ b/offapi/com/sun/star/xml/dom/XDocumentBuilder.idl @@ -0,0 +1,101 @@ +/* -*- 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_xml_dom_XDocumentBuilder_idl__ +#define __com_sun_star_xml_dom_XDocumentBuilder_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/xml/dom/XDocumentType.idl> +#include <com/sun/star/xml/dom/XDOMImplementation.idl> +#include <com/sun/star/io/XInputStream.idl> +#include <com/sun/star/xml/sax/SAXException.idl> +#include <com/sun/star/xml/sax/XErrorHandler.idl> +#include <com/sun/star/xml/sax/XEntityResolver.idl> + + +#include <com/sun/star/io/IOException.idl> + +module com { module sun { module star { module xml { module dom { + +interface XInputStream; + +/** +Builds a new dom tree +*/ +interface XDocumentBuilder : com::sun::star::uno::XInterface +{ + + /** + Obtain an instance of a DOMImplementation object. + */ + XDOMImplementation getDOMImplementation(); + + /** + Indicates whether or not this parser is configured to understand + namespaces. + */ + boolean isNamespaceAware(); + + /** + Indicates whether or not this parser is configured to validate XML + documents. + */ + boolean isValidating(); + + /** + Obtain a new instance of a DOM Document object to build a DOM tree + with. + */ + XDocument newDocument(); + + /** + Parse the content of the given InputStream as an XML document and + return a new DOM Document object. + */ + XDocument parse([in] com::sun::star::io::XInputStream is) + raises( com::sun::star::xml::sax::SAXException, + com::sun::star::io::IOException ); + + /** + Parse the content of the given URI as an XML document and return + a new DOM Document object. + */ + XDocument parseURI([in] string uri) + raises( com::sun::star::xml::sax::SAXException, + com::sun::star::io::IOException ); + + /** + Specify the EntityResolver to be used to resolve entities present + in the XML document to be parsed. + */ + void setEntityResolver([in] com::sun::star::xml::sax::XEntityResolver er); + + /** + Specify the ErrorHandler to be used to report errors present in + the XML document to be parsed. + */ + void setErrorHandler([in] com::sun::star::xml::sax::XErrorHandler eh); + +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/XDocumentFragment.idl b/offapi/com/sun/star/xml/dom/XDocumentFragment.idl new file mode 100644 index 000000000..f4fdfbed7 --- /dev/null +++ b/offapi/com/sun/star/xml/dom/XDocumentFragment.idl @@ -0,0 +1,34 @@ +/* -*- 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_xml_dom_XDocumentFragment_idl__ +#define __com_sun_star_xml_dom_XDocumentFragment_idl__ + +#include <com/sun/star/xml/dom/XNode.idl> + +module com { module sun { module star { module xml { module dom { + +interface XDocumentFragment: XNode +{ +}; +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/XDocumentType.idl b/offapi/com/sun/star/xml/dom/XDocumentType.idl new file mode 100644 index 000000000..19cb8b408 --- /dev/null +++ b/offapi/com/sun/star/xml/dom/XDocumentType.idl @@ -0,0 +1,68 @@ +/* -*- 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_xml_dom_XDocumentType_idl__ +#define __com_sun_star_xml_dom_XDocumentType_idl__ + +#include <com/sun/star/xml/dom/XNode.idl> +#include <com/sun/star/xml/dom/XNamedNodeMap.idl> + +module com { module sun { module star { module xml { module dom { + +interface XDocumentType: XNode +{ + + /** + A NamedNodeMap containing the general entities, both external and + internal, declared in the DTD. + */ + XNamedNodeMap getEntities(); + + /** + The internal subset as a string, or null if there is none. + */ + string getInternalSubset(); + + /** + The name of DTD; i.e., the name immediately following the DOCTYPE + keyword. + */ + string getName(); + + /** + A NamedNodeMap containing the notations declared in the DTD. + */ + XNamedNodeMap getNotations(); + + /** + The public identifier of the external subset. + */ + string getPublicId(); + + /** + The system identifier of the external subset. + */ + string getSystemId(); + +}; +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/XElement.idl b/offapi/com/sun/star/xml/dom/XElement.idl new file mode 100644 index 000000000..ed5da5a36 --- /dev/null +++ b/offapi/com/sun/star/xml/dom/XElement.idl @@ -0,0 +1,146 @@ +/* -*- 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_xml_dom_XElement_idl__ +#define __com_sun_star_xml_dom_XElement_idl__ + +#include <com/sun/star/xml/dom/XNode.idl> +#include <com/sun/star/xml/dom/XAttr.idl> + +module com { module sun { module star { module xml { module dom { + +interface XElement: XNode +{ + /** + Retrieves an attribute value by name. + */ + string getAttribute([in] string name); + + /** + Retrieves an attribute node by name. + */ + XAttr getAttributeNode([in] string name); + + /** + Retrieves an Attr node by local name and namespace URI. + */ + XAttr getAttributeNodeNS([in] string namespaceURI,[in] + string localName); + + /** + Retrieves an attribute value by local name and namespace URI. + */ + string getAttributeNS([in] string namespaceURI, [in] string localName); + + /** + Returns a NodeList of all descendant Elements with a given tag name, + in the order in which they are + encountered in a preorder traversal of this Element tree. + */ + XNodeList getElementsByTagName([in] string name); + + /** + Returns a NodeList of all the descendant Elements with a given local + name and namespace URI in the order in which they are encountered in + a preorder traversal of this Element tree. + */ + XNodeList getElementsByTagNameNS([in] string namespaceURI,[in] string localName); + + /** + The name of the element. + */ + string getTagName(); + + /** + Returns true when an attribute with a given name is specified on this + element or has a default value, false otherwise. + */ + boolean hasAttribute([in] string name); + + /** + Returns true when an attribute with a given local name and namespace + URI is specified on this element or has a default value, false otherwise. + */ + boolean hasAttributeNS([in] string namespaceURI,[in] string localName); + + /** + Removes an attribute by name. + Throws: + DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + */ + void removeAttribute([in] string name) raises (DOMException); + + /** + Removes the specified attribute node. + Throws: + DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + NOT_FOUND_ERR: Raised if oldAttr is not an attribute of the element. + */ + XAttr removeAttributeNode([in] XAttr oldAttr) raises (DOMException); + + /** + Removes an attribute by local name and namespace URI. + Throws: + DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + */ + void removeAttributeNS([in] string namespaceURI,[in] string localName) raises (DOMException); + + /** + Adds a new attribute. + Throws: + DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character. + NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + */ + void setAttribute([in] string name,[in] string value) raises (DOMException); + + /** + Adds a new attribute node. + Throws: + DOMException - WRONG_DOCUMENT_ERR: Raised if newAttr was created from a different document than the one that created the element. + NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + INUSE_ATTRIBUTE_ERR: Raised if newAttr is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements. + */ + XAttr setAttributeNode([in] XAttr newAttr) raises (DOMException); + + /** + Adds a new attribute. + Throws: + DOMException - WRONG_DOCUMENT_ERR: Raised if newAttr was created from a different document than the one that created the element. + NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + INUSE_ATTRIBUTE_ERR: Raised if newAttr is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements. + NOT_SUPPORTED_ERR: Always thrown if the current document does not support the "XML" feature, since namespaces were defined by XML. + */ + XAttr setAttributeNodeNS([in] XAttr newAttr) raises (DOMException); + + /** + Adds a new attribute. + Throws: + DOMException - INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal character, per the XML 1.0 specification . + NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + NAMESPACE_ERR: Raised if the qualifiedName is malformed per the Namespaces in XML specification, if the qualifiedName has a prefix and the namespaceURI is null, if the qualifiedName has a prefix that is "xml" and the namespaceURI is different from " http://www.w3.org/XML/1998/namespace", or if the qualifiedName, or its prefix, is "xmlns" and the namespaceURI is different from " http://www.w3.org/2000/xmlns/". + NOT_SUPPORTED_ERR: Always thrown if the current document does not support the "XML" feature, since namespaces were defined by XML. + */ + void setAttributeNS( + [in] string namespaceURI, [in] string qualifiedName, [in] string value) raises (DOMException); +}; +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/XEntity.idl b/offapi/com/sun/star/xml/dom/XEntity.idl new file mode 100644 index 000000000..be4ed99be --- /dev/null +++ b/offapi/com/sun/star/xml/dom/XEntity.idl @@ -0,0 +1,49 @@ +/* -*- 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_xml_dom_XEntity_idl__ +#define __com_sun_star_xml_dom_XEntity_idl__ + +#include <com/sun/star/xml/dom/XNode.idl> + +module com { module sun { module star { module xml { module dom { + +interface XEntity: XNode +{ + /** + For unparsed entities, the name of the notation for the entity. + */ + string getNotationName(); + + /** + The public identifier associated with the entity, if specified. + */ + string getPublicId(); + + /** + The system identifier associated with the entity, if specified. + */ + string getSystemId(); + +}; +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/XEntityReference.idl b/offapi/com/sun/star/xml/dom/XEntityReference.idl new file mode 100644 index 000000000..ca4fc2788 --- /dev/null +++ b/offapi/com/sun/star/xml/dom/XEntityReference.idl @@ -0,0 +1,34 @@ +/* -*- 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_xml_dom_XEntityReference_idl__ +#define __com_sun_star_xml_dom_XEntityReference_idl__ + +#include <com/sun/star/xml/dom/XNode.idl> + +module com { module sun { module star { module xml { module dom { + +interface XEntityReference: XNode +{ +}; +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/XNamedNodeMap.idl b/offapi/com/sun/star/xml/dom/XNamedNodeMap.idl new file mode 100644 index 000000000..a7285c77e --- /dev/null +++ b/offapi/com/sun/star/xml/dom/XNamedNodeMap.idl @@ -0,0 +1,94 @@ +/* -*- 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_xml_dom_XNamedNodeMap_idl__ +#define __com_sun_star_xml_dom_XNamedNodeMap_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/xml/dom/DOMException.idl> + +module com { module sun { module star { module xml { module dom { + +interface XNode; + +interface XNamedNodeMap : com::sun::star::uno::XInterface +{ + + /** + The number of nodes in this map. + */ + long getLength(); + + /** + Retrieves a node specified by local name. + */ + XNode getNamedItem([in] string name); + + /** + Retrieves a node specified by local name and namespace URI. + */ + XNode getNamedItemNS([in] string namespaceURI,[in] string localName); + + /** + Returns a node specified by index. + */ + XNode item([in] long index); + + /** + Removes a node specified by name. + Throws: + DOMException - NOT_FOUND_ERR: Raised if there is no node named name in this map. + NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly. + */ + XNode removeNamedItem([in] string name) raises (DOMException); + + /** + Removes a node specified by local name and namespace URI. + Throws: + DOMException - NOT_FOUND_ERR: Raised if there is no node with the specified namespaceURI and localName in this map. + NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly. + */ + XNode removeNamedItemNS([in] string namespaceURI, [in] string localName) raises (DOMException); + + /** + Adds a node using its nodeName attribute. + Throws: + DOMException - WRONG_DOCUMENT_ERR: Raised if arg was created from a different document than the one that created this map. + NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly. + INUSE_ATTRIBUTE_ERR: Raised if arg is an Attr that is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements. + HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node doesn't belong in this NamedNodeMap. Examples would include trying to insert something other than an Attr node into an Element's map of attributes, or a non-Entity node into the DocumentType's map of Entities. + */ + XNode setNamedItem([in] XNode arg) raises (DOMException); + + /** + Adds a node using its namespaceURI and localName. + Throws: + DOMException - WRONG_DOCUMENT_ERR: Raised if arg was created from a different document than the one that created this map. + NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly. + INUSE_ATTRIBUTE_ERR: Raised if arg is an Attr that is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements. + HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node doesn't belong in this NamedNodeMap. Examples would include trying to insert something other than an Attr node into an Element's map of attributes, or a non-Entity node into the DocumentType's map of Entities. + NOT_SUPPORTED_ERR: Always thrown if the current document does not support the "XML" feature, since namespaces were defined by XML. + */ + XNode setNamedItemNS([in] XNode arg) raises (DOMException); +}; +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/XNode.idl b/offapi/com/sun/star/xml/dom/XNode.idl new file mode 100644 index 000000000..b5ff89627 --- /dev/null +++ b/offapi/com/sun/star/xml/dom/XNode.idl @@ -0,0 +1,268 @@ +/* -*- 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_xml_dom_XNode_idl__ +#define __com_sun_star_xml_dom_XNode_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/xml/dom/NodeType.idl> +#include <com/sun/star/xml/dom/XNodeList.idl> +#include <com/sun/star/xml/dom/XNamedNodeMap.idl> + + +module com { module sun { module star { module xml { module dom { + +interface XDocument; + +/** The primary dom datatype + +<p>The Node interface is the primary datatype for the entire Document Object Model. +It represents a single node in the document tree. While all objects implementing +the Node interface expose methods for dealing with children, not all objects +implementing the Node interface may have children. For example, Text nodes may not +have children, and adding children to such nodes results in a DOMException being raised.</p> + +<p>The attributes nodeName, nodeValue and attributes are included as a mechanism to get at +node information without casting down to the specific derived interface. In cases where +there is no obvious mapping of these attributes for a specific nodeType (e.g., nodeValue +for an Element or attributes for a Comment ), this returns null. Note that the specialized +interfaces may contain additional and more convenient mechanisms to get and set the relevant +information.</p> + +<p>The values of nodeName, nodeValue, and attributes vary according to the node type as follows: +<table align=left border=1> +<tr><th>Interface </th><th>nodeName </th><th>nodeValue </th><th>attributes</th></tr> +<tr><th>Attr </th><td>name of attribute </td><td>value of attribute </td><td>null</td></tr> +<tr><th>CDATASection </th><td>"#cdata-section" </td><td>content of the CDATA Section </td><td>null</td></tr> +<tr><th>Comment </th><td>"#comment" </td><td>content of the comment </td><td>null</td></tr> +<tr><th>Document </th><td>"#document" </td><td>null </td><td>null</td></tr> +<tr><th>DocumentFragment </th><td>"#document-fragment"</td><td>null </td><td>null</td></tr> +<tr><th>DocumentType </th><td>document type name </td><td>null </td><td>null</td></tr> +<tr><th>Element </th><td>tag name </td><td>null </td><td>NamedNodeMap</td></tr> +<tr><th>Entity </th><td>entity name </td><td>null </td><td>null</td></tr> +<tr><th>EntityReference </th><td>name of entity referenced </td><td>null </td><td>null</td></tr> +<tr><th>Notation </th><td>notation name </td><td>null </td><td>null</td></tr> +<tr><th>ProcessingInstruction </th><td>target </td><td>entire content excluding the target </td><td>null</td></tr> +<tr><th>Text </th><td>"#text" </td><td>content of the text node </td><td>null</td></tr> +</table></p> + +@see <a href="http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113">Document Object Model (DOM) Level 2 Core Specification</a> </p> +@since OOo 2.0 +*/ +interface XNode : com::sun::star::uno::XInterface +{ + + /** + Adds the node newChild to the end of the list of children of this node. + @param newChild + the new child node + @throws com::sun::star::xml::dom::DOMException + <p>HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does + not allow children of the type of the newChild node, or if the + node to append is one of this node's ancestors or this node itself.</p> + <p>WRONG_DOCUMENT_ERR: Raised if newChild was created from a different + document than the one that created this node.</p> + <p>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or if + the previous parent of the node being inserted is readonly.</p> + */ + XNode appendChild([in] XNode newChild) raises (DOMException); + + /** + Returns a duplicate of this node, i.e., serves as a generic copy + constructor for nodes. + <p></p> + @param deep + `TRUE`: clone node together with any children<br> + `FALSE`: clone without children + @returns + the cloned node + */ + XNode cloneNode([in] boolean deep); + + /** + A NamedNodeMap containing the attributes of this node (if it is an Element) + or null otherwise. + */ + XNamedNodeMap getAttributes(); + + /** + A NodeList that contains all children of this node. + */ + XNodeList getChildNodes(); + + /** + The first child of this node. + */ + XNode getFirstChild(); + + /** + The last child of this node. + */ + XNode getLastChild(); + + /** + Returns the local part of the qualified name of this node. + */ + string getLocalName(); + + /** + The namespace URI of this node, or null if it is unspecified. + */ + string getNamespaceURI(); + + /** + The node immediately following this node. + */ + XNode getNextSibling(); + + /** + The name of this node, depending on its type; see the table above. + */ + string getNodeName(); + + /** + A code representing the type of the underlying object, as defined above. + */ + NodeType getNodeType(); + + /** + The value of this node, depending on its type; see the table above. + + @throws com::sun::star::xml::dom::DOMException + <p>DOMSTRING_SIZE_ERR: Raised when it would return more characters + than fit in a DOMString variable on the implementation platform.</p> + */ + string getNodeValue() raises (DOMException); + + /** + The Document object associated with this node. + */ + XDocument getOwnerDocument(); + + /** + The parent of this node. + */ + XNode getParentNode(); + + /** + The namespace prefix of this node, or null if it is unspecified. + */ + string getPrefix(); + + /** + The node immediately preceding this node. + */ + XNode getPreviousSibling(); + + /** + Returns whether this node (if it is an element) has any attributes. + */ + boolean hasAttributes(); + + /** + Returns whether this node has any children. + */ + boolean hasChildNodes(); + + /** + Inserts the node newChild before the existing child node refChild. + @throws DOMException + <p>HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does + not allow children of the type of the newChild node, or if the + node to insert is one of this node's ancestors or this node itself. + <p>WRONG_DOCUMENT_ERR: Raised if newChild was created from a different + document than the one that created this node. + <p>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or if the + parent of the node being inserted is readonly. + <p>NOT_FOUND_ERR: Raised if refChild is not a child of this node. + */ + XNode insertBefore([in] XNode newChild, [in] XNode refChild) raises (DOMException); + + /** + Tests whether the DOM implementation implements a specific feature and + that feature is supported by this node. + */ + boolean isSupported([in] string feature, [in] string ver); + + /** + Puts all Text nodes in the full depth of the sub-tree underneath this + Node, including attribute nodes, into a "normal" form where only structure + (e.g., elements, comments, processing instructions, CDATA sections, and + entity references) separates Text nodes, i.e., there are neither adjacent + Text nodes nor empty Text nodes. + */ + void normalize(); + + /** + Removes the child node indicated by oldChild from the list of children, + and returns it. + @throws DOMException + <p>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + <p>NOT_FOUND_ERR: Raised if oldChild is not a child of this node. + */ + XNode removeChild([in] XNode oldChild) raises (DOMException); + + /** + Replaces the child node oldChild with newChild in the list of children, + and returns the oldChild node. + @throws DOMException + <p>HIERARCHY_REQUEST_ERR: Raised if this node is of a type that + does not allow children of the type of the newChild node, or + if the node to put in is one of this node's ancestors or this + node itself. + <p>WRONG_DOCUMENT_ERR: Raised if newChild was created from a different + document than the one that created this node. + <p>NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the parent of the + new node is readonly. + <p>NOT_FOUND_ERR: Raised if oldChild is not a child of this node. + */ + XNode replaceChild([in] XNode newChild, [in] XNode oldChild) raises (DOMException); + + /** + The value of this node, depending on its type; see the table above. + @throws DOMException + <p>NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. + <p>DOMSTRING_SIZE_ERR: Raised when it would return more characters + than fit in a DOMString variable on the implementation platform. + */ + void setNodeValue([in] string nodeValue) raises (DOMException); + + /** + The namespace prefix of this node, or null if it is unspecified. + @throws DOMException + <p>INVALID_CHARACTER_ERR: Raised if the specified prefix contains an illegal character, + per the XML 1.0 specification . + <p>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + <p>NAMESPACE_ERR: Raised if the specified prefix is malformed per the Namespaces + in XML specification, if the namespaceURI of this node is null, if the specified + prefix is "xml" and the namespaceURI of this node is different from + "http://www.w3.org/XML/1998/namespace", if this node is an attribute and the + specified prefix is "xmlns" and the namespaceURI of this node is different from + " http://www.w3.org/2000/xmlns/", or if this node is an attribute and the qualifiedName + of this node is "xmlns" . + */ + void setPrefix([in] string prefix) raises (DOMException); + +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/XNodeList.idl b/offapi/com/sun/star/xml/dom/XNodeList.idl new file mode 100644 index 000000000..d4d307fab --- /dev/null +++ b/offapi/com/sun/star/xml/dom/XNodeList.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_xml_dom_XNodeList_idl__ +#define __com_sun_star_xml_dom_XNodeList_idl__ + +#include <com/sun/star/uno/XInterface.idl> + + +module com { module sun { module star { module xml { module dom { + +interface XNode; + +interface XNodeList : com::sun::star::uno::XInterface +{ + /** + The number of nodes in the list. + */ + long getLength(); + /** + Returns a node specified by index in the collection. + */ + XNode item([in] long index); +}; +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/XNotation.idl b/offapi/com/sun/star/xml/dom/XNotation.idl new file mode 100644 index 000000000..a1241440e --- /dev/null +++ b/offapi/com/sun/star/xml/dom/XNotation.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_xml_dom_XNotation_idl__ +#define __com_sun_star_xml_dom_XNotation_idl__ + +#include <com/sun/star/xml/dom/XNode.idl> + +module com { module sun { module star { module xml { module dom { + +interface XNotation : XNode +{ + /** + The public identifier of this notation. + */ + string getPublicId(); + + /** + The system identifier of this notation. + */ + string getSystemId(); +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/XProcessingInstruction.idl b/offapi/com/sun/star/xml/dom/XProcessingInstruction.idl new file mode 100644 index 000000000..e9ac864b0 --- /dev/null +++ b/offapi/com/sun/star/xml/dom/XProcessingInstruction.idl @@ -0,0 +1,53 @@ +/* -*- 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_xml_dom_XProcessingInstruction_idl__ +#define __com_sun_star_xml_dom_XProcessingInstruction_idl__ + +#include <com/sun/star/xml/dom/XNode.idl> + +module com { module sun { module star { module xml { module dom { + +interface XProcessingInstruction : XNode +{ + /** + The content of this processing instruction. + */ + string getData(); + + /** + The target of this processing instruction. + */ + string getTarget(); + + /** + The content of this processing instruction. + Throws: + DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. + */ + void setData([in] string data) raises (DOMException); + + +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/XSAXDocumentBuilder.idl b/offapi/com/sun/star/xml/dom/XSAXDocumentBuilder.idl new file mode 100644 index 000000000..36936edb0 --- /dev/null +++ b/offapi/com/sun/star/xml/dom/XSAXDocumentBuilder.idl @@ -0,0 +1,50 @@ +/* -*- 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_xml_dom_XSAXDocumentBuilder_idl__ +#define __com_sun_star_xml_dom_XSAXDocumentBuilder_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/xml/dom/XDocument.idl> +#include <com/sun/star/xml/dom/XDocumentFragment.idl> +#include <com/sun/star/xml/dom/SAXDocumentBuilderState.idl> + +module com { module sun { module star { module xml { module dom { + +/** +Builds a new dom tree +*/ +interface XSAXDocumentBuilder : com::sun::star::uno::XInterface +{ + + SAXDocumentBuilderState getState(); + void reset(); + XDocument getDocument(); + XDocumentFragment getDocumentFragment(); + void startDocumentFragment( [in] XDocument ownerDoc); + void endDocumentFragment(); + + +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/XSAXDocumentBuilder2.idl b/offapi/com/sun/star/xml/dom/XSAXDocumentBuilder2.idl new file mode 100644 index 000000000..37560fd8d --- /dev/null +++ b/offapi/com/sun/star/xml/dom/XSAXDocumentBuilder2.idl @@ -0,0 +1,43 @@ +/* -*- 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_xml_dom_XSAXDocumentBuilder2_idl +#define __com_sun_star_xml_dom_XSAXDocumentBuilder2_idl + +#include <com/sun/star/xml/sax/XFastDocumentHandler.idl> +#include <com/sun/star/xml/dom/XSAXDocumentBuilder.idl> + +module com { module sun { module star { module xml { module dom { + +/** + Provides a unified interface for the SAXDocumentBuilder service to implement. + + @since LibreOffice 4.0 +*/ +interface XSAXDocumentBuilder2 +{ + interface XSAXDocumentBuilder; + interface com::sun::star::xml::sax::XFastDocumentHandler; +}; + +};};};};}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/XText.idl b/offapi/com/sun/star/xml/dom/XText.idl new file mode 100644 index 000000000..7274953bf --- /dev/null +++ b/offapi/com/sun/star/xml/dom/XText.idl @@ -0,0 +1,41 @@ +/* -*- 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_xml_dom_XText_idl__ +#define __com_sun_star_xml_dom_XText_idl__ + +#include <com/sun/star/xml/dom/XCharacterData.idl> + +module com { module sun { module star { module xml { module dom { + +interface XText: XCharacterData +{ + /** Breaks this node into two nodes at the specified offset, keeping + both in the tree as siblings. + Throws: + DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than the number of 16-bit units in data. + NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + */ + XText splitText([in] long offset) raises (DOMException); +}; +};};};};}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/events/AttrChangeType.idl b/offapi/com/sun/star/xml/dom/events/AttrChangeType.idl new file mode 100644 index 000000000..ef6532fa9 --- /dev/null +++ b/offapi/com/sun/star/xml/dom/events/AttrChangeType.idl @@ -0,0 +1,36 @@ +/* -*- 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_xml_dom_events_AttrChangeType_idl__ +#define __com_sun_star_xml_dom_events_AttrChangeType_idl__ + +module com { module sun { module star { module xml { module dom { module events { + +enum AttrChangeType +{ + MODIFICATION, + ADDITION, + REMOVAL +}; + +}; }; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/events/EventException.idl b/offapi/com/sun/star/xml/dom/events/EventException.idl new file mode 100644 index 000000000..94408e08e --- /dev/null +++ b/offapi/com/sun/star/xml/dom/events/EventException.idl @@ -0,0 +1,35 @@ +/* -*- 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_xml_dom_events_EventException_idl__ +#define __com_sun_star_xml_dom_events_EventException_idl__ + +#include <com/sun/star/uno/Exception.idl> + +module com { module sun { module star { module xml { module dom { module events { + +// Introduced in DOM Level 2: +exception EventException: com::sun::star::uno::Exception { + short code; +}; + +}; }; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/events/EventType.idl b/offapi/com/sun/star/xml/dom/events/EventType.idl new file mode 100644 index 000000000..3dab31c93 --- /dev/null +++ b/offapi/com/sun/star/xml/dom/events/EventType.idl @@ -0,0 +1,168 @@ +/* -*- 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_xml_dom_events_EventType_idl__ +#define __com_sun_star_xml_dom_events_EventType_idl__ + +module com { module sun { module star { module xml { module dom { module events { + +enum EventType +{ + DOMFocusIn, + /* + The DOMFocusIn event occurs when an EventTarget receives focus, for instance via a pointing device being moved onto an element or by tabbing navigation to the element. Unlike the HTML event focus, DOMFocusIn can be applied to any focusable EventTarget, not just FORM controls. + * Bubbles: Yes + * Cancelable: No + * Context Info: None + */ + + DOMFocusOut, + /* + The DOMFocusOut event occurs when an EventTarget loses focus, for instance via a pointing device being moved out of an element or by tabbing navigation out of the element. Unlike the HTML event blur, DOMFocusOut can be applied to any focusable EventTarget, not just FORM controls. + * Bubbles: Yes + * Cancelable: No + * Context Info: None + */ + + DOMActivate, + /* + The activate event occurs when an element is activated, for instance, through a mouse click or a key press. A numerical argument is provided to give an indication of the type of activation that occurs: 1 for a simple activation (e.g. a simple click or Enter), 2 for hyper activation (for instance a double click or Shift Enter). + * Bubbles: Yes + * Cancelable: Yes + * Context Info: detail (the numerical value) + */ + + click, + /* + The click event occurs when the pointing device button is clicked over an element. + A click is defined as a mousedown and mouseup over the same screen location. + The sequence of these events is: + + mousedown + mouseup + click + + If multiple clicks occur at the same screen location, the sequence repeats with the detail attribute incrementing with each repetition. This event is valid for most elements. + + * Bubbles: Yes + * Cancelable: Yes + * Context Info: screenX, screenY, clientX, clientY, altKey, ctrlKey, shiftKey, metaKey, button, detail + */ + + mousedown, + /* + The mousedown event occurs when the pointing device button is pressed over an element. This event is valid for most elements. + * Bubbles: Yes + * Cancelable: Yes + * Context Info: screenX, screenY, clientX, clientY, altKey, ctrlKey, shiftKey, metaKey, button, detail + */ + + mouseup, + /* + The mouseup event occurs when the pointing device button is released over an element. This event is valid for most elements. + * Bubbles: Yes + * Cancelable: Yes + * Context Info: screenX, screenY, clientX, clientY, altKey, ctrlKey, shiftKey, metaKey, button, detail + */ + + mouseover, + /* + The mouseover event occurs when the pointing device is moved onto an element. This event is valid for most elements. + * Bubbles: Yes + * Cancelable: Yes + * Context Info: screenX, screenY, clientX, clientY, altKey, ctrlKey, shiftKey, metaKey, relatedTarget indicates the EventTarget the pointing device is exiting. + */ + + mousemove, + /* + The mousemove event occurs when the pointing device is moved while it is over an element. This event is valid for most elements. + * Bubbles: Yes + * Cancelable: No + * Context Info: screenX, screenY, clientX, clientY, altKey, ctrlKey, shiftKey, metaKey + */ + + mouseout, + /* + The mouseout event occurs when the pointing device is moved away from an element. This event is valid for most elements... + * Bubbles: Yes + * Cancelable: Yes + * Context Info: screenX, screenY, clientX, clientY, altKey, ctrlKey, shiftKey, metaKey, relatedTarget indicates the EventTarget the pointing device is entering. + */ + + DOMSubtreeModified, + /* + This is a general event for notification of all changes to the document. It can be used instead of the more specific events listed below. It may be fired after a single modification to the document or, at the implementation's discretion, after multiple changes have occurred. The latter use should generally be used to accommodate multiple changes which occur either simultaneously or in rapid succession. The target of this event is the lowest common parent of the changes which have taken place. This event is dispatched after any other events caused by the mutation have fired. + * Bubbles: Yes + * Cancelable: No + * Context Info: None + */ + + DOMNodeInserted, + /* + Fired when a node has been added as a child of another node. This event is dispatched after the insertion has taken place. The target of this event is the node being inserted. + * Bubbles: Yes + * Cancelable: No + * Context Info: relatedNode holds the parent node + */ + + DOMNodeRemoved, + /* + Fired when a node is being removed from its parent node. This event is dispatched before the node is removed from the tree. The target of this event is the node being removed. + * Bubbles: Yes + * Cancelable: No + * Context Info: relatedNode holds the parent node + */ + + DOMNodeRemovedFromDocument, + /* + Fired when a node is being removed from a document, either through direct removal of the Node or removal of a subtree in which it is contained. This event is dispatched before the removal takes place. The target of this event is the Node being removed. If the Node is being directly removed the DOMNodeRemoved event will fire before the DOMNodeRemovedFromDocument event. + * Bubbles: No + * Cancelable: No + * Context Info: None + */ + + DOMNodeInsertedIntoDocument, + /* + Fired when a node is being inserted into a document, either through direct insertion of the Node or insertion of a subtree in which it is contained. This event is dispatched after the insertion has taken place. The target of this event is the node being inserted. If the Node is being directly inserted the DOMNodeInserted event will fire before the DOMNodeInsertedIntoDocument event. + * Bubbles: No + * Cancelable: No + * Context Info: None + */ + + DOMAttrModified, + /* + Fired after an Attr has been modified on a node. The target of this event is the Node whose Attr changed. The value of attrChange indicates whether the Attr was modified, added, or removed. The value of relatedNode indicates the Attr node whose value has been affected. It is expected that string based replacement of an Attr value will be viewed as a modification of the Attr since its identity does not change. Subsequently replacement of the Attr node with a different Attr node is viewed as the removal of the first Attr node and the addition of the second. + * Bubbles: Yes + * Cancelable: No + * Context Info: attrName, attrChange, prevValue, newValue, relatedNode + */ + + DOMCharacterDataModified + /* + Fired after CharacterData within a node has been modified but the node itself has not been inserted or deleted. This event is also triggered by modifications to PI elements. The target of this event is the CharacterData node. + * Bubbles: Yes + * Cancelable: No + * Context Info: prevValue, newValue + */ +}; +}; }; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/events/PhaseType.idl b/offapi/com/sun/star/xml/dom/events/PhaseType.idl new file mode 100644 index 000000000..7b7faefa1 --- /dev/null +++ b/offapi/com/sun/star/xml/dom/events/PhaseType.idl @@ -0,0 +1,34 @@ +/* -*- 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_xml_dom_events_PhaseType_idl__ +#define __com_sun_star_xml_dom_events_PhaseType_idl__ + +module com { module sun { module star { module xml { module dom { module events { + +enum PhaseType +{ + CAPTURING_PHASE, + AT_TARGET, + BUBBLING_PHASE +}; +}; }; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/events/XDocumentEvent.idl b/offapi/com/sun/star/xml/dom/events/XDocumentEvent.idl new file mode 100644 index 000000000..bdc26b0d4 --- /dev/null +++ b/offapi/com/sun/star/xml/dom/events/XDocumentEvent.idl @@ -0,0 +1,36 @@ +/* -*- 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_xml_dom_events_XDocumentEvent_idl__ +#define __com_sun_star_xml_dom_events_XDocumentEvent_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/xml/dom/events/EventType.idl> +#include <com/sun/star/xml/dom/events/XEvent.idl> + +module com { module sun { module star { module xml { module dom { module events { + +// Introduced in DOM Level 2: +interface XDocumentEvent : com::sun::star::uno::XInterface { + XEvent createEvent([in] string eventType); +}; +}; }; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/events/XEvent.idl b/offapi/com/sun/star/xml/dom/events/XEvent.idl new file mode 100644 index 000000000..7345b3054 --- /dev/null +++ b/offapi/com/sun/star/xml/dom/events/XEvent.idl @@ -0,0 +1,60 @@ +/* -*- 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_xml_dom_events_XEvent_idl__ +#define __com_sun_star_xml_dom_events_XEvent_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/xml/dom/events/XEventTarget.idl> +#include <com/sun/star/xml/dom/events/EventType.idl> +#include <com/sun/star/xml/dom/events/PhaseType.idl> +#include <com/sun/star/util/Time.idl> + +module com { module sun { module star { module xml { module dom { module events { + +// Introduced in DOM Level 2: +interface XEvent : com::sun::star::uno::XInterface +{ + + string getType(); + + XEventTarget getTarget(); + + XEventTarget getCurrentTarget(); + + PhaseType getEventPhase(); + + boolean getBubbles(); + + boolean getCancelable(); + + com::sun::star::util::Time getTimeStamp(); + + void stopPropagation(); + + void preventDefault(); + + void initEvent([in] string eventTypeArg, + [in] boolean canBubbleArg, + [in] boolean cancelableArg); +}; +}; }; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/events/XEventListener.idl b/offapi/com/sun/star/xml/dom/events/XEventListener.idl new file mode 100644 index 000000000..16b302aab --- /dev/null +++ b/offapi/com/sun/star/xml/dom/events/XEventListener.idl @@ -0,0 +1,36 @@ +/* -*- 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_xml_dom_events_XEventListener_idl__ +#define __com_sun_star_xml_dom_events_XEventListener_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +module com { module sun { module star { module xml { module dom { module events { + +interface XEvent; + +// Introduced in DOM Level 2: +interface XEventListener : com::sun::star::uno::XInterface { + void handleEvent([in] XEvent evt); +}; +}; }; }; }; }; }; +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/events/XEventTarget.idl b/offapi/com/sun/star/xml/dom/events/XEventTarget.idl new file mode 100644 index 000000000..f73d4e71b --- /dev/null +++ b/offapi/com/sun/star/xml/dom/events/XEventTarget.idl @@ -0,0 +1,49 @@ +/* -*- 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_xml_dom_events_XEventTarget_idl__ +#define __com_sun_star_xml_dom_events_XEventTarget_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/xml/dom/events/EventType.idl> +#include <com/sun/star/xml/dom/events/EventException.idl> +#include <com/sun/star/xml/dom/events/XEventListener.idl> + + +module com { module sun { module star { module xml { module dom { module events { + +interface XEvent; + +// Introduced in DOM Level 2: +interface XEventTarget : com::sun::star::uno::XInterface { + void addEventListener([in] string eventType, + [in] XEventListener listener, + [in] boolean useCapture); + + void removeEventListener([in] string eventType, + [in] XEventListener listener, + [in] boolean useCapture); + + boolean dispatchEvent([in] XEvent evt) raises(EventException); +}; +}; }; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/events/XMouseEvent.idl b/offapi/com/sun/star/xml/dom/events/XMouseEvent.idl new file mode 100644 index 000000000..a84a0324b --- /dev/null +++ b/offapi/com/sun/star/xml/dom/events/XMouseEvent.idl @@ -0,0 +1,63 @@ +/* -*- 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_xml_dom_events_XMouseEvent_idl__ +#define __com_sun_star_xml_dom_events_XMouseEvent_idl__ + +#include <com/sun/star/xml/dom/events/EventType.idl> +#include <com/sun/star/xml/dom/events/XEvent.idl> +#include <com/sun/star/xml/dom/events/XUIEvent.idl> +#include <com/sun/star/xml/dom/events/XEventTarget.idl> +#include <com/sun/star/xml/dom/events/XEventListener.idl> + +module com { module sun { module star { module xml { module dom { module events { + +// Introduced in DOM Level 2: +interface XMouseEvent : XUIEvent { + + long getScreenX(); + long getScreenY(); + long getClientX(); + long getClientY(); + boolean getCtrlKey(); + boolean getShiftKey(); + boolean getAltKey(); + boolean getMetaKey(); + short getButton(); + XEventTarget getRelatedTarget(); + + void initMouseEvent([in] string typeArg, + [in] boolean canBubbleArg, + [in] boolean cancelableArg, + [in] com::sun::star::xml::dom::views::XAbstractView viewArg, + [in] long detailArg, + [in] long screenXArg, + [in] long screenYArg, + [in] long clientXArg, + [in] long clientYArg, + [in] boolean ctrlKeyArg, + [in] boolean altKeyArg, + [in] boolean shiftKeyArg, + [in] boolean metaKeyArg, + [in] short buttonArg, + [in] XEventTarget relatedTargetArg); +}; +}; }; }; }; }; }; +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/events/XMutationEvent.idl b/offapi/com/sun/star/xml/dom/events/XMutationEvent.idl new file mode 100644 index 000000000..f0baf2e1b --- /dev/null +++ b/offapi/com/sun/star/xml/dom/events/XMutationEvent.idl @@ -0,0 +1,53 @@ +/* -*- 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_xml_dom_events_XMutationEvent_idl__ +#define __com_sun_star_xml_dom_events_XMutationEvent_idl__ + +#include <com/sun/star/xml/dom/events/EventType.idl> +#include <com/sun/star/xml/dom/events/AttrChangeType.idl> +#include <com/sun/star/xml/dom/events/XEvent.idl> +#include <com/sun/star/xml/dom/events/XEventTarget.idl> +#include <com/sun/star/xml/dom/events/XEventListener.idl> +#include <com/sun/star/xml/dom/XNode.idl> + +module com { module sun { module star { module xml { module dom { module events { + +interface XMutationEvent : XEvent { + + + com::sun::star::xml::dom::XNode getRelatedNode(); + string getPrevValue(); + string getNewValue(); + string getAttrName(); + AttrChangeType getAttrChange(); + + void initMutationEvent([in] string typeArg, + [in] boolean canBubbleArg, + [in] boolean cancelableArg, + [in] com::sun::star::xml::dom::XNode relatedNodeArg, + [in] string prevValueArg, + [in] string newValueArg, + [in] string attrNameArg, + [in] AttrChangeType attrChangeArg); +}; +}; }; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/events/XUIEvent.idl b/offapi/com/sun/star/xml/dom/events/XUIEvent.idl new file mode 100644 index 000000000..78dd5cd99 --- /dev/null +++ b/offapi/com/sun/star/xml/dom/events/XUIEvent.idl @@ -0,0 +1,43 @@ +/* -*- 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_xml_dom_events_XUIEvent_idl__ +#define __com_sun_star_xml_dom_events_XUIEvent_idl__ + +#include <com/sun/star/xml/dom/events/XEvent.idl> + +module com { module sun { module star { module xml { module dom { module views { + interface XAbstractView; +}; }; }; }; }; }; + +module com { module sun { module star { module xml { module dom { module events { + +// Introduced in DOM Level 2: +interface XUIEvent : XEvent { + com::sun::star::xml::dom::views::XAbstractView getView(); + long getDetail(); + void initUIEvent([in] string typeArg, + [in] boolean canBubbleArg, + [in] boolean cancelableArg, + [in] com::sun::star::xml::dom::views::XAbstractView viewArg, + [in] long detailArg); +}; +}; }; }; }; }; }; +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/views/XAbstractView.idl b/offapi/com/sun/star/xml/dom/views/XAbstractView.idl new file mode 100644 index 000000000..b721961ab --- /dev/null +++ b/offapi/com/sun/star/xml/dom/views/XAbstractView.idl @@ -0,0 +1,35 @@ +/* -*- 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_xml_dom_views_XAbstractView_idl__ +#define __com_sun_star_xml_dom_views_XAbstractView_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/xml/dom/events/XEvent.idl> + +module com { module sun { module star { module xml { module dom { module views { + +interface XDocumentView; + +interface XAbstractView : com::sun::star::uno::XInterface{ + XDocumentView getDocument(); +}; +}; }; }; }; }; }; +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/dom/views/XDocumentView.idl b/offapi/com/sun/star/xml/dom/views/XDocumentView.idl new file mode 100644 index 000000000..fe239aa0a --- /dev/null +++ b/offapi/com/sun/star/xml/dom/views/XDocumentView.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_xml_dom_views_XDocumentView_idl__ +#define __com_sun_star_xml_dom_views_XDocumentView_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/xml/dom/views/XAbstractView.idl> + +module com { module sun { module star { module xml { module dom { module views { + +interface XDocumentView : com::sun::star::uno::XInterface { + XAbstractView getDefaultView(); +}; +}; }; }; }; }; }; +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/input/SaxDocumentHandler.idl b/offapi/com/sun/star/xml/input/SaxDocumentHandler.idl new file mode 100644 index 000000000..970d11f99 --- /dev/null +++ b/offapi/com/sun/star/xml/input/SaxDocumentHandler.idl @@ -0,0 +1,50 @@ +/* -*- 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_xml_input_SaxDocumentHandler_idl__ +#define __com_sun_star_xml_input_SaxDocumentHandler_idl__ + +#include <com/sun/star/xml/input/XRoot.idl> +#include <com/sun/star/xml/sax/XDocumentHandler.idl> +#include <com/sun/star/lang/XInitialization.idl> + + +module com { module sun { module star { module xml { module input { + +/** This service helps parsing files by providing a SAX document handler + interface for a SAX parsers. + You have to instantiate this service passing an XRoot instance. + + @internal +*/ +service SaxDocumentHandler +{ + /** to be passed to a SAX parser + */ + interface com::sun::star::xml::sax::XDocumentHandler; + + /** to be used to pass XRoot object + */ + interface com::sun::star::lang::XInitialization; +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/input/XAttributes.idl b/offapi/com/sun/star/xml/input/XAttributes.idl new file mode 100644 index 000000000..254699e46 --- /dev/null +++ b/offapi/com/sun/star/xml/input/XAttributes.idl @@ -0,0 +1,121 @@ +/* -*- 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_xml_input_XAttributes_idl__ +#define __com_sun_star_xml_input_XAttributes_idl__ + +#include <com/sun/star/uno/XInterface.idl> + + +module com { module sun { module star { module xml { module input { + +/** An element's attributes + + @internal +*/ +interface XAttributes : com::sun::star::uno::XInterface +{ + /** Gets the number of attributes. + + @return + number of attributes + */ + long getLength(); + + /** Gets attribute index passing a QName. + + @param qName + QName + @return + attribute index or -1, if not found + */ + long getIndexByQName( [in] string qName ); + + /** Gets attribute index passing a namespace uid and a local name. + + @param uid + namespace uid + @param localName + local name + @return + attribute index or -1, if not found + */ + long getIndexByUidName( [in] long uid, [in] string localName ); + + /** Gets the QName of an attribute. + + @param nIndex + index + @return + QName of attribute or empty string, if invalid index + */ + string getQNameByIndex( [in] long nIndex ); + + /** Gets the namespace uid of an attribute. + + @param nIndex + index + @return + namespace uid of attribute or -1, if invalid index + */ + long getUidByIndex( [in] long nIndex ); + + /** Gets the local name of an attribute. + + @param nIndex + index + @return + local name of attribute or empty string, if invalid index + */ + string getLocalNameByIndex( [in] long nIndex ); + + /** Gets the value of an attribute. + + @param nIndex + index + @return + value string or empty string, if invalid index + */ + string getValueByIndex( [in] long nIndex ); + + /** For convenience: Gets the value of an attribute passing uid, local name. + + @param uid + namespace uid + @param localName + local name + @return + value string or empty string, if invalid uid/local name + */ + string getValueByUidName( [in] long uid, [in] string localName ); + + /** Gets the type of an attribute, if possible. + + @param nIndex + index + @return + type of attribute (if possible, else empty string) + */ + string getTypeByIndex( [in] long nIndex ); +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/input/XElement.idl b/offapi/com/sun/star/xml/input/XElement.idl new file mode 100644 index 000000000..f79daa2ac --- /dev/null +++ b/offapi/com/sun/star/xml/input/XElement.idl @@ -0,0 +1,114 @@ +/* -*- 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_xml_input_XElement_idl__ +#define __com_sun_star_xml_input_XElement_idl__ + +#include <com/sun/star/xml/input/XAttributes.idl> +#include <com/sun/star/xml/sax/SAXException.idl> + + +module com { module sun { module star { module xml { module input { + +/** Capsule around an XML element. + + @internal +*/ +interface XElement : com::sun::star::uno::XInterface +{ + /** Gets the parent context. + + @return + parent context + */ + XElement getParent(); + + /** Gets the local name of this element. + + @return + local name of this element + */ + string getLocalName(); + + /** Gets the namespace uid of this element. + + @return + namespace uid of this element + */ + long getUid(); + + /** Gets the attributes of this element. + + @return + attributes of this element + */ + XAttributes getAttributes(); + + /** Called upon each occurring child element. + + @param uid + namespace uid of element + @param localName + local name of element + @param xAttributes + attributes of element + @return + child import context + */ + XElement startChildElement( + [in] long uid, [in] string localName, [in] XAttributes xAttributes ) + raises (com::sun::star::xml::sax::SAXException); + + /** Called upon retrieval of characters. + + @param chars + characters + */ + void characters( [in] string chars ) + raises (com::sun::star::xml::sax::SAXException); + + /** Receives notification of white space that can be ignored. + + @param whitespace + white space characters + */ + void ignorableWhitespace( [in] string whitespace ) + raises (com::sun::star::xml::sax::SAXException); + + /** Receives notification of a processing instruction. + + @param target + target + @param data + data + */ + void processingInstruction( + [in] string target, [in] string data ) + raises (com::sun::star::xml::sax::SAXException); + + /** Receives notification of element closing. + */ + void endElement() + raises (com::sun::star::xml::sax::SAXException); +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/input/XNamespaceMapping.idl b/offapi/com/sun/star/xml/input/XNamespaceMapping.idl new file mode 100644 index 000000000..08b8fb824 --- /dev/null +++ b/offapi/com/sun/star/xml/input/XNamespaceMapping.idl @@ -0,0 +1,59 @@ +/* -*- 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_xml_input_XNamespaceMapping_idl__ +#define __com_sun_star_xml_input_XNamespaceMapping_idl__ + +#include <com/sun/star/container/NoSuchElementException.idl> + + +module com { module sun { module star { module xml { module input { + +/** Interface to map XML namespace URI strings to ordinals (URI-id, short uid). + + @internal +*/ +interface XNamespaceMapping : com::sun::star::uno::XInterface +{ + /** Creates a unique ordinal passing an XML namespace URI. + + @param uri + XML namespace URI + @return + uid + */ + long getUidByUri( [in] string uri ); + + /** Gets the corresponding XML namespace URI passing a uid (created using + getUidByUri()). + + @param uid + uid + @return + XML namespace URI + */ + string getUriByUid( [in] long uid ) + raises (com::sun::star::container::NoSuchElementException); +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/input/XRoot.idl b/offapi/com/sun/star/xml/input/XRoot.idl new file mode 100644 index 000000000..8efb1a140 --- /dev/null +++ b/offapi/com/sun/star/xml/input/XRoot.idl @@ -0,0 +1,91 @@ +/* -*- 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_xml_input_XRoot_idl__ +#define __com_sun_star_xml_input_XRoot_idl__ + +#include <com/sun/star/xml/input/XNamespaceMapping.idl> +#include <com/sun/star/xml/input/XElement.idl> +#include <com/sun/star/xml/input/XAttributes.idl> +#include <com/sun/star/xml/sax/SAXException.idl> +#include <com/sun/star/xml/sax/XLocator.idl> + + +module com { module sun { module star { module xml { module input { + +/** Root interface being passed to SaxDocumentHandler service upon + instantiation. + + @internal +*/ +interface XRoot : com::sun::star::uno::XInterface +{ + /** Receives notification of the beginning of a document. + + @param xMapping + mapping to obtain ids out of XML namespace URIs + and vice versa + */ + void startDocument( + [in] XNamespaceMapping xMapping ) + raises (com::sun::star::xml::sax::SAXException); + + /** Receives notification of the end of a document. + */ + void endDocument() + raises (com::sun::star::xml::sax::SAXException); + + /** Receives notification of a processing instruction. + + @param target + target + @param data + data + */ + void processingInstruction( + [in] string target, [in] string data ) + raises (com::sun::star::xml::sax::SAXException); + + /** Receives an object for locating the origin of SAX document events. + + @param locator + locator + */ + void setDocumentLocator( + [in] com::sun::star::xml::sax::XLocator locator ) + raises (com::sun::star::xml::sax::SAXException); + + /** Called upon root element. + + @param uid + namespace uid of element + @param localName + local name of element + @param xAttributes + attributes of element + */ + XElement startRootElement( + [in] long uid, [in] string localName, [in] XAttributes xAttributes ) + raises (com::sun::star::xml::sax::SAXException); +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/sax/FastParser.idl b/offapi/com/sun/star/xml/sax/FastParser.idl new file mode 100644 index 000000000..4f2382217 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/FastParser.idl @@ -0,0 +1,23 @@ +/* -*- 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 INCLUDED_COM_SUN_STAR_XML_SAX_FASTPARSER_IDL +#define INCLUDED_COM_SUN_STAR_XML_SAX_FASTPARSER_IDL + +#include <com/sun/star/xml/sax/XFastParser.idl> + +module com { module sun { module star { module xml { module sax { + +service FastParser: XFastParser; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/sax/FastToken.idl b/offapi/com/sun/star/xml/sax/FastToken.idl new file mode 100644 index 000000000..772c8bfbc --- /dev/null +++ b/offapi/com/sun/star/xml/sax/FastToken.idl @@ -0,0 +1,46 @@ +/* -*- 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_xml_sax_FastToken_idl__ +#define __com_sun_star_xml_sax_FastToken_idl__ + +#include <com/sun/star/uno/XInterface.idl> + + +module com { module sun { module star { module xml { module sax { + + +constants FastToken +{ + + /** specifies an unknown token. + */ + const long DONTKNOW = -1; + + + /** specifies the first namespace token + */ + const long NAMESPACE = 0x00010000; +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/sax/FastTokenHandler.idl b/offapi/com/sun/star/xml/sax/FastTokenHandler.idl new file mode 100644 index 000000000..eccca85de --- /dev/null +++ b/offapi/com/sun/star/xml/sax/FastTokenHandler.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_xml_sax_FastTokenHandler_idl__ +#define __com_sun_star_xml_sax_FastTokenHandler_idl__ + +#include <com/sun/star/xml/sax/XFastTokenHandler.idl> + + +module com { module sun { module star { module xml { module sax { + +service FastTokenHandler : XFastTokenHandler; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/sax/InputSource.idl b/offapi/com/sun/star/xml/sax/InputSource.idl new file mode 100644 index 000000000..992a7d871 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/InputSource.idl @@ -0,0 +1,74 @@ +/* -*- 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_xml_sax_InputSource_idl__ +#define __com_sun_star_xml_sax_InputSource_idl__ + +#include <com/sun/star/io/XInputStream.idl> + + + +module com { module sun { module star { module xml { module sax { + + +/** specifies the Datasource plus some additional information for the parser. + + <p>There are two places where the application will deliver this input + source to the parser: + </p> + <ul> + <li>as the argument of XParser::parseStream()</li> + <li>as the return value of XEntityResolver::resolveEntity(). + </li> + </ul> + */ +published struct InputSource +{ + /** contains the byte input stream of the document. + */ + com::sun::star::io::XInputStream aInputStream; + + + /** contains the encoding of the data stream. This is used by the parser + to do Unicode conversions. + + <p>Note that in general you do not need to specify an encoding. + Either it is UTF-8 or UTF-16 which is recognized by the parser + or it is specified in the first line of the XML-File + ( e.g. <em>?xml encoding="EUC-JP"?</em> ).</p> + */ + string sEncoding; + + + /** contains the public Id of the document, for example, needed in + exception-message strings. + */ + string sPublicId; + + + /** contains the system ID of the document. + */ + string sSystemId; +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/sax/Parser.idl b/offapi/com/sun/star/xml/sax/Parser.idl new file mode 100644 index 000000000..8ddee4e50 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/Parser.idl @@ -0,0 +1,37 @@ +/* -*- 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_xml_sax_Parser_idl__ +#define __com_sun_star_xml_sax_Parser_idl__ + +#include <com/sun/star/xml/sax/XParser.idl> + +module com { module sun { module star { module xml { module sax { + + +/** + Service that provides a SAX parser. + */ +published service Parser : XParser; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/sax/SAXException.idl b/offapi/com/sun/star/xml/sax/SAXException.idl new file mode 100644 index 000000000..6bd174072 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/SAXException.idl @@ -0,0 +1,55 @@ +/* -*- 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_xml_sax_SAXException_idl__ +#define __com_sun_star_xml_sax_SAXException_idl__ + +#include <com/sun/star/uno/Exception.idl> + + + +module com { module sun { module star { module xml { module sax { + + +/** encapsulates the details of an XML parse error or warning. + + <p>This structure is a replacement for the Java class + <em>org.xml.sax.SAXException</em>. </p> + + <p>Some abbreviations: </p> + <ul> + <li>SAX = Simple API for XML </li> + <li>URI = Uniform Resource Identifier </li> + <li>DTD = document type definition </li> + </ul> + */ +published exception SAXException: com::sun::star::uno::Exception +{ + + /** This field may contain a wrapped exception. + */ + any WrappedException; + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/sax/SAXInvalidCharacterException.idl b/offapi/com/sun/star/xml/sax/SAXInvalidCharacterException.idl new file mode 100644 index 000000000..1d17bc0c6 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/SAXInvalidCharacterException.idl @@ -0,0 +1,43 @@ +/* -*- 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_xml_sax_SAXInvalidCharacterException_idl__ +#define __com_sun_star_xml_sax_SAXInvalidCharacterException_idl__ + +#include <com/sun/star/xml/sax/SAXException.idl> + + + +module com { module sun { module star { module xml { module sax { + + +/** stores information for locating the error in the original XML document. + + @see XLocator + */ +published exception SAXInvalidCharacterException: com::sun::star::xml::sax::SAXException +{ + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/sax/SAXParseException.idl b/offapi/com/sun/star/xml/sax/SAXParseException.idl new file mode 100644 index 000000000..b5640ff75 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/SAXParseException.idl @@ -0,0 +1,63 @@ +/* -*- 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_xml_sax_SAXParseException_idl__ +#define __com_sun_star_xml_sax_SAXParseException_idl__ + +#include <com/sun/star/xml/sax/SAXException.idl> + + + +module com { module sun { module star { module xml { module sax { + + +/** stores information for locating the error in the original XML document. + + @see XLocator + */ +published exception SAXParseException: com::sun::star::xml::sax::SAXException +{ + + /** contains the public identifier of the document where the exception + has occurred. + */ + string PublicId; + + + /** contains the system identifier of the document. + */ + string SystemId; + + + /** contains the line number in the document. + */ + long LineNumber; + + + /** contains the column number in the document. + */ + long ColumnNumber; + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/sax/Writer.idl b/offapi/com/sun/star/xml/sax/Writer.idl new file mode 100644 index 000000000..91a24207c --- /dev/null +++ b/offapi/com/sun/star/xml/sax/Writer.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_xml_sax_Writer_idl__ +#define __com_sun_star_xml_sax_Writer_idl__ + +#include <com/sun/star/xml/sax/XWriter.idl> + + + +module com { module sun { module star { module xml { module sax { + + +/** + @since LibreOffice 4.0 + */ +service Writer : XWriter; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/sax/XAttributeList.idl b/offapi/com/sun/star/xml/sax/XAttributeList.idl new file mode 100644 index 000000000..51924375e --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XAttributeList.idl @@ -0,0 +1,87 @@ +/* -*- 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_xml_sax_XAttributeList_idl__ +#define __com_sun_star_xml_sax_XAttributeList_idl__ + +#include <com/sun/star/uno/XInterface.idl> + + +module com { module sun { module star { module xml { module sax { + + +/** specifies an element's attributes. + + <p>This interface describes a name-type-value triple which describes a + single attribute of a tag. Implementors are encouraged to implement the + com::sun::star::util::XCloneable interface also to + allow the user to make a copy of the instance. + + </p> + <p>This interface is a poor IDL version of the Java interface + <em>org.xml.sax.AttributeList</em>. For example in getValueByName, it does + not allow to distinguish a missing value (for which the Java interface + returns null) from an empty string value.</p> + */ +published interface XAttributeList: com::sun::star::uno::XInterface +{ + + /** @returns + the number of attributes in this list. + */ + short getLength(); + + + /** @returns + the name of an attribute in this list (by position). + */ + string getNameByIndex( [in] short i ); + + + /** @returns + the type of an attribute in the list (by position). + Non-validating parsers may return CDATA only. + */ + string getTypeByIndex( [in] short i ); + + + /** @returns + the type of an attribute in the list (by name). + Non-validating parsers may return CDATA only. + */ + string getTypeByName( [in] string aName ); + + + /** @returns + the value of an attribute in the list (by position). + */ + string getValueByIndex( [in] short i ); + + + /** @returns + the value of an attribute in the list (by name). + */ + string getValueByName( [in] string aName ); +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/sax/XDTDHandler.idl b/offapi/com/sun/star/xml/sax/XDTDHandler.idl new file mode 100644 index 000000000..7bc06ba8d --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XDTDHandler.idl @@ -0,0 +1,66 @@ +/* -*- 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_xml_sax_XDTDHandler_idl__ +#define __com_sun_star_xml_sax_XDTDHandler_idl__ + +#include <com/sun/star/uno/XInterface.idl> + + + +module com { module sun { module star { module xml { module sax { + + +/** receives events according to the DTD of the document. + + <p>The SAX parser may report these events in any order, regardless of the + order in which the notations and unparsed entities were declared; however, + all DTD events must be reported after the document handler's + <code>startDocument</code> event, and before the first <code>startElement</code> + event. It is up to the application to store the information for future + use (perhaps in a hash table or object tree). If the application encounters + attributes of type "NOTATION", "ENTITY", or "ENTITIES", it can use the + information that it obtained through this interface to find the entity + and/or notation that corresponds with the attribute value. + </p> + */ +published interface XDTDHandler: com::sun::star::uno::XInterface +{ + + /** receives notification of a notation declaration event. + */ + void notationDecl( [in] string sName, + [in] string sPublicId, + [in] string sSystemId ); + + + /** receives notification of an unparsed entity declaration event. + */ + void unparsedEntityDecl( [in] string sName, + [in] string sPublicId, + [in] string sSystemId, + [in] string sNotationName ); + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/sax/XDocumentHandler.idl b/offapi/com/sun/star/xml/sax/XDocumentHandler.idl new file mode 100644 index 000000000..9c5f7dc6b --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XDocumentHandler.idl @@ -0,0 +1,100 @@ +/* -*- 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_xml_sax_XDocumentHandler_idl__ +#define __com_sun_star_xml_sax_XDocumentHandler_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/xml/sax/SAXException.idl> + +#include <com/sun/star/xml/sax/XAttributeList.idl> + +#include <com/sun/star/xml/sax/XLocator.idl> + + + +module com { module sun { module star { module xml { module sax { + + +/** receives notification of general document events. + + <p>This interface is an IDL version of the Java interface + <em>org.xml.sax.DocumentHandler</em> with some smaller + adaptations.</p> + */ +published interface XDocumentHandler: com::sun::star::uno::XInterface +{ + + /** receives notification of the beginning of a document. + */ + void startDocument() + raises( com::sun::star::xml::sax::SAXException ); + + + /** receives notification of the end of a document. + */ + void endDocument() + raises( com::sun::star::xml::sax::SAXException ); + + + /** receives notification of the beginning of an element . + */ + void startElement( [in] string aName, + [in] com::sun::star::xml::sax::XAttributeList xAttribs ) + raises( com::sun::star::xml::sax::SAXException ); + + + /** receives notification of the end of an element. + */ + void endElement( [in] string aName ) + raises( com::sun::star::xml::sax::SAXException ); + + + /** receives notification of character data. + */ + void characters( [in] string aChars ) + raises( com::sun::star::xml::sax::SAXException ); + + + /** receives notification of white space that can be ignored. + */ + void ignorableWhitespace( [in] string aWhitespaces ) + raises( com::sun::star::xml::sax::SAXException ); + + + /** receives notification of a processing instruction. + */ + void processingInstruction( [in] string aTarget, + [in] string aData ) + raises( com::sun::star::xml::sax::SAXException ); + + + /** receives an object for locating the origin of SAX document events. + */ + void setDocumentLocator( [in] com::sun::star::xml::sax::XLocator xLocator ) + raises( com::sun::star::xml::sax::SAXException ); + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/sax/XEntityResolver.idl b/offapi/com/sun/star/xml/sax/XEntityResolver.idl new file mode 100644 index 000000000..ad479dc7c --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XEntityResolver.idl @@ -0,0 +1,57 @@ +/* -*- 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_xml_sax_XEntityResolver_idl__ +#define __com_sun_star_xml_sax_XEntityResolver_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/xml/sax/InputSource.idl> + + + +module com { module sun { module star { module xml { module sax { + + +/** makes it possible to modify the behavior of resolving external + preferences. + + <p>Usually, the parser has a default behavior of resolving external + references (See documentation of the parser implementation). + Use this interface to modify or reimplement this behavior.</p> + */ +published interface XEntityResolver: com::sun::star::uno::XInterface +{ + + /** @returns + InputSource for the external entity. + + <p>If <var>aInputStream</var> is a valid reference to an input stream, + the parser uses this InputSource. Otherwise the + parser seeks for the entity using its default behavior. + */ + InputSource resolveEntity( [in] string sPublicId, [in] string sSystemId ); + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/sax/XErrorHandler.idl b/offapi/com/sun/star/xml/sax/XErrorHandler.idl new file mode 100644 index 000000000..568e14c78 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XErrorHandler.idl @@ -0,0 +1,68 @@ +/* -*- 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_xml_sax_XErrorHandler_idl__ +#define __com_sun_star_xml_sax_XErrorHandler_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/xml/sax/SAXException.idl> + + + +module com { module sun { module star { module xml { module sax { + + +/** is the basic interface for SAX error handlers. + + <p>If a SAX application needs to implement customized error handling, + it must implement this interface and then register an instance with the + SAX parser using the parser's XParser::setErrorhandler() + method. The parser will then report all errors and warnings through this + interface. </p> + + <p>This interface is a slight adaptation of the Java interface + <code>org.xml.sax.ErrorHandler</code>. In IDL, no exception can be passed + as an argument, so an <code>any</code> serves as the container. The type of the + exception is SAXParseException or an instance of a derived class.</p> + */ +published interface XErrorHandler: com::sun::star::uno::XInterface +{ + /** receives notification of a recoverable error. + */ + void error( [in] any aSAXParseException ) + raises( com::sun::star::xml::sax::SAXException ); + + /** receives notification of a non-recoverable error. + */ + void fatalError( [in] any aSAXParseException ) + raises( com::sun::star::xml::sax::SAXException ); + + /** receives notification of a warning. + */ + void warning( [in] any aSAXParseException ) + raises( com::sun::star::xml::sax::SAXException ); + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/sax/XExtendedDocumentHandler.idl b/offapi/com/sun/star/xml/sax/XExtendedDocumentHandler.idl new file mode 100644 index 000000000..23dc57cfb --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XExtendedDocumentHandler.idl @@ -0,0 +1,78 @@ +/* -*- 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_xml_sax_XExtendedDocumentHandler_idl__ +#define __com_sun_star_xml_sax_XExtendedDocumentHandler_idl__ + +#include <com/sun/star/xml/sax/XDocumentHandler.idl> + +#include <com/sun/star/xml/sax/SAXException.idl> + + + +module com { module sun { module star { module xml { module sax { + + +/** this interface does not conform to the SAX-standard. + + <p>Note: Whether or not every callback is supported is dependent + on the parser implementation. + */ +published interface XExtendedDocumentHandler: com::sun::star::xml::sax::XDocumentHandler +{ + /** receives notification about the start of a CDATA section in the + XML-source. + + <p>Any string coming in via character handler may include chars, + that would otherwise be interpreted as markup. </p> + */ + void startCDATA() + raises( com::sun::star::xml::sax::SAXException ); + + /** informs about the end of a CDATA-Section. + + <p>Note that <code>startCDATA/endCDATA</code> MUST NOT enclose any + <code>startElement/endElement</code>-call!</p> + */ + void endCDATA() + raises( com::sun::star::xml::sax::SAXException ); + + /** receives notification about a comment in the XML-source. + */ + void comment( [in] string sComment ) + raises( com::sun::star::xml::sax::SAXException ); + + /** informs a writer that it is allowable to insert a line break and + indentation before the next XDocumentHandler-call. + */ + void allowLineBreak() + raises( com::sun::star::xml::sax::SAXException ); + + /** notifies that any characters that cannot be handled by other callback + methods are announced through this method. + */ + void unknown( [in] string sString ) + raises( com::sun::star::xml::sax::SAXException ); +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/sax/XFastAttributeList.idl b/offapi/com/sun/star/xml/sax/XFastAttributeList.idl new file mode 100644 index 000000000..840fc920b --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XFastAttributeList.idl @@ -0,0 +1,160 @@ +/* -*- 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_xml_sax_XFastAttributeList_idl__ +#define __com_sun_star_xml_sax_XFastAttributeList_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/xml/Attribute.idl> +#include <com/sun/star/xml/FastAttribute.idl> +#include <com/sun/star/xml/sax/SAXException.idl> + + +module com { module sun { module star { module xml { module sax { + + +/** a container for the attributes of an XML element. + + <br>Attributes are separated into known attributes and unknown attributes. + <p>Known attributes have a local name that is known to the XFastTokenHandler + registered at the XFastParser which created the sax event containing + this attributes. If an attribute also has a namespace, that must be registered + at the XFastParser, else this attribute is also unknown even if + the local name is known. + */ +interface XFastAttributeList: com::sun::star::uno::XInterface +{ + /** checks if an attribute is available.<br> + + @param Token + contains the integer token from the XFastTokenHandler + registered at the XFastParser.<br> + + If the attribute name has a namespace that was registered with the + XFastParser, Token contains the integer token of the + attributes local name from the XFastTokenHandler and + the integer token of the namespace combined with an arithmetic + <b>or</b> operation. + + @returns + `TRUE`, if the attribute is available + */ + boolean hasAttribute( [in] long Token ); + + /** retrieves the token of an attribute value.<br> + + @param Token + contains the integer token from the XFastTokenHandler + registered at the XFastParser.<br> + + If the attribute name has a namespace that was registered with the + XFastParser, Token contains the integer token of the + attributes local name from the XFastTokenHandler and + the integer token of the namespace combined with an arithmetic + <b>or</b> operation. + + @returns + The integer token of the value from the attribute or FastToken::Invalid + + @throws SAXEXception + if the attribute is not available + + */ + long getValueToken( [in] long Token ) + raises( SAXException ); + + /**retrieves the token of an attribute value.<br> + + @param Token + contains the integer token from the XFastTokenHandler + registered at the XFastParser.<br> + + If the attribute name has a namespace that was registered with the + XFastParser, Token contains the integer token of the + attributes local name from the XFastTokenHandler and + the integer token of the namespace combined with an arithmetic + <b>or</b> operation. + + @param Default + This value will be returned if the attribute is not available + + @returns + If the attribute is available it returns the integer token of the value + from the attribute or FastToken::Invalid. + If not the value of <code>Default</code> is returned. + + */ + long getOptionalValueToken( [in] long Token, [in] long Default ); + + /** retrieves the value of an attribute.<br> + + @param Token + contains the integer token from the XFastTokenHandler + registered at the XFastParser.<br> + + If the attribute name has a namespace that was registered with the + XFastParser, Token contains the integer token of the + attributes local name from the XFastTokenHandler and + the integer token of the namespace combined with an arithmetic + <b>or</b> operation. + + @returns + The string value from the attribute. + + @throws SAXEXception + if the attribute is not available + + */ + string getValue( [in] long Token ) + raises( SAXException ); + + /** retrieves the value of an attribute.<br> + + @param Token + contains the integer token from the XFastTokenHandler + registered at the XFastParser.<br> + + If the attribute name has a namespace that was registered with the + XFastParser, Token contains the integer token of the + attributes local name from the XFastTokenHandler and + the integer token of the namespace combined with an arithmetic + <b>or</b> operation. + + @returns + The string value from the attribute or an empty string if the + attribute is not available. + */ + string getOptionalValue( [in] long Token ); + + /** returns a sequence of attributes which names and or namespaces URLS + can not be translated to tokens. + */ + sequence< ::com::sun::star::xml::Attribute > getUnknownAttributes(); + + /** returns a sequence of attributes which names and or namespaces URLS + are translated to tokens. + */ + sequence< ::com::sun::star::xml::FastAttribute > getFastAttributes(); +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/sax/XFastContextHandler.idl b/offapi/com/sun/star/xml/sax/XFastContextHandler.idl new file mode 100644 index 000000000..da53a0ce7 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XFastContextHandler.idl @@ -0,0 +1,137 @@ +/* -*- 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_xml_sax_XFastContextHandler_idl__ +#define __com_sun_star_xml_sax_XFastContextHandler_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/xml/sax/SAXException.idl> + +#include <com/sun/star/xml/sax/XFastAttributeList.idl> + +#include <com/sun/star/xml/sax/XLocator.idl> + + + +module com { module sun { module star { module xml { module sax { + + +/** receives notification of sax document events from a + XFastParser. + + @see XFastDocumentHandler + */ +interface XFastContextHandler: com::sun::star::uno::XInterface +{ + + /** receives notification of the beginning of an element . + + @param Element + contains the integer token from the XFastTokenHandler + registered at the XFastParser.<br> + + If the element has a namespace that was registered with the + XFastParser, <code>Element</code> contains the integer + token of the elements local name from the XFastTokenHandler + and the integer token of the namespace combined with an arithmetic + <b>or</b> operation. + + @param Attribs + Contains a XFastAttributeList to access the attributes + from the element. + + */ + void startFastElement( [in] long Element, [in] XFastAttributeList Attribs ) + raises( com::sun::star::xml::sax::SAXException ); + + + /** receives notification of the beginning of an unknown element . + + @param Namespace + contains the namespace url (not the prefix!) of this element. + @param Name + contains the elements local name. + @param Attribs + Contains a XFastAttributeList to access the attributes + from the element. + */ + void startUnknownElement( [in] string Namespace, [in] string Name, [in] XFastAttributeList Attribs ) + raises( com::sun::star::xml::sax::SAXException ); + + + /** receives notification of the end of a known element. + @see startFastElement + */ + void endFastElement( [in] long Element ) + raises( com::sun::star::xml::sax::SAXException ); + + + /** receives notification of the end of a known element. + @see startUnknownElement + */ + void endUnknownElement( [in] string Namespace, [in] string Name ) + raises( com::sun::star::xml::sax::SAXException ); + + + /** receives notification of the beginning of a known child element. + + @param Element + contains the integer token from the XFastTokenHandler + registered at the XFastParser. + + <br>If the element has a namespace that was registered with the + XFastParser, <code>Element</code> contains the + integer token of the elements local name from the + XFastTokenHandler and the integer token of the + namespace combined with an arithmetic <b>or</b> operation. + + @param Attribs + Contains a XFastAttributeList to access the attributes + from the element. + */ + XFastContextHandler createFastChildContext( [in] long Element, [in] XFastAttributeList Attribs ) + raises( com::sun::star::xml::sax::SAXException ); + + + /** receives notification of the beginning of an unknown child element . + + @param Namespace + contains the namespace url (not the prefix!) of this element. + @param Name + contains the elements local name. + @param Attribs + Contains a XFastAttributeList to access the attributes + the element. + */ + XFastContextHandler createUnknownChildContext( [in] string Namespace, [in] string Name, [in] XFastAttributeList Attribs ) + raises( com::sun::star::xml::sax::SAXException ); + + + /** receives notification of character data. + */ + void characters( [in] string aChars ) + raises( com::sun::star::xml::sax::SAXException ); + }; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/sax/XFastDocumentHandler.idl b/offapi/com/sun/star/xml/sax/XFastDocumentHandler.idl new file mode 100644 index 000000000..27c68e221 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XFastDocumentHandler.idl @@ -0,0 +1,72 @@ +/* -*- 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_xml_sax_XFastDocumentHandler_idl__ +#define __com_sun_star_xml_sax_XFastDocumentHandler_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/xml/sax/SAXException.idl> + +#include <com/sun/star/xml/sax/XFastAttributeList.idl> +#include <com/sun/star/xml/sax/XFastContextHandler.idl> +#include <com/sun/star/xml/sax/XLocator.idl> + + + +module com { module sun { module star { module xml { module sax { + + +/** receives notification of sax document events from a + XFastParser + */ +interface XFastDocumentHandler: XFastContextHandler +{ + + /** called by the parser when parsing of an XML stream is started. + */ + void startDocument() + raises( com::sun::star::xml::sax::SAXException ); + + + /** called by the parser after the last XML element of a stream is processed. + */ + void endDocument() + raises( com::sun::star::xml::sax::SAXException ); + + + /** receives notification of a processing instruction. + @since LibreOffice 6.0 + */ + void processingInstruction( [in] string aTarget, [in] string aData ) + raises( com::sun::star::xml::sax::SAXException ); + + + /** receives an object for locating the origin of SAX document events. + */ + void setDocumentLocator( [in] com::sun::star::xml::sax::XLocator xLocator ) + raises( com::sun::star::xml::sax::SAXException ); + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/sax/XFastNamespaceHandler.idl b/offapi/com/sun/star/xml/sax/XFastNamespaceHandler.idl new file mode 100644 index 000000000..c427325f0 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XFastNamespaceHandler.idl @@ -0,0 +1,51 @@ +/* -*- 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_xml_sax_XFastNamespaceHandler_idl__ +#define __com_sun_star_xml_sax_XFastNamespaceHandler_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +module com { module sun { module star { module xml { module sax { + +/** Stores and manages namespace declarations of a sax + document parsed by XFastParser. + + @since LibreOffice 5.3 + */ +interface XFastNamespaceHandler: com::sun::star::uno::XInterface +{ + + /** receives notification of namespace declarations + from a XFastParser. + */ + void registerNamespace( [in] string NamespacePrefix, [in] string NamespaceURI ); + + + /** retrieves the namespace URI of a namespace prefix + */ + string getNamespaceURI( [in] string NamespacePrefix ); + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/sax/XFastParser.idl b/offapi/com/sun/star/xml/sax/XFastParser.idl new file mode 100644 index 000000000..9d4439144 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XFastParser.idl @@ -0,0 +1,176 @@ +/* -*- 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_xml_sax_XFastParser_idl__ +#define __com_sun_star_xml_sax_XFastParser_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/xml/sax/InputSource.idl> + +#include <com/sun/star/xml/sax/SAXException.idl> + +#include <com/sun/star/io/IOException.idl> + +#include <com/sun/star/xml/sax/XFastDocumentHandler.idl> +#include <com/sun/star/xml/sax/XFastTokenHandler.idl> +#include <com/sun/star/xml/sax/XErrorHandler.idl> + +#include <com/sun/star/xml/sax/XDTDHandler.idl> + +#include <com/sun/star/xml/sax/XEntityResolver.idl> + +#include <com/sun/star/lang/Locale.idl> + +#include <com/sun/star/lang/IllegalArgumentException.idl> + +#include <com/sum/star/xml/sax/XFastNamespaceHandler.idl> + +#include <com/sun/star/beans/Pair.idl> + + +module com { module sun { module star { module xml { module sax { + + +/** specifies a SAX parser that uses integer values for known XML names + (elements, attributes and attribute values). The parser also handles + namespaces and allows to have individual contexts for each XML element. + + <p>Before parsing is possible you have to set your + XFastDocumentHandler using setFastDocumentHandler(). + + <p>Parsing starts with calling parseStream(). If the parser + finds a valid XML file with the given InputSource, it calls + XFastDocumentHandler::startDocument() first. + + <p>This parser generates either "fast" events that use integer token + values for namespaces, elements and attributes or "unknown" events for + elements that are unknown. + + <p>A namespace is unknown if the namespace URL was not registered with + registerNamespace(). + + <p>An element is unknown if no XFastTokenHandler is set + or if the XFastTokenHandler does not return a valid + identifier for the elements local name. An element is also unknown if + the elements local name is known but it uses a namespace that is unknown. + + <p>Setting a XFastTokenHandler with setTokenHandler() + is optional, but without a XFastTokenHandler you will only + get unknown sax events. This can be useful if you are only interested + in the namespace handling and/or the context feature. + + <p>For each element the parser sends a create child element event to the + elements parent context by calling + XFastContextHandler::createFastChildContext() for known + elements or XFastContextHandler::createUnknownChildContext() + for unknown elements. + <br>The parent context for the root element is the XFastDocumentHandler + itself. + + <p>If the parent context returns an empty reference, no further events for + the element and all of its children are created. + + <p>If a valid context is returned this context gets a start event by a call to + XFastContextHandler::startFastElement() for known elements or + XFastContextHandler::startUnknownElement() for unknown elements. + + <p>After processing all its child elements the context gets an end event by a call to + XFastContextHandler::endFastElement() for known elements or + XFastContextHandler::endUnknownElement() for unknown elements. + + <p>It is valid to return one instance of XFastContextHandler more + than once. It is even possible to only use the XFastDocumentHandler + by always returning a reference to itself for each create child context event. + + <p>After the last element is processed the parser generates an end document + event at the XFastDocumentHandler by calling + XFastDocumentHandler::endDocument(). + + @see http://wiki.openoffice.org/wiki/FastParser +*/ +interface XFastParser: com::sun::star::uno::XInterface +{ + /** parses an XML document from a stream. + + <p>Set the desired handlers before calling this method.</p> + */ + void parseStream( [in] InputSource aInputSource ) + raises( SAXException, com::sun::star::io::IOException ); + + + /** Application must register a document event handler to get + sax events for the parsed stream. + */ + void setFastDocumentHandler( [in] XFastDocumentHandler Handler ); + + + /** must be registered to translate known XML names to integer tokens. + */ + void setTokenHandler( [in] XFastTokenHandler Handler ); + + + /** registers a known namespace url with the given integer token.<br> + @param NamespaceURL the namespace URL. + @param NamespaceToken + an integer token that must be greater than FastToken::NAMESPACE. + */ + void registerNamespace( [in] string NamespaceURL, [in] long NamespaceToken ) + raises( com::sun::star::lang::IllegalArgumentException ); + + /** allows an application to register an error event handler. + + <p>Note that the error handler can throw an exception when an error or + warning occurs. Note that an exception is thrown by the parser when + an unrecoverable (fatal) error occurs.</p> + */ + void setErrorHandler( [in] XErrorHandler Handler ); + + /** allows an application to register a DTD-Handler. + */ + void setEntityResolver( [in] XEntityResolver Resolver ); + + /** sets a locale specified for localization of warnings and error messages. + + <p>Set the language of the error messages. Useful when the parsing + errors will be presented to the user.</p> + */ + void setLocale( [in] com::sun::star::lang::Locale locale ); + + /** Gets the namespace url string. + */ + string getNamespaceURL( [in] string prefix ) + raises( com::sun::star::lang::IllegalArgumentException ); + + /** @since LibreOffice 5.3 */ + void setNamespaceHandler( [in] XFastNamespaceHandler Handler); + + /** + * Simulate a DTD file. + * Will allow to use customized entity references like ∞ . + * @since LibreOffice 7.1 + */ + void setCustomEntityNames( [in] sequence< beans::Pair<string,string> > replacements); +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/sax/XFastSAXSerializable.idl b/offapi/com/sun/star/xml/sax/XFastSAXSerializable.idl new file mode 100644 index 000000000..16f2bfeeb --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XFastSAXSerializable.idl @@ -0,0 +1,80 @@ +/* -*- 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_xml_sax_XFastSAXSerializable_idl__ +#define __com_sun_star_xml_sax_XFastSAXSerializable_idl__ + +#include <com/sun/star/xml/sax/XFastDocumentHandler.idl> +#include <com/sun/star/xml/sax/XFastTokenHandler.idl> +#include <com/sun/star/beans/StringPair.idl> +#include <com/sun/star/beans/Pair.idl> + +module com { module sun { module star { module xml { module sax { + +/** serializes a DOM tree by generating FastSAX events. + + <p> + </p> + + @since OOo 3.1 + +*/ +interface XFastSAXSerializable +{ + + /** serializes an object (e.g. a DOM tree) that represents an XML document + by generating fast SAX events. + + @param handler + the SAX event handler that should receive the generated events + @param tokenHandler + the fast SAX token handler that is used to translate names + @param namespaces + a list of namespace declarations that will be added to the root + element node of the XML document + <p> + This is necessary mostly because the DOM implementation does + not permit attaching namespaces declarations directly to nodes, + which may lead to duplicate namespace declarations on export, + and thus larger documents. + Note that the first part of each tuple is the prefix, + e.g. "office", and the second is the numeric namespace identifier. + </p> + @param registerNamespaces + a list of namespace url / namespace token pairs. you need + to register all namespace in order to have them recognized + during export. Namespace tokens must be greater than + FastToken::NAMESPACE. + </p> + + @throws com::sun::star::xml::sax::SAXException + if serializing the XML document fails + */ + void fastSerialize([in] com::sun::star::xml::sax::XFastDocumentHandler handler, + [in] com::sun::star::xml::sax::XFastTokenHandler tokenHandler, + [in] sequence< com::sun::star::beans::StringPair > namespaces, + [in] sequence< com::sun::star::beans::Pair<string, long> > registerNamespaces) + raises( com::sun::star::xml::sax::SAXException ); +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/sax/XFastTokenHandler.idl b/offapi/com/sun/star/xml/sax/XFastTokenHandler.idl new file mode 100644 index 000000000..d6bb02889 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XFastTokenHandler.idl @@ -0,0 +1,64 @@ +/* -*- 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_xml_sax_XFastTokenHandler_idl__ +#define __com_sun_star_xml_sax_XFastTokenHandler_idl__ + +#include <com/sun/star/uno/XInterface.idl> + + +module com { module sun { module star { module xml { module sax { + + +/** interface to translate XML strings to integer tokens. + + <p>An instance of this interface can be registered at a XFastParser. + It should be able to translate all XML names (element local names, + attribute local names and constant attribute values) to integer tokens. + + A token value must be greater or equal to zero and less than + FastToken::NAMESPACE. If a string identifier is not known + to this instance, FastToken::DONTKNOW is returned. + */ +interface XFastTokenHandler: com::sun::star::uno::XInterface +{ + + /** returns an integer token for the given string + + @param Identifier + the string given as a byte sequence encoded in UTF-8 + + @returns + a unique integer token for the given String or FastToken::DONTKNOW + if the identifier is not known to this instance. + */ + long getTokenFromUTF8( [in] sequence< byte > Identifier ); + + + /** returns an identifier for the given integer token as a byte + sequence encoded in UTF-8. + */ + sequence< byte > getUTF8Identifier( [in] long Token ); +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/sax/XLocator.idl b/offapi/com/sun/star/xml/sax/XLocator.idl new file mode 100644 index 000000000..65d601da4 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XLocator.idl @@ -0,0 +1,62 @@ +/* -*- 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_xml_sax_XLocator_idl__ +#define __com_sun_star_xml_sax_XLocator_idl__ + +#include <com/sun/star/uno/XInterface.idl> + + + +module com { module sun { module star { module xml { module sax { + + +/** makes it possible to associate a SAX event with a document location. + + <p>This interface is an IDL version of the Java interface + <em>org.xml.sax.Locator</em>.</p> + */ +published interface XLocator: com::sun::star::uno::XInterface +{ + /** @returns + the column number where the current document event ends. + */ + long getColumnNumber(); + + /** @returns + the line number where the current document event ends. + */ + long getLineNumber(); + + /** @returns + the public identifier for the current document event. + */ + string getPublicId(); + + /** @returns + the system identifier for the current document event. + */ + string getSystemId(); +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/sax/XParser.idl b/offapi/com/sun/star/xml/sax/XParser.idl new file mode 100644 index 000000000..8b770dab0 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XParser.idl @@ -0,0 +1,93 @@ +/* -*- 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_xml_sax_XParser_idl__ +#define __com_sun_star_xml_sax_XParser_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/xml/sax/InputSource.idl> + +#include <com/sun/star/xml/sax/SAXException.idl> + +#include <com/sun/star/io/IOException.idl> + +#include <com/sun/star/xml/sax/XDocumentHandler.idl> + +#include <com/sun/star/xml/sax/XErrorHandler.idl> + +#include <com/sun/star/xml/sax/XDTDHandler.idl> + +#include <com/sun/star/xml/sax/XEntityResolver.idl> + +#include <com/sun/star/lang/Locale.idl> + + + +module com { module sun { module star { module xml { module sax { + + +/** specifies a SAX parser. + + <p>This interface is an IDL version of the Java interface + <em>org.xml.sax.Parser</em> with some minor adaptations.</p> + */ +published interface XParser: com::sun::star::uno::XInterface +{ + /** parses an XML document from a stream. + + <p>Set the desired handlers before calling this method.</p> + */ + void parseStream( [in] com::sun::star::xml::sax::InputSource aInputSource ) + raises( com::sun::star::xml::sax::SAXException, + com::sun::star::io::IOException ); + + /** allows an application to register a document event handler. + */ + void setDocumentHandler( [in] com::sun::star::xml::sax::XDocumentHandler xHandler ); + + /** allows an application to register an error event handler. + + <p>Note that the error handler can throw an exception when an error or + warning occurs. Note that an exception is thrown by the parser when + an unrecoverable (fatal) error occurs.</p> + */ + void setErrorHandler( [in] com::sun::star::xml::sax::XErrorHandler xHandler ); + + /** allows an application to register a DTD-Handler. + */ + void setDTDHandler( [in] com::sun::star::xml::sax::XDTDHandler xHandler ); + + /** allows an application to register a DTD-Handler. + */ + void setEntityResolver( [in] com::sun::star::xml::sax::XEntityResolver xResolver ); + + /** sets a locale specified for localization of warnings and error messages. + + <p>Set the language of the error messages. Useful when the parsing + errors will be presented to the user.</p> + */ + void setLocale( [in] com::sun::star::lang::Locale locale ); +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/sax/XSAXSerializable.idl b/offapi/com/sun/star/xml/sax/XSAXSerializable.idl new file mode 100644 index 000000000..ebba020b1 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XSAXSerializable.idl @@ -0,0 +1,69 @@ +/* -*- 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_xml_sax_XSAXSerializable_idl__ +#define __com_sun_star_xml_sax_XSAXSerializable_idl__ + +#include <com/sun/star/xml/sax/XDocumentHandler.idl> +#include <com/sun/star/beans/StringPair.idl> + +module com { module sun { module star { module xml { module sax { + +/** serializes a DOM tree by generating SAX events. + + <p> + </p> + + @since OOo 3.0 + +*/ +interface XSAXSerializable +{ + + /** serializes an object (e.g. a DOM tree) that represents an XML document + by generating SAX events. + + @param handler + the SAX event handler that should receive the generated events + @param namespaces + a list of namespace declarations that will be added to the root + element node of the XML document + <p> + This is necessary mostly because the DOM implementation does + not permit attaching namespaces declarations directly to nodes, + which may lead to duplicate namespace declarations on export, + and thus larger documents. + Note that the first part of each tuple is the prefix, + e.g. "office", and the second is the full namespace URI. + </p> + + @throws com::sun::star::xml::sax::SAXException + if serializing the XML document fails + */ + void serialize([in] com::sun::star::xml::sax::XDocumentHandler handler, + [in] sequence< com::sun::star::beans::StringPair > namespaces) + raises( com::sun::star::xml::sax::SAXException ); + +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/sax/XWriter.idl b/offapi/com/sun/star/xml/sax/XWriter.idl new file mode 100644 index 000000000..62d3d7425 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XWriter.idl @@ -0,0 +1,50 @@ +/* -*- 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_xml_sax_XWriter_idl__ +#define __com_sun_star_xml_sax_XWriter_idl__ + +#include <com/sun/star/io/XActiveDataSource.idl> +#include <com/sun/star/xml/sax/XExtendedDocumentHandler.idl> +#include <com/sun/star/beans/Pair.idl> + +module com { module sun { module star { module xml { module sax { + + +/** + Provides a unified interface for the new-style Writer service to implement. + + @since LibreOffice 4.0 + */ +interface XWriter +{ + interface com::sun::star::io::XActiveDataSource; + interface com::sun::star::xml::sax::XExtendedDocumentHandler; + + /** Adds support for custom entity names list + * @since LibreOffice 7.2 + */ + void setCustomEntityNames( [in] sequence< com::sun::star::beans::Pair<string,string> > replacements ); +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/wrapper/XMLDocumentWrapper.idl b/offapi/com/sun/star/xml/wrapper/XMLDocumentWrapper.idl new file mode 100644 index 000000000..753403555 --- /dev/null +++ b/offapi/com/sun/star/xml/wrapper/XMLDocumentWrapper.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_xml_wrapper_xmldocumentwrapper_idl_ +#define __com_sun_star_xml_wrapper_xmldocumentwrapper_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> +#include <com/sun/star/xml/wrapper/XXMLDocumentWrapper.idl> +#include <com/sun/star/lang/XInitialization.idl> + +module com { module sun { module star { module xml { module wrapper { + +/** + * Service of XMLDocumentWrapper + */ +service XMLDocumentWrapper { + interface com::sun::star::xml::wrapper::XXMLDocumentWrapper ; + interface com::sun::star::lang::XInitialization ; +}; + +} ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/wrapper/XMLElementWrapper.idl b/offapi/com/sun/star/xml/wrapper/XMLElementWrapper.idl new file mode 100644 index 000000000..c48fd68df --- /dev/null +++ b/offapi/com/sun/star/xml/wrapper/XMLElementWrapper.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_xml_wrapper_xmlelementwrapper_idl_ +#define __com_sun_star_xml_wrapper_xmlelementwrapper_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> +#include <com/sun/star/xml/wrapper/XXMLElementWrapper.idl> +#include <com/sun/star/lang/XUnoTunnel.idl> +#include <com/sun/star/lang/XInitialization.idl> + +module com { module sun { module star { module xml { module wrapper { + +/** + * Service of XMLElementWrapper + */ +service XMLElementWrapper { + interface com::sun::star::xml::wrapper::XXMLElementWrapper ; + interface com::sun::star::lang::XUnoTunnel; + interface com::sun::star::lang::XInitialization ; +}; + +} ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/wrapper/XXMLDocumentWrapper.idl b/offapi/com/sun/star/xml/wrapper/XXMLDocumentWrapper.idl new file mode 100644 index 000000000..6be5167f0 --- /dev/null +++ b/offapi/com/sun/star/xml/wrapper/XXMLDocumentWrapper.idl @@ -0,0 +1,164 @@ +/* -*- 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_xml_wrapper_xxmldocumentwrapper_idl_ +#define __com_sun_star_xml_wrapper_xxmldocumentwrapper_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> +#include <com/sun/star/xml/sax/XDocumentHandler.idl> + +module com { module sun { module star { module xml { module wrapper { + +interface XXMLElementWrapper; + +/** + * Interface of XML Document Wrapper. + * <p> + * When converting SAX events into a DOM tree, this interface is + * used to manipulate the DOM data in UNO perspective. + * <p> + * Every language has its own methods to manipulate its native DOM + * data structure, this interface provides a common method set which + * each language have to implement. + * <p> + * In another word, this interface wraps language dependent methods, + * then other component can manipulate DOM data through UNO methods. + */ +interface XXMLDocumentWrapper : com::sun::star::uno::XInterface +{ + /** + * Gets the current element. + * + * @return the current element in the SAX event stream + */ + XXMLElementWrapper getCurrentElement(); + + /** + * Sets the current element. + * <p> + * When the current element is replaced outside of this interface, then + * uses this method can update the current element pointer. + * + * @param element the new current element + */ + void setCurrentElement([in] XXMLElementWrapper element); + + /** + * Removes the current element. + * <p> + * When the current element is removed, then its parent element becomes + * the new current element. + */ + void removeCurrentElement(); + + /** + * Checks whether an element is the current element. + * + * @param node the element to be checked + * @return <code>true</code> if the node is the current element, + * <code>false</code> otherwise + */ + boolean isCurrent([in] XXMLElementWrapper node); + + /** + * Checks whether the current element is empty. + * + * @return <code>true</code> if the current element is empty, + * <code>false</code> otherwise + */ + boolean isCurrentElementEmpty(); + + /** + * Gets the name of the element. + * + * @param node the element whose name will be gotten + * @return the name of the element + */ + string getNodeName([in] XXMLElementWrapper node); + + /** + * Clears all useless element in a branch of the DOM tree along the + * tree order. + * + * @param node the start point of the branch to clear + * @param reservedDescendants an array including all elements that + * need to be reserved (along their + * ancestor path) + * @param stopAtNode the stop element. The operation have + * to interrupt when this element is met + * during clearing + */ + void clearUselessData( + [in] XXMLElementWrapper node, + [in] sequence< XXMLElementWrapper > reservedDescendants, + [in] XXMLElementWrapper stopAtNode); + + /** + * Collapses a tree path + * <p> + * Each element in the ancestor path of the node will be checked, + * if this element is empty, then deletes it. + * + * @param node the start point of the path from where the tree + * path will be collapsed + */ + void collapse([in] XXMLElementWrapper node); + + /** + * Converts a part of the DOM tree into SAX events. + * + * @param handler the document handler which will receive + * generated SAX events + * @param saxEventKeeperHandler the SAXEventKeeper connecting with + * this XMLDocumentHandler + * @param startNode the start point to generate SAX events + * @param endNode the end point where to stop generating + */ + void generateSAXEvents( + [in] com::sun::star::xml::sax::XDocumentHandler handler, + [in] com::sun::star::xml::sax::XDocumentHandler saxEventKeeperHandler, + [in] XXMLElementWrapper startNode, + [in] XXMLElementWrapper endNode) + raises( com::sun::star::xml::sax::SAXException ); + + /** + * Converts the whole DOM tree into a SAX event stream. + * + * @param handler the document handler which will receive the SAX event + * stream + */ + void getTree([in] com::sun::star::xml::sax::XDocumentHandler handler) + raises( com::sun::star::xml::sax::SAXException ); + + /** + * Rebuild the ID attribute in the branch starting from the particular + * element. + * + * @param node the root element of the branch whose ID link will be + * built + */ + void rebuildIDLink([in] XXMLElementWrapper node); +}; + +} ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/wrapper/XXMLElementWrapper.idl b/offapi/com/sun/star/xml/wrapper/XXMLElementWrapper.idl new file mode 100644 index 000000000..abddd84b3 --- /dev/null +++ b/offapi/com/sun/star/xml/wrapper/XXMLElementWrapper.idl @@ -0,0 +1,43 @@ +/* -*- 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_xml_wrapper_xxmlelementwrapper_idl_ +#define __com_sun_star_xml_wrapper_xxmlelementwrapper_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> + +module com { module sun { module star { module xml { module wrapper { + +/** + * Interface of XML Element Wrapper. + * <p> + * This interface is used to wrap an element information, which + * make it enable to transfer the element information between + * different languages, such as C++/Java. + */ +interface XXMLElementWrapper : com::sun::star::uno::XInterface +{ +} ; + +} ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/xpath/Libxml2ExtensionHandle.idl b/offapi/com/sun/star/xml/xpath/Libxml2ExtensionHandle.idl new file mode 100644 index 000000000..da2b33019 --- /dev/null +++ b/offapi/com/sun/star/xml/xpath/Libxml2ExtensionHandle.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_xml_xpath_Libxml2ExtensionHandle_idl__ +#define __com_sun_star_xml_xpath_Libxml2ExtensionHandle_idl__ + + + module com { module sun { module star { module xml { module xpath { + + +struct Libxml2ExtensionHandle +{ + hyper functionLookupFunction; + hyper functionData; + hyper variableLookupFunction; + hyper variableData; +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/xpath/XPathAPI.idl b/offapi/com/sun/star/xml/xpath/XPathAPI.idl new file mode 100644 index 000000000..694a07758 --- /dev/null +++ b/offapi/com/sun/star/xml/xpath/XPathAPI.idl @@ -0,0 +1,32 @@ +/* -*- 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_xml_xpath_XPathAPI_idl__ +#define __com_sun_star_xml_xpath_XPathAPI_idl__ + +#include <com/sun/star/xml/xpath/XXPathAPI.idl> + +module com { module sun { module star { module xml { module xpath { + +service XPathAPI : XXPathAPI; + +};};};};}; +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/xpath/XPathException.idl b/offapi/com/sun/star/xml/xpath/XPathException.idl new file mode 100644 index 000000000..803a1e188 --- /dev/null +++ b/offapi/com/sun/star/xml/xpath/XPathException.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_xml_XPath_XPathException_idl__ +#define __com_sun_star_xml_XPath_XPathException_idl__ + +#include <com/sun/star/uno/Exception.idl> + + +module com { module sun { module star { module xml { module xpath { + +/** Exception that may occur when evaluating an XPath expression. + + @since OOo 3.0 + + @see XXPathAPI + */ +exception XPathException : com::sun::star::uno::Exception +{ +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/xpath/XPathExtension.idl b/offapi/com/sun/star/xml/xpath/XPathExtension.idl new file mode 100644 index 000000000..23b95e48c --- /dev/null +++ b/offapi/com/sun/star/xml/xpath/XPathExtension.idl @@ -0,0 +1,37 @@ +/* -*- 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_xml_xpath_XPathExtension_idl__ +#define __com_sun_star_xml_xpath_XPathExtension_idl__ + +#include <com/sun/star/xforms/XModel.idl> +#include <com/sun/star/xml/xpath/XXPathExtension.idl> +#include <com/sun/star/xml/dom/XNode.idl> + +module com { module sun { module star { module xml { module xpath { + +service XPathExtension : XXPathExtension +{ + createWithModel([in] com::sun::star::xforms::XModel Model, [in] com::sun::star::xml::dom::XNode ContextNode); +}; + +};};};};}; +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/xpath/XPathObjectType.idl b/offapi/com/sun/star/xml/xpath/XPathObjectType.idl new file mode 100644 index 000000000..2cefe678e --- /dev/null +++ b/offapi/com/sun/star/xml/xpath/XPathObjectType.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_xml_XPath_XPathObjectType_idl__ +#define __com_sun_star_xml_XPath_XPathObjectType_idl__ + +module com { module sun { module star { module xml { module xpath { + + +enum XPathObjectType +{ + XPATH_UNDEFINED, + XPATH_NODESET, + XPATH_BOOLEAN, + XPATH_NUMBER, + XPATH_STRING, + XPATH_POINT, + XPATH_RANGE, + XPATH_LOCATIONSET, + XPATH_USERS, + XPATH_XSLT_TREE + +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/xpath/XXPathAPI.idl b/offapi/com/sun/star/xml/xpath/XXPathAPI.idl new file mode 100644 index 000000000..e400abff1 --- /dev/null +++ b/offapi/com/sun/star/xml/xpath/XXPathAPI.idl @@ -0,0 +1,189 @@ +/* -*- 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_xml_XPath_XXPathAPI_idl__ +#define __com_sun_star_xml_XPath_XXPathAPI_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/xml/dom/XNode.idl> +#include <com/sun/star/xml/dom/XNodeList.idl> +#include <com/sun/star/xml/xpath/XXPathObject.idl> +#include <com/sun/star/xml/xpath/XXPathExtension.idl> +#include <com/sun/star/xml/xpath/XPathException.idl> + + +module com { module sun { module star { module xml { module xpath { + + +interface XXPathAPI : com::sun::star::uno::XInterface +{ + + void registerNS( + [in] string prefix, + [in] string url); + + void unregisterNS( + [in] string prefix, + [in] string url); + + void registerExtension( [in] string serviceName ); + void registerExtensionInstance( + [in] com::sun::star::xml::xpath::XXPathExtension aExtension); + + /** Evaluate XPath Expression. + + @param contextNode + the context node (expression is relative to this node) + + @param expr + the XPath expression + + @throws XPathException + if the expression is malformed, or evaluation fails + + @returns + an object representing the result of the XPath evaluation + + @see XXPathObject + */ + XXPathObject eval( + [in] com::sun::star::xml::dom::XNode contextNode, + [in] string expr) + raises( com::sun::star::xml::xpath::XPathException ); + + /** Evaluate XPath Expression. + + @param contextNode + the context node (expression is relative to this node) + + @param expr + the XPath expression + + @param namespaceNode + all namespaces declared on this node will be registered + + @throws XPathException + if the expression is malformed, or evaluation fails + + @returns + an object representing the result of the XPath evaluation + + @see XXPathObject + */ + XXPathObject evalNS( + [in] com::sun::star::xml::dom::XNode contextNode, + [in] string expr, + [in] com::sun::star::xml::dom::XNode namespaceNode) + raises( com::sun::star::xml::xpath::XPathException ); + + /** Evaluate an XPath expression to select a list of nodes. + + @param contextNode + the context node (expression is relative to this node) + + @param expr + the XPath expression + + @throws XPathException + if the expression is malformed, or evaluation fails + + @returns + result of the XPath evaluation: a list of nodes + + @see XNodeList + */ + com::sun::star::xml::dom::XNodeList selectNodeList( + [in] com::sun::star::xml::dom::XNode contextNode, + [in] string expr) + raises( com::sun::star::xml::xpath::XPathException ); + + /** Evaluate an XPath expression to select a list of nodes. + + @param contextNode + the context node (expression is relative to this node) + + @param expr + the XPath expression + + @param namespaceNode + all namespaces declared on this node will be registered + + @throws XPathException + if the expression is malformed, or evaluation fails + + @returns + result of the XPath evaluation: a list of nodes + + @see XNodeList + */ + com::sun::star::xml::dom::XNodeList selectNodeListNS( + [in] com::sun::star::xml::dom::XNode contextNode, + [in] string expr, + [in] com::sun::star::xml::dom::XNode namespaceNode) + raises( com::sun::star::xml::xpath::XPathException ); + + /** Evaluate an XPath expression to select a single node. + + @param contextNode + the context node (expression is relative to this node) + + @param expr + the XPath expression + + @throws XPathException + if the expression is malformed, or evaluation fails + + @returns + result of the XPath evaluation: a single node + */ + com::sun::star::xml::dom::XNode selectSingleNode( + [in] com::sun::star::xml::dom::XNode contextNode, + [in] string expr) + raises( com::sun::star::xml::xpath::XPathException ); + + /** Evaluate an XPath expression to select a single node. + + @param contextNode + the context node (expression is relative to this node) + + @param expr + the XPath expression + + @param namespaceNode + all namespaces declared on this node will be registered + + @throws XPathException + if the expression is malformed, or evaluation fails + + @returns + result of the XPath evaluation: a single node + */ + com::sun::star::xml::dom::XNode selectSingleNodeNS( + [in] com::sun::star::xml::dom::XNode contextNode, + [in] string expr, + [in] com::sun::star::xml::dom::XNode namespaceNode) + raises( com::sun::star::xml::xpath::XPathException ); + +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/xpath/XXPathExtension.idl b/offapi/com/sun/star/xml/xpath/XXPathExtension.idl new file mode 100644 index 000000000..10fdabc92 --- /dev/null +++ b/offapi/com/sun/star/xml/xpath/XXPathExtension.idl @@ -0,0 +1,37 @@ +/* -*- 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_xml_XPath_XXPathExtension_idl__ +#define __com_sun_star_xml_XPath_XXPathExtension_idl__ +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/xml/xpath/Libxml2ExtensionHandle.idl> + +module com { module sun { module star { module xml { module xpath { + + +interface XXPathExtension : com::sun::star::uno::XInterface +{ + Libxml2ExtensionHandle getLibxml2ExtensionHandle(); +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/xpath/XXPathObject.idl b/offapi/com/sun/star/xml/xpath/XXPathObject.idl new file mode 100644 index 000000000..b101710d2 --- /dev/null +++ b/offapi/com/sun/star/xml/xpath/XXPathObject.idl @@ -0,0 +1,88 @@ +/* -*- 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_xml_XPath_XXPathObject_idl__ +#define __com_sun_star_xml_XPath_XXPathObject_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/xml/dom/XNode.idl> +#include <com/sun/star/xml/dom/XNodeList.idl> +#include <com/sun/star/xml/xpath/XPathObjectType.idl> + +module com { module sun { module star { module xml { module xpath { + + +interface XXPathObject : com::sun::star::uno::XInterface +{ + /** + get object type + */ + XPathObjectType getObjectType(); + + /** + get the nodes from a node list type object + */ + com::sun::star::xml::dom::XNodeList getNodeList(); + + /** + get value of a boolean object + */ + boolean getBoolean(); + + /** + get number as byte + */ + byte getByte(); + + /** + get number as short + */ + short getShort(); + + /** + get number as long + */ + long getLong(); + + /** + get number as hyper + */ + hyper getHyper(); + + /** + get number as float + */ + float getFloat(); + + /** + get number as double + */ + double getDouble(); + + /** + get string value + */ + string getString(); +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/xslt/XSLT2Transformer.idl b/offapi/com/sun/star/xml/xslt/XSLT2Transformer.idl new file mode 100644 index 000000000..c658cd858 --- /dev/null +++ b/offapi/com/sun/star/xml/xslt/XSLT2Transformer.idl @@ -0,0 +1,30 @@ +/* -*- 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_XML_XSLT_XSLT2TRANSFORMER_IDL__ +#define __COM_SUN_STAR_XML_XSLT_XSLT2TRANSFORMER_IDL__ + +#include <com/sun/star/xml/xslt/XXSLTTransformer.idl> + +module com { module sun { module star { module xml { module xslt { + +/** Get XSLT filter transformer supporting XSLT 2.0. + + @since LibreOffice 4.0 + */ +service XSLT2Transformer : XXSLTTransformer +{ + create([in] sequence<any> args); +}; + +}; }; }; }; }; + +#endif // INCLUDED_COM_SUN_STAR_XML_XSLT_XSLT2TRANSFORMER_IDL + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/xslt/XSLTTransformer.idl b/offapi/com/sun/star/xml/xslt/XSLTTransformer.idl new file mode 100644 index 000000000..52ebe1f87 --- /dev/null +++ b/offapi/com/sun/star/xml/xslt/XSLTTransformer.idl @@ -0,0 +1,32 @@ +/* -*- 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_XML_XSLT_XSLTTRANSFORMER_IDL__ +#define __COM_SUN_STAR_XML_XSLT_XSLTTRANSFORMER_IDL__ + +#include <com/sun/star/xml/xslt/XXSLTTransformer.idl> + +module com { module sun { module star { module xml { module xslt { + +/** Get unspecified XSLT filter transformer. + + <p>It is not safe to expect support for any features except XSLT 1.0 . + + @since LibreOffice 4.0 + */ +service XSLTTransformer : XXSLTTransformer +{ + create([in] sequence<any> args); +}; + +}; }; }; }; }; + +#endif // INCLUDED_COM_SUN_STAR_XML_XSLT_XSLTTRANSFORMER_IDL + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/xslt/XXSLTTransformer.idl b/offapi/com/sun/star/xml/xslt/XXSLTTransformer.idl new file mode 100644 index 000000000..7671579f2 --- /dev/null +++ b/offapi/com/sun/star/xml/xslt/XXSLTTransformer.idl @@ -0,0 +1,36 @@ +/* -*- 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_XML_XSLT_XXSLTTRANSFORMER_IDL__ +#define __COM_SUN_STAR_XML_XSLT_XXSLTTRANSFORMER_IDL__ + +#include <com/sun/star/io/XActiveDataControl.idl> +#include <com/sun/star/io/XActiveDataSink.idl> +#include <com/sun/star/io/XActiveDataSource.idl> +#include <com/sun/star/lang/XInitialization.idl> + +module com { module sun { module star { module xml { module xslt { + +/** An interface for XSLT transformers. + + @since LibreOffice 4.0 + */ +interface XXSLTTransformer +{ + interface com::sun::star::io::XActiveDataControl; + interface com::sun::star::io::XActiveDataSink; + interface com::sun::star::io::XActiveDataSource; + interface com::sun::star::lang::XInitialization; +}; + +}; }; }; }; }; + +#endif // INCLUDED_COM_SUN_STAR_XML_XSLT_XXSLTTRANSFORMER_IDL + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |