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#ifndef __com_sun_star_embed_StorageFactory_idl__
25#define __com_sun_star_embed_StorageFactory_idl__
26
27#ifndef __com_sun_star_lang_XSingleServiceFactory_idl__
28#include <com/sun/star/lang/XSingleServiceFactory.idl>
29#endif
30
31
32//============================================================================
33
34 module com {  module sun {  module star {  module embed {
35
36//============================================================================
37/** The <type>StorageFactory</type> is a service that allows to create
38	a storage based on either stream or URL.
39 */
40published service StorageFactory
41{
42	// ----------------------------------------------------------------------
43	/** A storage can be created through this interface.
44
45		<p>
46		In case
47		<method scope="com::sun::star::lang">XSingleServiceFactory::createInstance</method>
48		call is used the result storage will be open in readwrite mode based
49		on an arbitrary medium.
50		</p>
51
52		<p>
53		In case
54		<method scope="com::sun::star::lang">XSingleServiceFactory::createInstanceWithArguments</method>
55		call is used a sequence of the following parameters can be used:
56		</p>
57
58		<dl>
59			<dt>parameter 1</dt>
60			<dd>
61					  specifies source of the object, it can be a string
62					  containing URL, an
63					  <type scope="com::sun::star::io">XStream</type>
64					  implementation or
65					  <type scope="com::sun::star::io">XInputStream</type>;
66					  in case of
67					  <type scope="com::sun::star::io">XStream</type>
68					  implementation
69					  the <type scope="com::sun::star::io">XSeekable</type>
70					  interface must be supported.
71			</dd>
72
73			<dt>parameter 2</dt>
74			<dd>
75					  specifies mode the storage should be open in, can take
76					  values from <type>ElementModes</type> constant set.
77			</dd>
78
79			<dt>parameter 3</dt>
80			<dd>
81                      this paramenter represents
82					  <type scope="com::sun::star::uno">Any</type>
83                      containing a sequence of
84					  <type scope="com::sun::star::beans">PropertyValue</type>.<br>
85                      The parameter can contain entries from
86					  <type scope="com::sun::star::document">MediaDescryptor</type>
87                      to transport some document info during the storage
88					  initialization, it can be for example
89					  <type scope="com::sun::star::task">XInteractionHandler</type>
90					  implementation, password for the storage and repair
91					  package flag.<br>
92                      Additionaly the parameter might contain property with the name
93                      "StorageFormat" that can take values from
94					  <type scope="com::sun::star::embed">StorageFormats</type>.
95                      If the property is not provided a storage of package format
96                      is created.
97			</dd>
98		</dl>
99
100		<p>
101		The parameters are optional, that means that sequence can be empty or
102		contain only first parameter, or first and second one. In case
103		no parameters are provided the call works the same way as
104		<member scope="com::sun::star::lang">XSingleServiceFactory::createInstance</member>.
105		In case only first parameter is provided, the storage is opened in
106		readonly mode.
107		</p>
108
109		<p>
110		The opened root storage can support read access in addition to
111		specified one.
112		</p>
113	 */
114	interface ::com::sun::star::lang::XSingleServiceFactory;
115};
116
117//============================================================================
118
119}; }; }; };
120
121#endif
122
123