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