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 --- .../sun/star/configuration/ConfigurationAccess.idl | 235 +++++++++++++++++++++ 1 file changed, 235 insertions(+) create mode 100644 offapi/com/sun/star/configuration/ConfigurationAccess.idl (limited to 'offapi/com/sun/star/configuration/ConfigurationAccess.idl') diff --git a/offapi/com/sun/star/configuration/ConfigurationAccess.idl b/offapi/com/sun/star/configuration/ConfigurationAccess.idl new file mode 100644 index 000000000..9e34f9adf --- /dev/null +++ b/offapi/com/sun/star/configuration/ConfigurationAccess.idl @@ -0,0 +1,235 @@ +/* -*- 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_ConfigurationAccess_idl__ +#define __com_sun_star_configuration_ConfigurationAccess_idl__ + +#include +#include +#include +#include +#include +#include +#include + + +module com { module sun { module star { module configuration { + +/** provides read access to a fragment of the configuration hierarchy. + +

Values that are direct or indirect descendants of a root element can be + retrieved and, if themselves objects, navigated. Other interfaces provide + access to information about this element and its context. + Changes to values in the hierarchy can be monitored by event listeners. +

+ +

Descendants of this service also implement this service. +

+ +

Ultimately the configuration holds values. These values are organized into + a hierarchy using structural elements. The structure is defined in advance in + a schema. Necessary information from the schema is stored in the configuration + repository itself and is accessible through an implementation of this service. +

+ +

Two different kinds of structural elements are used in the configuration + hierarchy: +

+
+
Sets
+
are dynamic containers of homogeneous elements. Which elements + a set contains can vary. Their names are defined by the + clients that insert them. On the other hand, the type of + the elements is the same for all elements. In the case of elements + that are themselves hierarchy objects, the type includes + the structure of the hierarchy fragment they contain. Such types + are defined in the configuration schema as templates. +
+ +
Groups
+
are static collections of heterogeneous elements. The names and + types of the elements of a group are completely defined in the + configuration schema. Here each element may be of a different + type, allowing groups that contain a mix of + subobjects and simple values. +
+
+ +

Objects in the configuration hierarchy, for example, implementations of this service, + can thus be classified in the following ways: +

+
    +
  • Container role: + An object that can hold child elements as a set or a group. +
  • +
  • Element role: + An object may be an element of a set or a group + or else it may be the root element. +
  • +
+ +

Several types of simple values can be used in the configuration. + In addition to the basic (scalar) types, sequences of the basic types are + supported. The basic types are: +

+ +
    +
  • string can hold a human-readable text. +

    Values are represented as `string`.

    +

    Sequences are represented as `string[]`.

    +

    "human-readable" here excludes non-printing characters + except for CR, LF and TAB [Unicode code points 9,10,13]. + For binary data, use type binary instead.

    +
  • +
  • boolean can hold the values `TRUE` or `FALSE`. +

    Values are represented as `boolean`. +

    Sequences are represented as `boolean[]`.

    +
  • +
  • short can hold a 16-bit signed integer. +

    Values are represented as `short`.

    +

    Sequences are represented as `short[]`.

    +
  • +
  • int can hold a 32-bit signed integer. +

    Values are represented as `long`.

    +

    Sequences are represented as `long[]`.

    +
  • +
  • long can hold a 64-bit signed integer. +

    Values are represented as `hyper`.

    +

    Sequences are represented as `hyper[]`.

    +
  • +
  • double can hold a floating point number. +

    Values are represented as `double`.

    +

    Sequences are represented as `double[]`.

    +
  • +
  • binary can hold a sequence of octets. +

    Values are represented as `byte[]`.

    +

    Sequences are represented as `byte[][]`.

    +
  • +
+ +

Within templates an additional type any can occur. When + such a template is used to create a new SetElement, the type + of the element is initially reported as `any` (having no value). + When the value of such an element is first set, it will assume the type used. +

+ +

If the schema marks a value as nullable (which is indicated by + attribute com::sun::star::beans::PropertyAttribute::MAYBEVOID ), + its contents may be `NULL`. +

+ +

The configuration should support explicit access to default values + (implementing com::sun::star::beans::XPropertyState + and com::sun::star::beans::XPropertyWithState). +

+ + @see ConfigurationProvider + Root instances of this service can be requested from a + ConfigurationProvider. + + @see ConfigurationUpdateAccess + an extended service that includes facilities for modifying + configuration data. +*/ +published service ConfigurationAccess +{ + /** provides interfaces to access child and descendent elements. + +

An implementation actually implements a specialization of this service, + which depends on its Container role. +

+ +

Implementations shall implement exactly one of:

+
    +
  • SetAccess if this element is a Set.
  • +
  • GroupAccess if this element is a Group.
  • +
+ */ + service HierarchyAccess; + + /** provides interfaces to obtain information about this element and its + role and context in the hierarchy. + +

An implementation actually implements a specialization of this service, + which depends on its Element role. +

+ +

Implementations shall implement exactly one of:

+
    +
  • AccessRootElement if this element is the + Root of the whole hierarchy. Objects that can be + created directly by a ConfigurationProvider + implement this service.
  • +
  • SetElement if this element may be contained in a + Set.
  • +
  • GroupElement if this element is a child of a + Group.
  • +
+ + */ + service HierarchyElement; + + /** specializes HierarchyAccess, if this element is a Set. + +

This is an alternative to GroupAccess. +

+ */ + [optional] service SetAccess; + + /** specializes HierarchyAccess, + if this element is a Group. +

This is an alternative to SetAccess. +

+ */ + [optional] service GroupAccess; + + /** specializes HierarchyElement, + if this element is the Root of the whole hierarchy. +

This is an alternative to SetElement + or GroupElement. +

+ + @see ConfigurationProvider + Instances obtained from a ConfigurationProvider will + implement this version of HierarchyElement. + */ + [optional] service AccessRootElement; + + /** specializes HierarchyElement, + if this element may be contained in a Set. +

This is an alternative to AccessRootElement + or GroupElement. +

+ */ + [optional] service SetElement; + + /** specializes HierarchyElement, + if this element is a child of a Group. +

This is an alternative to AccessRootElement + or SetElement. +

+*/ + [optional] service GroupElement; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3