1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_configuration_HierarchyAccess_idl__
24#define __com_sun_star_configuration_HierarchyAccess_idl__
25
26#ifndef __com_sun_star_container_XNameAccess_idl__
27#include <com/sun/star/container/XNameAccess.idl>
28#endif
29
30#ifndef __com_sun_star_container_XHierarchicalNameAccess_idl__
31#include <com/sun/star/container/XHierarchicalNameAccess.idl>
32#endif
33
34#ifndef __com_sun_star_container_XContainer_idl__
35#include <com/sun/star/container/XContainer.idl>
36#endif
37
38#ifndef __com_sun_star_beans_XExactName_idl__
39#include <com/sun/star/beans/XExactName.idl>
40#endif
41
42#ifndef __com_sun_star_beans_XPropertySetInfo_idl__
43#include <com/sun/star/beans/XPropertySetInfo.idl>
44#endif
45
46#ifndef __com_sun_star_beans_XPropertyState_idl__
47#include <com/sun/star/beans/XPropertyState.idl>
48#endif
49
50#ifndef __com_sun_star_beans_XMultiPropertyState_idl__
51#include <com/sun/star/beans/XMultiPropertyStates.idl>
52#endif
53
54//=============================================================================
55
56module com { module sun { module star { module configuration {
57
58//=============================================================================
59/** provides access to a hierarchy of descendant elements.
60
61 <p>Subnodes are accessed by their name. Values that are direct or indirect
62 descendants of this tree node can be retrieved. Non-value subnodes can be
63 navigated using container interfaces.
64 Other interfaces provide access to information about this node.
65 Changes to values in the subtree can be monitored by event listeners.
66 </p>
67
68 <p>Elements of this container that are not simple values
69 are similar containers themselves, thus (recursively) forming a
70 hierarchical tree.
71 </p>
72
73 <p>Implementations of this service usually also implement
74 service <type>HierarchyElement</type>, which concerns the complementary role
75 of being accessible as an element of the hierarchy.
76 </p>
77*/
78published service HierarchyAccess
79{
80/** allows access to immediate children of this node.
81
82 <p><member scope="com::sun::star::container">XNameAccess::getByName()</member>
83 returns an <atom>any</atom> holding either a simple value or an interface
84 on another HierarchyAccess if the child is not a simple value.
85 </p>
86*/
87	interface com::sun::star::container::XNameAccess;
88
89/** allows access to all descendants of this node
90
91 <p><member scope="com::sun::star::container">XHierarchicalNameAccess::getByHierarchicalName()</member>
92 returns an <atom>any</atom> holding either a simple value or an interface
93 on another HierarchyAccess if the descendant is not a simple value.
94 </p>
95*/
96	interface com::sun::star::container::XHierarchicalNameAccess;
97
98/** allows attaching listeners to this node to monitor changes to immediate child nodes.
99*/
100	interface com::sun::star::container::XContainer;
101
102/** provides support for inexact names.
103 <p>Exact names can be obtained for simple or hierarchical names for use in
104 <type scope="com::sun::star::container">XNameAccess</type>,
105 <type scope="com::sun::star::container">XHierarchicalNameAccess</type>,
106 <type scope="com::sun::star::beans">XPropertySet</type> or
107 any other interfaces that allow access to or manipulation of subnodes
108 selected by name or hierarchical name.
109 </p>
110 <p>If an inexact name could be matched to either a simple or a hierarchical
111 name, the simple (immediate child) name is preferred.
112 </p>
113*/
114	interface com::sun::star::beans::XExactName;
115
116/** provides information about immediate children of this node. [optional]
117
118 <p>This interface may be missing, if the hierarchy supports no traits that are
119 described by <type scope="com::sun::star::beans">PropertyAttribute</type>
120 values or if the same information is available by other means,
121 e.g. if the implementation supports
122 <member scope="com::sun::star::beans">XPropertySet::getPropertySetInfo()</member>.
123 </p>
124
125 <p>If a child of this node is an object that implements
126 <type scope="com::sun::star::beans">XProperty</type>, then this implementation
127 returns the same <type scope="com::sun::star::beans">Property</type> for that
128 child as the child itself.
129 </p>
130*/
131	[optional] interface com::sun::star::beans::XPropertySetInfo;
132
133/** provides access to the state of child elements of an implementation. [optional]
134
135 <p>This interface may be missing if the hierarchy (or a hierarchy fragment
136 that contains this implementation as element) does not support default values or
137 if the node does not support accessing the default state of individual children.
138 </p>
139
140 <p>If elements that are not simple values, but objects themselves, support
141 a default state (as indicated by
142 <const scope="com::sun::star::beans">PropertyAttribute::MAYBEDEFAULT</const>),
143 they should implement
144 <type scope="com::sun::star::beans">XPropertyWithState</type>, in which case
145 the <type scope="com::sun::star::beans">PropertyState</type> applies to all
146 their children and recursively to all descendants.
147 </p>
148
149 <p>If an implementation is part of a <em>read-only</em> view of the hierarchy,
150 attempts to change property states will fail.
151 </p>
152*/
153	[optional] interface com::sun::star::beans::XPropertyState;
154
155/** provides access to the states of multiple child elements of
156 an implementation. [optional]
157
158 <p>This interface may be missing if the hierarchy (or a hierarchy fragment
159 that contains this implementation as element) does not support default values
160 if the node does not support accessing the default state of individual children.
161 </p>
162
163 <p>If elements that are not simple values, but objects themselves, support
164 a default state (as indicated by
165 <const scope="com::sun::star::beans">PropertyAttribute::MAYBEDEFAULT</const>),
166 they should implement
167 <type scope="com::sun::star::beans">XPropertyWithState</type>, in which case
168 the <type scope="com::sun::star::beans">PropertyState</type> applies to all
169 their children and recursively to all descendants.
170 </p>
171
172 <p>If an implementation is part of a <em>read-only</em> view of the hierarchy,
173 attempts to change property states will fail.
174 </p>
175*/
176	[optional] interface com::sun::star::beans::XMultiPropertyStates;
177};
178
179//=============================================================================
180
181}; }; }; };
182
183#endif
184