summaryrefslogtreecommitdiff
path: root/offapi/com/sun/star/embed/Storage.idl
blob: 9d9a61afe673d120a97f61bc7076c68456c3e160 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
/*************************************************************************
 *
 *  $RCSfile: Storage.idl,v $
 *
 *  $Revision: 1.2 $
 *
 *  last change: $Author: kz $ $Date: 2003-09-11 10:23:23 $
 *
 *  The Contents of this file are made available subject to the terms of
 *  either of the following licenses
 *
 *         - GNU Lesser General Public License Version 2.1
 *         - Sun Industry Standards Source License Version 1.1
 *
 *  Sun Microsystems Inc., October, 2000
 *
 *  GNU Lesser General Public License Version 2.1
 *  =============================================
 *  Copyright 2000 by Sun Microsystems, Inc.
 *  901 San Antonio Road, Palo Alto, CA 94303, USA
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License version 2.1, as published by the Free Software Foundation.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 *  MA  02111-1307  USA
 *
 *
 *  Sun Industry Standards Source License Version 1.1
 *  =================================================
 *  The contents of this file are subject to the Sun Industry Standards
 *  Source License Version 1.1 (the "License"); You may not use this file
 *  except in compliance with the License. You may obtain a copy of the
 *  License at http://www.openoffice.org/license.html.
 *
 *  Software provided under this License is provided on an "AS IS" basis,
 *  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
 *  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
 *  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
 *  See the License for the specific provisions governing your rights and
 *  obligations concerning the Software.
 *
 *  The Initial Developer of the Original Code is: Sun Microsystems, Inc.
 *
 *  Copyright: 2000 by Sun Microsystems, Inc.
 *
 *  All Rights Reserved.
 *
 *  Contributor(s): _______________________________________
 *
 *
 ************************************************************************/

#ifndef __com_sun_star_embed_Storage_idl__
#define __com_sun_star_embed_Storage_idl__

#ifndef __com_sun_star_embed_XStorage_idl__
#include <com/sun/star/embed/XStorage.idl>
#endif

#ifndef __com_sun_star_embed_XEncryptionProtectedSource_idl__
#include <com/sun/star/embed/XEncryptionProtectedSource.idl>
#endif

#ifndef __com_sun_star_embed_XTransactedObject_idl__
#include <com/sun/star/embed/XTransactedObject.idl>
#endif

#ifndef __com_sun_star_embed_XTransactionBroadcaster_idl__
#include <com/sun/star/embed/XTransactionBroadcaster.idl>
#endif

#ifndef __com_sun_star_util_XModifiable_idl__
#include <com/sun/star/util/XModifiable.idl>
#endif

#ifndef __com_sun_star_container_XNameAccess_idl__
#include <com/sun/star/container/XNameAccess.idl>
#endif

#ifndef __com_sun_star_lang_XComponent_idl__
#include <com/sun/star/lang/XComponent.idl>
#endif

#ifndef __com_sun_star_beans_XPropertySet_idl__
#include <com/sun/star/beans/XPropertySet.idl>
#endif


//=============================================================================

 module com {  module sun {  module star {  module embed {

//=============================================================================
/**  The <type>Storage</type> is a service that allows to get access to
a storage hierarchy. A root storage should be retrieved by <type>ServiceFactory</type>
service. Substorages are created by <type>XStorage</type> interface of a parent storage.
 */
service Storage
{
    //================================================================
    /** This is a general interface representing storage functionality.
    It allows to copy storages, get access to child elements and etc.
     */
    interface ::com::sun::star::embed::XStorage;

    //================================================================
    /** Allow to get list of child elements and to check if an element with a
    specified name exists in a storage.
    <p>
    It is also possible to use this interface to get read access to a child
    element by <type>XNameAccess</type>::getByName() call. But the recommended way is to
    use <type>XStorage</type> interface for this purpose.
    </p>
     */
    interface ::com::sun::star::container::XNameAccess;

    //================================================================
    /** Allows to controll and track lifetime of a storage.
    <p>
        A root storage is created by <type>StorageFactory</type> and is controlled by
    refcounting. In case refcounting is decreased to zero the storage will be disposed
    automatically. It is still strongly recommended that a root storage is disposed explicitly
    since in garbage collector based languages the refcounting can be decreased too late
    and resources locked by the storage will not be freed until then.
    </p>

    <p>
        A substorage is created by <type>XStorage</type> interface of storage. Only one
    instance in a time can be created. It means that in case such a substorage is open
    it is not possible to open it another time untill existing instance is disposed. The
    lifetime of substorage is also controlled by refcounting but because of mentioned
    garbage collection specific it is strongly recommended to dispose substorages explicitly.
    </p>

    <p>
        In case a storage is disposed the whole it's subtree will be disposed.
    All noncommited changes will be lost. Of course in case storage implements autocommit
    mode the changes will be commited automatically.
    </p>

    <p>
        In case a storage is disposed any call to it's methods should result in <type>DisposedException</type>.
    </p>
     */
    interface ::com::sun::star::lang::XComponent;

    //================================================================
    /** Allows to get access to storage properties.
     */
    interface ::com::sun::star::beans::XPropertySet;

    //================================================================
    /** Supporting of this interface means that the storage must be used in transacted mode.
    <p>
        If a storage is commited all changes made to it will be integrated to it's parent
    storage. This is recursive process, so the last commited storage should be the root one.
    For the package based storages commit of a root storage also means flashing to the related medium.
    If a storage is not commited, no changes for it or it's child elements will be stored.
    </p>
    <p>
        In case storage does not support this interface an autocommit mode is used.
    That means that all the changes are immediatelly integrated to the parent storage.
    </p>
     */
    [optional]
    interface ::com::sun::star::embed::XTransactedObject;

    //================================================================
    /** Transacted storage can support this interface to allow to track it's transaction state.
     */
    [optional]
    interface ::com::sun::star::embed::XTransactionBroadcaster;

    //================================================================
    /** Allows to set encryption key to a root storage.

    <p>
        This interface can be supported by a storage to allow to set
    a common storage encryption key. This key is used as default key
    to decrypt all encrypted streams and encrypt all the streams that
    must be encrypted on storing.
        Specifying of the key for a storage allows to use it for the
    whole subtree. Of course substorage can allow to overwrite the common
    storage key for own subtree.
    </p>
     */
    [optional]
    interface ::com::sun::star::embed::XEncryptionProtectedSource;

    //================================================================
    /** Allows to get and set the media type of the storage.
     */
    [property] string MediaType;

    //================================================================
    /** Allows to detect if the storage is a root one.
     */
    [property, readonly] boolean IsRoot;

    //================================================================
    /** Allows to get the mode the storage is open in.
    <p>
        Can be a combination of values from <type>ElementModes</type>.
    </p>
     */
    [property, readonly] long OpenMode;

    //================================================================
    /** Optional readonly property that can be supported by storage.
    <p>
        This property allows to retrieve URL the storage is based on.
    </p>
     */
    [property, optional, readonly] string URL;

    //================================================================
    /** Optional readonly property that can be supported by storage.
    <p>
        Allows to detect whether storage is open in "repair package" mode or not.
    </p>
     */
    [property, optional, readonly] boolean RepairPackage;

    //================================================================
    /** Optional readonly property that can be supported by storage.
    <p>
        In case it is set to <TRUE/> the storage itself and/or a tree of substorages
    contain encrypted streams.
        Usually in case this property is supported the implementation supports
    <type>XEncryptionProtectedSource</type> interface.
    </p>
     */
    [property, optional, readonly] boolean HasEncryptedEntries;

};

//=============================================================================

}; }; }; };

#endif