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
25#ifndef __com_sun_star_script_XStorageBasedLibraryContainer_idl__
26#define __com_sun_star_script_XStorageBasedLibraryContainer_idl__
27
28#ifndef __com_sun_star_embed_XStorage_idl__
29#include <com/sun/star/embed/XStorage.idl>
30#endif
31#ifndef __com_sun_star_script_XPersistentLibraryContainer_idl__
32#include <com/sun/star/script/XPersistentLibraryContainer.idl>
33#endif
34
35//=============================================================================
36
37module com { module sun { module star { module script {
38
39//=============================================================================
40
41/** is the interface for an <type>XLibraryContainer</type> which can be made
42    persistent in an <type scope="com::sun::star::embed">XStorage</type>.
43
44    <p>A persistent library container is associated with a root storage. The
45    container is responsible for a particular sub storage of the root storage,
46    the container storage.</p>
47
48    @since OpenOffice 2.3
49 */
50interface XStorageBasedLibraryContainer
51{
52    interface XPersistentLibraryContainer;
53
54    /** denotes the root storage associated with the container.
55
56        <p>Effectively, this attribute is a typed version of
57        <member>XPersistentLibraryContainer::RootLocation</member>, it's guaranteed
58        that at every time, <code>XPersistentLibraryContainer::RootLocation</code> and
59        <code>RootStorage</code> have the same value.</p>
60
61        <p>You should only <em>set</em> this attribute to a new value if you previously
62        called storeLibrariesToStorage with the same storage. Setting this attribute
63        to a storage into which the container has not been stored previously might
64        result in unexpected behaviour.</p>
65    */
66    [attribute] ::com::sun::star::embed::XStorage RootStorage
67    {
68        set raises ( ::com::sun::star::lang::IllegalArgumentException );
69    };
70
71    /** stores the libraries to a storage other than the current container storage
72
73        <p>Note that the library continer is not automatically associated with the
74        new root storage. Instead, you need to manually set the <type>RootStroage</type>
75        attribute afterwards. This separation allows for Save-To as well Save-As
76        operations.</p>
77
78        @param RootStorage
79            denotes the root storage into which the libraries should be written, which
80            must not be <NULL/>.<br/>
81            Note that the actual libraries are written into a sub storage of this
82            root storage, as usual.
83
84        @throws ::com::sun::star::lang::IllegalArgumentException
85            if the <code>RootStorage</code> parameter is <NULL/>, or equals
86            <member>RootStorage</member>.
87
88        @throws ::com::sun::star::lang::WrappedTargetException
89            if an error occurs during storing.
90    */
91    void    storeLibrariesToStorage( [in] ::com::sun::star::embed::XStorage RootStorage )
92        raises ( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
93};
94
95//=============================================================================
96
97}; }; }; };
98
99//=============================================================================
100
101#endif
102