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_ui_XUIConfigurationPersistence_idl__
25#define __com_sun_star_ui_XUIConfigurationPersistence_idl__
26
27#ifndef __com_sun_star_embed_XStorage_idl__
28#include <com/sun/star/embed/XStorage.idl>
29#endif
30
31module com { module sun { module star { module ui {
32
33/** specifies a persistence interface which supports to load/store user
34    interface configuration data to a storage and to retrieve information
35    about the current state.
36
37    @since OOo 2.0
38*/
39
40published interface XUIConfigurationPersistence : ::com::sun::star::uno::XInterface
41{
42    /** reloads the configuration data from the storage and reinitialize
43        the user interface configuration manager instance with this data.
44
45        <p>
46        It is up to the implementation if it defers the first loading process
47        until the first data request using <type>XUIConfigurationManager</type>
48        interface.
49        </p>
50    */
51    void reload() raises ( ::com::sun::star::uno::Exception );
52
53    /** stores the configuration data to the storage provided by
54        <member>setStorage</member> from the storage and initialize the
55        user interface configuration manager instance with the newly
56        data. This call can throw an
57        <type scope="com::sun::star::io">IOException</type> if
58        <member>store</member> cannot store its data into the internal
59        storage.
60    */
61    void store() raises ( ::com::sun::star::uno::Exception );
62
63    /** stores the configuration data to the provided storage, ignoring
64        the previously set storage by <member>setStorage</member>. Can
65        be used to make copy of the current user interface configuration
66        data to another storage. This call will throw an
67        <type scope="com::sun::star::io">IOException</type> if the provided
68        storage is in read-only mode.
69
70        @param Storage
71            all configuration data will be stored to this storage.
72    */
73    void storeToStorage( [in] ::com::sun::star::embed::XStorage Storage ) raises ( ::com::sun::star::uno::Exception );
74
75    /** provides the current modify state of the configuration manager
76        instance.
77
78        @return
79            <TRUE/> if the configuration manager has changed since the
80            last <member>store</member> call. <FALSE/> if the configuration
81            manager has not been changed.
82    */
83    boolean isModified();
84
85    /** provides the current read-only state of the user configuration
86        manager. Storing a user interface configuration to a read-only storage
87        is not possible. A read-only configuration manager instance will also
88        not support any changes to its configuration settings.
89
90        @return
91            <TRUE/> if the configuration manager storage is read-only otherwise
92            <FALSE/>.
93    */
94    boolean isReadOnly();
95};
96
97//=============================================================================
98
99}; }; }; };
100
101#endif
102