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_beans_XFastPropertyState_idl__
28#define __com_sun_star_beans_XFastPropertyState_idl__
29
30#ifndef __com_sun_star_uno_XInterface_idl__
31#include <com/sun/star/uno/XInterface.idl>
32#endif
33
34#ifndef __com_sun_star_beans_PropertyState_idl__
35#include <com/sun/star/beans/PropertyState.idl>
36#endif
37
38#ifndef __com_sun_star_beans_UnknownPropertyException_idl__
39#include <com/sun/star/beans/UnknownPropertyException.idl>
40#endif
41
42#ifndef __com_sun_star_lang_WrappedTargetException_idl__
43#include <com/sun/star/lang/WrappedTargetException.idl>
44#endif
45
46
47//=============================================================================
48
49module com {  module sun {  module star {  module beans {
50
51//=============================================================================
52
53/** makes it possible to query information about the state of
54	one or more properties.
55
56	<p>The state contains the information if:</p>
57	<ul>
58		<li>a value is available or void</li>
59		<li>the value is stored in the object itself, or if a default value is to be used</li>
60		<li>and if the value cannot be determined, due to ambiguity
61			(multi selection with multiple values).</li>
62	</ul>
63 */
64interface XFastPropertyState: ::com::sun::star::uno::XInterface
65{
66	//-------------------------------------------------------------------------
67
68	/** @returns
69				the state of the property.
70
71		@param	aPropertyName
72			specifies the name of the property.
73
74		@throws UnknownPropertyException
75			if the property does not exist.
76	 */
77	::com::sun::star::beans::PropertyState getFastPropertyState( [in] long nHandle )
78			raises( ::com::sun::star::beans::UnknownPropertyException );
79
80	//-------------------------------------------------------------------------
81
82	/** @returns
83			a sequence of the states of the properties which are specified
84				by their names.
85
86		<p>The order of the states is correlating to the order of the
87		given property names. </p>
88
89		@param aPropertyNames
90			contains the sequence of property names.
91
92		@throws UnknownPropertyException
93			if one property does not exist.
94	 */
95	sequence< ::com::sun::star::beans::PropertyState > getFastPropertyStates(
96			[in] sequence< long > aHandles )
97		raises( ::com::sun::star::beans::UnknownPropertyException );
98
99	//-------------------------------------------------------------------------
100
101	/** Sets the property to default value.
102
103		<p>The value depends on the implementation of this interface.
104		If it is a bound property, you must change the value before
105		the change events are fired.  If it is a constrained property, you
106		must fire the vetoable event before you change the property value.
107		</p>
108
109		@param aPropertyname
110			specifies the name of the property.
111
112		@throws UnknownPropertyException
113			if the property does not exist.
114	 */
115	void setFastPropertyToDefault( [in] long nHandle )
116			raises( ::com::sun::star::beans::UnknownPropertyException );
117
118	//-------------------------------------------------------------------------
119
120	/** @returns
121			the default value of the property with the name PropertyName.
122
123		<p>If no default exists, is not known or is void,
124		then the return type is <type>void</type>.
125
126		@param aPropertyName
127			specifies the name of the property.
128
129		@throws UnknownPropertyException
130			if the property does not exist.
131
132		@throws  ::com::sun::star::lang::WrappedTargetException
133			if the implementation has an internal reason for the exception.
134			In this case the original exception is wrapped into that
135			<type scope="::com::sun::star::lang">WrappedTargetException</type>.
136	 */
137	any getFastPropertyDefault( [in] long nHandle )
138			raises( ::com::sun::star::beans::UnknownPropertyException,
139					::com::sun::star::lang::WrappedTargetException );
140};
141
142//=============================================================================
143
144}; }; }; };
145
146#endif
147