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