1*b1cdbd2cSJim Jagielski/**************************************************************
2*b1cdbd2cSJim Jagielski *
3*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one
4*b1cdbd2cSJim Jagielski * or more contributor license agreements.  See the NOTICE file
5*b1cdbd2cSJim Jagielski * distributed with this work for additional information
6*b1cdbd2cSJim Jagielski * regarding copyright ownership.  The ASF licenses this file
7*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the
8*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance
9*b1cdbd2cSJim Jagielski * with the License.  You may obtain a copy of the License at
10*b1cdbd2cSJim Jagielski *
11*b1cdbd2cSJim Jagielski *   http://www.apache.org/licenses/LICENSE-2.0
12*b1cdbd2cSJim Jagielski *
13*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing,
14*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an
15*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b1cdbd2cSJim Jagielski * KIND, either express or implied.  See the License for the
17*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations
18*b1cdbd2cSJim Jagielski * under the License.
19*b1cdbd2cSJim Jagielski *
20*b1cdbd2cSJim Jagielski *************************************************************/
21*b1cdbd2cSJim Jagielski
22*b1cdbd2cSJim Jagielski
23*b1cdbd2cSJim Jagielski
24*b1cdbd2cSJim Jagielski
25*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_script_XStorageBasedLibraryContainer_idl__
26*b1cdbd2cSJim Jagielski#define __com_sun_star_script_XStorageBasedLibraryContainer_idl__
27*b1cdbd2cSJim Jagielski
28*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_embed_XStorage_idl__
29*b1cdbd2cSJim Jagielski#include <com/sun/star/embed/XStorage.idl>
30*b1cdbd2cSJim Jagielski#endif
31*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_script_XPersistentLibraryContainer_idl__
32*b1cdbd2cSJim Jagielski#include <com/sun/star/script/XPersistentLibraryContainer.idl>
33*b1cdbd2cSJim Jagielski#endif
34*b1cdbd2cSJim Jagielski
35*b1cdbd2cSJim Jagielski//=============================================================================
36*b1cdbd2cSJim Jagielski
37*b1cdbd2cSJim Jagielskimodule com { module sun { module star { module script {
38*b1cdbd2cSJim Jagielski
39*b1cdbd2cSJim Jagielski//=============================================================================
40*b1cdbd2cSJim Jagielski
41*b1cdbd2cSJim Jagielski/** is the interface for an <type>XLibraryContainer</type> which can be made
42*b1cdbd2cSJim Jagielski    persistent in an <type scope="com::sun::star::embed">XStorage</type>.
43*b1cdbd2cSJim Jagielski
44*b1cdbd2cSJim Jagielski    <p>A persistent library container is associated with a root storage. The
45*b1cdbd2cSJim Jagielski    container is responsible for a particular sub storage of the root storage,
46*b1cdbd2cSJim Jagielski    the container storage.</p>
47*b1cdbd2cSJim Jagielski
48*b1cdbd2cSJim Jagielski    @since OpenOffice 2.3
49*b1cdbd2cSJim Jagielski */
50*b1cdbd2cSJim Jagielskiinterface XStorageBasedLibraryContainer
51*b1cdbd2cSJim Jagielski{
52*b1cdbd2cSJim Jagielski    interface XPersistentLibraryContainer;
53*b1cdbd2cSJim Jagielski
54*b1cdbd2cSJim Jagielski    /** denotes the root storage associated with the container.
55*b1cdbd2cSJim Jagielski
56*b1cdbd2cSJim Jagielski        <p>Effectively, this attribute is a typed version of
57*b1cdbd2cSJim Jagielski        <member>XPersistentLibraryContainer::RootLocation</member>, it's guaranteed
58*b1cdbd2cSJim Jagielski        that at every time, <code>XPersistentLibraryContainer::RootLocation</code> and
59*b1cdbd2cSJim Jagielski        <code>RootStorage</code> have the same value.</p>
60*b1cdbd2cSJim Jagielski
61*b1cdbd2cSJim Jagielski        <p>You should only <em>set</em> this attribute to a new value if you previously
62*b1cdbd2cSJim Jagielski        called storeLibrariesToStorage with the same storage. Setting this attribute
63*b1cdbd2cSJim Jagielski        to a storage into which the container has not been stored previously might
64*b1cdbd2cSJim Jagielski        result in unexpected behaviour.</p>
65*b1cdbd2cSJim Jagielski    */
66*b1cdbd2cSJim Jagielski    [attribute] ::com::sun::star::embed::XStorage RootStorage
67*b1cdbd2cSJim Jagielski    {
68*b1cdbd2cSJim Jagielski        set raises ( ::com::sun::star::lang::IllegalArgumentException );
69*b1cdbd2cSJim Jagielski    };
70*b1cdbd2cSJim Jagielski
71*b1cdbd2cSJim Jagielski    /** stores the libraries to a storage other than the current container storage
72*b1cdbd2cSJim Jagielski
73*b1cdbd2cSJim Jagielski        <p>Note that the library continer is not automatically associated with the
74*b1cdbd2cSJim Jagielski        new root storage. Instead, you need to manually set the <type>RootStroage</type>
75*b1cdbd2cSJim Jagielski        attribute afterwards. This separation allows for Save-To as well Save-As
76*b1cdbd2cSJim Jagielski        operations.</p>
77*b1cdbd2cSJim Jagielski
78*b1cdbd2cSJim Jagielski        @param RootStorage
79*b1cdbd2cSJim Jagielski            denotes the root storage into which the libraries should be written, which
80*b1cdbd2cSJim Jagielski            must not be <NULL/>.<br/>
81*b1cdbd2cSJim Jagielski            Note that the actual libraries are written into a sub storage of this
82*b1cdbd2cSJim Jagielski            root storage, as usual.
83*b1cdbd2cSJim Jagielski
84*b1cdbd2cSJim Jagielski        @throws ::com::sun::star::lang::IllegalArgumentException
85*b1cdbd2cSJim Jagielski            if the <code>RootStorage</code> parameter is <NULL/>, or equals
86*b1cdbd2cSJim Jagielski            <member>RootStorage</member>.
87*b1cdbd2cSJim Jagielski
88*b1cdbd2cSJim Jagielski        @throws ::com::sun::star::lang::WrappedTargetException
89*b1cdbd2cSJim Jagielski            if an error occurs during storing.
90*b1cdbd2cSJim Jagielski    */
91*b1cdbd2cSJim Jagielski    void    storeLibrariesToStorage( [in] ::com::sun::star::embed::XStorage RootStorage )
92*b1cdbd2cSJim Jagielski        raises ( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
93*b1cdbd2cSJim Jagielski};
94*b1cdbd2cSJim Jagielski
95*b1cdbd2cSJim Jagielski//=============================================================================
96*b1cdbd2cSJim Jagielski
97*b1cdbd2cSJim Jagielski}; }; }; };
98*b1cdbd2cSJim Jagielski
99*b1cdbd2cSJim Jagielski//=============================================================================
100*b1cdbd2cSJim Jagielski
101*b1cdbd2cSJim Jagielski#endif
102