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
24#ifndef __com_sun_star_form_binding_XValueBinding_idl__
25#define __com_sun_star_form_binding_XValueBinding_idl__
26
27#ifndef __com_sun_star_uno_XInterface_idl__
28#include <com/sun/star/uno/XInterface.idl>
29#endif
30#ifndef __com_sun_star_lang_NoSupportException_idl__
31#include <com/sun/star/lang/NoSupportException.idl>
32#endif
33#ifndef __com_sun_star_form_binding_IncompatibleTypesException_idl__
34#include <com/sun/star/form/binding/IncompatibleTypesException.idl>
35#endif
36#ifndef __com_sun_star_form_binding_InvalidBindingStateException_idl__
37#include <com/sun/star/form/binding/InvalidBindingStateException.idl>
38#endif
39
40//=============================================================================
41
42module com {  module sun {  module star {  module form { module binding {
43
44//=============================================================================
45
46/** specifies a binding to a value which can be read and written.
47*/
48interface XValueBinding : com::sun::star::uno::XInterface
49{
50	//-------------------------------------------------------------------------
51	/** determines the types which are supported by this binding for value exchange
52
53        @see supportsType
54    */
55    sequence< type >
56            getSupportedValueTypes( );
57
58	/** determines whether a given type is supported by this binding for value exchange
59
60        <p>Calling this method is equal to calling <member>getSupportedValueTypes</member>,
61        and looking up the given type in the resulting type sequence.</p>
62
63        @see getSupportedValueTypes
64    */
65    boolean supportsType( [in] type aType );
66
67	/** retrieves the current value
68
69        @throws <type>IncompatibleTypesException</type>
70            if the requested value type is not supported by the binding
71        @see getSupportedValueTypes
72        @see supportsType
73    */
74    any     getValue( [in] type aType )
75                raises( IncompatibleTypesException );
76
77	/** sets the current value
78
79        @throws <type>IncompatibleTypesException</type>
80            if the given value type is not supported by the binding
81        @throws <type>InvalidBindingStateException</type>
82            if the value currently cannot be changed, since the binding is not
83            fully operational. Possible reasons for this include the binding being
84            readonly, or the target of the binding not being present.
85        @throws <type scope="com::sun::star::lang">NoSupportException</type>
86            if the binding in general does not support write access to it's binding
87
88        @see getSupportedValueTypes
89        @see supportsType
90        @see ValueBinding
91    */
92    void    setValue( [in] any aValue )
93                raises( IncompatibleTypesException, InvalidBindingStateException, com::sun::star::lang::NoSupportException );
94};
95
96//=============================================================================
97
98}; }; }; }; };
99
100#endif
101