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_XListEntrySource_idl__
25#define __com_sun_star_form_binding_XListEntrySource_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_NullPointerException_idl__
31#include <com/sun/star/lang/NullPointerException.idl>
32#endif
33#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
34#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
35#endif
36
37//=============================================================================
38
39module com {  module sun {  module star {  module form { module binding {
40
41interface XListEntryListener;
42
43//=============================================================================
44
45/** specifies a source of string list entries
46
47    <p>The interface supports foreign components which actively retrieve list entries,
48    as well as components which want to passively being notified of changes in the list.</p>
49
50    @see XListEntrySink
51*/
52interface XListEntrySource : com::sun::star::uno::XInterface
53{
54    /** retrieves the number of entries in the list
55    */
56    long    getListEntryCount( );
57
58    /** provides access to a single list entry
59
60        @throws <type scope="com::sun::star::lang">IndexOutOfBoundsException</type>
61            if the given position does not denote a valid index in the list
62
63        @see getListEntryCount
64    */
65    string  getListEntry( [in] long Position )
66                raises( com::sun::star::lang::IndexOutOfBoundsException );
67
68    /** provides access to the entirety of all list entries
69    */
70    sequence< string >
71            getAllListEntries( );
72
73    /** adds a listener which will be notified about changes in the list
74        reflected by the component.
75
76        @throws <type scope="com::sun::star::lang">NullPointerException</type>
77            if the given listener is <NULL/>
78    */
79    void    addListEntryListener( [in] XListEntryListener Listener )
80                raises( com::sun::star::lang::NullPointerException );
81
82    /** revokes the given listener from the list of components which will
83        be notfiied about changes in the entry list.
84
85        @throws <type scope="com::sun::star::lang">NullPointerException</type>
86            if the given listener is <NULL/>
87    */
88    void    removeListEntryListener( [in] XListEntryListener Listener )
89                raises( com::sun::star::lang::NullPointerException );
90};
91
92//=============================================================================
93
94}; }; }; }; };
95
96#endif
97