From ed5640d8b587fbcfed7dd7967f3de04b37a76f26 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:06:44 +0200 Subject: Adding upstream version 4:7.4.7. Signed-off-by: Daniel Baumann --- .../com/sun/star/configuration/SimpleSetUpdate.idl | 164 +++++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 offapi/com/sun/star/configuration/SimpleSetUpdate.idl (limited to 'offapi/com/sun/star/configuration/SimpleSetUpdate.idl') diff --git a/offapi/com/sun/star/configuration/SimpleSetUpdate.idl b/offapi/com/sun/star/configuration/SimpleSetUpdate.idl new file mode 100644 index 000000000..735316783 --- /dev/null +++ b/offapi/com/sun/star/configuration/SimpleSetUpdate.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_configuration_SimpleSetUpdate_idl__ +#define __com_sun_star_configuration_SimpleSetUpdate_idl__ + +#include +#include +#include +#include + + +module com { module sun { module star { module configuration { + +/** provides write access to a dynamic, homogeneous, non-hierarchical set of + values or objects. + +

Allows adding and removing elements. + Helps create new elements to be added. +

+ +

This service extends SimpleSetAccess to support + modifying the container. Any child objects shall in turn support + modifying access. +

+*/ +published service SimpleSetUpdate +{ +/** is the basic service providing read access to a (not necessarily + hierarchical) set. +*/ + service SimpleSetAccess; + +/** allows inserting, removing, and replacing elements. + +

This interface extends the interface + com::sun::star::container::XNameAccess supported + by service SimpleSetAccess to allow modifying the container. +

+ +

If available, changes can be observed by registering a listener with interface + com::sun::star::container::XContainer. +

+ +

If the elements of this set are of simple type (the type returned by + com::sun::star::container::XElementAccess::getElementType() + is not an interface type), then values of that type can directly be passed to + com::sun::star::container::XNameContainer::insertByName() + and + com::sun::star::container::XNameContainer::replaceByName(). +

+ +

Otherwise new elements have to be constructed to match the type + prescribed by the element template of this set. Such elements can be created + using interfaces com::sun::star::lang::XSingleServiceFactory + and, if supported, com::sun::star::lang::XMultiServiceFactory. +

+ +

Objects to be inserted must not be contained in any set at the time of + insertion. com::sun::star::container::XChild::getParent() + must return `NULL`. If a name had been assigned to the object prior to insertion + (using com::sun::star::container::XNamed::setName() + or by other means), this name is ignored and will be lost. + After insertion the name of the object is the name that was used as argument + to com::sun::star::container::XNameContainer::insertByName() + or com::sun::star::container::XNameContainer::replaceByName(). +

+ + +

Objects that are removed using + com::sun::star::container::XNameContainer::removeByName() + or replaced using + com::sun::star::container::XNameContainer::replaceByName() + remain valid and can be reinserted into a set supporting the same template and + even under a different name. +

+ +

An implementation need not support insertion of objects that were not + obtained in one of the ways described above. If it does, the implementation + must reject elements that do not have the correct structure as described + by the template. +

+*/ + interface com::sun::star::container::XNameContainer; + +/** allows creating an object that can be inserted into this set. [conditional] + +

This interface shall be implemented by an implementation, + if and only if the element type of the set, as returned by + com::sun::star::container::XElementAccess::getElementType(), + is an object type, such as an interface. +

+ +

Using com::sun::star::lang::XSingleServiceFactory::createInstance() + an instance of the element template of this set is created. If the set + supports multiple templates or variations of the basic template, a default + variant of the basic template is instantiated. If an implementation supports + variations, they may be specified by passing arguments to + com::sun::star::lang::XSingleServiceFactory::createInstanceWithArguments(). + There are no predefined arguments for all versions of this service. +

+ +

The object created is not contained in the set and does not have a name yet. + It may subsequently be inserted into the set and named using + com::sun::star::container::XNameContainer::insertByName() + or + com::sun::star::container::XNameContainer::replaceByName(). +

+*/ + [optional] interface com::sun::star::lang::XSingleServiceFactory; + +/** allows creating various objects that can be inserted into this set. [optional] + +

This interface may be implemented by an implementation of + service SetUpdate to support creating elements from other than + the basic element template. An example of this would be an + implementation that supports inheritance, allowing the use of + templates derived from the basic template by extension. +

+ +

This interface may only be implemented if the element type of the set + (as returned by + com::sun::star::container::XElementAccess::getElementType()) + is an object type, such as an interface. An implementation should also implement + interface XTemplateContainer which is optional in this service. +

+ +

The service identifier argument passed + to com::sun::star::lang::XMultiServiceFactory::createInstance() + or com::sun::star::lang::XMultiServiceFactory::createInstanceWithArguments() + names the template to be instantiated or otherwise identifies the structure + to be built. The implementation must at least support using the template + name obtained from XTemplateContainer::getElementTemplateName() + as a service identifier, in which case the result shall be the same as if + the corresponding member of com::sun::star::lang::XSingleServiceFactory + had been called. +

+ +*/ + [optional] interface com::sun::star::lang::XMultiServiceFactory; + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3