1408a4873SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3408a4873SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4408a4873SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5408a4873SAndrew Rist * distributed with this work for additional information
6408a4873SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7408a4873SAndrew Rist * to you under the Apache License, Version 2.0 (the
8408a4873SAndrew Rist * "License"); you may not use this file except in compliance
9408a4873SAndrew Rist * with the License.  You may obtain a copy of the License at
10408a4873SAndrew Rist *
11408a4873SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12408a4873SAndrew Rist *
13408a4873SAndrew Rist * Unless required by applicable law or agreed to in writing,
14408a4873SAndrew Rist * software distributed under the License is distributed on an
15408a4873SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16408a4873SAndrew Rist * KIND, either express or implied.  See the License for the
17408a4873SAndrew Rist * specific language governing permissions and limitations
18408a4873SAndrew Rist * under the License.
19408a4873SAndrew Rist *
20408a4873SAndrew Rist *************************************************************/
21408a4873SAndrew Rist
22408a4873SAndrew Rist
23cdf0e10cSrcweir#ifndef __com_sun_star_beans_XMultiPropertySet_idl__
24cdf0e10cSrcweir#define __com_sun_star_beans_XMultiPropertySet_idl__
25cdf0e10cSrcweir
26cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__
27cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl>
28cdf0e10cSrcweir#endif
29cdf0e10cSrcweir
30cdf0e10cSrcweir#ifndef __com_sun_star_beans_XPropertySetInfo_idl__
31cdf0e10cSrcweir#include <com/sun/star/beans/XPropertySetInfo.idl>
32cdf0e10cSrcweir#endif
33cdf0e10cSrcweir
34cdf0e10cSrcweir#ifndef __com_sun_star_beans_PropertyVetoException_idl__
35cdf0e10cSrcweir#include <com/sun/star/beans/PropertyVetoException.idl>
36cdf0e10cSrcweir#endif
37cdf0e10cSrcweir
38cdf0e10cSrcweir#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
39cdf0e10cSrcweir#include <com/sun/star/lang/IllegalArgumentException.idl>
40cdf0e10cSrcweir#endif
41cdf0e10cSrcweir
42cdf0e10cSrcweir#ifndef __com_sun_star_lang_WrappedTargetException_idl__
43cdf0e10cSrcweir#include <com/sun/star/lang/WrappedTargetException.idl>
44cdf0e10cSrcweir#endif
45cdf0e10cSrcweir
46cdf0e10cSrcweir#ifndef __com_sun_star_beans_XPropertiesChangeListener_idl__
47cdf0e10cSrcweir#include <com/sun/star/beans/XPropertiesChangeListener.idl>
48cdf0e10cSrcweir#endif
49cdf0e10cSrcweir
50cdf0e10cSrcweir
51cdf0e10cSrcweir//=============================================================================
52cdf0e10cSrcweir
53cdf0e10cSrcweirmodule com {  module sun {  module star {  module beans {
54cdf0e10cSrcweir
55cdf0e10cSrcweir//=============================================================================
56cdf0e10cSrcweir
57cdf0e10cSrcweir/** provides access to multiple properties with a single call.
58cdf0e10cSrcweir */
59cdf0e10cSrcweirpublished interface XMultiPropertySet: com::sun::star::uno::XInterface
60cdf0e10cSrcweir{
61cdf0e10cSrcweir	//-------------------------------------------------------------------------
62cdf0e10cSrcweir
63cdf0e10cSrcweir	/** @returns
64cdf0e10cSrcweir			the <type>XPropertySetInfo</type> interface, which describes
65cdf0e10cSrcweir			all properties of the object to which this interface belongs.
66cdf0e10cSrcweir			<const>NULL</const> is returned if the object cannot or will
67cdf0e10cSrcweir			not provide information about the properties.
68cdf0e10cSrcweir
69cdf0e10cSrcweir		@see XPropertySet::getPropertySetInfo
70cdf0e10cSrcweir	 */
71cdf0e10cSrcweir	com::sun::star::beans::XPropertySetInfo getPropertySetInfo();
72cdf0e10cSrcweir
73cdf0e10cSrcweir	//-------------------------------------------------------------------------
74cdf0e10cSrcweir
75cdf0e10cSrcweir	/** sets the values to the properties with the specified names.
76cdf0e10cSrcweir
77cdf0e10cSrcweir		<p>The values of the properties must change before the bound
78cdf0e10cSrcweir		events are fired. The values of the constrained properties
79cdf0e10cSrcweir		should change after the vetoable events are fired and only if no
80*86e1cf34SPedro Giffuni		exception occurred. Unknown properties are ignored.  </p>
81cdf0e10cSrcweir
82cdf0e10cSrcweir		@param aPropertyNames
83cdf0e10cSrcweir			specifies the names of the properties. All names must be unique.
84cdf0e10cSrcweir			This sequence must be alphabetically sorted.
85cdf0e10cSrcweir
86cdf0e10cSrcweir		@param aValues
87cdf0e10cSrcweir			contains the new values of the properties. The order is the same
88cdf0e10cSrcweir			as in <var>aPropertyNames</var>.
89cdf0e10cSrcweir
90cdf0e10cSrcweir		@throws IllegalArgumentException
91cdf0e10cSrcweir			if one of the new values cannot be converted to the type
92cdf0e10cSrcweir			of the underlying property by an identity or widening conversion.
93cdf0e10cSrcweir
94cdf0e10cSrcweir		@throws com::sun::star::lang:WrappedTargetException
95cdf0e10cSrcweir			if the implementation has an internal reason for the exception.
96cdf0e10cSrcweir			In this case the original exception is wrapped.
97cdf0e10cSrcweir	 */
98cdf0e10cSrcweir	void setPropertyValues( [in] sequence<string> aPropertyNames,
99cdf0e10cSrcweir			 [in] sequence<any> aValues )
100cdf0e10cSrcweir			raises( com::sun::star::beans::PropertyVetoException,
101cdf0e10cSrcweir					com::sun::star::lang::IllegalArgumentException,
102cdf0e10cSrcweir					com::sun::star::lang::WrappedTargetException );
103cdf0e10cSrcweir
104cdf0e10cSrcweir	//-------------------------------------------------------------------------
105cdf0e10cSrcweir
106cdf0e10cSrcweir	/** @returns
107cdf0e10cSrcweir			a sequence of all values of the properties which are specified by their names.
108cdf0e10cSrcweir
109cdf0e10cSrcweir		<p>The order of the values in the returned sequence will be the same
110cdf0e10cSrcweir		as the order of the names in the argument. </p>
111cdf0e10cSrcweir
112cdf0e10cSrcweir		@param aPropertyNames
113cdf0e10cSrcweir			specifies the names of the properties.
114cdf0e10cSrcweir			This sequence must be alphabetically sorted.
115cdf0e10cSrcweir	 */
116cdf0e10cSrcweir	sequence<any> getPropertyValues( [in] sequence<string> aPropertyNames );
117cdf0e10cSrcweir
118cdf0e10cSrcweir	//-------------------------------------------------------------------------
119cdf0e10cSrcweir
120cdf0e10cSrcweir	/** adds an <type>XPropertiesChangeListener</type> to the
121cdf0e10cSrcweir		specified property with the specified names.
122cdf0e10cSrcweir
123cdf0e10cSrcweir		<p>The implementation can ignore the names of the properties
124cdf0e10cSrcweir		and fire the event on all properties. </p>
125cdf0e10cSrcweir
126cdf0e10cSrcweir		<p>It is suggested to allow multiple registration of the same listener,
127cdf0e10cSrcweir		thus for each time a listener is added, it has to be removed.
128cdf0e10cSrcweir
129cdf0e10cSrcweir		@param aPropertyNames
130cdf0e10cSrcweir			specifies the names of the properties.
131cdf0e10cSrcweir
132cdf0e10cSrcweir		@param xListener
133cdf0e10cSrcweir			contains the listener for the property change events.
134cdf0e10cSrcweir
135cdf0e10cSrcweir		@see removePropertiesChangeListener
136cdf0e10cSrcweir	 */
137cdf0e10cSrcweir	[oneway] void addPropertiesChangeListener( [in] sequence<string> aPropertyNames,
138cdf0e10cSrcweir			 [in] com::sun::star::beans::XPropertiesChangeListener xListener );
139cdf0e10cSrcweir
140cdf0e10cSrcweir	//-------------------------------------------------------------------------
141cdf0e10cSrcweir
142cdf0e10cSrcweir	/** removes an <type>XPropertiesChangeListener</type> from the listener list.
143cdf0e10cSrcweir
144cdf0e10cSrcweir		<p>It is a "noop" if the listener is not registered.  </p>
145cdf0e10cSrcweir
146cdf0e10cSrcweir		<p>It is suggested to allow multiple registration of the same listener,
147cdf0e10cSrcweir		thus for each time a listener is added, it has to be removed.
148cdf0e10cSrcweir
149cdf0e10cSrcweir		@param
150cdf0e10cSrcweir			contains the listener to be removed.
151cdf0e10cSrcweir
152cdf0e10cSrcweir		@see addPropertiesChangeListener
153cdf0e10cSrcweir	 */
154cdf0e10cSrcweir	[oneway] void removePropertiesChangeListener( [in] com::sun::star::beans::XPropertiesChangeListener xListener );
155cdf0e10cSrcweir
156cdf0e10cSrcweir	//-------------------------------------------------------------------------
157cdf0e10cSrcweir
158cdf0e10cSrcweir	/** fires a sequence of <type>PropertyChangeEvent</type>s to the specified
159cdf0e10cSrcweir		listener.
160cdf0e10cSrcweir
161cdf0e10cSrcweir		@param aPropertynames
162cdf0e10cSrcweir			specifies the sorted names of the properties.
163cdf0e10cSrcweir
164cdf0e10cSrcweir		@param xListener
165cdf0e10cSrcweir			contains the listener for the property change events.
166cdf0e10cSrcweir	 */
167cdf0e10cSrcweir	[oneway] void firePropertiesChangeEvent( [in] sequence<string> aPropertyNames,
168cdf0e10cSrcweir			 [in] com::sun::star::beans::XPropertiesChangeListener xListener );
169cdf0e10cSrcweir
170cdf0e10cSrcweir};
171cdf0e10cSrcweir
172cdf0e10cSrcweir//=============================================================================
173cdf0e10cSrcweir
174cdf0e10cSrcweir}; }; }; };
175cdf0e10cSrcweir
176cdf0e10cSrcweir#endif
177