Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / embed / StorageFactory.idl
blob71446713ab9033e5f5c35c921990a1f2851e708b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef __com_sun_star_embed_StorageFactory_idl__
21 #define __com_sun_star_embed_StorageFactory_idl__
23 #include <com/sun/star/lang/XSingleServiceFactory.idl>
27 module com { module sun { module star { module embed {
29 /** The StorageFactory is a service that allows to create
30 a storage based on either stream or URL.
32 <p>
33 In case
34 com::sun::star::lang::XSingleServiceFactory::createInstance()
35 call is used the result storage will be open in read-write mode based
36 on an arbitrary medium.
37 </p>
39 <p>
40 In case
41 com::sun::star::lang::XSingleServiceFactory::createInstanceWithArguments()
42 call is used a sequence of the following parameters can be used:
43 </p>
45 <dl>
46 <dt>parameter 1</dt>
47 <dd>
48 specifies source of the object, it can be a string
49 containing URL, an
50 com::sun::star::io::XStream
51 implementation or
52 com::sun::star::io::XInputStream;
53 in case of
54 com::sun::star::io::XStream
55 implementation
56 the com::sun::star::io::XSeekable
57 interface must be supported.
58 </dd>
60 <dt>parameter 2</dt>
61 <dd>
62 specifies mode the storage should be open in, can take
63 values from ElementModes constant set.
64 </dd>
66 <dt>parameter 3</dt>
67 <dd>
68 this parameter represents `any` containing a sequence of
69 com::sun::star::beans::PropertyValue.<br>
70 The parameter can contain entries from
71 com::sun::star::document::MediaDescryptor
72 to transport some document info during the storage
73 initialization, it can be for example
74 com::sun::star::task::XInteractionHandler
75 implementation, password for the storage and repair
76 package flag.<br>
77 Additionally the parameter might contain property with the name
78 "StorageFormat" that can take values from
79 com::sun::star::embed::StorageFormats.
80 If the property is not provided a storage of package format
81 is created.
82 </dd>
83 </dl>
85 <p>
86 The parameters are optional, that means that sequence can be empty or
87 contain only first parameter, or first and second one. In case
88 no parameters are provided the call works the same way as
89 com::sun::star::lang::XSingleServiceFactory::createInstance().
90 In case only first parameter is provided, the storage is opened in
91 readonly mode.
92 </p>
94 <p>
95 The opened root storage can support read access in addition to
96 specified one.
97 </p>
99 published service StorageFactory
100 : ::com::sun::star::lang::XSingleServiceFactory;
103 }; }; }; };
105 #endif
107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */