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_beans_XMultiPropertySet_idl__
24#define __com_sun_star_beans_XMultiPropertySet_idl__
25
26#ifndef __com_sun_star_uno_XInterface_idl__
27#include <com/sun/star/uno/XInterface.idl>
28#endif
29
30#ifndef __com_sun_star_beans_XPropertySetInfo_idl__
31#include <com/sun/star/beans/XPropertySetInfo.idl>
32#endif
33
34#ifndef __com_sun_star_beans_PropertyVetoException_idl__
35#include <com/sun/star/beans/PropertyVetoException.idl>
36#endif
37
38#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
39#include <com/sun/star/lang/IllegalArgumentException.idl>
40#endif
41
42#ifndef __com_sun_star_lang_WrappedTargetException_idl__
43#include <com/sun/star/lang/WrappedTargetException.idl>
44#endif
45
46#ifndef __com_sun_star_beans_XPropertiesChangeListener_idl__
47#include <com/sun/star/beans/XPropertiesChangeListener.idl>
48#endif
49
50
51//=============================================================================
52
53module com {  module sun {  module star {  module beans {
54
55//=============================================================================
56
57/** provides access to multiple properties with a single call.
58 */
59published interface XMultiPropertySet: com::sun::star::uno::XInterface
60{
61	//-------------------------------------------------------------------------
62
63	/** @returns
64			the <type>XPropertySetInfo</type> interface, which describes
65			all properties of the object to which this interface belongs.
66			<const>NULL</const> is returned if the object cannot or will
67			not provide information about the properties.
68
69		@see XPropertySet::getPropertySetInfo
70	 */
71	com::sun::star::beans::XPropertySetInfo getPropertySetInfo();
72
73	//-------------------------------------------------------------------------
74
75	/** sets the values to the properties with the specified names.
76
77		<p>The values of the properties must change before the bound
78		events are fired. The values of the constrained properties
79		should change after the vetoable events are fired and only if no
80		exception occured. Unknown properties are ignored.  </p>
81
82		@param aPropertyNames
83			specifies the names of the properties. All names must be unique.
84			This sequence must be alphabetically sorted.
85
86		@param aValues
87			contains the new values of the properties. The order is the same
88			as in <var>aPropertyNames</var>.
89
90		@throws IllegalArgumentException
91			if one of the new values cannot be converted to the type
92			of the underlying property by an identity or widening conversion.
93
94		@throws com::sun::star::lang:WrappedTargetException
95			if the implementation has an internal reason for the exception.
96			In this case the original exception is wrapped.
97	 */
98	void setPropertyValues( [in] sequence<string> aPropertyNames,
99			 [in] sequence<any> aValues )
100			raises( com::sun::star::beans::PropertyVetoException,
101					com::sun::star::lang::IllegalArgumentException,
102					com::sun::star::lang::WrappedTargetException );
103
104	//-------------------------------------------------------------------------
105
106	/** @returns
107			a sequence of all values of the properties which are specified by their names.
108
109		<p>The order of the values in the returned sequence will be the same
110		as the order of the names in the argument. </p>
111
112		@param aPropertyNames
113			specifies the names of the properties.
114			This sequence must be alphabetically sorted.
115	 */
116	sequence<any> getPropertyValues( [in] sequence<string> aPropertyNames );
117
118	//-------------------------------------------------------------------------
119
120	/** adds an <type>XPropertiesChangeListener</type> to the
121		specified property with the specified names.
122
123		<p>The implementation can ignore the names of the properties
124		and fire the event on all properties. </p>
125
126		<p>It is suggested to allow multiple registration of the same listener,
127		thus for each time a listener is added, it has to be removed.
128
129		@param aPropertyNames
130			specifies the names of the properties.
131
132		@param xListener
133			contains the listener for the property change events.
134
135		@see removePropertiesChangeListener
136	 */
137	[oneway] void addPropertiesChangeListener( [in] sequence<string> aPropertyNames,
138			 [in] com::sun::star::beans::XPropertiesChangeListener xListener );
139
140	//-------------------------------------------------------------------------
141
142	/** removes an <type>XPropertiesChangeListener</type> from the listener list.
143
144		<p>It is a "noop" if the listener is not registered.  </p>
145
146		<p>It is suggested to allow multiple registration of the same listener,
147		thus for each time a listener is added, it has to be removed.
148
149		@param
150			contains the listener to be removed.
151
152		@see addPropertiesChangeListener
153	 */
154	[oneway] void removePropertiesChangeListener( [in] com::sun::star::beans::XPropertiesChangeListener xListener );
155
156	//-------------------------------------------------------------------------
157
158	/** fires a sequence of <type>PropertyChangeEvent</type>s to the specified
159		listener.
160
161		@param aPropertynames
162			specifies the sorted names of the properties.
163
164		@param xListener
165			contains the listener for the property change events.
166	 */
167	[oneway] void firePropertiesChangeEvent( [in] sequence<string> aPropertyNames,
168			 [in] com::sun::star::beans::XPropertiesChangeListener xListener );
169
170};
171
172//=============================================================================
173
174}; }; }; };
175
176#endif
177